diff --git a/src/CoreMidi/MidiCompat.cs b/src/CoreMidi/MidiCompat.cs index ac7bed7336..0de0b38cf6 100644 --- a/src/CoreMidi/MidiCompat.cs +++ b/src/CoreMidi/MidiCompat.cs @@ -29,5 +29,17 @@ namespace CoreMidi { } #endif +#if !MONOMAC && !__MACCATALYST__ + public partial class MidiNetworkConnection { + [Obsolete ("Use static factory method to create an instance.")] + public MidiNetworkConnection () => throw new NotSupportedException (); + } + + public partial class MidiNetworkHost { + [Obsolete ("Use static factory method to create an instance.")] + public MidiNetworkHost () => throw new NotSupportedException (); + } +#endif + } #endif diff --git a/src/ObjCRuntime/Dlfcn.cs b/src/ObjCRuntime/Dlfcn.cs index 4f0a8bff47..efb78e7d56 100644 --- a/src/ObjCRuntime/Dlfcn.cs +++ b/src/ObjCRuntime/Dlfcn.cs @@ -54,11 +54,6 @@ namespace ObjCRuntime { static public class LibC { static public readonly IntPtr Handle = Dlfcn.dlopen (Constants.libcLibrary, 0); } -#if MONOMAC - static public class CoreMidi { - static public readonly IntPtr Handle = Dlfcn.dlopen (Constants.CoreMidiLibrary, 0); - } -#endif #if HAS_OPENGLES static public class OpenGLES { diff --git a/src/coremidi.cs b/src/coremidi.cs index fa19e2752e..5622ab78e5 100644 --- a/src/coremidi.cs +++ b/src/coremidi.cs @@ -96,10 +96,10 @@ namespace CoreMidi { } - -#if !MONOMAC - [NoMac][NoTV][NoWatch] + [NoTV][NoWatch] + [Mac (10,15)] [BaseType (typeof (NSObject), Name="MIDINetworkHost")] + [DisableDefaultCtor] interface MidiNetworkHost { [Export ("name", ArgumentSemantic.Retain)] string Name { get; } @@ -134,7 +134,8 @@ namespace CoreMidi { bool HasSameAddressAs (MidiNetworkHost other); } - [NoMac][NoTV][NoWatch] + [NoTV][NoWatch] + [Mac (10,15)] [Static] interface Midi { [Field ("MIDINetworkNotificationContactsDidChange")] @@ -149,7 +150,9 @@ namespace CoreMidi { NSString NetworkBonjourServiceType { get; } } - [NoMac][NoTV][NoWatch] + [NoTV][NoWatch] + [Mac (10,15)] + [DisableDefaultCtor] [BaseType (typeof (NSObject), Name="MIDINetworkConnection")] interface MidiNetworkConnection { [Export ("host", ArgumentSemantic.Retain)] @@ -159,7 +162,8 @@ namespace CoreMidi { MidiNetworkConnection FromHost (MidiNetworkHost host); } - [NoMac][NoTV][NoWatch] + [NoTV][NoWatch] + [Mac (10,15)] [BaseType (typeof (NSObject), Name="MIDINetworkSession")] // default 'init' crash the application [DisableDefaultCtor] @@ -224,7 +228,6 @@ namespace CoreMidi { #endif } -#endif [NoWatch, NoTV, Mac (10,14), iOS (12,0)] [BaseType (typeof(NSObject), Name="MIDICIProfile")] diff --git a/tests/xtro-sharpie/macOS-CoreMIDI.todo b/tests/xtro-sharpie/macOS-CoreMIDI.todo deleted file mode 100644 index 7fd7c261dd..0000000000 --- a/tests/xtro-sharpie/macOS-CoreMIDI.todo +++ /dev/null @@ -1,33 +0,0 @@ -!missing-field! MIDINetworkBonjourServiceType not bound -!missing-field! MIDINetworkNotificationContactsDidChange not bound -!missing-field! MIDINetworkNotificationSessionDidChange not bound -!missing-selector! +MIDINetworkConnection::connectionWithHost: not bound -!missing-selector! +MIDINetworkHost::hostWithName:address:port: not bound -!missing-selector! +MIDINetworkHost::hostWithName:netService: not bound -!missing-selector! +MIDINetworkHost::hostWithName:netServiceName:netServiceDomain: not bound -!missing-selector! +MIDINetworkSession::defaultSession not bound -!missing-selector! MIDINetworkConnection::host not bound -!missing-selector! MIDINetworkHost::address not bound -!missing-selector! MIDINetworkHost::hasSameAddressAs: not bound -!missing-selector! MIDINetworkHost::name not bound -!missing-selector! MIDINetworkHost::netServiceDomain not bound -!missing-selector! MIDINetworkHost::netServiceName not bound -!missing-selector! MIDINetworkHost::port not bound -!missing-selector! MIDINetworkSession::addConnection: not bound -!missing-selector! MIDINetworkSession::addContact: not bound -!missing-selector! MIDINetworkSession::connectionPolicy not bound -!missing-selector! MIDINetworkSession::connections not bound -!missing-selector! MIDINetworkSession::contacts not bound -!missing-selector! MIDINetworkSession::destinationEndpoint not bound -!missing-selector! MIDINetworkSession::isEnabled not bound -!missing-selector! MIDINetworkSession::localName not bound -!missing-selector! MIDINetworkSession::networkName not bound -!missing-selector! MIDINetworkSession::networkPort not bound -!missing-selector! MIDINetworkSession::removeConnection: not bound -!missing-selector! MIDINetworkSession::removeContact: not bound -!missing-selector! MIDINetworkSession::setConnectionPolicy: not bound -!missing-selector! MIDINetworkSession::setEnabled: not bound -!missing-selector! MIDINetworkSession::sourceEndpoint not bound -!missing-type! MIDINetworkConnection not bound -!missing-type! MIDINetworkHost not bound -!missing-type! MIDINetworkSession not bound