[NetworkExtensions] Add support for Xcode 14 beta 6. (#15847)

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
This commit is contained in:
Manuel de la Pena 2022-09-02 17:27:49 -04:00 коммит произвёл GitHub
Родитель 9d6271fb5f
Коммит 431e578ae9
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
9 изменённых файлов: 76 добавлений и 44 удалений

Просмотреть файл

@ -177,6 +177,33 @@ namespace NetworkExtension {
Unknown = 4, Unknown = 4,
} }
[NoWatch, NoTV, Mac (13,0), iOS (16,0), MacCatalyst (16,0)]
[Native]
[ErrorDomain ("NEVPNConnectionErrorDomain")]
public enum NEVpnConnectionError : long
{
Overslept = 1,
NoNetworkAvailable = 2,
UnrecoverableNetworkChange = 3,
ConfigurationFailed = 4,
ServerAddressResolutionFailed = 5,
ServerNotResponding = 6,
ServerDead = 7,
AuthenticationFailed = 8,
ClientCertificateInvalid = 9,
ClientCertificateNotYetValid = 10,
ClientCertificateExpired = 11,
PluginFailed = 12,
ConfigurationNotFound = 13,
PluginDisabled = 14,
NegotiationFailed = 15,
ServerDisconnected = 16,
ServerCertificateInvalid = 17,
ServerCertificateNotYetValid = 18,
ServerCertificateExpired = 19,
}
[iOS (9,0)][Mac (10,11)] [iOS (9,0)][Mac (10,11)]
[BaseType (typeof (NSObject))] [BaseType (typeof (NSObject))]
[Abstract] // documented as such and ... [Abstract] // documented as such and ...
@ -930,6 +957,11 @@ namespace NetworkExtension {
[NullAllowed, Export ("excludedRoutes", ArgumentSemantic.Copy)] [NullAllowed, Export ("excludedRoutes", ArgumentSemantic.Copy)]
NEIPv4Route[] ExcludedRoutes { get; set; } NEIPv4Route[] ExcludedRoutes { get; set; }
[NoWatch, NoTV, NoiOS, Mac (13, 0)]
[Export ("router")]
[NullAllowed]
string Router { get; set; }
} }
[iOS (9,0)][Mac (10,11)] [iOS (9,0)][Mac (10,11)]
@ -1249,6 +1281,11 @@ namespace NetworkExtension {
[Notification] [Notification]
[Field ("NEVPNStatusDidChangeNotification")] [Field ("NEVPNStatusDidChangeNotification")]
NSString StatusDidChangeNotification { get; } NSString StatusDidChangeNotification { get; }
[Async]
[NoWatch, NoTV, Mac (13,0), iOS (16,0), MacCatalyst (16,0)]
[Export ("fetchLastDisconnectErrorWithCompletionHandler:")]
void FetchLastDisconnectError (Action<NSError> handler);
} }
[Static][Internal] [Static][Internal]
@ -2303,6 +2340,11 @@ namespace NetworkExtension {
[NullAllowed] [NullAllowed]
[Export ("serverURL", ArgumentSemantic.Copy)] [Export ("serverURL", ArgumentSemantic.Copy)]
NSUrl ServerUrl { get; set; } NSUrl ServerUrl { get; set; }
[NoWatch, NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16,0)]
[Export ("identityReference", ArgumentSemantic.Copy)]
[NullAllowed]
NSData IdentityReference { get; set; }
} }
[NoWatch, NoTV, Mac (11,0), iOS (14,0)] [NoWatch, NoTV, Mac (11,0), iOS (14,0)]
@ -2312,6 +2354,11 @@ namespace NetworkExtension {
[NullAllowed] [NullAllowed]
[Export ("serverName")] [Export ("serverName")]
string ServerName { get; set; } string ServerName { get; set; }
[NoWatch, NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16,0)]
[Export ("identityReference", ArgumentSemantic.Copy)]
[NullAllowed]
NSData IdentityReference { get; set; }
} }
[NoWatch, NoTV, Mac (11,0), iOS (14,0)] [NoWatch, NoTV, Mac (11,0), iOS (14,0)]
@ -2390,4 +2437,21 @@ namespace NetworkExtension {
string TrackingAreaCode { get; set; } string TrackingAreaCode { get; set; }
} }
[NoWatch, NoTV, NoiOS, Mac (13,0)]
[BaseType (typeof (NEPacketTunnelProvider))]
interface NEEthernetTunnelProvider
{
}
[NoWatch, NoTV, NoiOS, Mac (13,0)]
[BaseType (typeof (NEPacketTunnelNetworkSettings))]
interface NEEthernetTunnelNetworkSettings
{
[Export ("initWithTunnelRemoteAddress:ethernetAddress:mtu:")]
NativeHandle Constructor (string address, string ethernetAddress, nint mtu);
[Export ("ethernetAddress")]
string EthernetAddress { get; }
}
} }

