1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
#[cfg(feature = "objc2")]
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-foundation")]
use objc2_foundation::*;
use crate::*;
extern "C" {
/// A notification posted when a MIDI UMP Endpoint has been added to the subsystem.
///
///
/// The MIDIUMPEndpoint sent in userInfo is the endpoint which was recently discovered.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/coremidi/midiumpendpointwasaddednotification?language=objc)
#[cfg(feature = "objc2-foundation")]
pub static MIDIUMPEndpointWasAddedNotification: &'static NSNotificationName;
}
extern "C" {
/// A notification posted when a MIDI UMP Endpoint has been removed from the subsystem.
///
///
/// Any MIDIUMPEndpoint sent with this notification is no longer available to the system. Any
/// attempt to perform I/O with its source or destination may fail, as the MIDIEndpointRef
/// associated with the UMP endpoint may no longer be valid. If this notification is posted,
/// any resources related to communication with this UMP endpoint may be safely
/// disposed.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/coremidi/midiumpendpointwasremovednotification?language=objc)
#[cfg(feature = "objc2-foundation")]
pub static MIDIUMPEndpointWasRemovedNotification: &'static NSNotificationName;
}
extern "C" {
/// A notification posted when an UMP endpoint updates its stream configuration or changes the
/// state of one of its Function Blocks.
///
///
/// If this notification is posted, an Endpoint Info Notification was sent from the UMP endpoint in userInfo.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/coremidi/midiumpendpointwasupdatednotification?language=objc)
#[cfg(feature = "objc2-foundation")]
pub static MIDIUMPEndpointWasUpdatedNotification: &'static NSNotificationName;
}
extern "C" {
/// A notification posted when a Function Block is updated.
///
///
/// If this notification is posted, the supplied Function Block in userInfo has had a change to its
/// enabled state, Group configuration, UI hint, MIDI 1.0 status, etc..
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/coremidi/midiumpfunctionblockwasupdatednotification?language=objc)
#[cfg(feature = "objc2-foundation")]
pub static MIDIUMPFunctionBlockWasUpdatedNotification: &'static NSNotificationName;
}
/// [Apple's documentation](https://developer.apple.com/documentation/coremidi/midiumpendpointmanagerdictionarykey?language=objc)
// NS_TYPED_ENUM
#[cfg(feature = "objc2-foundation")]
pub type MIDIUMPEndpointManagerDictionaryKey = NSString;
extern "C" {
/// Value is a MIDIUMPEndpoint
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/coremidi/midiumpendpointobjectkey?language=objc)
#[cfg(feature = "objc2-foundation")]
pub static MIDIUMPEndpointObjectKey: &'static MIDIUMPEndpointManagerDictionaryKey;
}
extern "C" {
/// Value is a MIDIUMPFunctionBlock
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/coremidi/midiumpfunctionblockobjectkey?language=objc)
#[cfg(feature = "objc2-foundation")]
pub static MIDIUMPFunctionBlockObjectKey: &'static MIDIUMPEndpointManagerDictionaryKey;
}
#[cfg(feature = "objc2")]
extern_class!(
/// A singleton object that performs system-wide UMP Endpoint bookkeeping.
///
///
/// MIDIUMPEndpointManager is used to retrieve information about UMP Endpoint
/// pairs detected by or explicitly declared to the MIDI UMP subsystem.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/coremidi/midiumpendpointmanager?language=objc)
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "objc2")]
pub struct MIDIUMPEndpointManager;
);
#[cfg(feature = "objc2")]
extern_conformance!(
unsafe impl NSObjectProtocol for MIDIUMPEndpointManager {}
);
#[cfg(feature = "objc2")]
impl MIDIUMPEndpointManager {
extern_methods!(
/// Retrieve the shared UMP Endpoint manager for the client process.
///
///
/// After first access to this property, the client process may begin observing notifications
/// which are posted when the system-wide cache changes.
#[unsafe(method(sharedInstance))]
#[unsafe(method_family = none)]
pub unsafe fn sharedInstance() -> Retained<MIDIUMPEndpointManager>;
#[cfg(all(feature = "MIDIUMPEndpoint", feature = "objc2-foundation"))]
/// A list of UMP endpoints discovered using UMP endpoint discovery.
#[unsafe(method(UMPEndpoints))]
#[unsafe(method_family = none)]
pub unsafe fn UMPEndpoints(&self) -> Retained<NSArray<MIDIUMPEndpoint>>;
);
}
/// Methods declared on superclass `NSObject`.
#[cfg(feature = "objc2")]
impl MIDIUMPEndpointManager {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}