mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-18 05:18:39 +08:00

* feat(tns-platform-declarations): Generate iOS typings from iOS 12.1 SDK * Instructions for generating iOS typescript definitions * Refactor `typings-gen.sh` to use {N} CLI and generate fuller metadata for the system libraries * Automatically generate `ios.d.ts` wrapper * Add interop pointers and references as alternatives to `string` for `char*` args (implemented in https://github.com/NativeScript/ios-runtime/pull/1022) BREAKING CHANGE: Several enum values have changed because they have been wrongly generated. To migrate your app or plugin code use the new names of the following: * enum NSUnderlineStyle: - `StyleNone` -> `None` - `StyleSingle` -> `Single` - `StyleThick` -> `Thick` - `StyleDouble` -> `Double` * enum AVAudioSessionErrorCode: - `CodeNone` -> `None` - `CodeMediaServicesFailed` -> `MediaServicesFailed` - `CodeIsBusy` -> `IsBusy` - `CodeIncompatibleCategory` -> `IncompatibleCategory` - `CodeCannotInterruptOthers` -> `CannotInterruptOthers` - `CodeMissingEntitlement` -> `MissingEntitlement` - `CodeSiriIsRecording` -> `SiriIsRecording` - `CodeCannotStartPlaying` -> `CannotStartPlaying` - `CodeCannotStartRecording` -> `CannotStartRecording` - `CodeBadParam` -> `BadParam` - `CodeResourceNotAvailable` -> `ResourceNotAvailable` - `CodeUnspecified` -> `Unspecified` * fix(ui/text-base): Update NSUnderlineStyle.StyleSingle constant After the typings regeneration its and several others' names have changed to the expected `NSUnderlineStyle.Single`. * fix(tns-platform-declarations): Restore deprecated enum values In order to not introduce a breaking change in a patch version, we are keeping `Style...` and `Code...` values that have been wrongly generated till now. In the next major/minor release of the package when the typings are regenerated we can safely remove them. Revert to using the deprecated one's in `text-base.ios.ts` so that the introduction of this breaking change doesn't slip in undetected. * fix(application.ios): Directly call presetnNativeScriptApp We've been using `performSelectorWithObject` but it's declaration has been manually added. Moreover it's more convenient to directly call the method.
599 lines
21 KiB
TypeScript
599 lines
21 KiB
TypeScript
|
|
interface OS_nw_advertise_descriptor extends NSObjectProtocol {
|
|
}
|
|
declare var OS_nw_advertise_descriptor: {
|
|
|
|
prototype: OS_nw_advertise_descriptor;
|
|
};
|
|
|
|
interface OS_nw_connection extends NSObjectProtocol {
|
|
}
|
|
declare var OS_nw_connection: {
|
|
|
|
prototype: OS_nw_connection;
|
|
};
|
|
|
|
interface OS_nw_content_context extends NSObjectProtocol {
|
|
}
|
|
declare var OS_nw_content_context: {
|
|
|
|
prototype: OS_nw_content_context;
|
|
};
|
|
|
|
interface OS_nw_endpoint extends NSObjectProtocol {
|
|
}
|
|
declare var OS_nw_endpoint: {
|
|
|
|
prototype: OS_nw_endpoint;
|
|
};
|
|
|
|
interface OS_nw_error extends NSObjectProtocol {
|
|
}
|
|
declare var OS_nw_error: {
|
|
|
|
prototype: OS_nw_error;
|
|
};
|
|
|
|
interface OS_nw_interface extends NSObjectProtocol {
|
|
}
|
|
declare var OS_nw_interface: {
|
|
|
|
prototype: OS_nw_interface;
|
|
};
|
|
|
|
interface OS_nw_listener extends NSObjectProtocol {
|
|
}
|
|
declare var OS_nw_listener: {
|
|
|
|
prototype: OS_nw_listener;
|
|
};
|
|
|
|
interface OS_nw_object extends NSObjectProtocol {
|
|
}
|
|
declare var OS_nw_object: {
|
|
|
|
prototype: OS_nw_object;
|
|
};
|
|
|
|
interface OS_nw_parameters extends NSObjectProtocol {
|
|
}
|
|
declare var OS_nw_parameters: {
|
|
|
|
prototype: OS_nw_parameters;
|
|
};
|
|
|
|
interface OS_nw_path extends NSObjectProtocol {
|
|
}
|
|
declare var OS_nw_path: {
|
|
|
|
prototype: OS_nw_path;
|
|
};
|
|
|
|
interface OS_nw_path_monitor extends NSObjectProtocol {
|
|
}
|
|
declare var OS_nw_path_monitor: {
|
|
|
|
prototype: OS_nw_path_monitor;
|
|
};
|
|
|
|
interface OS_nw_protocol_definition extends NSObjectProtocol {
|
|
}
|
|
declare var OS_nw_protocol_definition: {
|
|
|
|
prototype: OS_nw_protocol_definition;
|
|
};
|
|
|
|
interface OS_nw_protocol_metadata extends NSObjectProtocol {
|
|
}
|
|
declare var OS_nw_protocol_metadata: {
|
|
|
|
prototype: OS_nw_protocol_metadata;
|
|
};
|
|
|
|
interface OS_nw_protocol_options extends NSObjectProtocol {
|
|
}
|
|
declare var OS_nw_protocol_options: {
|
|
|
|
prototype: OS_nw_protocol_options;
|
|
};
|
|
|
|
interface OS_nw_protocol_stack extends NSObjectProtocol {
|
|
}
|
|
declare var OS_nw_protocol_stack: {
|
|
|
|
prototype: OS_nw_protocol_stack;
|
|
};
|
|
|
|
declare var _nw_connection_send_idempotent_content: (p1: NSObject) => void;
|
|
|
|
declare var _nw_content_context_default_message: NSObject;
|
|
|
|
declare var _nw_content_context_default_stream: NSObject;
|
|
|
|
declare var _nw_content_context_final_send: NSObject;
|
|
|
|
declare var _nw_parameters_configure_protocol_default_configuration: (p1: NSObject) => void;
|
|
|
|
declare var _nw_parameters_configure_protocol_disable: (p1: NSObject) => void;
|
|
|
|
declare var kNWErrorDomainDNS: string;
|
|
|
|
declare var kNWErrorDomainPOSIX: string;
|
|
|
|
declare var kNWErrorDomainTLS: string;
|
|
|
|
declare function nw_advertise_descriptor_create_bonjour_service(name: string, type: string, domain: string): NSObject;
|
|
|
|
declare function nw_advertise_descriptor_get_no_auto_rename(advertise_descriptor: NSObject): boolean;
|
|
|
|
declare function nw_advertise_descriptor_set_no_auto_rename(advertise_descriptor: NSObject, no_auto_rename: boolean): void;
|
|
|
|
declare function nw_advertise_descriptor_set_txt_record(advertise_descriptor: NSObject, txt_record: interop.Pointer | interop.Reference<any>, txt_length: number): void;
|
|
|
|
declare function nw_connection_batch(connection: NSObject, batch_block: () => void): void;
|
|
|
|
declare function nw_connection_cancel(connection: NSObject): void;
|
|
|
|
declare function nw_connection_cancel_current_endpoint(connection: NSObject): void;
|
|
|
|
declare function nw_connection_copy_current_path(connection: NSObject): NSObject;
|
|
|
|
declare function nw_connection_copy_description(connection: NSObject): string;
|
|
|
|
declare function nw_connection_copy_endpoint(connection: NSObject): NSObject;
|
|
|
|
declare function nw_connection_copy_parameters(connection: NSObject): NSObject;
|
|
|
|
declare function nw_connection_copy_protocol_metadata(connection: NSObject, definition: NSObject): NSObject;
|
|
|
|
declare function nw_connection_create(endpoint: NSObject, parameters: NSObject): NSObject;
|
|
|
|
declare function nw_connection_force_cancel(connection: NSObject): void;
|
|
|
|
declare function nw_connection_get_maximum_datagram_size(connection: NSObject): number;
|
|
|
|
declare function nw_connection_receive(connection: NSObject, minimum_incomplete_length: number, maximum_length: number, completion: (p1: NSObject, p2: NSObject, p3: boolean, p4: NSObject) => void): void;
|
|
|
|
declare function nw_connection_receive_message(connection: NSObject, completion: (p1: NSObject, p2: NSObject, p3: boolean, p4: NSObject) => void): void;
|
|
|
|
declare function nw_connection_restart(connection: NSObject): void;
|
|
|
|
declare function nw_connection_send(connection: NSObject, content: NSObject, context: NSObject, is_complete: boolean, completion: (p1: NSObject) => void): void;
|
|
|
|
declare function nw_connection_set_better_path_available_handler(connection: NSObject, handler: (p1: boolean) => void): void;
|
|
|
|
declare function nw_connection_set_path_changed_handler(connection: NSObject, handler: (p1: NSObject) => void): void;
|
|
|
|
declare function nw_connection_set_queue(connection: NSObject, queue: NSObject): void;
|
|
|
|
declare function nw_connection_set_state_changed_handler(connection: NSObject, handler: (p1: nw_connection_state_t, p2: NSObject) => void): void;
|
|
|
|
declare function nw_connection_set_viability_changed_handler(connection: NSObject, handler: (p1: boolean) => void): void;
|
|
|
|
declare function nw_connection_start(connection: NSObject): void;
|
|
|
|
declare const enum nw_connection_state_t {
|
|
|
|
nw_connection_state_invalid = 0,
|
|
|
|
nw_connection_state_waiting = 1,
|
|
|
|
nw_connection_state_preparing = 2,
|
|
|
|
nw_connection_state_ready = 3,
|
|
|
|
nw_connection_state_failed = 4,
|
|
|
|
nw_connection_state_cancelled = 5
|
|
}
|
|
|
|
declare function nw_content_context_copy_antecedent(context: NSObject): NSObject;
|
|
|
|
declare function nw_content_context_copy_protocol_metadata(context: NSObject, protocol: NSObject): NSObject;
|
|
|
|
declare function nw_content_context_create(context_identifier: string): NSObject;
|
|
|
|
declare function nw_content_context_foreach_protocol_metadata(context: NSObject, foreach_block: (p1: NSObject, p2: NSObject) => void): void;
|
|
|
|
declare function nw_content_context_get_expiration_milliseconds(context: NSObject): number;
|
|
|
|
declare function nw_content_context_get_identifier(context: NSObject): string;
|
|
|
|
declare function nw_content_context_get_is_final(context: NSObject): boolean;
|
|
|
|
declare function nw_content_context_get_relative_priority(context: NSObject): number;
|
|
|
|
declare function nw_content_context_set_antecedent(context: NSObject, antecendent_context: NSObject): void;
|
|
|
|
declare function nw_content_context_set_expiration_milliseconds(context: NSObject, expiration_milliseconds: number): void;
|
|
|
|
declare function nw_content_context_set_is_final(context: NSObject, is_final: boolean): void;
|
|
|
|
declare function nw_content_context_set_metadata_for_protocol(context: NSObject, protocol_metadata: NSObject): void;
|
|
|
|
declare function nw_content_context_set_relative_priority(context: NSObject, relative_priority: number): void;
|
|
|
|
declare function nw_endpoint_copy_address_string(endpoint: NSObject): string;
|
|
|
|
declare function nw_endpoint_copy_port_string(endpoint: NSObject): string;
|
|
|
|
declare function nw_endpoint_create_address(address: interop.Pointer | interop.Reference<sockaddr>): NSObject;
|
|
|
|
declare function nw_endpoint_create_bonjour_service(name: string, type: string, domain: string): NSObject;
|
|
|
|
declare function nw_endpoint_create_host(hostname: string, port: string): NSObject;
|
|
|
|
declare function nw_endpoint_get_address(endpoint: NSObject): interop.Pointer | interop.Reference<sockaddr>;
|
|
|
|
declare function nw_endpoint_get_bonjour_service_domain(endpoint: NSObject): string;
|
|
|
|
declare function nw_endpoint_get_bonjour_service_name(endpoint: NSObject): string;
|
|
|
|
declare function nw_endpoint_get_bonjour_service_type(endpoint: NSObject): string;
|
|
|
|
declare function nw_endpoint_get_hostname(endpoint: NSObject): string;
|
|
|
|
declare function nw_endpoint_get_port(endpoint: NSObject): number;
|
|
|
|
declare function nw_endpoint_get_type(endpoint: NSObject): nw_endpoint_type_t;
|
|
|
|
declare const enum nw_endpoint_type_t {
|
|
|
|
nw_endpoint_type_invalid = 0,
|
|
|
|
nw_endpoint_type_address = 1,
|
|
|
|
nw_endpoint_type_host = 2,
|
|
|
|
nw_endpoint_type_bonjour_service = 3
|
|
}
|
|
|
|
declare function nw_error_copy_cf_error(error: NSObject): interop.Unmanaged<NSError>;
|
|
|
|
declare const enum nw_error_domain_t {
|
|
|
|
nw_error_domain_invalid = 0,
|
|
|
|
nw_error_domain_posix = 1,
|
|
|
|
nw_error_domain_dns = 2,
|
|
|
|
nw_error_domain_tls = 3
|
|
}
|
|
|
|
declare function nw_error_get_error_code(error: NSObject): number;
|
|
|
|
declare function nw_error_get_error_domain(error: NSObject): nw_error_domain_t;
|
|
|
|
declare function nw_interface_get_index(interface: NSObject): number;
|
|
|
|
declare function nw_interface_get_name(interface: NSObject): string;
|
|
|
|
declare function nw_interface_get_type(interface: NSObject): nw_interface_type_t;
|
|
|
|
declare const enum nw_interface_type_t {
|
|
|
|
nw_interface_type_other = 0,
|
|
|
|
nw_interface_type_wifi = 1,
|
|
|
|
nw_interface_type_cellular = 2,
|
|
|
|
nw_interface_type_wired = 3,
|
|
|
|
nw_interface_type_loopback = 4
|
|
}
|
|
|
|
declare function nw_ip_create_metadata(): NSObject;
|
|
|
|
declare const enum nw_ip_ecn_flag_t {
|
|
|
|
nw_ip_ecn_flag_non_ect = 0,
|
|
|
|
nw_ip_ecn_flag_ect_0 = 2,
|
|
|
|
nw_ip_ecn_flag_ect_1 = 1,
|
|
|
|
nw_ip_ecn_flag_ce = 3
|
|
}
|
|
|
|
declare function nw_ip_metadata_get_ecn_flag(metadata: NSObject): nw_ip_ecn_flag_t;
|
|
|
|
declare function nw_ip_metadata_get_receive_time(metadata: NSObject): number;
|
|
|
|
declare function nw_ip_metadata_get_service_class(metadata: NSObject): nw_service_class_t;
|
|
|
|
declare function nw_ip_metadata_set_ecn_flag(metadata: NSObject, ecn_flag: nw_ip_ecn_flag_t): void;
|
|
|
|
declare function nw_ip_metadata_set_service_class(metadata: NSObject, service_class: nw_service_class_t): void;
|
|
|
|
declare function nw_ip_options_set_calculate_receive_time(options: NSObject, calculate_receive_time: boolean): void;
|
|
|
|
declare function nw_ip_options_set_disable_fragmentation(options: NSObject, disable_fragmentation: boolean): void;
|
|
|
|
declare function nw_ip_options_set_hop_limit(options: NSObject, hop_limit: number): void;
|
|
|
|
declare function nw_ip_options_set_use_minimum_mtu(options: NSObject, use_minimum_mtu: boolean): void;
|
|
|
|
declare function nw_ip_options_set_version(options: NSObject, version: nw_ip_version_t): void;
|
|
|
|
declare const enum nw_ip_version_t {
|
|
|
|
nw_ip_version_any = 0,
|
|
|
|
nw_ip_version_4 = 4,
|
|
|
|
nw_ip_version_6 = 6
|
|
}
|
|
|
|
declare function nw_listener_cancel(listener: NSObject): void;
|
|
|
|
declare function nw_listener_create(parameters: NSObject): NSObject;
|
|
|
|
declare function nw_listener_create_with_connection(connection: NSObject, parameters: NSObject): NSObject;
|
|
|
|
declare function nw_listener_create_with_port(port: string, parameters: NSObject): NSObject;
|
|
|
|
declare function nw_listener_get_port(listener: NSObject): number;
|
|
|
|
declare function nw_listener_set_advertise_descriptor(listener: NSObject, advertise_descriptor: NSObject): void;
|
|
|
|
declare function nw_listener_set_advertised_endpoint_changed_handler(listener: NSObject, handler: (p1: NSObject, p2: boolean) => void): void;
|
|
|
|
declare function nw_listener_set_new_connection_handler(listener: NSObject, handler: (p1: NSObject) => void): void;
|
|
|
|
declare function nw_listener_set_queue(listener: NSObject, queue: NSObject): void;
|
|
|
|
declare function nw_listener_set_state_changed_handler(listener: NSObject, handler: (p1: nw_listener_state_t, p2: NSObject) => void): void;
|
|
|
|
declare function nw_listener_start(listener: NSObject): void;
|
|
|
|
declare const enum nw_listener_state_t {
|
|
|
|
nw_listener_state_invalid = 0,
|
|
|
|
nw_listener_state_waiting = 1,
|
|
|
|
nw_listener_state_ready = 2,
|
|
|
|
nw_listener_state_failed = 3,
|
|
|
|
nw_listener_state_cancelled = 4
|
|
}
|
|
|
|
declare const enum nw_multipath_service_t {
|
|
|
|
nw_multipath_service_disabled = 0,
|
|
|
|
nw_multipath_service_handover = 1,
|
|
|
|
nw_multipath_service_interactive = 2,
|
|
|
|
nw_multipath_service_aggregate = 3
|
|
}
|
|
|
|
declare function nw_parameters_clear_prohibited_interface_types(parameters: NSObject): void;
|
|
|
|
declare function nw_parameters_clear_prohibited_interfaces(parameters: NSObject): void;
|
|
|
|
declare function nw_parameters_copy(parameters: NSObject): NSObject;
|
|
|
|
declare function nw_parameters_copy_default_protocol_stack(parameters: NSObject): NSObject;
|
|
|
|
declare function nw_parameters_copy_local_endpoint(parameters: NSObject): NSObject;
|
|
|
|
declare function nw_parameters_copy_required_interface(parameters: NSObject): NSObject;
|
|
|
|
declare function nw_parameters_create(): NSObject;
|
|
|
|
declare function nw_parameters_create_secure_tcp(configure_tls: (p1: NSObject) => void, configure_tcp: (p1: NSObject) => void): NSObject;
|
|
|
|
declare function nw_parameters_create_secure_udp(configure_dtls: (p1: NSObject) => void, configure_udp: (p1: NSObject) => void): NSObject;
|
|
|
|
declare const enum nw_parameters_expired_dns_behavior_t {
|
|
|
|
nw_parameters_expired_dns_behavior_default = 0,
|
|
|
|
nw_parameters_expired_dns_behavior_allow = 1,
|
|
|
|
nw_parameters_expired_dns_behavior_prohibit = 2
|
|
}
|
|
|
|
declare function nw_parameters_get_expired_dns_behavior(parameters: NSObject): nw_parameters_expired_dns_behavior_t;
|
|
|
|
declare function nw_parameters_get_fast_open_enabled(parameters: NSObject): boolean;
|
|
|
|
declare function nw_parameters_get_include_peer_to_peer(parameters: NSObject): boolean;
|
|
|
|
declare function nw_parameters_get_local_only(parameters: NSObject): boolean;
|
|
|
|
declare function nw_parameters_get_multipath_service(parameters: NSObject): nw_multipath_service_t;
|
|
|
|
declare function nw_parameters_get_prefer_no_proxy(parameters: NSObject): boolean;
|
|
|
|
declare function nw_parameters_get_prohibit_expensive(parameters: NSObject): boolean;
|
|
|
|
declare function nw_parameters_get_required_interface_type(parameters: NSObject): nw_interface_type_t;
|
|
|
|
declare function nw_parameters_get_reuse_local_address(parameters: NSObject): boolean;
|
|
|
|
declare function nw_parameters_get_service_class(parameters: NSObject): nw_service_class_t;
|
|
|
|
declare function nw_parameters_iterate_prohibited_interface_types(parameters: NSObject, iterate_block: (p1: nw_interface_type_t) => boolean): void;
|
|
|
|
declare function nw_parameters_iterate_prohibited_interfaces(parameters: NSObject, iterate_block: (p1: NSObject) => boolean): void;
|
|
|
|
declare function nw_parameters_prohibit_interface(parameters: NSObject, interface: NSObject): void;
|
|
|
|
declare function nw_parameters_prohibit_interface_type(parameters: NSObject, interface_type: nw_interface_type_t): void;
|
|
|
|
declare function nw_parameters_require_interface(parameters: NSObject, interface: NSObject): void;
|
|
|
|
declare function nw_parameters_set_expired_dns_behavior(parameters: NSObject, expired_dns_behavior: nw_parameters_expired_dns_behavior_t): void;
|
|
|
|
declare function nw_parameters_set_fast_open_enabled(parameters: NSObject, fast_open_enabled: boolean): void;
|
|
|
|
declare function nw_parameters_set_include_peer_to_peer(parameters: NSObject, include_peer_to_peer: boolean): void;
|
|
|
|
declare function nw_parameters_set_local_endpoint(parameters: NSObject, local_endpoint: NSObject): void;
|
|
|
|
declare function nw_parameters_set_local_only(parameters: NSObject, local_only: boolean): void;
|
|
|
|
declare function nw_parameters_set_multipath_service(parameters: NSObject, multipath_service: nw_multipath_service_t): void;
|
|
|
|
declare function nw_parameters_set_prefer_no_proxy(parameters: NSObject, prefer_no_proxy: boolean): void;
|
|
|
|
declare function nw_parameters_set_prohibit_expensive(parameters: NSObject, prohibit_expensive: boolean): void;
|
|
|
|
declare function nw_parameters_set_required_interface_type(parameters: NSObject, interface_type: nw_interface_type_t): void;
|
|
|
|
declare function nw_parameters_set_reuse_local_address(parameters: NSObject, reuse_local_address: boolean): void;
|
|
|
|
declare function nw_parameters_set_service_class(parameters: NSObject, service_class: nw_service_class_t): void;
|
|
|
|
declare function nw_path_copy_effective_local_endpoint(path: NSObject): NSObject;
|
|
|
|
declare function nw_path_copy_effective_remote_endpoint(path: NSObject): NSObject;
|
|
|
|
declare function nw_path_enumerate_interfaces(path: NSObject, enumerate_block: (p1: NSObject) => boolean): void;
|
|
|
|
declare function nw_path_get_status(path: NSObject): nw_path_status_t;
|
|
|
|
declare function nw_path_has_dns(path: NSObject): boolean;
|
|
|
|
declare function nw_path_has_ipv4(path: NSObject): boolean;
|
|
|
|
declare function nw_path_has_ipv6(path: NSObject): boolean;
|
|
|
|
declare function nw_path_is_equal(path: NSObject, other_path: NSObject): boolean;
|
|
|
|
declare function nw_path_is_expensive(path: NSObject): boolean;
|
|
|
|
declare function nw_path_monitor_cancel(monitor: NSObject): void;
|
|
|
|
declare function nw_path_monitor_create(): NSObject;
|
|
|
|
declare function nw_path_monitor_create_with_type(required_interface_type: nw_interface_type_t): NSObject;
|
|
|
|
declare function nw_path_monitor_set_cancel_handler(monitor: NSObject, cancel_handler: () => void): void;
|
|
|
|
declare function nw_path_monitor_set_queue(monitor: NSObject, queue: NSObject): void;
|
|
|
|
declare function nw_path_monitor_set_update_handler(monitor: NSObject, update_handler: (p1: NSObject) => void): void;
|
|
|
|
declare function nw_path_monitor_start(monitor: NSObject): void;
|
|
|
|
declare const enum nw_path_status_t {
|
|
|
|
nw_path_status_invalid = 0,
|
|
|
|
nw_path_status_satisfied = 1,
|
|
|
|
nw_path_status_unsatisfied = 2,
|
|
|
|
nw_path_status_satisfiable = 3
|
|
}
|
|
|
|
declare function nw_path_uses_interface_type(path: NSObject, interface_type: nw_interface_type_t): boolean;
|
|
|
|
declare function nw_protocol_copy_ip_definition(): NSObject;
|
|
|
|
declare function nw_protocol_copy_tcp_definition(): NSObject;
|
|
|
|
declare function nw_protocol_copy_tls_definition(): NSObject;
|
|
|
|
declare function nw_protocol_copy_udp_definition(): NSObject;
|
|
|
|
declare function nw_protocol_definition_is_equal(definition1: NSObject, definition2: NSObject): boolean;
|
|
|
|
declare function nw_protocol_metadata_copy_definition(metadata: NSObject): NSObject;
|
|
|
|
declare function nw_protocol_metadata_is_ip(metadata: NSObject): boolean;
|
|
|
|
declare function nw_protocol_metadata_is_tcp(metadata: NSObject): boolean;
|
|
|
|
declare function nw_protocol_metadata_is_tls(metadata: NSObject): boolean;
|
|
|
|
declare function nw_protocol_metadata_is_udp(metadata: NSObject): boolean;
|
|
|
|
declare function nw_protocol_options_copy_definition(options: NSObject): NSObject;
|
|
|
|
declare function nw_protocol_stack_clear_application_protocols(stack: NSObject): void;
|
|
|
|
declare function nw_protocol_stack_copy_internet_protocol(stack: NSObject): NSObject;
|
|
|
|
declare function nw_protocol_stack_copy_transport_protocol(stack: NSObject): NSObject;
|
|
|
|
declare function nw_protocol_stack_iterate_application_protocols(stack: NSObject, iterate_block: (p1: NSObject) => void): void;
|
|
|
|
declare function nw_protocol_stack_prepend_application_protocol(stack: NSObject, protocol: NSObject): void;
|
|
|
|
declare function nw_protocol_stack_set_transport_protocol(stack: NSObject, protocol: NSObject): void;
|
|
|
|
declare function nw_release(obj: interop.Pointer | interop.Reference<any>): void;
|
|
|
|
declare function nw_retain(obj: interop.Pointer | interop.Reference<any>): interop.Pointer | interop.Reference<any>;
|
|
|
|
declare const enum nw_service_class_t {
|
|
|
|
nw_service_class_best_effort = 0,
|
|
|
|
nw_service_class_background = 1,
|
|
|
|
nw_service_class_interactive_video = 2,
|
|
|
|
nw_service_class_interactive_voice = 3,
|
|
|
|
nw_service_class_responsive_data = 4,
|
|
|
|
nw_service_class_signaling = 5
|
|
}
|
|
|
|
declare function nw_tcp_create_options(): NSObject;
|
|
|
|
declare function nw_tcp_get_available_receive_buffer(metadata: NSObject): number;
|
|
|
|
declare function nw_tcp_get_available_send_buffer(metadata: NSObject): number;
|
|
|
|
declare function nw_tcp_options_set_connection_timeout(options: NSObject, connection_timeout: number): void;
|
|
|
|
declare function nw_tcp_options_set_disable_ack_stretching(options: NSObject, disable_ack_stretching: boolean): void;
|
|
|
|
declare function nw_tcp_options_set_disable_ecn(options: NSObject, disable_ecn: boolean): void;
|
|
|
|
declare function nw_tcp_options_set_enable_fast_open(options: NSObject, enable_fast_open: boolean): void;
|
|
|
|
declare function nw_tcp_options_set_enable_keepalive(options: NSObject, enable_keepalive: boolean): void;
|
|
|
|
declare function nw_tcp_options_set_keepalive_count(options: NSObject, keepalive_count: number): void;
|
|
|
|
declare function nw_tcp_options_set_keepalive_idle_time(options: NSObject, keepalive_idle_time: number): void;
|
|
|
|
declare function nw_tcp_options_set_keepalive_interval(options: NSObject, keepalive_interval: number): void;
|
|
|
|
declare function nw_tcp_options_set_maximum_segment_size(options: NSObject, maximum_segment_size: number): void;
|
|
|
|
declare function nw_tcp_options_set_no_delay(options: NSObject, no_delay: boolean): void;
|
|
|
|
declare function nw_tcp_options_set_no_options(options: NSObject, no_options: boolean): void;
|
|
|
|
declare function nw_tcp_options_set_no_push(options: NSObject, no_push: boolean): void;
|
|
|
|
declare function nw_tcp_options_set_persist_timeout(options: NSObject, persist_timeout: number): void;
|
|
|
|
declare function nw_tcp_options_set_retransmit_connection_drop_time(options: NSObject, retransmit_connection_drop_time: number): void;
|
|
|
|
declare function nw_tcp_options_set_retransmit_fin_drop(options: NSObject, retransmit_fin_drop: boolean): void;
|
|
|
|
declare function nw_tls_copy_sec_protocol_metadata(metadata: NSObject): NSObject;
|
|
|
|
declare function nw_tls_copy_sec_protocol_options(options: NSObject): NSObject;
|
|
|
|
declare function nw_tls_create_options(): NSObject;
|
|
|
|
declare function nw_udp_create_metadata(): NSObject;
|
|
|
|
declare function nw_udp_create_options(): NSObject;
|
|
|
|
declare function nw_udp_options_set_prefer_no_checksum(options: NSObject, prefer_no_checksum: boolean): void;
|