# Run with `dart run ffigen --config ffigen.yaml`.
name: NativeCupertinoHttp
description: |
  Bindings for the Foundation URL Loading System and supporting libraries.

  Regenerate bindings with `dart run ffigen --config ffigen.yaml`.
language: 'objc'
output:
  bindings: 'lib/src/native_cupertino_bindings.dart'
  objc-bindings: 'src/native_cupertino_bindings.m'
headers:
  entry-points:
    - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLCache.h'
    - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLRequest.h'
    - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLSession.h'
    - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURL.h'
    - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSLock.h'
    - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSProgress.h'
    - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLResponse.h'
    - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSHTTPCookieStorage.h'
    - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSOperation.h'
    - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSError.h'
    - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSDictionary.h'
preamble: |
  // ignore_for_file: always_specify_types
  // ignore_for_file: camel_case_types
  // ignore_for_file: non_constant_identifier_names
  // ignore_for_file: unused_element
  // ignore_for_file: unused_field
  // ignore_for_file: return_of_invalid_type
exclude-all-by-default: true
objc-interfaces:
  include:
    - 'NSCondition'
    - 'NSHTTPURLResponse'
    - 'NSMutableURLRequest'
    - 'NSOperationQueue'
    - 'NSURLCache'
    - 'NSURLRequest'
    - 'NSURLResponse'
    - 'NSURLSession'
    - 'NSURLSessionConfiguration'
    - 'NSURLSessionDownloadTask'
    - 'NSURLSessionTask'
    - 'NSURLSessionWebSocketMessage'
    - 'NSURLSessionWebSocketTask'
  member-rename:
    # TODO(brianquinlan): Remove this when
    # https://github.com/dart-lang/native/issues/2419 is fixed.
    'NSURLResponse':
      'initWithURL:MIMEType:expectedContentLength:textEncodingName:': 'initWithUrlAndMIMEType'
    'NSHTTPURLResponse':
      'initWithURL:statusCode:HTTPVersion:headerFields:': 'initWithURLAndStatusCode'
objc-protocols:
  include:
    - 'NSURLSessionDataDelegate'
    - 'NSURLSessionDownloadDelegate'
    - 'NSURLSessionWebSocketDelegate'
comments:
  style: any
  length: full
enums:
  include:
    - 'NSHTTPCookieAcceptPolicy'
    - 'NSURLRequestCachePolicy'
    - 'NSURLRequestNetworkServiceType'
    - 'NSURLSessionMultipathServiceType'
    - 'NSURLSessionResponseDisposition'
    - 'NSURLSessionTaskState'
    - 'NSURLSessionWebSocketMessageType'
  as-int: 
    include:
      - 'NSURLSessionWebSocketCloseCode'
