Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions src/accessorysetupkit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
using ObjCRuntime;
using UIKit;

using ASAccessoryWiFiAwarePairedDeviceId = System.UInt64;

namespace AccessorySetupKit {
[Native]
[iOS (18, 0)]
Expand Down Expand Up @@ -69,6 +71,10 @@ interface ASAccessory {

[Export ("bluetoothTransportBridgingIdentifier", ArgumentSemantic.Copy), NullAllowed]
NSData BluetoothTransportBridgingIdentifier { get; }

[iOS (26, 0)]
[Export ("wifiAwarePairedDeviceID")]
ASAccessoryWiFiAwarePairedDeviceId WifiAwarePairedDeviceId { get; }
}

[Native]
Expand Down Expand Up @@ -140,8 +146,20 @@ interface ASAccessorySession {
[Async]
[Export ("failAuthorization:completionHandler:")]
void FailAuthorization (ASAccessory accessory, ASAccessorySessionCompletionHandler completionHandler);

[iOS (26, 0)]
[Export ("pickerDisplaySettings", ArgumentSemantic.Copy)]
[NullAllowed]
ASPickerDisplaySettings PickerDisplaySettings { get; set; }

[Async]
[iOS (26, 0)]
[Export ("updateAuthorization:descriptor:completionHandler:")]
void UpdateAuthorization (ASAccessory accessory, ASDiscoveryDescriptor descriptor, ASAccessorySessionUpdateAuthorizationHandler completionHandler);
}

delegate void ASAccessorySessionUpdateAuthorizationHandler ([NullAllowed] NSError error);

[BaseType (typeof (NSObject))]
[iOS (18, 0)]
interface ASAccessorySettings {
Expand Down Expand Up @@ -194,6 +212,25 @@ interface ASDiscoveryDescriptor {

[Export ("SSIDPrefix", ArgumentSemantic.Copy), NullAllowed]
string SsidPrefix { get; set; }

[iOS (26, 0)]
[Export ("wifiAwareServiceName")]
[NullAllowed]
string WifiAwareServiceName { get; set; }

[iOS (26, 0)]
[Export ("wifiAwareServiceRole", ArgumentSemantic.Assign)]
ASDiscoveryDescriptorWiFiAwareServiceRole WifiAwareServiceRole { get; set; }

[iOS (26, 0)]
[Export ("wifiAwareModelNameMatch", ArgumentSemantic.Copy)]
[NullAllowed]
ASPropertyCompareString WifiAwareModelNameMatch { get; set; }

[iOS (26, 0)]
[Export ("wifiAwareVendorNameMatch", ArgumentSemantic.Copy)]
[NullAllowed]
ASPropertyCompareString WifiAwareVendorNameMatch { get; set; }
}

[Native]
Expand Down Expand Up @@ -259,4 +296,52 @@ interface ASMigrationDisplayItem {
[DesignatedInitializer]
NativeHandle Constructor (string name, UIImage productImage, ASDiscoveryDescriptor descriptor);
}

[iOS (26, 0)]
[BaseType (typeof (NSObject))]
[DisableDefaultCtor]
interface ASPropertyCompareString {
[Export ("string")]
string String { get; }

[Export ("compareOptions", ArgumentSemantic.Assign)]
NSStringCompareOptions CompareOptions { get; }

[Export ("initWithString:compareOptions:")]
[DesignatedInitializer]
NativeHandle Constructor (string @string, NSStringCompareOptions compareOptions);
}

[iOS (26, 0)]
[Native]
public enum ASDiscoveryDescriptorWiFiAwareServiceRole : long {
Subscriber = 10,
Publisher = 20,
}

[iOS (26, 0)]
[BaseType (typeof (NSObject))]
interface ASPickerDisplaySettings {
[Static]
[Export ("defaultSettings")]
ASPickerDisplaySettings DefaultSettings { get; }

[Export ("discoveryTimeout")]
double DiscoveryTimeout { get; set; }
}

[Static]
partial interface ASPickerDisplaySettingsDiscoveryTimeout {
[iOS (26, 0)]
[Field ("ASPickerDisplaySettingsDiscoveryTimeoutShort")]
double Short { get; }

[iOS (26, 0)]
[Field ("ASPickerDisplaySettingsDiscoveryTimeoutMedium")]
double Medium { get; }

[iOS (26, 0)]
[Field ("ASPickerDisplaySettingsDiscoveryTimeoutLong")]
double Long { get; }
}
}

This file was deleted.

Loading