Просмотреть файл

@ -3,3 +3,6 @@
## is, which means we can't use the same managed enum for both cases (the native enums aren't entirely identical ## is, which means we can't use the same managed enum for both cases (the native enums aren't entirely identical
## either: one is pointer sized while the other is 32-bit always). ## either: one is pointer sized while the other is 32-bit always).
!duplicate-type-name! NWPathStatus enum exists as both NetworkExtension.NWPathStatus and Network.NWPathStatus !duplicate-type-name! NWPathStatus enum exists as both NetworkExtension.NWPathStatus and Network.NWPathStatus
# value got removed in xcode14
!extra-enum-value! Managed value 1 for NEOnDemandRuleInterfaceType.Ethernet is available for the current platform while the value in the native header is not

Просмотреть файл

@ -1,8 +0,0 @@
!extra-enum-value! Managed value 1 for NEOnDemandRuleInterfaceType.Ethernet is available for the current platform while the value in the native header is not
!missing-enum! NEVPNConnectionError not bound
!missing-field! NEVPNConnectionErrorDomain not bound
!missing-selector! NEDNSOverHTTPSSettings::identityReference not bound
!missing-selector! NEDNSOverHTTPSSettings::setIdentityReference: not bound
!missing-selector! NEDNSOverTLSSettings::identityReference not bound
!missing-selector! NEDNSOverTLSSettings::setIdentityReference: not bound
!missing-selector! NEVPNConnection::fetchLastDisconnectErrorWithCompletionHandler: not bound

Просмотреть файл

@ -3,3 +3,6 @@
## is, which means we can't use the same managed enum for both cases (the native enums aren't entirely identical ## is, which means we can't use the same managed enum for both cases (the native enums aren't entirely identical
## either: one is pointer sized while the other is 32-bit always). ## either: one is pointer sized while the other is 32-bit always).
!duplicate-type-name! NWPathStatus enum exists as both NetworkExtension.NWPathStatus and Network.NWPathStatus !duplicate-type-name! NWPathStatus enum exists as both NetworkExtension.NWPathStatus and Network.NWPathStatus
# enum got removed from mac Os in xcode 14
!extra-enum-value! Managed value 3 for NEOnDemandRuleInterfaceType.Cellular is available for the current platform while the value in the native header is not

Просмотреть файл

@ -1,14 +0,0 @@
!extra-enum-value! Managed value 3 for NEOnDemandRuleInterfaceType.Cellular is available for the current platform while the value in the native header is not
!missing-enum! NEVPNConnectionError not bound
!missing-field! NEVPNConnectionErrorDomain not bound
!missing-selector! NEDNSOverHTTPSSettings::identityReference not bound
!missing-selector! NEDNSOverHTTPSSettings::setIdentityReference: not bound
!missing-selector! NEDNSOverTLSSettings::identityReference not bound
!missing-selector! NEDNSOverTLSSettings::setIdentityReference: not bound
!missing-selector! NEEthernetTunnelNetworkSettings::ethernetAddress not bound
!missing-selector! NEEthernetTunnelNetworkSettings::initWithTunnelRemoteAddress:ethernetAddress:mtu: not bound
!missing-selector! NEIPv4Settings::router not bound
!missing-selector! NEIPv4Settings::setRouter: not bound
!missing-selector! NEVPNConnection::fetchLastDisconnectErrorWithCompletionHandler: not bound
!missing-type! NEEthernetTunnelNetworkSettings not bound
!missing-type! NEEthernetTunnelProvider not bound

