diff --git a/src/GLKit/Defs.cs b/src/GLKit/Defs.cs index 89458600d2..3723487387 100644 --- a/src/GLKit/Defs.cs +++ b/src/GLKit/Defs.cs @@ -40,7 +40,7 @@ namespace GLKit { public enum GLKVertexAttrib { Position, Normal, Color, TexCoord0, TexCoord1 } - + // GLint (32 bits on 64 bit hardware) -> GLKEffectPropertyLight.h public enum GLKLightingType { PerVertex, @@ -87,7 +87,7 @@ namespace GLKit { public enum GLKViewDrawableMultisample { None, Sample4x } - + // GLint (32 bits on 64 bit hardware) -> GLKTextureLoader.h public enum GLKTextureInfoAlphaState { None, NonPremultiplied, Premultiplied @@ -137,11 +137,11 @@ namespace GLKit { [ObsoletedOSPlatform ("macos10.14", "Use 'Metal' instead.")] [ObsoletedOSPlatform ("ios12.0", "Use 'Metal' instead.")] #else - [Deprecated (PlatformName.iOS, 12,0, message: "Use 'Metal' instead.")] - [Deprecated (PlatformName.TvOS, 12,0, message: "Use 'Metal' instead.")] - [Deprecated (PlatformName.MacOSX, 10,14, message: "Use 'Metal' instead.")] - [iOS (9,0)] - [Mac (10,11)] + [Deprecated (PlatformName.iOS, 12, 0, message: "Use 'Metal' instead.")] + [Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'Metal' instead.")] + [Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'Metal' instead.")] + [iOS (9, 0)] + [Mac (10, 11)] #endif [StructLayout (LayoutKind.Sequential)] public struct GLKVertexAttributeParameters { diff --git a/src/GLKit/GLTextureLoader.cs b/src/GLKit/GLTextureLoader.cs index dccbda87af..a43b9c991e 100644 --- a/src/GLKit/GLTextureLoader.cs +++ b/src/GLKit/GLTextureLoader.cs @@ -95,7 +95,7 @@ namespace GLKit { using (var array = NSArray.FromNSObjects (urls)) return CubeMapFromFiles (array, textureOperations?.Dictionary, out error); } - + public static GLKTextureInfo? CubeMapFromFile (string path, GLKTextureOperations? textureOperations, out NSError error) { return CubeMapFromFile (path, textureOperations?.Dictionary, out error); @@ -147,7 +147,7 @@ namespace GLKit { { BeginLoadCubeMap (filePath, textureOperations?.Dictionary, queue, onComplete); } - + } #if NET @@ -162,14 +162,14 @@ namespace GLKit { [ObsoletedOSPlatform ("macos10.14", "Use 'Metal' instead.")] [ObsoletedOSPlatform ("ios12.0", "Use 'Metal' instead.")] #else - [Deprecated (PlatformName.iOS, 12,0, message: "Use 'Metal' instead.")] - [Deprecated (PlatformName.TvOS, 12,0, message: "Use 'Metal' instead.")] - [Deprecated (PlatformName.MacOSX, 10,14, message: "Use 'Metal' instead.")] + [Deprecated (PlatformName.iOS, 12, 0, message: "Use 'Metal' instead.")] + [Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'Metal' instead.")] + [Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'Metal' instead.")] #endif public class GLKTextureOperations : DictionaryContainer { - public GLKTextureOperations () : base (new NSMutableDictionary ()) {} + public GLKTextureOperations () : base (new NSMutableDictionary ()) { } - public GLKTextureOperations (NSDictionary options) : base (options) {} + public GLKTextureOperations (NSDictionary options) : base (options) { } public bool? ApplyPremultiplication { get { @@ -219,7 +219,7 @@ namespace GLKit { [ObsoletedOSPlatform ("macos10.14", "Use 'Metal' instead.")] [ObsoletedOSPlatform ("ios12.0", "Use 'Metal' instead.")] #else - [iOS (7,0)] + [iOS (7, 0)] #endif public bool? SRGB { get { diff --git a/src/GameController/Enums.cs b/src/GameController/Enums.cs index ea09d54491..9339e1e25e 100644 --- a/src/GameController/Enums.cs +++ b/src/GameController/Enums.cs @@ -17,47 +17,43 @@ namespace GameController { [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'GCController.GetMicroGamepadController()' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'GCController.GetMicroGamepadController()' instead.")] [Native] - public enum GCExtendedGamepadSnapshotDataVersion : long - { + public enum GCExtendedGamepadSnapshotDataVersion : long { Version1 = 0x0100, Version2 = 0x0101, } [Native] - public enum GCMicroGamepadSnapshotDataVersion : long - { + public enum GCMicroGamepadSnapshotDataVersion : long { Version1 = 0x0100, } - [TV (14,0), Mac (11,0), iOS (14,0)] + [TV (14, 0), Mac (11, 0), iOS (14, 0)] [Native] - public enum GCTouchState : long - { + public enum GCTouchState : long { Up, Down, Moving, } - [TV (14,0), Mac (11,0), iOS (14,0)] + [TV (14, 0), Mac (11, 0), iOS (14, 0)] [Native] - public enum GCDeviceBatteryState : long - { + public enum GCDeviceBatteryState : long { Unknown = -1, Discharging, Charging, Full, } - [TV (14,0), Mac (11,0), iOS (14,0)] + [TV (14, 0), Mac (11, 0), iOS (14, 0)] [Native] - public enum GCSystemGestureState : long - { + public enum GCSystemGestureState : long { Enabled = 0, AlwaysReceive, Disabled, } - [iOS (9,0)][Mac (10,11)] + [iOS (9, 0)] + [Mac (10, 11)] [Native] public enum GCControllerPlayerIndex : long { Unset = -1, @@ -67,10 +63,9 @@ namespace GameController { Index4, } - [iOS (16,0), Mac (13,0), NoWatch, TV (16,0), MacCatalyst (16,0)] + [iOS (16, 0), Mac (13, 0), NoWatch, TV (16, 0), MacCatalyst (16, 0)] [Native] - public enum GCDevicePhysicalInputElementChange : long - { + public enum GCDevicePhysicalInputElementChange : long { UnknownChange = -1, NoChange = 0, Changed = 1, diff --git a/src/GameController/GCExtendedGamepadSnapshot.cs b/src/GameController/GCExtendedGamepadSnapshot.cs index 7445921d58..dbb41a0d3a 100644 --- a/src/GameController/GCExtendedGamepadSnapshot.cs +++ b/src/GameController/GCExtendedGamepadSnapshot.cs @@ -30,8 +30,8 @@ namespace GameController { [ObsoletedOSPlatform ("tvos12.2", "Use 'GCExtendedGamepadSnapshotData' instead.")] [ObsoletedOSPlatform ("ios12.2", "Use 'GCExtendedGamepadSnapshotData' instead.")] #else - [iOS (7,0)] - [Mac (10,9)] + [iOS (7, 0)] + [Mac (10, 9)] [Deprecated (PlatformName.iOS, 12, 2, message: "Use 'GCExtendedGamepadSnapshotData' instead.")] [Deprecated (PlatformName.MacOSX, 10, 14, 4, message: "Use 'GCExtendedGamepadSnapshotData' instead.")] [Deprecated (PlatformName.TvOS, 12, 2, message: "Use 'GCExtendedGamepadSnapshotData' instead.")] @@ -99,7 +99,7 @@ namespace GameController { return p == IntPtr.Zero ? null : new NSData (p); } } - + #if NET [UnsupportedOSPlatform ("macos10.15")] [UnsupportedOSPlatform ("tvos13.0")] @@ -181,7 +181,7 @@ namespace GameController { #endif [MarshalAs (UnmanagedType.I1)] bool LeftThumbstickButton; - + #if NET [SupportedOSPlatform ("tvos12.2")] [SupportedOSPlatform ("macos10.14.4")] @@ -245,14 +245,14 @@ namespace GameController { } public partial class GCExtendedGamepadSnapshot { - + // GCExtendedGamepadSnapshot.h [DllImport (Constants.GameControllerLibrary)] [return: MarshalAs (UnmanagedType.I1)] static extern bool GCExtendedGamepadSnapShotDataV100FromNSData ( - /* GCExtendedGamepadSnapShotDataV100 * __nullable */ out GCExtendedGamepadSnapShotDataV100 snapshotData, + /* GCExtendedGamepadSnapShotDataV100 * __nullable */ out GCExtendedGamepadSnapShotDataV100 snapshotData, /* NSData * __nullable */ IntPtr data); - + #if NET [SupportedOSPlatform ("tvos12.2")] [SupportedOSPlatform ("macos10.14.4")] @@ -272,14 +272,14 @@ namespace GameController { [DllImport (Constants.GameControllerLibrary)] [return: MarshalAs (UnmanagedType.I1)] static extern bool GCExtendedGamepadSnapshotDataFromNSData ( - /* GCExtendedGamepadSnapshotData * __nullable */ out GCExtendedGamepadSnapshotData snapshotData, + /* GCExtendedGamepadSnapshotData * __nullable */ out GCExtendedGamepadSnapshotData snapshotData, /* NSData * __nullable */ IntPtr data); public static bool TryGetSnapShotData (NSData? data, out GCExtendedGamepadSnapShotDataV100 snapshotData) { return GCExtendedGamepadSnapShotDataV100FromNSData (out snapshotData, data.GetHandle ()); } - + #if NET [SupportedOSPlatform ("tvos12.2")] [SupportedOSPlatform ("macos10.14.4")] diff --git a/src/GameController/GCGamepadSnapshot.cs b/src/GameController/GCGamepadSnapshot.cs index fa56cd2378..5862a0a62b 100644 --- a/src/GameController/GCGamepadSnapshot.cs +++ b/src/GameController/GCGamepadSnapshot.cs @@ -32,8 +32,8 @@ namespace GameController { [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'GCExtendedGamepad' instead.")] [Deprecated (PlatformName.iOS, 13, 0, message: "Use 'GCExtendedGamepad' instead.")] [Deprecated (PlatformName.TvOS, 13, 0, message: "Use 'GCExtendedGamepad' instead.")] - [iOS (7,0)] - [Mac (10,9)] + [iOS (7, 0)] + [Mac (10, 9)] #endif [StructLayout (LayoutKind.Sequential, Pack = 1)] public struct GCGamepadSnapShotDataV100 { @@ -67,7 +67,7 @@ namespace GameController { } public partial class GCGamepadSnapshot { - + // GCGamepadSnapshot.h [DllImport (Constants.GameControllerLibrary)] [return: MarshalAs (UnmanagedType.I1)] diff --git a/src/GameController/GCMicroGamepadSnapshot.cs b/src/GameController/GCMicroGamepadSnapshot.cs index b51dab6c0e..3bbff9e9d2 100644 --- a/src/GameController/GCMicroGamepadSnapshot.cs +++ b/src/GameController/GCMicroGamepadSnapshot.cs @@ -26,8 +26,8 @@ namespace GameController { [ObsoletedOSPlatform ("tvos12.2", "Use 'GCController.GetMicroGamepadController()' instead.")] [ObsoletedOSPlatform ("ios12.2", "Use 'GCController.GetMicroGamepadController()' instead.")] #else - [iOS (10,0)] - [Mac (10,12)] + [iOS (10, 0)] + [Mac (10, 12)] [Deprecated (PlatformName.iOS, 12, 2, message: "Use 'GCController.GetMicroGamepadController()' instead.")] [Deprecated (PlatformName.MacOSX, 10, 14, 4, message: "Use 'GCController.GetMicroGamepadController()' instead.")] [Deprecated (PlatformName.TvOS, 12, 2, message: "Use 'GCController.GetMicroGamepadController()' instead.")] @@ -195,7 +195,7 @@ namespace GameController { { return GCMicroGamepadSnapShotDataV100FromNSData (out snapshotData, data.GetHandle ()); } - + #if NET [SupportedOSPlatform ("tvos12.2")] [SupportedOSPlatform ("macos10.14.4")] @@ -243,4 +243,4 @@ namespace GameController { } } -#endif +#endif diff --git a/src/GameKit/GKCompat.cs b/src/GameKit/GKCompat.cs index 61cd39336b..151d5eb2f6 100644 --- a/src/GameKit/GKCompat.cs +++ b/src/GameKit/GKCompat.cs @@ -14,9 +14,9 @@ namespace GameKit { #if !XAMCORE_3_0 public partial class GKMatchRequest { - + #if !NET - [iOS (8,0), Mac (10,10)] + [iOS (8, 0), Mac (10, 10)] [Obsolete ("Use 'RecipientResponseHandler' property.")] #else [Obsolete ("Use 'RecipientResponseHandler' property.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")] @@ -28,7 +28,7 @@ namespace GameKit { } public partial class GKMatchmaker { - + [Obsolete ("Use 'InviteHandler' property.")] public virtual void SetInviteHandler (GKInviteHandler handler) { @@ -50,22 +50,22 @@ namespace GameKit { public partial class GKGameSession { [Obsolete ("Empty stub (GKGameSessionEventListenerPrivate category members are not public API).")] - public static void DidAddPlayer (GKGameSession session, GKCloudPlayer player) {} + public static void DidAddPlayer (GKGameSession session, GKCloudPlayer player) { } [Obsolete ("Empty stub (GKGameSessionEventListenerPrivate category members are not public API).")] - public static void DidChangeConnectionState (GKGameSession session, GKCloudPlayer player, GKConnectionState newState) {} + public static void DidChangeConnectionState (GKGameSession session, GKCloudPlayer player, GKConnectionState newState) { } [Obsolete ("Empty stub (GKGameSessionEventListenerPrivate category members are not public API).")] - public static void DidReceiveData (GKGameSession session, Foundation.NSData data, GKCloudPlayer player) {} + public static void DidReceiveData (GKGameSession session, Foundation.NSData data, GKCloudPlayer player) { } [Obsolete ("Empty stub (GKGameSessionEventListenerPrivate category members are not public API).")] - public static void DidReceiveMessage (GKGameSession session, string message, Foundation.NSData data, GKCloudPlayer player) {} + public static void DidReceiveMessage (GKGameSession session, string message, Foundation.NSData data, GKCloudPlayer player) { } [Obsolete ("Empty stub (GKGameSessionEventListenerPrivate category members are not public API).")] - public static void DidRemovePlayer (GKGameSession session, GKCloudPlayer player) {} + public static void DidRemovePlayer (GKGameSession session, GKCloudPlayer player) { } [Obsolete ("Empty stub (GKGameSessionEventListenerPrivate category members are not public API).")] - public static void DidSaveData (GKGameSession session, GKCloudPlayer player, Foundation.NSData data) {} + public static void DidSaveData (GKGameSession session, GKCloudPlayer player, Foundation.NSData data) { } } #endif diff --git a/src/GameKit/GKLocalPlayerListener.cs b/src/GameKit/GKLocalPlayerListener.cs index 70d09db815..c60f61ac8c 100644 --- a/src/GameKit/GKLocalPlayerListener.cs +++ b/src/GameKit/GKLocalPlayerListener.cs @@ -11,7 +11,7 @@ namespace GameKit { // GKInviteEventListener and GKTurnBasedEventListener both export same selector // but generator changes now catch this. Stub it out to prevent API break [Obsolete ("Use 'DidRequestMatch (GKPlayer player, GKPlayer[] recipientPlayers)' instead.")] - public virtual void DidRequestMatchWithPlayers (GKPlayer player, string[] playerIDsToInvite) + public virtual void DidRequestMatchWithPlayers (GKPlayer player, string [] playerIDsToInvite) { } } diff --git a/src/GameKit/GameKit.cs b/src/GameKit/GameKit.cs index e77c9339c6..3923fa022e 100644 --- a/src/GameKit/GameKit.cs +++ b/src/GameKit/GameKit.cs @@ -36,7 +36,7 @@ namespace GameKit { [Deprecated (PlatformName.iOS, 7, 0)] [ErrorDomain ("GKVoiceChatServiceErrorDomain")] public enum GKVoiceChatServiceError { - Internal = 32000, + Internal = 32000, NoRemotePackets = 32001, UnableToConnect = 32002, RemoteParticipantHangup = 32003, @@ -61,15 +61,15 @@ namespace GameKit { public enum GKSendDataMode { Reliable, Unreliable, - } + } // untyped enum -> GKPublicConstants.h [Deprecated (PlatformName.iOS, 7, 0)] [Deprecated (PlatformName.MacOSX, 10, 10)] public enum GKSessionMode { - Server, - Client, - Peer, + Server, + Client, + Peer, } // untyped enum -> GKPublicConstants.h @@ -78,7 +78,7 @@ namespace GameKit { public enum GKPeerConnectionState { Available, Unavailable, - Connected, + Connected, Disconnected, Connecting, ConnectedRelay = 5, @@ -146,27 +146,27 @@ namespace GameKit { FriendRequestNotAvailable = 103, } - [iOS (10,0)] - [Mac (10,12)] - [TV (10,0)] + [iOS (10, 0)] + [Mac (10, 12)] + [TV (10, 0)] [Native] public enum GKConnectionState : long { NotConnected, Connected, } - [iOS (10,0)] - [Mac (10,12)] - [TV (10,0)] + [iOS (10, 0)] + [Mac (10, 12)] + [TV (10, 0)] [Native] public enum GKTransportType : long { Unreliable, Reliable, } - [Deprecated (PlatformName.MacOSX, 10,14)] - [Deprecated (PlatformName.TvOS, 12,0)] - [Deprecated (PlatformName.iOS, 12,0)] + [Deprecated (PlatformName.MacOSX, 10, 14)] + [Deprecated (PlatformName.TvOS, 12, 0)] + [Deprecated (PlatformName.iOS, 12, 0)] [Native] #if WATCH // removed in Xcode 10 but a breaking change (for us) to remove @@ -244,9 +244,9 @@ namespace GameKit { } // NSInteger -> GKChallenge.h - [Mac (10,9)] + [Mac (10, 9)] [Native] - public enum GKChallengeState : long { + public enum GKChallengeState : long { Invalid = 0, Pending, Completed, @@ -258,48 +258,45 @@ namespace GameKit { [Native] public enum GKGameCenterViewControllerState : long { Default = -1, - Leaderboards , + Leaderboards, Achievements, Challenges, - [iOS (14,0)] - [TV (14,0)] + [iOS (14, 0)] + [TV (14, 0)] LocalPlayerProfile = 3, - [iOS (14,0)] - [TV (14,0)] + [iOS (14, 0)] + [TV (14, 0)] Dashboard = 4, - [iOS (15,0)] - [Mac (12,0)] - [MacCatalyst (15,0)] - [TV (15,0)] + [iOS (15, 0)] + [Mac (12, 0)] + [MacCatalyst (15, 0)] + [TV (15, 0)] [NoWatch] LocalPlayerFriendsList = 5, } // NSInteger -> GKMatchmaker.h [Native] - public enum GKInviteeResponse : long - { - Accepted = 0, - Declined = 1, - Failed = 2, - Incompatible = 3, - UnableToConnect = 4, - NoAnswer = 5, + public enum GKInviteeResponse : long { + Accepted = 0, + Declined = 1, + Failed = 2, + Incompatible = 3, + UnableToConnect = 4, + NoAnswer = 5, } // NSUInteger -> GKMatchmaker.h [Native] - public enum GKMatchType : ulong - { + public enum GKMatchType : ulong { PeerToPeer, Hosted, TurnBased } // uint8_t -> GKTurnBasedMatch.h - [iOS (7,0)] - public enum GKTurnBasedExchangeStatus : sbyte - { + [iOS (7, 0)] + public enum GKTurnBasedExchangeStatus : sbyte { Unknown, Active, Complete, @@ -318,9 +315,12 @@ namespace GameKit { } #if !NET - [iOS (11,3)][Deprecated (PlatformName.iOS, 14,0, message: "Do not use; this API was removed.")] - [Mac (10,13,4)][Deprecated (PlatformName.MacOSX, 11,0, message: "Do not use; this API was removed.")] - [TV (11,3)][Deprecated (PlatformName.TvOS, 14,0, message: "Do not use; this API was removed.")] + [iOS (11, 3)] + [Deprecated (PlatformName.iOS, 14, 0, message: "Do not use; this API was removed.")] + [Mac (10, 13, 4)] + [Deprecated (PlatformName.MacOSX, 11, 0, message: "Do not use; this API was removed.")] + [TV (11, 3)] + [Deprecated (PlatformName.TvOS, 14, 0, message: "Do not use; this API was removed.")] [Native] public enum GKAuthenticationType : ulong { WithoutUI = 0, @@ -329,51 +329,48 @@ namespace GameKit { } #endif - [TV (14,0)] - [Mac (11,0)] - [iOS (14,0)] + [TV (14, 0)] + [Mac (11, 0)] + [iOS (14, 0)] [NoWatch] [Native] - public enum GKAccessPointLocation : long - { + public enum GKAccessPointLocation : long { TopLeading, TopTrailing, BottomLeading, BottomTrailing, } - [TV (14,0)] - [Mac (11,0)] - [iOS (14,0)] - [Watch (7,0)] + [TV (14, 0)] + [Mac (11, 0)] + [iOS (14, 0)] + [Watch (7, 0)] [Native] - public enum GKLeaderboardType : long - { + public enum GKLeaderboardType : long { Classic, Recurring, } - [TV (14,0)] - [Mac (11,0)] - [iOS (14,0)] + [TV (14, 0)] + [Mac (11, 0)] + [iOS (14, 0)] [NoWatch] [Native] - public enum GKMatchmakingMode : long - { + public enum GKMatchmakingMode : long { Default = 0, NearbyOnly = 1, AutomatchOnly = 2, - [TV (15,0)] - [Mac (12,0)] - [iOS (15,0)] - [MacCatalyst (15,0)] + [TV (15, 0)] + [Mac (12, 0)] + [iOS (15, 0)] + [MacCatalyst (15, 0)] InviteOnly = 3, } - [Watch (7,4)] - [TV (14,5)] - [Mac (11,3)] - [iOS (14,5)] + [Watch (7, 4)] + [TV (14, 5)] + [Mac (11, 3)] + [iOS (14, 5)] [Native] public enum GKFriendsAuthorizationStatus : long { NotDetermined = 0, diff --git a/src/GameKit/GameKit2.cs b/src/GameKit/GameKit2.cs index b85af829fd..5e6398eabe 100644 --- a/src/GameKit/GameKit2.cs +++ b/src/GameKit/GameKit2.cs @@ -47,7 +47,7 @@ namespace GameKit { if (receiver is not null) receiver (session, new GKDataReceivedEventArgs (data, peer, session)); } - + } // @@ -55,14 +55,14 @@ namespace GameKit { ReceiverObject? receiver; public event EventHandler? ReceiveData { add { - if (receiver is null){ + if (receiver is null) { receiver = new ReceiverObject (); _SetDataReceiveHandler (receiver, IntPtr.Zero); MarkDirty (); } receiver.receiver += value; } - + remove { if (receiver is null) return; @@ -82,9 +82,9 @@ namespace GameKit { Mono_GKSessionDelegate EnsureDelegate () { var del = WeakDelegate; - if (del is null || (!(del is Mono_GKSessionDelegate))){ - del = new Mono_GKSessionDelegate (); - WeakDelegate = del; + if (del is null || (!(del is Mono_GKSessionDelegate))) { + del = new Mono_GKSessionDelegate (); + WeakDelegate = del; } return (Mono_GKSessionDelegate) del; } @@ -98,7 +98,7 @@ namespace GameKit { EnsureDelegate ().cbPeerChanged -= value; } } - + public event EventHandler ConnectionRequest { add { EnsureDelegate ().cbConnectionRequest += value; @@ -144,14 +144,14 @@ namespace GameKit { if (cbPeerChanged is not null) cbPeerChanged (session, new GKPeerChangedStateEventArgs (session, peerID, state)); } - + [Preserve (Conditional = true)] public override void PeerConnectionRequest (GKSession session, string peerID) { if (cbConnectionRequest is not null) cbConnectionRequest (session, new GKPeerConnectionEventArgs (session, peerID, null)); } - + [Preserve (Conditional = true)] public override void PeerConnectionFailed (GKSession session, string peerID, NSError error) { @@ -159,7 +159,7 @@ namespace GameKit { cbConnectionFailed (session, new GKPeerConnectionEventArgs (session, peerID, error)); } - + [Preserve (Conditional = true)] public override void FailedWithError (GKSession session, NSError error) { diff --git a/src/GameplayKit/GKCompat.cs b/src/GameplayKit/GKCompat.cs index 002d069bd6..8c4dc6b0cc 100644 --- a/src/GameplayKit/GKCompat.cs +++ b/src/GameplayKit/GKCompat.cs @@ -20,8 +20,8 @@ namespace GameplayKit { return new GKQuadTree (min, max, minCellSize); } - [Deprecated (PlatformName.iOS, 10,0, message: "Empty stub (always return 'false') as this API is now rejected).")] - [Deprecated (PlatformName.TvOS, 10,0, message: "Empty stub (always return 'false') as this API is now rejected).")] + [Deprecated (PlatformName.iOS, 10, 0, message: "Empty stub (always return 'false') as this API is now rejected).")] + [Deprecated (PlatformName.TvOS, 10, 0, message: "Empty stub (always return 'false') as this API is now rejected).")] public virtual bool RemoveData (NSObject data) { return false; diff --git a/src/GameplayKit/GKComponentSystem.cs b/src/GameplayKit/GKComponentSystem.cs index 64023bf2ca..f546b7c160 100644 --- a/src/GameplayKit/GKComponentSystem.cs +++ b/src/GameplayKit/GKComponentSystem.cs @@ -15,13 +15,13 @@ using ObjCRuntime; namespace GameplayKit { public partial class GKComponentSystem { - + public GKComponentSystem () : this (GKState.GetClass (typeof (TComponent), "componentType")) { } - public Type? ComponentType { + public Type? ComponentType { get { return Class.Lookup (ComponentClass); } } diff --git a/src/GameplayKit/GKGridGraph.cs b/src/GameplayKit/GKGridGraph.cs index 87b52af4f3..e935d4696d 100644 --- a/src/GameplayKit/GKGridGraph.cs +++ b/src/GameplayKit/GKGridGraph.cs @@ -19,7 +19,7 @@ using Vector2i = global::OpenTK.Vector2i; namespace GameplayKit { public partial class GKGridGraph { - + #if !NET public virtual GKGridGraphNode? GetNodeAt (Vector2i position) { diff --git a/src/GameplayKit/GKObstacleGraph.cs b/src/GameplayKit/GKObstacleGraph.cs index 20c1f000fc..5c536d653b 100644 --- a/src/GameplayKit/GKObstacleGraph.cs +++ b/src/GameplayKit/GKObstacleGraph.cs @@ -36,9 +36,9 @@ namespace GameplayKit { [SupportedOSPlatform ("macos10.12")] [SupportedOSPlatform ("maccatalyst")] #else - [iOS (10,0)] - [TV (10,0)] - [Mac (10,12)] + [iOS (10, 0)] + [TV (10, 0)] + [Mac (10, 12)] #endif [Register ("GKObstacleGraph", SkipRegistration = true)] public partial class GKObstacleGraph : GKObstacleGraph where NodeType : GKGraphNode2D { @@ -58,7 +58,7 @@ namespace GameplayKit { public static new GKObstacleGraph? FromObstacles (GKPolygonObstacle [] obstacles, float bufferRadius) { - return Runtime.GetNSObject > (GraphWithObstacles (obstacles, bufferRadius, new Class (typeof (NodeType)))); + return Runtime.GetNSObject> (GraphWithObstacles (obstacles, bufferRadius, new Class (typeof (NodeType)))); } public new NodeType [] GetNodes (GKPolygonObstacle obstacle) diff --git a/src/GameplayKit/GKPath.cs b/src/GameplayKit/GKPath.cs index 55d9147d41..801351b2ae 100644 --- a/src/GameplayKit/GKPath.cs +++ b/src/GameplayKit/GKPath.cs @@ -25,7 +25,7 @@ using System.Runtime.InteropServices; namespace GameplayKit { public partial class GKPath { - public static GKPath FromPoints (Vector2[] points, float radius, bool cyclical) + public static GKPath FromPoints (Vector2 [] points, float radius, bool cyclical) { if (points is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (points)); @@ -34,7 +34,7 @@ namespace GameplayKit { try { PrepareBuffer (out buffer, ref points); - return FromPoints (buffer, (nuint)points.Length, radius, cyclical); + return FromPoints (buffer, (nuint) points.Length, radius, cyclical); } finally { if (buffer != IntPtr.Zero) Marshal.FreeHGlobal (buffer); @@ -46,12 +46,12 @@ namespace GameplayKit { { if (points is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (points)); - + var buffer = IntPtr.Zero; try { PrepareBuffer (out buffer, ref points); - Handle = InitWithPoints (buffer, (nuint)points.Length, radius, cyclical); + Handle = InitWithPoints (buffer, (nuint) points.Length, radius, cyclical); } finally { if (buffer != IntPtr.Zero) Marshal.FreeHGlobal (buffer); @@ -64,9 +64,9 @@ namespace GameplayKit { [SupportedOSPlatform ("macos10.12")] [SupportedOSPlatform ("maccatalyst")] #else - [iOS (10,0)] - [TV (10,0)] - [Mac (10,12)] + [iOS (10, 0)] + [TV (10, 0)] + [Mac (10, 12)] #endif public static GKPath FromPoints (Vector3 [] points, float radius, bool cyclical) { @@ -78,8 +78,7 @@ namespace GameplayKit { PrepareBuffer (out buffer, ref points); return FromFloat3Points (buffer, (nuint) points.Length, radius, cyclical); - } - finally { + } finally { if (buffer != IntPtr.Zero) Marshal.FreeHGlobal (buffer); } @@ -91,9 +90,9 @@ namespace GameplayKit { [SupportedOSPlatform ("macos10.12")] [SupportedOSPlatform ("maccatalyst")] #else - [iOS (10,0)] - [TV (10,0)] - [Mac (10,12)] + [iOS (10, 0)] + [TV (10, 0)] + [Mac (10, 12)] #endif public GKPath (Vector3 [] points, float radius, bool cyclical) { @@ -105,14 +104,13 @@ namespace GameplayKit { PrepareBuffer (out buffer, ref points); Handle = InitWithFloat3Points (buffer, (nuint) points.Length, radius, cyclical); - } - finally { + } finally { if (buffer != IntPtr.Zero) Marshal.FreeHGlobal (buffer); } } - static void PrepareBuffer (out IntPtr buffer, ref T[] points) where T : struct + static void PrepareBuffer (out IntPtr buffer, ref T [] points) where T : struct { var type = typeof (T); // Vector3 is 12 bytes but vector_float3 is 16 diff --git a/src/GameplayKit/GKPolygonObstacle.cs b/src/GameplayKit/GKPolygonObstacle.cs index c469723a30..a925fd91fc 100644 --- a/src/GameplayKit/GKPolygonObstacle.cs +++ b/src/GameplayKit/GKPolygonObstacle.cs @@ -26,16 +26,16 @@ namespace GameplayKit { { if (points is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (points)); - + var size = Marshal.SizeOf (typeof (Vector2)); var length = points.Length * size; var buffer = Marshal.AllocHGlobal (length); try { for (int i = 0; i < points.Length; i++) - Marshal.StructureToPtr (points[i], IntPtr.Add (buffer, i * size), false); + Marshal.StructureToPtr (points [i], IntPtr.Add (buffer, i * size), false); - return FromPoints (buffer, (nuint)points.Length); + return FromPoints (buffer, (nuint) points.Length); } finally { if (buffer != IntPtr.Zero) Marshal.FreeHGlobal (buffer); @@ -45,7 +45,7 @@ namespace GameplayKit { [ThreadStatic] static IntPtr ctor_pointer; - static unsafe IntPtr GetPointer (Vector2[] points) + static unsafe IntPtr GetPointer (Vector2 [] points) { if (points is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (points)); @@ -61,7 +61,7 @@ namespace GameplayKit { var buffer = Marshal.AllocHGlobal (length); for (int i = 0; i < points.Length; i++) - Marshal.StructureToPtr (points[i], IntPtr.Add (buffer, i * size), false); + Marshal.StructureToPtr (points [i], IntPtr.Add (buffer, i * size), false); ctor_pointer = buffer; return ctor_pointer = buffer; diff --git a/src/GameplayKit/GKPrimitives.cs b/src/GameplayKit/GKPrimitives.cs index 323b0cfe92..bda9fbc334 100644 --- a/src/GameplayKit/GKPrimitives.cs +++ b/src/GameplayKit/GKPrimitives.cs @@ -29,9 +29,9 @@ namespace GameplayKit { [SupportedOSPlatform ("macos10.12")] [SupportedOSPlatform ("maccatalyst")] #else - [iOS (10,0)] - [TV (10,0)] - [Mac (10,12)] + [iOS (10, 0)] + [TV (10, 0)] + [Mac (10, 12)] #endif [StructLayout (LayoutKind.Sequential)] public struct GKBox { @@ -45,9 +45,9 @@ namespace GameplayKit { [SupportedOSPlatform ("macos10.12")] [SupportedOSPlatform ("maccatalyst")] #else - [iOS (10,0)] - [TV (10,0)] - [Mac (10,12)] + [iOS (10, 0)] + [TV (10, 0)] + [Mac (10, 12)] #endif [StructLayout (LayoutKind.Sequential)] public struct GKQuad { @@ -61,9 +61,9 @@ namespace GameplayKit { [SupportedOSPlatform ("macos10.12")] [SupportedOSPlatform ("maccatalyst")] #else - [iOS (10,0)] - [TV (10,0)] - [Mac (10,12)] + [iOS (10, 0)] + [TV (10, 0)] + [Mac (10, 12)] #endif [StructLayout (LayoutKind.Sequential)] public struct GKTriangle { diff --git a/src/GameplayKit/GKState.cs b/src/GameplayKit/GKState.cs index c89638d035..f53d125d45 100644 --- a/src/GameplayKit/GKState.cs +++ b/src/GameplayKit/GKState.cs @@ -33,11 +33,11 @@ namespace GameplayKit { { if (instance is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (parameterName)); - - var klass = instance.Class; + + var klass = instance.Class; if ((klass is null) || (klass.Handle == IntPtr.Zero)) throw new ArgumentException ("Not an type exposed to ObjC", parameterName); - + return klass; } diff --git a/src/GameplayKit/GKStateMachine.cs b/src/GameplayKit/GKStateMachine.cs index 05322dd4a0..91e62d7b22 100644 --- a/src/GameplayKit/GKStateMachine.cs +++ b/src/GameplayKit/GKStateMachine.cs @@ -15,7 +15,7 @@ using ObjCRuntime; namespace GameplayKit { public partial class GKStateMachine : NSObject { - + public GKState? GetState (Type stateType) { return GetState (GKState.GetClass (stateType, "stateType")); diff --git a/src/GameplayKit/NSArray_GameplayKit.cs b/src/GameplayKit/NSArray_GameplayKit.cs index 01e473e174..6692678eb6 100644 --- a/src/GameplayKit/NSArray_GameplayKit.cs +++ b/src/GameplayKit/NSArray_GameplayKit.cs @@ -21,9 +21,9 @@ namespace GameplayKit { [SupportedOSPlatform ("macos10.12")] [SupportedOSPlatform ("maccatalyst")] #else - [iOS (10,0)] - [TV (10,0)] - [Mac (10,12)] + [iOS (10, 0)] + [TV (10, 0)] + [Mac (10, 12)] #endif public static class NSArray_GameplayKit { diff --git a/src/HealthKit/Enums.cs b/src/HealthKit/Enums.cs index 1655d55945..2cf74010a3 100644 --- a/src/HealthKit/Enums.cs +++ b/src/HealthKit/Enums.cs @@ -3,12 +3,11 @@ using ObjCRuntime; using Foundation; using System; -namespace HealthKit -{ +namespace HealthKit { // NSInteger -> HKDefines.h - [Watch (2,0)] - [iOS (8,0)] - [Mac (13,0)] + [Watch (2, 0)] + [iOS (8, 0)] + [Mac (13, 0)] [Native] public enum HKUpdateFrequency : long { Immediate = 1, @@ -18,9 +17,9 @@ namespace HealthKit } // NSInteger -> HKDefines.h - [Watch (2,0)] - [iOS (8,0)] - [Mac (13,0)] + [Watch (2, 0)] + [iOS (8, 0)] + [Mac (13, 0)] [Native] public enum HKAuthorizationStatus : long { NotDetermined = 0, @@ -29,22 +28,22 @@ namespace HealthKit } // NSInteger -> HKDefines.h - [Watch (2,0)] - [iOS (8,0)] - [Mac (13,0)] + [Watch (2, 0)] + [iOS (8, 0)] + [Mac (13, 0)] [Native] public enum HKBiologicalSex : long { NotSet = 0, Female, Male, - [iOS (8,2)] + [iOS (8, 2)] Other } // NSInteger -> HKDefines.h - [Watch (2,0)] - [iOS (8,0)] - [Mac (13,0)] + [Watch (2, 0)] + [iOS (8, 0)] + [Mac (13, 0)] [Native] public enum HKBloodType : long { NotSet = 0, @@ -59,9 +58,9 @@ namespace HealthKit } // NSInteger -> HKMetadata.h - [Watch (2,0)] - [iOS (8,0)] - [Mac (13,0)] + [Watch (2, 0)] + [iOS (8, 0)] + [Mac (13, 0)] [Native] public enum HKBodyTemperatureSensorLocation : long { Other = 0, @@ -79,9 +78,9 @@ namespace HealthKit } // NSInteger -> HKMetadata.h - [Watch (2,0)] - [iOS (8,0)] - [Mac (13,0)] + [Watch (2, 0)] + [iOS (8, 0)] + [Mac (13, 0)] [Native] public enum HKHeartRateSensorLocation : long { Other = 0, @@ -94,9 +93,9 @@ namespace HealthKit } // NSInteger -> HKObjectType.h - [Watch (2,0)] - [iOS (8,0)] - [Mac (13,0)] + [Watch (2, 0)] + [iOS (8, 0)] + [Mac (13, 0)] [Native] public enum HKQuantityAggregationStyle : long { Cumulative = 0, @@ -112,58 +111,58 @@ namespace HealthKit } // NSInteger -> HKObjectType.h - [Watch (2,0)] - [iOS (8,0)] - [Mac (13,0)] + [Watch (2, 0)] + [iOS (8, 0)] + [Mac (13, 0)] [Native] public enum HKCategoryValueSleepAnalysis : long { InBed, Asleep, - [Watch (3,0), iOS (10,0)] + [Watch (3, 0), iOS (10, 0)] Awake, - [Watch (9,0), MacCatalyst (16,0), Mac (13,0), iOS (16,0), NoTV] + [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] AsleepCore = 3, - [Watch (9,0), MacCatalyst (16,0), Mac (13,0), iOS (16,0), NoTV] + [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] AsleepDeep = 4, - [Watch (9,0), MacCatalyst (16,0), Mac (13,0), iOS (16,0), NoTV] + [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] AsleepREM = 5, } // NSUInteger -> HKQuery.h - [Watch (2,0)] - [iOS (8,0)] - [Mac (13,0)] + [Watch (2, 0)] + [iOS (8, 0)] + [Mac (13, 0)] [Native] [Flags] public enum HKQueryOptions : ulong { - None = 0, - StrictStartDate = 1 << 0, - StrictEndDate = 1 << 1 + None = 0, + StrictStartDate = 1 << 0, + StrictEndDate = 1 << 1 } // NSUInteger -> HKStatistics.h - [Watch (2,0)] - [iOS (8,0)] - [Mac (13,0)] + [Watch (2, 0)] + [iOS (8, 0)] + [Mac (13, 0)] [Native] [Flags] public enum HKStatisticsOptions : ulong { - None = 0, - SeparateBySource = 1 << 0, - DiscreteAverage = 1 << 1, - DiscreteMin = 1 << 2, - DiscreteMax = 1 << 3, - CumulativeSum = 1 << 4, + None = 0, + SeparateBySource = 1 << 0, + DiscreteAverage = 1 << 1, + DiscreteMin = 1 << 2, + DiscreteMax = 1 << 3, + CumulativeSum = 1 << 4, [iOS (13, 0), Watch (6, 0)] - MostRecent = 1 << 5, + MostRecent = 1 << 5, [iOS (13, 0), Watch (6, 0)] - Duration = 1 << 6, + Duration = 1 << 6, } // NSInteger -> HKUnit.h - [Watch (2,0)] - [iOS (8,0)] - [Mac (13,0)] + [Watch (2, 0)] + [iOS (8, 0)] + [Mac (13, 0)] [Native] public enum HKMetricPrefix : long { None = 0, @@ -184,9 +183,9 @@ namespace HealthKit } [Native] - [Watch (2,0)] - [iOS (8,0)] - [Mac (13,0)] + [Watch (2, 0)] + [iOS (8, 0)] + [Mac (13, 0)] public enum HKWorkoutActivityType : ulong { AmericanFootball = 1, Archery, @@ -249,35 +248,35 @@ namespace HealthKit WaterSports, Wrestling, Yoga, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] Barre, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] CoreTraining, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] CrossCountrySkiing, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] DownhillSkiing, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] Flexibility, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] HighIntensityIntervalTraining, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] JumpRope, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] Kickboxing, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] Pilates, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] Snowboarding, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] Stairs, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] StepTraining, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] WheelchairWalkPace, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] WheelchairRunPace, - [iOS (11,0), Watch (4,0)] + [iOS (11, 0), Watch (4, 0)] TaiChi, [iOS (11, 0), Watch (4, 0)] MixedCardio, @@ -287,36 +286,40 @@ namespace HealthKit DiscSports, [iOS (13, 0), Watch (6, 0)] FitnessGaming, - [iOS (14,0)][Watch (7,0)] + [iOS (14, 0)] + [Watch (7, 0)] CardioDance = 77, - [iOS (14,0)][Watch (7,0)] + [iOS (14, 0)] + [Watch (7, 0)] SocialDance = 78, - [iOS (14,0)][Watch (7,0)] + [iOS (14, 0)] + [Watch (7, 0)] Pickleball = 79, - [iOS (14,0)][Watch (7,0)] + [iOS (14, 0)] + [Watch (7, 0)] Cooldown = 80, - [Watch (9,0), MacCatalyst (16,0), Mac (13,0), iOS (16,0), NoTV] + [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] SwimBikeRun = 82, - [Watch (9,0), MacCatalyst (16,0), Mac (13,0), iOS (16,0), NoTV] + [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] Transition = 83, - [iOS (8,2)] + [iOS (8, 2)] Other = 3000 } [Native] - [Watch (2,0)] - [iOS (8,0)] - [Mac (13,0)] + [Watch (2, 0)] + [iOS (8, 0)] + [Mac (13, 0)] public enum HKWorkoutEventType : long { Pause = 1, Resume, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] Lap, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] Marker, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] MotionPaused, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] MotionResumed, [iOS (11, 0), Watch (4, 0)] Segment, @@ -324,17 +327,17 @@ namespace HealthKit PauseOrResumeRequest, } - [Watch (2,0)] - [iOS (9,0)] - [Mac (13,0)] + [Watch (2, 0)] + [iOS (9, 0)] + [Mac (13, 0)] [Native] public enum HKCategoryValue : long { NotApplicable = 0 } - [Watch (2,0)] - [iOS (9,0)] - [Mac (13,0)] + [Watch (2, 0)] + [iOS (9, 0)] + [Mac (13, 0)] [Native] public enum HKCategoryValueCervicalMucusQuality : long { NotApplicable = 0, @@ -345,9 +348,9 @@ namespace HealthKit EggWhite } - [Watch (2,0)] - [iOS (9,0)] - [Mac (13,0)] + [Watch (2, 0)] + [iOS (9, 0)] + [Mac (13, 0)] [Native] public enum HKCategoryValueMenstrualFlow : long { NotApplicable = 0, @@ -355,13 +358,14 @@ namespace HealthKit Light, Medium, Heavy, - [iOS (12,0)][Watch (5,0)] + [iOS (12, 0)] + [Watch (5, 0)] None, } - [Watch (2,0)] - [iOS (9,0)] - [Mac (13,0)] + [Watch (2, 0)] + [iOS (9, 0)] + [Mac (13, 0)] [Native] public enum HKCategoryValueOvulationTestResult : long { NotApplicable = 0, @@ -376,26 +380,26 @@ namespace HealthKit EstrogenSurge = 4, } - [Watch (2,0)] - [iOS (9,0)] - [Mac (13,0)] + [Watch (2, 0)] + [iOS (9, 0)] + [Mac (13, 0)] [Native] public enum HKCategoryValueAppleStandHour : long { Stood = 0, Idle } - [iOS (13,0)] - [Watch (6,0)] - [Mac (13,0)] + [iOS (13, 0)] + [Watch (6, 0)] + [Mac (13, 0)] [Native] public enum HKCategoryValueAudioExposureEvent : long { LoudEnvironment = 1, } - [Watch (2,0)] - [iOS (9,0)] - [Mac (13,0)] + [Watch (2, 0)] + [iOS (9, 0)] + [Mac (13, 0)] [Native] public enum HKFitzpatrickSkinType : long { NotSet = 0, @@ -407,7 +411,7 @@ namespace HealthKit VI } - [Watch (3,0), iOS (10,0), Mac (13,0)] + [Watch (3, 0), iOS (10, 0), Mac (13, 0)] [Native] public enum HKWheelchairUse : long { NotSet = 0, @@ -415,7 +419,7 @@ namespace HealthKit Yes, } - [Watch (3,0), iOS (10,0), Mac (13,0)] + [Watch (3, 0), iOS (10, 0), Mac (13, 0)] [Native] public enum HKWeatherCondition : long { None = 0, @@ -448,7 +452,7 @@ namespace HealthKit Tornado, } - [Watch (3,0), iOS (10,0), Mac (13,0)] + [Watch (3, 0), iOS (10, 0), Mac (13, 0)] [Native] public enum HKWorkoutSwimmingLocationType : long { Unknown = 0, @@ -456,7 +460,7 @@ namespace HealthKit OpenWater, } - [Watch (3,0), iOS (10,0), Mac (13,0)] + [Watch (3, 0), iOS (10, 0), Mac (13, 0)] [Native] public enum HKSwimmingStrokeStyle : long { Unknown = 0, @@ -465,7 +469,7 @@ namespace HealthKit Backstroke, Breaststroke, Butterfly, - [Watch (9,0), MacCatalyst (16,0), Mac (13,0), iOS (16,0), NoTV] + [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] Kickboard = 6, } @@ -502,8 +506,8 @@ namespace HealthKit PredictionSubMaxExercise, PredictionNonExercise, } - - [NoWatch, iOS (12, 0), Mac (13,0)] + + [NoWatch, iOS (12, 0), Mac (13, 0)] public enum HKFhirResourceType { [Field ("HKFHIRResourceTypeAllergyIntolerance")] AllergyIntolerance, @@ -551,16 +555,15 @@ namespace HealthKit CoverageRecord, } - [Watch (5,0), iOS (12,0), Mac (13,0)] + [Watch (5, 0), iOS (12, 0), Mac (13, 0)] [Native] - public enum HKAuthorizationRequestStatus : long - { + public enum HKAuthorizationRequestStatus : long { Unknown = 0, ShouldRequest, Unnecessary, } - [Watch (7,0), iOS (13,6), Mac (13,0)] + [Watch (7, 0), iOS (13, 6), Mac (13, 0)] [Native] public enum HKCategoryValueAppetiteChanges : long { Unspecified = 0, @@ -569,27 +572,27 @@ namespace HealthKit Increased, } - [Watch (7,0), iOS (14,0), Mac (13,0)] + [Watch (7, 0), iOS (14, 0), Mac (13, 0)] [Native] public enum HKAppleEcgAlgorithmVersion : long { Version1 = 1, Version2 = 2, } - [Watch (7,0), iOS (14,0), Mac (13,0)] + [Watch (7, 0), iOS (14, 0), Mac (13, 0)] [Native] public enum HKCategoryValueEnvironmentalAudioExposureEvent : long { MomentaryLimit = 1, } - [Watch (7,0), iOS (13,6), Mac (13,0)] + [Watch (7, 0), iOS (13, 6), Mac (13, 0)] [Native] public enum HKCategoryValuePresence : long { Present = 0, NotPresent, } - [Watch (7,0), iOS (13,6), Mac (13,0)] + [Watch (7, 0), iOS (13, 6), Mac (13, 0)] [Native] public enum HKCategoryValueSeverity : long { Unspecified = 0, @@ -599,7 +602,7 @@ namespace HealthKit Severe, } - [Watch (7,0), iOS (14,0), Mac (13,0)] + [Watch (7, 0), iOS (14, 0), Mac (13, 0)] [Native] public enum HKDevicePlacementSide : long { Unknown = 0, @@ -608,7 +611,7 @@ namespace HealthKit Central, } - [Watch (7,0), iOS (14,0), Mac (13,0)] + [Watch (7, 0), iOS (14, 0), Mac (13, 0)] [Native] public enum HKElectrocardiogramClassification : long { NotSet = 0, @@ -621,13 +624,13 @@ namespace HealthKit Unrecognized = 100, } - [Watch (7,0), iOS (14,0), Mac (13,0)] + [Watch (7, 0), iOS (14, 0), Mac (13, 0)] [Native] public enum HKElectrocardiogramLead : long { AppleWatchSimilarToLeadI = 1, } - [Watch (7,0), iOS (14,0), Mac (13,0)] + [Watch (7, 0), iOS (14, 0), Mac (13, 0)] [Native] public enum HKElectrocardiogramSymptomsStatus : long { NotSet = 0, @@ -645,19 +648,17 @@ namespace HealthKit Unknown, } - [Watch (9,0), MacCatalyst (16,0), Mac (13,0), iOS (16,0), NoTV] + [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Native] - public enum HKHeartRateRecoveryTestType : long - { + public enum HKHeartRateRecoveryTestType : long { MaxExercise = 1, PredictionSubMaxExercise, PredictionNonExercise, } - [Watch (9,0), MacCatalyst (16,0), Mac (13,0), iOS (16,0), NoTV] + [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Native] - public enum HKPrismBase : long - { + public enum HKPrismBase : long { None = 0, Up, Down, @@ -665,27 +666,24 @@ namespace HealthKit Out, } - [Watch (9,0), MacCatalyst (16,0), Mac (13,0), iOS (16,0), NoTV] + [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Native] - public enum HKUserMotionContext : long - { + public enum HKUserMotionContext : long { NotSet = 0, Stationary, Active, } - [Watch (9,0), MacCatalyst (16,0), Mac (13,0), iOS (16,0), NoTV] + [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Native] - public enum HKVisionEye : long - { + public enum HKVisionEye : long { Left = 1, Right, } - [Watch (9,0), MacCatalyst (16,0), Mac (13,0), iOS (16,0), NoTV] + [Watch (9, 0), MacCatalyst (16, 0), Mac (13, 0), iOS (16, 0), NoTV] [Native] - public enum HKVisionPrescriptionType : ulong - { + public enum HKVisionPrescriptionType : ulong { Glasses = 1, Contacts, } diff --git a/src/HealthKit/HKAppleWalkingSteadiness.cs b/src/HealthKit/HKAppleWalkingSteadiness.cs index 55f0067b18..bc065459db 100644 --- a/src/HealthKit/HKAppleWalkingSteadiness.cs +++ b/src/HealthKit/HKAppleWalkingSteadiness.cs @@ -14,12 +14,11 @@ namespace HealthKit { [SupportedOSPlatform ("maccatalyst15.0")] [SupportedOSPlatform ("macos13.0")] #else - [Watch (8,0)] - [iOS (15,0)] - [Mac (13,0)] + [Watch (8, 0)] + [iOS (15, 0)] + [Mac (13, 0)] #endif - public static class HKAppleWalkingSteadiness - { + public static class HKAppleWalkingSteadiness { [DllImport (Constants.HealthKitLibrary)] [return: MarshalAs (UnmanagedType.I1)] @@ -33,10 +32,10 @@ namespace HealthKit { error = null; if (HKAppleWalkingSteadinessClassificationForQuantity (value.GetHandle (), out var classificationOut, out var errorPtr)) { classification = (HKAppleWalkingSteadinessClassification) (long) classificationOut; - error = Runtime.GetNSObject (errorPtr, false); + error = Runtime.GetNSObject (errorPtr, false); return true; } - return false; + return false; } @@ -44,13 +43,13 @@ namespace HealthKit { static extern HKQuantityRef HKAppleWalkingSteadinessMinimumQuantityForClassification (nint classification); public static HKQuantity? GetMinimumQuantity (HKAppleWalkingSteadinessClassification classification) - => Runtime.GetNSObject (HKAppleWalkingSteadinessMinimumQuantityForClassification ((nint) (long) classification), false); + => Runtime.GetNSObject (HKAppleWalkingSteadinessMinimumQuantityForClassification ((nint) (long) classification), false); [DllImport (Constants.HealthKitLibrary)] static extern HKQuantityRef HKAppleWalkingSteadinessMaximumQuantityForClassification (nint classification); public static HKQuantity? GetMaximumQuantity (HKAppleWalkingSteadinessClassification classification) - => Runtime.GetNSObject (HKAppleWalkingSteadinessMaximumQuantityForClassification ((nint) (long) classification), false); + => Runtime.GetNSObject (HKAppleWalkingSteadinessMaximumQuantityForClassification ((nint) (long) classification), false); } } diff --git a/src/HealthKit/HKCategoryValueSleepAnalysisAsleep.cs b/src/HealthKit/HKCategoryValueSleepAnalysisAsleep.cs index 8244839d78..48c391d9f9 100644 --- a/src/HealthKit/HKCategoryValueSleepAnalysisAsleep.cs +++ b/src/HealthKit/HKCategoryValueSleepAnalysisAsleep.cs @@ -23,8 +23,7 @@ using System.Collections.Generic; using NativeHandle = System.IntPtr; #endif -namespace HealthKit -{ +namespace HealthKit { public partial class HKCategoryValueSleepAnalysisAsleep { #if NET @@ -33,7 +32,7 @@ namespace HealthKit [SupportedOSPlatform ("maccatalyst16.0")] [UnsupportedOSPlatform ("tvos")] #else - [iOS (16,0), Mac (13,0), Watch (9,0), NoTV, MacCatalyst (16,0)] + [iOS (16, 0), Mac (13, 0), Watch (9, 0), NoTV, MacCatalyst (16, 0)] #endif // NET [DllImport (Constants.HealthKitLibrary)] static extern NativeHandle HKCategoryValueSleepAnalysisAsleepValues (); @@ -44,14 +43,14 @@ namespace HealthKit [SupportedOSPlatform ("maccatalyst16.0")] [UnsupportedOSPlatform ("tvos")] #else - [iOS (16,0), Mac (13,0), Watch (9,0), NoTV, MacCatalyst (16,0)] + [iOS (16, 0), Mac (13, 0), Watch (9, 0), NoTV, MacCatalyst (16, 0)] #endif // NET public static HashSet GetAsleepValues () { using var values = Runtime.GetNSObject> (HKCategoryValueSleepAnalysisAsleepValues ())!; var hashSet = new HashSet (); foreach (NSNumber value in values) { - hashSet.Add ((HKCategoryValueSleepAnalysis) (int)value); + hashSet.Add ((HKCategoryValueSleepAnalysis) (int) value); } return hashSet; } diff --git a/src/HealthKit/HKObjectType.cs b/src/HealthKit/HKObjectType.cs index 563e485fda..a25dd4adbc 100644 --- a/src/HealthKit/HKObjectType.cs +++ b/src/HealthKit/HKObjectType.cs @@ -14,8 +14,7 @@ using System; using Foundation; -namespace HealthKit -{ +namespace HealthKit { #pragma warning disable CS0618 // Type or member is obsolete public partial class HKQuantityType { public static HKQuantityType? Create (HKQuantityTypeIdentifier kind) diff --git a/src/HealthKit/HKObsolete.cs b/src/HealthKit/HKObsolete.cs index 5c750ab8b1..c59a7ac6e7 100644 --- a/src/HealthKit/HKObsolete.cs +++ b/src/HealthKit/HKObsolete.cs @@ -6,7 +6,7 @@ namespace HealthKit { #if !XAMCORE_3_0 public partial class HKStatisticsCollectionQuery { - + [Obsolete ("Use 'InitialResultsHandler'.")] public virtual void SetInitialResultsHandler (HKStatisticsCollectionQueryInitialResultsHandler handler) { diff --git a/src/HealthKit/HKUnit.cs b/src/HealthKit/HKUnit.cs index 58a2648dd5..38e596d83e 100644 --- a/src/HealthKit/HKUnit.cs +++ b/src/HealthKit/HKUnit.cs @@ -2,10 +2,8 @@ using System; -namespace HealthKit -{ - public partial class HKUnit - { +namespace HealthKit { + public partial class HKUnit { public const double MolarMassBloodGlucose = 180.15588000005408; } } diff --git a/src/HomeKit/HMActionSet.cs b/src/HomeKit/HMActionSet.cs index d09670c1cb..e1c71d822f 100644 --- a/src/HomeKit/HMActionSet.cs +++ b/src/HomeKit/HMActionSet.cs @@ -13,7 +13,7 @@ namespace HomeKit { [SupportedOSPlatform ("tvos10.0")] [SupportedOSPlatform ("maccatalyst14.0")] #else - [iOS (9,0)] + [iOS (9, 0)] #endif public HMActionSetType ActionSetType { get { diff --git a/src/HomeKit/HMCharacteristic.cs b/src/HomeKit/HMCharacteristic.cs index fd2abf66df..0b4acd883b 100644 --- a/src/HomeKit/HMCharacteristic.cs +++ b/src/HomeKit/HMCharacteristic.cs @@ -6,21 +6,20 @@ using Foundation; namespace HomeKit { - partial class HMCharacteristic - { + partial class HMCharacteristic { public bool SupportsEventNotification { get { - foreach (var p in Properties){ + foreach (var p in Properties) { if (p == HMCharacteristicPropertyInternal.SupportsEventNotification) return true; } return false; } } - + public bool Readable { get { - foreach (var p in Properties){ + foreach (var p in Properties) { if (p == HMCharacteristicPropertyInternal.Readable) return true; } @@ -30,7 +29,7 @@ namespace HomeKit { public bool Writable { get { - foreach (var p in Properties){ + foreach (var p in Properties) { if (p == HMCharacteristicPropertyInternal.Writable) return true; } @@ -43,8 +42,8 @@ namespace HomeKit { [SupportedOSPlatform ("tvos10.0")] [SupportedOSPlatform ("maccatalyst14.0")] #else - [iOS (9,3)] - [Watch (2,2)] + [iOS (9, 3)] + [Watch (2, 2)] #endif public bool Hidden { get { diff --git a/src/HomeKit/HMCharacteristicMetadata.cs b/src/HomeKit/HMCharacteristicMetadata.cs index c4211472e6..5adf09bf3d 100644 --- a/src/HomeKit/HMCharacteristicMetadata.cs +++ b/src/HomeKit/HMCharacteristicMetadata.cs @@ -7,8 +7,7 @@ using Foundation; namespace HomeKit { - public partial class HMCharacteristicMetadata - { + public partial class HMCharacteristicMetadata { public HMCharacteristicMetadataUnits Units { get { var u = _Units; diff --git a/src/HomeKit/HMCharacteristicProperties.cs b/src/HomeKit/HMCharacteristicProperties.cs index d443fc9a3b..fff9d8ed25 100644 --- a/src/HomeKit/HMCharacteristicProperties.cs +++ b/src/HomeKit/HMCharacteristicProperties.cs @@ -12,8 +12,8 @@ namespace HomeKit { [SupportedOSPlatform ("maccatalyst")] [SupportedOSPlatform ("tvos10.0")] #else - [iOS (8,0)] - [TV (10,0)] + [iOS (8, 0)] + [TV (10, 0)] #endif public class HMCharacteristicProperties { diff --git a/src/HomeKit/HMCompat.cs b/src/HomeKit/HMCompat.cs index da0f682bbc..5765778ced 100644 --- a/src/HomeKit/HMCompat.cs +++ b/src/HomeKit/HMCompat.cs @@ -56,16 +56,16 @@ namespace HomeKit { protected HMChipServiceTopology (IntPtr handle) => throw new InvalidOperationException (Constants.RemovedFromHomeKit); public HMChipServiceTopology (NSCoder coder) => throw new InvalidOperationException (Constants.RemovedFromHomeKit); protected HMChipServiceTopology (NSObjectFlag t) => throw new InvalidOperationException (Constants.RemovedFromHomeKit); - public HMChipServiceTopology (HMChipServiceHome[] homes) => throw new InvalidOperationException (Constants.RemovedFromHomeKit); + public HMChipServiceTopology (HMChipServiceHome [] homes) => throw new InvalidOperationException (Constants.RemovedFromHomeKit); public virtual NSObject Copy (NSZone? zone) => throw new InvalidOperationException (Constants.RemovedFromHomeKit); public virtual void EncodeTo (NSCoder encoder) => throw new InvalidOperationException (Constants.RemovedFromHomeKit); - public virtual HMChipServiceHome[] Homes => throw new InvalidOperationException (Constants.RemovedFromHomeKit); + public virtual HMChipServiceHome [] Homes => throw new InvalidOperationException (Constants.RemovedFromHomeKit); } /* class HMChipServiceTopology */ [Obsolete ("This class is removed, use 'HMMatterRoom' instead.")] - [Register("HMCHIPServiceRoom", SkipRegistration = true)] + [Register ("HMCHIPServiceRoom", SkipRegistration = true)] public class HMChipServiceRoom : NSObject, INSCoding, INSCopying, INSSecureCoding { public override IntPtr ClassHandle => throw new InvalidOperationException (Constants.RemovedFromHomeKit); @@ -75,7 +75,7 @@ namespace HomeKit { protected HMChipServiceRoom (NSObjectFlag t) => throw new InvalidOperationException (Constants.RemovedFromHomeKit); public HMChipServiceRoom (NSUuid uuid, string name) => throw new InvalidOperationException (Constants.RemovedFromHomeKit); - public virtual NSObject Copy (NSZone? zone)=> throw new InvalidOperationException (Constants.RemovedFromHomeKit); + public virtual NSObject Copy (NSZone? zone) => throw new InvalidOperationException (Constants.RemovedFromHomeKit); public virtual void EncodeTo (NSCoder encoder) => throw new InvalidOperationException (Constants.RemovedFromHomeKit); public virtual string Name => throw new InvalidOperationException (Constants.RemovedFromHomeKit); public virtual NSUuid Uuid => throw new InvalidOperationException (Constants.RemovedFromHomeKit); @@ -83,7 +83,7 @@ namespace HomeKit { } /* class HMChipServiceRoom */ [Obsolete ("This class is removed.")] - [Register("HMCHIPServiceHome", SkipRegistration = true)] + [Register ("HMCHIPServiceHome", SkipRegistration = true)] public partial class HMChipServiceHome : NSObject, INSCoding, INSCopying, INSSecureCoding { public override IntPtr ClassHandle => throw new InvalidOperationException (Constants.RemovedFromHomeKit); @@ -112,7 +112,7 @@ namespace HomeKit { [Obsolete (Constants.RemovedFromHomeKit)] public virtual Task AddAndSetUpAccessoriesAsync (HMChipServiceTopology topology) => throw new InvalidOperationException (Constants.RemovedFromHomeKit); #pragma warning restore CS0618 // HMChipServiceTopology and HMErrorHandler is obsolete - } + } #endif // !NET #if !XAMCORE_5_0 @@ -157,7 +157,7 @@ namespace HomeKit { public virtual string Name => throw new InvalidOperationException (Constants.RemovedFromHomeKit); public virtual NSUuid Uuid => throw new InvalidOperationException (Constants.RemovedFromHomeKit); - public virtual NSObject Copy (NSZone? zone)=> throw new InvalidOperationException (Constants.RemovedFromHomeKit); + public virtual NSObject Copy (NSZone? zone) => throw new InvalidOperationException (Constants.RemovedFromHomeKit); public virtual void EncodeTo (NSCoder encoder) => throw new InvalidOperationException (Constants.RemovedFromHomeKit); } @@ -170,7 +170,7 @@ namespace HomeKit { [UnsupportedOSPlatform ("maccatalyst16.1")] [UnsupportedOSPlatform ("macos13.0")] #endif - [Register("HMMatterHome", SkipRegistration = true)] + [Register ("HMMatterHome", SkipRegistration = true)] public partial class HMMatterHome : NSObject, INSCoding, INSCopying, INSSecureCoding { public override NativeHandle ClassHandle => throw new InvalidOperationException (Constants.RemovedFromHomeKit); @@ -196,7 +196,7 @@ namespace HomeKit { [UnsupportedOSPlatform ("maccatalyst16.1")] [UnsupportedOSPlatform ("macos13.0")] #endif - [Register("HMMatterTopology", SkipRegistration = true)] + [Register ("HMMatterTopology", SkipRegistration = true)] public partial class HMMatterTopology : NSObject, INSCoding, INSCopying, INSSecureCoding { public override NativeHandle ClassHandle => throw new InvalidOperationException (Constants.RemovedFromHomeKit); @@ -208,11 +208,11 @@ namespace HomeKit { public HMMatterTopology (HMMatterHome [] homes) => throw new InvalidOperationException (Constants.RemovedFromHomeKit); public virtual HMMatterHome [] Homes => throw new InvalidOperationException (Constants.RemovedFromHomeKit); - public virtual NSObject Copy (NSZone? zone)=> throw new InvalidOperationException (Constants.RemovedFromHomeKit); + public virtual NSObject Copy (NSZone? zone) => throw new InvalidOperationException (Constants.RemovedFromHomeKit); public virtual void EncodeTo (NSCoder encoder) => throw new InvalidOperationException (Constants.RemovedFromHomeKit); } - public delegate void HMFetchRoomHandler (HMMatterRoom [] rooms, NSError error); + public delegate void HMFetchRoomHandler (HMMatterRoom [] rooms, NSError error); #if !NET [Obsolete ("This class is removed.")] @@ -222,7 +222,7 @@ namespace HomeKit { [UnsupportedOSPlatform ("maccatalyst16.1")] [UnsupportedOSPlatform ("macos13.0")] #endif - [Register("HMMatterRequestHandler", SkipRegistration = true)] + [Register ("HMMatterRequestHandler", SkipRegistration = true)] public partial class HMMatterRequestHandler : NSObject, INSExtensionRequestHandling { public override NativeHandle ClassHandle => throw new InvalidOperationException (Constants.RemovedFromHomeKit); @@ -231,7 +231,7 @@ namespace HomeKit { protected HMMatterRequestHandler (NSObjectFlag t) => throw new InvalidOperationException (Constants.RemovedFromHomeKit); public virtual void FetchRooms (HMMatterHome home, HMFetchRoomHandler completion) => throw new InvalidOperationException (Constants.RemovedFromHomeKit); - public virtual Task FetchRoomsAsync (HMMatterHome home) => throw new InvalidOperationException (Constants.RemovedFromHomeKit); + public virtual Task FetchRoomsAsync (HMMatterHome home) => throw new InvalidOperationException (Constants.RemovedFromHomeKit); public virtual void PairAccessory (HMMatterHome home, string onboardingPayload, Action completion) => throw new InvalidOperationException (Constants.RemovedFromHomeKit); public virtual Task PairAccessoryAsync (HMMatterHome home, string onboardingPayload) => throw new InvalidOperationException (Constants.RemovedFromHomeKit); diff --git a/src/HomeKit/HMEnums.cs b/src/HomeKit/HMEnums.cs index f78411d40e..187e06d65e 100644 --- a/src/HomeKit/HMEnums.cs +++ b/src/HomeKit/HMEnums.cs @@ -4,105 +4,105 @@ using Foundation; namespace HomeKit { - [iOS (8,0)] - [TV (10,0)] - [MacCatalyst (14,0)] + [iOS (8, 0)] + [TV (10, 0)] + [MacCatalyst (14, 0)] [Native ("HMErrorCode")] public enum HMError : long { - UnexpectedError = -1, - AlreadyExists = 1, - NotFound = 2, - InvalidParameter = 3, - AccessoryNotReachable = 4, - ReadOnlyCharacteristic = 5, - WriteOnlyCharacteristic = 6, - NotificationNotSupported = 7, - OperationTimedOut = 8, - AccessoryPoweredOff = 9, - AccessDenied = 10, - ObjectAssociatedToAnotherHome = 11, - ObjectNotAssociatedToAnyHome = 12, - ObjectAlreadyAssociatedToHome = 13, - AccessoryIsBusy = 14, - OperationInProgress = 15, - AccessoryOutOfResources = 16, - InsufficientPrivileges = 17, - AccessoryPairingFailed = 18, - InvalidDataFormatSpecified = 19, - NilParameter = 20, - UnconfiguredParameter = 21, - InvalidClass = 22, - OperationCancelled = 23, - RoomForHomeCannotBeInZone = 24, - NoActionsInActionSet = 25, - NoRegisteredActionSets = 26, - MissingParameter = 27, - FireDateInPast = 28, - RoomForHomeCannotBeUpdated = 29, - ActionInAnotherActionSet = 30, - ObjectWithSimilarNameExistsInHome = 31, - HomeWithSimilarNameExists = 32, - RenameWithSimilarName = 33, - CannotRemoveNonBridgeAccessory = 34, - NameContainsProhibitedCharacters = 35, - NameDoesNotStartWithValidCharacters = 36, - UserIDNotEmailAddress = 37, - UserDeclinedAddingUser = 38, - UserDeclinedRemovingUser = 39, - UserDeclinedInvite = 40, - UserManagementFailed = 41, - RecurrenceTooSmall = 42, - InvalidValueType = 43, - ValueLowerThanMinimum = 44, - ValueHigherThanMaximum = 45, - StringLongerThanMaximum = 46, - HomeAccessNotAuthorized = 47, - OperationNotSupported = 48, - MaximumObjectLimitReached = 49, - AccessorySentInvalidResponse = 50, - StringShorterThanMinimum = 51, - GenericError = 52, - SecurityFailure = 53, - CommunicationFailure = 54, - MessageAuthenticationFailed = 55, - InvalidMessageSize = 56, - AccessoryDiscoveryFailed = 57, - ClientRequestError = 58, - AccessoryResponseError = 59, - NameDoesNotEndWithValidCharacters = 60, - AccessoryIsBlocked = 61, - InvalidAssociatedServiceType = 62, - ActionSetExecutionFailed = 63, - ActionSetExecutionPartialSuccess = 64, - ActionSetExecutionInProgress = 65, - AccessoryOutOfCompliance = 66, - DataResetFailure = 67, - NotificationAlreadyEnabled = 68, - RecurrenceMustBeOnSpecifiedBoundaries = 69, - DateMustBeOnSpecifiedBoundaries = 70, - CannotActivateTriggerTooFarInFuture = 71, - RecurrenceTooLarge = 72, - ReadWritePartialSuccess = 73, - ReadWriteFailure = 74, - NotSignedIntoiCloud = 75, - KeychainSyncNotEnabled = 76, - CloudDataSyncInProgress = 77, - NetworkUnavailable = 78, - AddAccessoryFailed = 79, - MissingEntitlement = 80, - CannotUnblockNonBridgeAccessory = 81, - DeviceLocked = 82, - CannotRemoveBuiltinActionSet = 83, - LocationForHomeDisabled = 84, - NotAuthorizedForLocationServices = 85, + UnexpectedError = -1, + AlreadyExists = 1, + NotFound = 2, + InvalidParameter = 3, + AccessoryNotReachable = 4, + ReadOnlyCharacteristic = 5, + WriteOnlyCharacteristic = 6, + NotificationNotSupported = 7, + OperationTimedOut = 8, + AccessoryPoweredOff = 9, + AccessDenied = 10, + ObjectAssociatedToAnotherHome = 11, + ObjectNotAssociatedToAnyHome = 12, + ObjectAlreadyAssociatedToHome = 13, + AccessoryIsBusy = 14, + OperationInProgress = 15, + AccessoryOutOfResources = 16, + InsufficientPrivileges = 17, + AccessoryPairingFailed = 18, + InvalidDataFormatSpecified = 19, + NilParameter = 20, + UnconfiguredParameter = 21, + InvalidClass = 22, + OperationCancelled = 23, + RoomForHomeCannotBeInZone = 24, + NoActionsInActionSet = 25, + NoRegisteredActionSets = 26, + MissingParameter = 27, + FireDateInPast = 28, + RoomForHomeCannotBeUpdated = 29, + ActionInAnotherActionSet = 30, + ObjectWithSimilarNameExistsInHome = 31, + HomeWithSimilarNameExists = 32, + RenameWithSimilarName = 33, + CannotRemoveNonBridgeAccessory = 34, + NameContainsProhibitedCharacters = 35, + NameDoesNotStartWithValidCharacters = 36, + UserIDNotEmailAddress = 37, + UserDeclinedAddingUser = 38, + UserDeclinedRemovingUser = 39, + UserDeclinedInvite = 40, + UserManagementFailed = 41, + RecurrenceTooSmall = 42, + InvalidValueType = 43, + ValueLowerThanMinimum = 44, + ValueHigherThanMaximum = 45, + StringLongerThanMaximum = 46, + HomeAccessNotAuthorized = 47, + OperationNotSupported = 48, + MaximumObjectLimitReached = 49, + AccessorySentInvalidResponse = 50, + StringShorterThanMinimum = 51, + GenericError = 52, + SecurityFailure = 53, + CommunicationFailure = 54, + MessageAuthenticationFailed = 55, + InvalidMessageSize = 56, + AccessoryDiscoveryFailed = 57, + ClientRequestError = 58, + AccessoryResponseError = 59, + NameDoesNotEndWithValidCharacters = 60, + AccessoryIsBlocked = 61, + InvalidAssociatedServiceType = 62, + ActionSetExecutionFailed = 63, + ActionSetExecutionPartialSuccess = 64, + ActionSetExecutionInProgress = 65, + AccessoryOutOfCompliance = 66, + DataResetFailure = 67, + NotificationAlreadyEnabled = 68, + RecurrenceMustBeOnSpecifiedBoundaries = 69, + DateMustBeOnSpecifiedBoundaries = 70, + CannotActivateTriggerTooFarInFuture = 71, + RecurrenceTooLarge = 72, + ReadWritePartialSuccess = 73, + ReadWriteFailure = 74, + NotSignedIntoiCloud = 75, + KeychainSyncNotEnabled = 76, + CloudDataSyncInProgress = 77, + NetworkUnavailable = 78, + AddAccessoryFailed = 79, + MissingEntitlement = 80, + CannotUnblockNonBridgeAccessory = 81, + DeviceLocked = 82, + CannotRemoveBuiltinActionSet = 83, + LocationForHomeDisabled = 84, + NotAuthorizedForLocationServices = 85, // iOS 9.3 - ReferToUserManual = 86, + ReferToUserManual = 86, // iOS 10.0 - InvalidOrMissingAuthorizationData = 87, - BridgedAccessoryNotReachable = 88, - NotAuthorizedForMicrophoneAccess = 89, + InvalidOrMissingAuthorizationData = 87, + BridgedAccessoryNotReachable = 88, + NotAuthorizedForMicrophoneAccess = 89, // iOS 10.2 - IncompatibleNetwork = 90, + IncompatibleNetwork = 90, // iOS 11 NoHomeHub = 91, IncompatibleHomeHub = 92, // HMErrorCodeNoCompatibleHomeHub introduced and deprecated on iOS 11. HMErrorCodeIncompatibleHomeHub = HMErrorCodeNoCompatibleHomeHub. @@ -120,11 +120,11 @@ namespace HomeKit { AccessoryIsSuspended = 103, } - + // conveniance enum (ObjC uses NSString) - [iOS (8,0)] - [TV (10,0)] - [MacCatalyst (14,0)] + [iOS (8, 0)] + [TV (10, 0)] + [MacCatalyst (14, 0)] public enum HMCharacteristicType { None, @@ -244,404 +244,405 @@ namespace HomeKit { [Field ("HMCharacteristicTypeLockManagementAutoSecureTimeout")] LockManagementAutoSecureTimeout, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMCharacteristicTypeAirParticulateDensity")] AirParticulateDensity, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMCharacteristicTypeAirParticulateSize")] AirParticulateSize, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMCharacteristicTypeAirQuality")] AirQuality, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMCharacteristicTypeBatteryLevel")] BatteryLevel, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMCharacteristicTypeCarbonDioxideDetected")] CarbonDioxideDetected, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMCharacteristicTypeCarbonDioxideLevel")] CarbonDioxideLevel, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMCharacteristicTypeCarbonDioxidePeakLevel")] CarbonDioxidePeakLevel, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMCharacteristicTypeCarbonMonoxideDetected")] CarbonMonoxideDetected, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMCharacteristicTypeCarbonMonoxideLevel")] CarbonMonoxideLevel, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMCharacteristicTypeCarbonMonoxidePeakLevel")] CarbonMonoxidePeakLevel, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMCharacteristicTypeChargingState")] ChargingState, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMCharacteristicTypeContactState")] ContactState, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMCharacteristicTypeCurrentSecuritySystemState")] CurrentSecuritySystemState, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMCharacteristicTypeCurrentHorizontalTilt")] CurrentHorizontalTilt, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMCharacteristicTypeCurrentLightLevel")] CurrentLightLevel, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMCharacteristicTypeCurrentPosition")] CurrentPosition, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMCharacteristicTypeCurrentVerticalTilt")] CurrentVerticalTilt, - [iOS (9,0)] + [iOS (9, 0)] [Deprecated (PlatformName.TvOS, 11, 0, message: "Use 'HMAccessory.FirmwareVersion' instead.")] [Deprecated (PlatformName.WatchOS, 4, 0, message: "Use 'HMAccessory.FirmwareVersion' instead.")] [Deprecated (PlatformName.iOS, 11, 0, message: "Use 'HMAccessory.FirmwareVersion' instead.")] [Field ("HMCharacteristicTypeFirmwareVersion")] FirmwareVersion, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMCharacteristicTypeHardwareVersion")] HardwareVersion, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMCharacteristicTypeHoldPosition")] HoldPosition, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMCharacteristicTypeInputEvent")] InputEvent, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMCharacteristicTypeLeakDetected")] LeakDetected, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMCharacteristicTypeOccupancyDetected")] OccupancyDetected, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMCharacteristicTypeOutputState")] OutputState, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMCharacteristicTypePositionState")] PositionState, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMCharacteristicTypeSmokeDetected")] SmokeDetected, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMCharacteristicTypeSoftwareVersion")] SoftwareVersion, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMCharacteristicTypeStatusActive")] StatusActive, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMCharacteristicTypeStatusFault")] StatusFault, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMCharacteristicTypeStatusJammed")] StatusJammed, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMCharacteristicTypeStatusLowBattery")] StatusLowBattery, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMCharacteristicTypeStatusTampered")] StatusTampered, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMCharacteristicTypeTargetSecuritySystemState")] TargetSecuritySystemState, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMCharacteristicTypeTargetHorizontalTilt")] TargetHorizontalTilt, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMCharacteristicTypeTargetPosition")] TargetPosition, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMCharacteristicTypeTargetVerticalTilt")] TargetVerticalTilt, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] [Field ("HMCharacteristicTypeStreamingStatus")] StreamingStatus, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] [Field ("HMCharacteristicTypeSetupStreamEndpoint")] SetupStreamEndpoint, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] [Field ("HMCharacteristicTypeSupportedVideoStreamConfiguration")] SupportedVideoStreamConfiguration, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] [Field ("HMCharacteristicTypeSupportedAudioStreamConfiguration")] SupportedAudioStreamConfiguration, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] [Field ("HMCharacteristicTypeSupportedRTPConfiguration")] SupportedRtpConfiguration, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] [Field ("HMCharacteristicTypeSelectedStreamConfiguration")] SelectedStreamConfiguration, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] [Field ("HMCharacteristicTypeVolume")] Volume, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] [Field ("HMCharacteristicTypeMute")] Mute, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] [Field ("HMCharacteristicTypeNightVision")] NightVision, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] [Field ("HMCharacteristicTypeOpticalZoom")] OpticalZoom, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] [Field ("HMCharacteristicTypeDigitalZoom")] DigitalZoom, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] [Field ("HMCharacteristicTypeImageRotation")] ImageRotation, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] [Field ("HMCharacteristicTypeImageMirroring")] ImageMirroring, - [Watch (3,1,1)] - [iOS (10,2), TV (10,1)] + [Watch (3, 1, 1)] + [iOS (10, 2), TV (10, 1)] [Field ("HMCharacteristicTypeActive")] Active, - [Watch (3,1,1)] - [iOS (10,2), TV (10,1)] + [Watch (3, 1, 1)] + [iOS (10, 2), TV (10, 1)] [Field ("HMCharacteristicTypeCurrentAirPurifierState")] CurrentAirPurifierState, - [Watch (3,1,1)] - [iOS (10,2), TV (10,1)] + [Watch (3, 1, 1)] + [iOS (10, 2), TV (10, 1)] [Field ("HMCharacteristicTypeTargetAirPurifierState")] TargetAirPurifierState, - [Watch (3,1,1)] - [iOS (10,2), TV (10,1)] + [Watch (3, 1, 1)] + [iOS (10, 2), TV (10, 1)] [Field ("HMCharacteristicTypeCurrentFanState")] CurrentFanState, - [Watch (3,1,1)] - [iOS (10,2), TV (10,1)] + [Watch (3, 1, 1)] + [iOS (10, 2), TV (10, 1)] [Field ("HMCharacteristicTypeCurrentHeaterCoolerState")] CurrentHeaterCoolerState, - [Watch (3,1,1)] - [iOS (10,2), TV (10,1)] + [Watch (3, 1, 1)] + [iOS (10, 2), TV (10, 1)] [Field ("HMCharacteristicTypeCurrentHumidifierDehumidifierState")] CurrentHumidifierDehumidifierState, - [Watch (3,1,1)] - [iOS (10,2), TV (10,1)] + [Watch (3, 1, 1)] + [iOS (10, 2), TV (10, 1)] [Field ("HMCharacteristicTypeCurrentSlatState")] CurrentSlatState, - [Watch (3,1,1)] - [iOS (10,2), TV (10,1)] + [Watch (3, 1, 1)] + [iOS (10, 2), TV (10, 1)] [Field ("HMCharacteristicTypeWaterLevel")] WaterLevel, - [Watch (3,1,1)] - [iOS (10,2), TV (10,1)] + [Watch (3, 1, 1)] + [iOS (10, 2), TV (10, 1)] [Field ("HMCharacteristicTypeFilterChangeIndication")] FilterChangeIndication, - [Watch (3,1,1)] - [iOS (10,2), TV (10,1)] + [Watch (3, 1, 1)] + [iOS (10, 2), TV (10, 1)] [Field ("HMCharacteristicTypeFilterLifeLevel")] FilterLifeLevel, - [Watch (3,1,1)] - [iOS (10,2), TV (10,1)] + [Watch (3, 1, 1)] + [iOS (10, 2), TV (10, 1)] [Field ("HMCharacteristicTypeFilterResetChangeIndication")] FilterResetChangeIndication, - [Watch (3,1,1)] - [iOS (10,2), TV (10,1)] + [Watch (3, 1, 1)] + [iOS (10, 2), TV (10, 1)] [Field ("HMCharacteristicTypeLockPhysicalControls")] LockPhysicalControls, - [Watch (3,1,1)] - [iOS (10,2), TV (10,1)] + [Watch (3, 1, 1)] + [iOS (10, 2), TV (10, 1)] [Field ("HMCharacteristicTypeSwingMode")] SwingMode, - [Watch (3,1,1)] - [iOS (10,2), TV (10,1)] + [Watch (3, 1, 1)] + [iOS (10, 2), TV (10, 1)] [Field ("HMCharacteristicTypeTargetHeaterCoolerState")] TargetHeaterCoolerState, - [Watch (3,1,1)] - [iOS (10,2), TV (10,1)] + [Watch (3, 1, 1)] + [iOS (10, 2), TV (10, 1)] [Field ("HMCharacteristicTypeTargetHumidifierDehumidifierState")] TargetHumidifierDehumidifierState, - [Watch (3,1,1)] - [iOS (10,2), TV (10,1)] + [Watch (3, 1, 1)] + [iOS (10, 2), TV (10, 1)] [Field ("HMCharacteristicTypeTargetFanState")] TargetFanState, - [Watch (3,1,1)] - [iOS (10,2), TV (10,1)] + [Watch (3, 1, 1)] + [iOS (10, 2), TV (10, 1)] [Field ("HMCharacteristicTypeSlatType")] SlatType, - [Watch (3,1,1)] - [iOS (10,2), TV (10,1)] + [Watch (3, 1, 1)] + [iOS (10, 2), TV (10, 1)] [Field ("HMCharacteristicTypeCurrentTilt")] CurrentTilt, - [Watch (3,1,1)] - [iOS (10,2), TV (10,1)] + [Watch (3, 1, 1)] + [iOS (10, 2), TV (10, 1)] [Field ("HMCharacteristicTypeTargetTilt")] TargetTilt, - [Watch (3,1,1)] - [iOS (10,2), TV (10,1)] + [Watch (3, 1, 1)] + [iOS (10, 2), TV (10, 1)] [Field ("HMCharacteristicTypeOzoneDensity")] OzoneDensity, - [Watch (3,1,1)] - [iOS (10,2), TV (10,1)] + [Watch (3, 1, 1)] + [iOS (10, 2), TV (10, 1)] [Field ("HMCharacteristicTypeNitrogenDioxideDensity")] NitrogenDioxideDensity, - [Watch (3,1,1)] - [iOS (10,2), TV (10,1)] + [Watch (3, 1, 1)] + [iOS (10, 2), TV (10, 1)] [Field ("HMCharacteristicTypeSulphurDioxideDensity")] SulphurDioxideDensity, - [Watch (3,1,1)] - [iOS (10,2), TV (10,1)] + [Watch (3, 1, 1)] + [iOS (10, 2), TV (10, 1)] [Field ("HMCharacteristicTypePM2_5Density")] PM2_5Density, - [Watch (3,1,1)] - [iOS (10,2), TV (10,1)] + [Watch (3, 1, 1)] + [iOS (10, 2), TV (10, 1)] [Field ("HMCharacteristicTypePM10Density")] PM10Density, - [Watch (3,1,1)] - [iOS (10,2), TV (10,1)] + [Watch (3, 1, 1)] + [iOS (10, 2), TV (10, 1)] [Field ("HMCharacteristicTypeVolatileOrganicCompoundDensity")] VolatileOrganicCompoundDensity, - [Watch (3,1,1)] - [iOS (10,2), TV (10,1)] + [Watch (3, 1, 1)] + [iOS (10, 2), TV (10, 1)] [Field ("HMCharacteristicTypeDehumidifierThreshold")] DehumidifierThreshold, - [Watch (3,1,1)] - [iOS (10,2), TV (10,1)] + [Watch (3, 1, 1)] + [iOS (10, 2), TV (10, 1)] [Field ("HMCharacteristicTypeHumidifierThreshold")] HumidifierThreshold, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMCharacteristicTypeSecuritySystemAlarmType")] SecuritySystemAlarmType, - [iOS (10,3), Watch (3,2), TV (10,2)] + [iOS (10, 3), Watch (3, 2), TV (10, 2)] [Field ("HMCharacteristicTypeLabelNamespace")] LabelNamespace, - [iOS (10,3), Watch (3,2), TV (10,2)] + [iOS (10, 3), Watch (3, 2), TV (10, 2)] [Field ("HMCharacteristicTypeLabelIndex")] LabelIndex, - [iOS (11,0), Watch (4,0), TV (11,0)] + [iOS (11, 0), Watch (4, 0), TV (11, 0)] [Field ("HMCharacteristicTypeColorTemperature")] ColorTemperature, - [Watch (4,2), TV (11,2), iOS (11,2)] + [Watch (4, 2), TV (11, 2), iOS (11, 2)] [Field ("HMCharacteristicTypeProgramMode")] ProgramMode, - [Watch (4,2), TV (11,2), iOS (11,2)] + [Watch (4, 2), TV (11, 2), iOS (11, 2)] [Field ("HMCharacteristicTypeInUse")] InUse, - [Watch (4,2), TV (11,2), iOS (11,2)] + [Watch (4, 2), TV (11, 2), iOS (11, 2)] [Field ("HMCharacteristicTypeSetDuration")] SetDuration, - [Watch (4,2), TV (11,2), iOS (11,2)] + [Watch (4, 2), TV (11, 2), iOS (11, 2)] [Field ("HMCharacteristicTypeRemainingDuration")] RemainingDuration, - [Watch (4,2), TV (11,2), iOS (11,2)] + [Watch (4, 2), TV (11, 2), iOS (11, 2)] [Field ("HMCharacteristicTypeValveType")] ValveType, - [Watch (4,2), TV (11,2), iOS (11,2)] + [Watch (4, 2), TV (11, 2), iOS (11, 2)] [Field ("HMCharacteristicTypeIsConfigured")] IsConfigured, } // conveniance enum (ObjC uses NSString) - [iOS (8,0)] - [TV (10,0)] + [iOS (8, 0)] + [TV (10, 0)] public enum HMCharacteristicMetadataUnits { None, Celsius, Fahrenheit, Percentage, ArcDegree, - [iOS (8,3)] + [iOS (8, 3)] Seconds, - [iOS (9,3)][Watch(2,2)] + [iOS (9, 3)] + [Watch (2, 2)] Lux, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] PartsPerMillion, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] MicrogramsPerCubicMeter, } // conveniance enum (ObjC uses NSString) - [iOS (8,0)] - [TV (10,0)] - [MacCatalyst (14,0)] + [iOS (8, 0)] + [TV (10, 0)] + [MacCatalyst (14, 0)] [Flags] public enum HMServiceType { None, @@ -673,148 +674,148 @@ namespace HomeKit { [Field ("HMServiceTypeLockManagement")] LockManagement, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMServiceTypeAirQualitySensor")] AirQualitySensor, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMServiceTypeBattery")] Battery, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMServiceTypeCarbonDioxideSensor")] CarbonDioxideSensor, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMServiceTypeCarbonMonoxideSensor")] CarbonMonoxideSensor, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMServiceTypeContactSensor")] ContactSensor, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMServiceTypeDoor")] Door, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMServiceTypeHumiditySensor")] HumiditySensor, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMServiceTypeLeakSensor")] LeakSensor, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMServiceTypeLightSensor")] LightSensor, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMServiceTypeMotionSensor")] MotionSensor, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMServiceTypeOccupancySensor")] OccupancySensor, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMServiceTypeSecuritySystem")] SecuritySystem, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMServiceTypeStatefulProgrammableSwitch")] StatefulProgrammableSwitch, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMServiceTypeStatelessProgrammableSwitch")] StatelessProgrammableSwitch, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMServiceTypeSmokeSensor")] SmokeSensor, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMServiceTypeTemperatureSensor")] TemperatureSensor, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMServiceTypeWindow")] Window, - [iOS (9,0)] + [iOS (9, 0)] [Field ("HMServiceTypeWindowCovering")] WindowCovering, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] [Field ("HMServiceTypeCameraRTPStreamManagement")] CameraRtpStreamManagement, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] [Field ("HMServiceTypeCameraControl")] CameraControl, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] [Field ("HMServiceTypeMicrophone")] Microphone, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] [Field ("HMServiceTypeSpeaker")] Speaker, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] [Field ("HMServiceTypeDoorbell")] Doorbell, - [Watch (3,1,1)] - [iOS (10,2), TV (10,1)] + [Watch (3, 1, 1)] + [iOS (10, 2), TV (10, 1)] [Field ("HMServiceTypeAirPurifier")] AirPurifier, - [Watch (3,1,1)] - [iOS (10,2), TV (10,1)] + [Watch (3, 1, 1)] + [iOS (10, 2), TV (10, 1)] [Field ("HMServiceTypeVentilationFan")] VentilationFan, - [Watch (3,1,1)] - [iOS (10,2), TV (10,1)] + [Watch (3, 1, 1)] + [iOS (10, 2), TV (10, 1)] [Field ("HMServiceTypeFilterMaintenance")] FilterMaintenance, - [Watch (3,1,1)] - [iOS (10,2), TV (10,1)] + [Watch (3, 1, 1)] + [iOS (10, 2), TV (10, 1)] [Field ("HMServiceTypeHeaterCooler")] HeaterCooler, - [Watch (3,1,1)] - [iOS (10,2), TV (10,1)] + [Watch (3, 1, 1)] + [iOS (10, 2), TV (10, 1)] [Field ("HMServiceTypeHumidifierDehumidifier")] HumidifierDehumidifier, - [Watch (3,1,1)] - [iOS (10,2), TV (10,1)] + [Watch (3, 1, 1)] + [iOS (10, 2), TV (10, 1)] [Field ("HMServiceTypeSlats")] Slats, - [iOS (10,3), Watch (3,2), TV (10,2)] + [iOS (10, 3), Watch (3, 2), TV (10, 2)] [Field ("HMServiceTypeLabel")] Label, - [Watch (4,2), TV (11,2), iOS (11,2)] + [Watch (4, 2), TV (11, 2), iOS (11, 2)] [Field ("HMServiceTypeIrrigationSystem")] IrrigationSystem, - [Watch (4,2), TV (11,2), iOS (11,2)] + [Watch (4, 2), TV (11, 2), iOS (11, 2)] [Field ("HMServiceTypeValve")] Valve, - [Watch (4,2), TV (11,2), iOS (11,2)] + [Watch (4, 2), TV (11, 2), iOS (11, 2)] [Field ("HMServiceTypeFaucet")] Faucet, } // conveniance enum (ObjC uses NSString) - [iOS (8,0)] - [TV (10,0)] + [iOS (8, 0)] + [TV (10, 0)] public enum HMCharacteristicMetadataFormat { None, Bool, @@ -831,9 +832,9 @@ namespace HomeKit { Tlv8 } - [iOS (8,0)] - [TV (10,0)] - [MacCatalyst (14,0)] + [iOS (8, 0)] + [TV (10, 0)] + [MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueDoorState : long { Open = 0, @@ -843,9 +844,9 @@ namespace HomeKit { Stopped } - [iOS (8,0)] - [TV (10,0)] - [MacCatalyst (14,0)] + [iOS (8, 0)] + [TV (10, 0)] + [MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueHeatingCooling : long { Off = 0, @@ -854,27 +855,27 @@ namespace HomeKit { Auto } - [iOS (8,0)] - [TV (10,0)] - [MacCatalyst (14,0)] + [iOS (8, 0)] + [TV (10, 0)] + [MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueRotationDirection : long { Clockwise = 0, CounterClockwise } - [iOS (8,0)] - [TV (10,0)] - [MacCatalyst (14,0)] + [iOS (8, 0)] + [TV (10, 0)] + [MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueTemperatureUnit : long { Celsius = 0, Fahrenheit } - [iOS (8,0)] - [TV (10,0)] - [MacCatalyst (14,0)] + [iOS (8, 0)] + [TV (10, 0)] + [MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueLockMechanismState : long { Unsecured = 0, @@ -883,9 +884,9 @@ namespace HomeKit { Unknown } - [iOS (8,0)] - [TV (10,0)] - [MacCatalyst (14,0)] + [iOS (8, 0)] + [TV (10, 0)] + [MacCatalyst (14, 0)] [Native ("HMCharacteristicValueLockMechanismLastKnownAction")] // in iOS 8.3 this was renamed HMCharacteristicValueLockMechanismLastKnownAction but that would be a breaking change for us public enum HMCharacteristicValueLockMechanism : long { @@ -902,18 +903,18 @@ namespace HomeKit { LastKnownActionUnsecuredUsingPhysicalMovement, } - [iOS (9,0)] - [TV (10,0)] - [MacCatalyst (14,0)] + [iOS (9, 0)] + [TV (10, 0)] + [MacCatalyst (14, 0)] [Native ("HMCharacteristicValueAirParticulateSize")] public enum HMCharacteristicValueAirParticulate : long { Size2_5 = 0, Size10 } - [iOS (9,0)] - [TV (10,0)] - [MacCatalyst (14,0)] + [iOS (9, 0)] + [TV (10, 0)] + [MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueCurrentSecuritySystemState : long { StayArm = 0, @@ -923,9 +924,9 @@ namespace HomeKit { Triggered } - [iOS (9,0)] - [TV (10,0)] - [MacCatalyst (14,0)] + [iOS (9, 0)] + [TV (10, 0)] + [MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValuePositionState : long { Closing = 0, @@ -933,9 +934,9 @@ namespace HomeKit { Stopped } - [iOS (9,0)] - [TV (10,0)] - [MacCatalyst (14,0)] + [iOS (9, 0)] + [TV (10, 0)] + [MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueTargetSecuritySystemState : long { StayArm = 0, @@ -944,86 +945,86 @@ namespace HomeKit { Disarm } - [Watch (3,0), TV (10,0), iOS (10,0), MacCatalyst (14,0)] + [Watch (3, 0), TV (10, 0), iOS (10, 0), MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueBatteryStatus : long { Normal = 0, Low } - [Watch (3,0), TV (10,0), iOS (10,0), MacCatalyst (14,0)] + [Watch (3, 0), TV (10, 0), iOS (10, 0), MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueJammedStatus : long { None = 0, Jammed } - [Watch (3,0), TV (10,0), iOS (10,0), MacCatalyst (14,0)] + [Watch (3, 0), TV (10, 0), iOS (10, 0), MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueTamperedStatus : long { None = 0, Tampered } - [Watch (3,0), TV (10,0), iOS (10,0), MacCatalyst (14,0)] + [Watch (3, 0), TV (10, 0), iOS (10, 0), MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueLeakStatus : long { None = 0, Detected } - [Watch (3,0), TV (10,0), iOS (10,0), MacCatalyst (14,0)] + [Watch (3, 0), TV (10, 0), iOS (10, 0), MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueSmokeDetectionStatus : long { None = 0, Detected } - [Watch (3,0), TV (10,0), iOS (10,0), MacCatalyst (14,0)] + [Watch (3, 0), TV (10, 0), iOS (10, 0), MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueChargingState : long { None = 0, InProgress, - [iOS (10,2), Watch (3,1,1), TV (10,1)] + [iOS (10, 2), Watch (3, 1, 1), TV (10, 1)] NotChargeable, } - [Watch (3,0), TV (10,0), iOS (10,0), MacCatalyst (14,0)] + [Watch (3, 0), TV (10, 0), iOS (10, 0), MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueContactState : long { Detected = 0, None, } - [Watch (3,0), TV (10,0), iOS (10,0), MacCatalyst (14,0)] + [Watch (3, 0), TV (10, 0), iOS (10, 0), MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueStatusFault : long { NoFault = 0, GeneralFault } - [Watch (3,0), TV (10,0), iOS (10,0), MacCatalyst (14,0)] + [Watch (3, 0), TV (10, 0), iOS (10, 0), MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueCarbonMonoxideDetectionStatus : long { NotDetected = 0, Detected } - [Watch (3,0), TV (10,0), iOS (10,0), MacCatalyst (14,0)] + [Watch (3, 0), TV (10, 0), iOS (10, 0), MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueCarbonDioxideDetectionStatus : long { NotDetected = 0, Detected } - [Watch (3,0), TV (10,0), iOS (10,0), MacCatalyst (14,0)] + [Watch (3, 0), TV (10, 0), iOS (10, 0), MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueOccupancyStatus : long { NotOccupied = 0, Occupied } - [Watch (3,0), TV (10,0), iOS (10,0), MacCatalyst (14,0)] + [Watch (3, 0), TV (10, 0), iOS (10, 0), MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueSecuritySystemAlarmType : long { NoAlarm = 0, @@ -1031,8 +1032,8 @@ namespace HomeKit { } // conveniance enum (ObjC uses NSString) - [iOS (9,0)] - [TV (10,0)] + [iOS (9, 0)] + [TV (10, 0)] public enum HMActionSetType { Unknown = -1, WakeUp, @@ -1040,13 +1041,13 @@ namespace HomeKit { HomeDeparture, HomeArrival, UserDefined, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] TriggerOwned, } - [iOS (9,0)] - [TV (10,0)] - [MacCatalyst (14,0)] + [iOS (9, 0)] + [TV (10, 0)] + [MacCatalyst (14, 0)] // conveniance enum (ObjC uses NSString) public enum HMAccessoryCategoryType { [Field ("HMAccessoryCategoryTypeOther")] @@ -1100,59 +1101,59 @@ namespace HomeKit { [Field ("HMAccessoryCategoryTypeWindowCovering")] WindowCovering, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] [Field ("HMAccessoryCategoryTypeRangeExtender")] RangeExtender, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] [Field ("HMAccessoryCategoryTypeIPCamera")] IPCamera, - [iOS (10,0), Watch (3,0)] + [iOS (10, 0), Watch (3, 0)] [Field ("HMAccessoryCategoryTypeVideoDoorbell")] VideoDoorbell, - [Watch (3,1,1)] - [iOS (10,2), TV (10,1)] + [Watch (3, 1, 1)] + [iOS (10, 2), TV (10, 1)] [Field ("HMAccessoryCategoryTypeAirPurifier")] AirPurifier, - [Watch (3,1,1)] - [iOS (10,2), TV (10,1)] + [Watch (3, 1, 1)] + [iOS (10, 2), TV (10, 1)] [Field ("HMAccessoryCategoryTypeAirHeater")] AirHeater, - [Watch (3,1,1)] - [iOS (10,2), TV (10,1)] + [Watch (3, 1, 1)] + [iOS (10, 2), TV (10, 1)] [Field ("HMAccessoryCategoryTypeAirConditioner")] AirConditioner, - [Watch (3,1,1)] - [iOS (10,2), TV (10,1)] + [Watch (3, 1, 1)] + [iOS (10, 2), TV (10, 1)] [Field ("HMAccessoryCategoryTypeAirHumidifier")] AirHumidifier, - [Watch (3,1,1)] - [iOS (10,2), TV (10,1)] + [Watch (3, 1, 1)] + [iOS (10, 2), TV (10, 1)] [Field ("HMAccessoryCategoryTypeAirDehumidifier")] AirDehumidifier, - [Watch (4,2), TV (11,2), iOS (11,2)] + [Watch (4, 2), TV (11, 2), iOS (11, 2)] [Field ("HMAccessoryCategoryTypeSprinkler")] Sprinkler, - [Watch (4,2), TV (11,2), iOS (11,2)] + [Watch (4, 2), TV (11, 2), iOS (11, 2)] [Field ("HMAccessoryCategoryTypeFaucet")] Faucet, - [Watch (4,2), TV (11,2), iOS (11,2)] + [Watch (4, 2), TV (11, 2), iOS (11, 2)] [Field ("HMAccessoryCategoryTypeShowerHead")] ShowerHead, } - [iOS (9,0)] - [TV (10,0)] - [MacCatalyst (14,0)] + [iOS (9, 0)] + [TV (10, 0)] + [MacCatalyst (14, 0)] public enum HMSignificantEvent { [Field ("HMSignificantEventSunrise")] @@ -1162,7 +1163,7 @@ namespace HomeKit { Sunset, } - [iOS (13,0), TV (13,0), Watch (6,0), NoMac, MacCatalyst (14,0)] + [iOS (13, 0), TV (13, 0), Watch (6, 0), NoMac, MacCatalyst (14, 0)] [Flags] [Native] public enum HMHomeManagerAuthorizationStatus : ulong { @@ -1171,9 +1172,9 @@ namespace HomeKit { Authorized = 1 << 2, } - [iOS (9,0)] - [TV (10,0)] - [MacCatalyst (14,0)] + [iOS (9, 0)] + [TV (10, 0)] + [MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueAirQuality : long { Unknown = 0, @@ -1184,39 +1185,37 @@ namespace HomeKit { Poor } - [iOS (10,0)] - [TV (10,0)] - [MacCatalyst (14,0)] + [iOS (10, 0)] + [TV (10, 0)] + [MacCatalyst (14, 0)] [Native] - public enum HMCameraStreamState : ulong - { + public enum HMCameraStreamState : ulong { Starting = 1, Streaming = 2, Stopping = 3, NotStreaming = 4 } - [iOS (10,0)] - [TV (10,0)] - [MacCatalyst (14,0)] + [iOS (10, 0)] + [TV (10, 0)] + [MacCatalyst (14, 0)] [Native] - public enum HMCameraAudioStreamSetting : ulong - { + public enum HMCameraAudioStreamSetting : ulong { Muted = 1, IncomingAudioAllowed = 2, BidirectionalAudioAllowed = 3 } - [Watch (3,1,1)] - [TV (10,1), iOS (10,2), MacCatalyst (14,0)] + [Watch (3, 1, 1)] + [TV (10, 1), iOS (10, 2), MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueLockPhysicalControlsState : long { NotLocked = 0, Locked, } - [Watch (3,1,1)] - [TV (10,1), iOS (10,2), MacCatalyst (14,0)] + [Watch (3, 1, 1)] + [TV (10, 1), iOS (10, 2), MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueCurrentAirPurifierState : long { Inactive = 0, @@ -1224,16 +1223,16 @@ namespace HomeKit { Active, } - [Watch (3,1,1)] - [TV (10,1), iOS (10,2), MacCatalyst (14,0)] + [Watch (3, 1, 1)] + [TV (10, 1), iOS (10, 2), MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueTargetAirPurifierState : long { Manual = 0, Automatic, } - [Watch (3,1,1)] - [TV (10,1), iOS (10,2), MacCatalyst (14,0)] + [Watch (3, 1, 1)] + [TV (10, 1), iOS (10, 2), MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueCurrentSlatState : long { Stationary = 0, @@ -1241,24 +1240,24 @@ namespace HomeKit { Oscillating, } - [Watch (3,1,1)] - [TV (10,1), iOS (10,2), MacCatalyst (14,0)] + [Watch (3, 1, 1)] + [TV (10, 1), iOS (10, 2), MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueSlatType : long { Horizontal = 0, Vertical, } - [Watch (3,1,1)] - [TV (10,1), iOS (10,2), MacCatalyst (14,0)] + [Watch (3, 1, 1)] + [TV (10, 1), iOS (10, 2), MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueFilterChange : long { NotNeeded = 0, Needed, } - [Watch (3,1,1)] - [TV (10,1), iOS (10,2), MacCatalyst (14,0)] + [Watch (3, 1, 1)] + [TV (10, 1), iOS (10, 2), MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueCurrentFanState : long { Inactive = 0, @@ -1266,16 +1265,16 @@ namespace HomeKit { Active, } - [Watch (3,1,1)] - [TV (10,1), iOS (10,2), MacCatalyst (14,0)] + [Watch (3, 1, 1)] + [TV (10, 1), iOS (10, 2), MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueTargetFanState : long { Manual = 0, Automatic, } - [Watch (3,1,1)] - [TV (10,1), iOS (10,2), MacCatalyst (14,0)] + [Watch (3, 1, 1)] + [TV (10, 1), iOS (10, 2), MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueCurrentHeaterCoolerState : long { Inactive = 0, @@ -1284,8 +1283,8 @@ namespace HomeKit { Cooling, } - [Watch (3,1,1)] - [TV (10,1), iOS (10,2), MacCatalyst (14,0)] + [Watch (3, 1, 1)] + [TV (10, 1), iOS (10, 2), MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueTargetHeaterCoolerState : long { Automatic = 0, @@ -1293,8 +1292,8 @@ namespace HomeKit { Cool, } - [Watch (3,1,1)] - [TV (10,1), iOS (10,2), MacCatalyst (14,0)] + [Watch (3, 1, 1)] + [TV (10, 1), iOS (10, 2), MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueCurrentHumidifierDehumidifierState : long { Inactive = 0, @@ -1303,8 +1302,8 @@ namespace HomeKit { Dehumidifying, } - [Watch (3,1,1)] - [TV (10,1), iOS (10,2), MacCatalyst (14,0)] + [Watch (3, 1, 1)] + [TV (10, 1), iOS (10, 2), MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueTargetHumidifierDehumidifierState : long { Automatic = 0, @@ -1312,24 +1311,24 @@ namespace HomeKit { Dehumidify, } - [Watch (3,1,1)] - [TV (10,1), iOS (10,2), MacCatalyst (14,0)] + [Watch (3, 1, 1)] + [TV (10, 1), iOS (10, 2), MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueSwingMode : long { Disabled = 0, Enabled, } - [Watch (3,1,1)] - [TV (10,1), iOS (10,2)] - [MacCatalyst (14,0)] + [Watch (3, 1, 1)] + [TV (10, 1), iOS (10, 2)] + [MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueActivationState : long { Inactive = 0, Active, } - [Watch (3,2), TV (10,2), iOS (10,3), MacCatalyst (14,0)] + [Watch (3, 2), TV (10, 2), iOS (10, 3), MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueInputEvent : long { SinglePress = 0, @@ -1337,14 +1336,14 @@ namespace HomeKit { LongPress, } - [Watch (3,2), TV (10,2), iOS (10,3), MacCatalyst (14,0)] + [Watch (3, 2), TV (10, 2), iOS (10, 3), MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueLabelNamespace : long { Dot = 0, Numeral, } - [Watch (4,0), TV (11,0), iOS (11,0), MacCatalyst (14,0)] + [Watch (4, 0), TV (11, 0), iOS (11, 0), MacCatalyst (14, 0)] [Native] public enum HMEventTriggerActivationState : ulong { Disabled = 0, @@ -1354,7 +1353,7 @@ namespace HomeKit { Enabled = 4, } - [Watch (4,0), TV (11,0), iOS (11,0), MacCatalyst (14,0)] + [Watch (4, 0), TV (11, 0), iOS (11, 0), MacCatalyst (14, 0)] [Native] public enum HMHomeHubState : ulong { NotAvailable = 0, @@ -1362,7 +1361,7 @@ namespace HomeKit { Disconnected, } - [Watch (4,0), TV (11,0), iOS (11,0), MacCatalyst (14,0)] + [Watch (4, 0), TV (11, 0), iOS (11, 0), MacCatalyst (14, 0)] [Native] public enum HMPresenceEventType : ulong { EveryEntry = 1, @@ -1373,7 +1372,7 @@ namespace HomeKit { NotAtHome = LastExit, } - [Watch (4,0), TV (11,0), iOS (11,0), MacCatalyst (14,0)] + [Watch (4, 0), TV (11, 0), iOS (11, 0), MacCatalyst (14, 0)] [Native] public enum HMPresenceEventUserType : ulong { CurrentUser = 1, @@ -1381,7 +1380,7 @@ namespace HomeKit { CustomUsers = 3, } - [Watch (4,2), TV (11,2), iOS (11,2), MacCatalyst (14,0)] + [Watch (4, 2), TV (11, 2), iOS (11, 2), MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueProgramMode : long { NotScheduled = 0, @@ -1389,14 +1388,14 @@ namespace HomeKit { ScheduleOverriddenToManual, } - [Watch (4,2), TV (11,2), iOS (11,2), MacCatalyst (14,0)] + [Watch (4, 2), TV (11, 2), iOS (11, 2), MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueUsageState : long { NotInUse = 0, InUse, } - [Watch (4,2), TV (11,2), iOS (11,2), MacCatalyst (14,0)] + [Watch (4, 2), TV (11, 2), iOS (11, 2), MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueValveType : long { GenericValve = 0, @@ -1405,7 +1404,7 @@ namespace HomeKit { WaterFaucet, } - [Watch (4,2), TV (11,2), iOS (11,2), MacCatalyst (14,0)] + [Watch (4, 2), TV (11, 2), iOS (11, 2), MacCatalyst (14, 0)] [Native] public enum HMCharacteristicValueConfigurationState : long { NotConfigured = 0, @@ -1413,29 +1412,26 @@ namespace HomeKit { } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [Watch (2,0), TV (10,0), NoMac, iOS (8,0)] + [Watch (2, 0), TV (10, 0), NoMac, iOS (8, 0)] [Native] - public enum HMCharacteristicValueTargetDoorState : long - { + public enum HMCharacteristicValueTargetDoorState : long { Open = 0, Closed = 1, } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [Watch (2,0), TV (10,0), NoMac, iOS (8,0)] + [Watch (2, 0), TV (10, 0), NoMac, iOS (8, 0)] [Native] - public enum HMCharacteristicValueCurrentHeatingCooling : long - { + public enum HMCharacteristicValueCurrentHeatingCooling : long { Off = 0, Heat = 1, Cool = 2, } [Introduced (PlatformName.MacCatalyst, 14, 0)] - [Watch (2,0), TV (10,0), NoMac, iOS (8,0)] + [Watch (2, 0), TV (10, 0), NoMac, iOS (8, 0)] [Native] - public enum HMCharacteristicValueTargetLockMechanismState : long - { + public enum HMCharacteristicValueTargetLockMechanismState : long { Unsecured = 0, Secured = 1, } diff --git a/src/HomeKit/HMHome.cs b/src/HomeKit/HMHome.cs index 7ac5d1a884..c5e64d26ec 100644 --- a/src/HomeKit/HMHome.cs +++ b/src/HomeKit/HMHome.cs @@ -8,29 +8,28 @@ using Foundation; namespace HomeKit { - public partial class HMHome - { + public partial class HMHome { public HMService []? GetServices (HMServiceType serviceTypes) { var arr = new ServiceTypeList (); - if ((serviceTypes & HMServiceType.LightBulb) == HMServiceType.LightBulb) + if ((serviceTypes & HMServiceType.LightBulb) == HMServiceType.LightBulb) arr.Add (HMServiceType.LightBulb.GetConstant ()); - if ((serviceTypes & HMServiceType.Switch) == HMServiceType.Switch) + if ((serviceTypes & HMServiceType.Switch) == HMServiceType.Switch) arr.Add (HMServiceType.Switch.GetConstant ()); - if ((serviceTypes & HMServiceType.Thermostat) == HMServiceType.Thermostat) + if ((serviceTypes & HMServiceType.Thermostat) == HMServiceType.Thermostat) arr.Add (HMServiceType.Thermostat.GetConstant ()); - if ((serviceTypes & HMServiceType.GarageDoorOpener) == HMServiceType.GarageDoorOpener) + if ((serviceTypes & HMServiceType.GarageDoorOpener) == HMServiceType.GarageDoorOpener) arr.Add (HMServiceType.GarageDoorOpener.GetConstant ()); - if ((serviceTypes & HMServiceType.AccessoryInformation) == HMServiceType.AccessoryInformation) + if ((serviceTypes & HMServiceType.AccessoryInformation) == HMServiceType.AccessoryInformation) arr.Add (HMServiceType.AccessoryInformation.GetConstant ()); - if ((serviceTypes & HMServiceType.Fan) == HMServiceType.Fan) + if ((serviceTypes & HMServiceType.Fan) == HMServiceType.Fan) arr.Add (HMServiceType.Fan.GetConstant ()); - if ((serviceTypes & HMServiceType.Outlet) == HMServiceType.Outlet) + if ((serviceTypes & HMServiceType.Outlet) == HMServiceType.Outlet) arr.Add (HMServiceType.Outlet.GetConstant ()); - if ((serviceTypes & HMServiceType.LockMechanism) == HMServiceType.LockMechanism) + if ((serviceTypes & HMServiceType.LockMechanism) == HMServiceType.LockMechanism) arr.Add (HMServiceType.LockMechanism.GetConstant ()); - if ((serviceTypes & HMServiceType.LockManagement) == HMServiceType.LockManagement) + if ((serviceTypes & HMServiceType.LockManagement) == HMServiceType.LockManagement) arr.Add (HMServiceType.LockManagement.GetConstant ()); // iOS 9 if ((serviceTypes & HMServiceType.AirQualitySensor) == HMServiceType.AirQualitySensor) @@ -96,8 +95,9 @@ namespace HomeKit { #if (WATCH || TVOS) [Obsolete ("This API is not available on this platform.")] #endif // WATCH || TVOS - [Obsoleted (PlatformName.iOS, 9,0, PlatformArchitecture.All, message: "This API in now prohibited on iOS. Use 'ManageUsers' instead.")] - public virtual void RemoveUser (HMUser user, Action completion) { + [Obsoleted (PlatformName.iOS, 9, 0, PlatformArchitecture.All, message: "This API in now prohibited on iOS. Use 'ManageUsers' instead.")] + public virtual void RemoveUser (HMUser user, Action completion) + { throw new NotSupportedException (); } @@ -106,8 +106,9 @@ namespace HomeKit { #if (WATCH || TVOS) [Obsolete ("This API is not available on this platform.")] #endif // WATCH || TVOS - [Obsoleted (PlatformName.iOS, 9,0, PlatformArchitecture.All, message: "This API in now prohibited on iOS. Use 'ManageUsers' instead.")] - public virtual Task RemoveUserAsync (HMUser user) { + [Obsoleted (PlatformName.iOS, 9, 0, PlatformArchitecture.All, message: "This API in now prohibited on iOS. Use 'ManageUsers' instead.")] + public virtual Task RemoveUserAsync (HMUser user) + { throw new NotSupportedException (); } #endif diff --git a/tools/autoformat.sh b/tools/autoformat.sh index 6d62918d67..a9c5a7ac38 100755 --- a/tools/autoformat.sh +++ b/tools/autoformat.sh @@ -88,6 +88,12 @@ dotnet format whitespace --folder "$SRC_DIR/src/ExternalAccessory" dotnet format whitespace --folder "$SRC_DIR/src/FileProvider" dotnet format whitespace --folder "$SRC_DIR/src/FinderSync" dotnet format whitespace --folder "$SRC_DIR/src/Foundation" +dotnet format whitespace --folder "$SRC_DIR/src/GLKit" +dotnet format whitespace --folder "$SRC_DIR/src/GameController" +dotnet format whitespace --folder "$SRC_DIR/src/GameKit" +dotnet format whitespace --folder "$SRC_DIR/src/GameplayKit" +dotnet format whitespace --folder "$SRC_DIR/src/HealthKit" +dotnet format whitespace --folder "$SRC_DIR/src/HomeKit" # dotnet format "$SRC_DIR/[...]" # add more projects here...