Просмотреть файл

@ -3,3 +3,6 @@
## is, which means we can't use the same managed enum for both cases (the native enums aren't entirely identical ## is, which means we can't use the same managed enum for both cases (the native enums aren't entirely identical
## either: one is pointer sized while the other is 32-bit always). ## either: one is pointer sized while the other is 32-bit always).
!duplicate-type-name! NWPathStatus enum exists as both NetworkExtension.NWPathStatus and Network.NWPathStatus !duplicate-type-name! NWPathStatus enum exists as both NetworkExtension.NWPathStatus and Network.NWPathStatus
# value got removed in xcode14
!extra-enum-value! Managed value 1 for NEOnDemandRuleInterfaceType.Ethernet is available for the current platform while the value in the native header is not

Просмотреть файл

@ -1,8 +0,0 @@
!extra-enum-value! Managed value 1 for NEOnDemandRuleInterfaceType.Ethernet is available for the current platform while the value in the native header is not
!missing-enum! NEVPNConnectionError not bound
!missing-field! NEVPNConnectionErrorDomain not bound
!missing-selector! NEDNSOverHTTPSSettings::identityReference not bound
!missing-selector! NEDNSOverHTTPSSettings::setIdentityReference: not bound
!missing-selector! NEDNSOverTLSSettings::identityReference not bound
!missing-selector! NEDNSOverTLSSettings::setIdentityReference: not bound
!missing-selector! NEVPNConnection::fetchLastDisconnectErrorWithCompletionHandler: not bound

Просмотреть файл

@ -7,3 +7,6 @@
## is, which means we can't use the same managed enum for both cases (the native enums aren't entirely identical ## is, which means we can't use the same managed enum for both cases (the native enums aren't entirely identical
## either: one is pointer sized while the other is 32-bit always). ## either: one is pointer sized while the other is 32-bit always).
!duplicate-type-name! NWPathStatus enum exists as both NetworkExtension.NWPathStatus and Network.NWPathStatus !duplicate-type-name! NWPathStatus enum exists as both NetworkExtension.NWPathStatus and Network.NWPathStatus
# enum got removed from mac Os in xcode 14
!extra-enum-value! Managed value 3 for NEOnDemandRuleInterfaceType.Cellular is available for the current platform while the value in the native header is not

Просмотреть файл

@ -1,14 +0,0 @@
!extra-enum-value! Managed value 3 for NEOnDemandRuleInterfaceType.Cellular is available for the current platform while the value in the native header is not
!missing-enum! NEVPNConnectionError not bound
!missing-field! NEVPNConnectionErrorDomain not bound
!missing-selector! NEDNSOverHTTPSSettings::identityReference not bound
!missing-selector! NEDNSOverHTTPSSettings::setIdentityReference: not bound
!missing-selector! NEDNSOverTLSSettings::identityReference not bound
!missing-selector! NEDNSOverTLSSettings::setIdentityReference: not bound
!missing-selector! NEEthernetTunnelNetworkSettings::ethernetAddress not bound
!missing-selector! NEEthernetTunnelNetworkSettings::initWithTunnelRemoteAddress:ethernetAddress:mtu: not bound
!missing-selector! NEIPv4Settings::router not bound
!missing-selector! NEIPv4Settings::setRouter: not bound
!missing-selector! NEVPNConnection::fetchLastDisconnectErrorWithCompletionHandler: not bound
!missing-type! NEEthernetTunnelNetworkSettings not bound
!missing-type! NEEthernetTunnelProvider not bound