objc2_core_midi/generated/
MIDICapabilityInquiry.rs1use core::ffi::*;
4use core::ptr::NonNull;
5#[cfg(feature = "objc2")]
6use objc2::__framework_prelude::*;
7#[cfg(feature = "objc2-foundation")]
8use objc2_foundation::*;
9
10use crate::*;
11
12#[repr(C)]
14#[derive(Clone, Copy, Debug, PartialEq)]
15pub struct MIDICIDeviceIdentification {
16 pub manufacturer: [u8; 3],
17 pub family: [u8; 2],
18 pub modelNumber: [u8; 2],
19 pub revisionLevel: [u8; 4],
20 pub reserved: [u8; 5],
21}
22
23#[cfg(feature = "objc2")]
24unsafe impl Encode for MIDICIDeviceIdentification {
25 const ENCODING: Encoding = Encoding::Struct(
26 "MIDICIDeviceIdentification",
27 &[
28 <[u8; 3]>::ENCODING,
29 <[u8; 2]>::ENCODING,
30 <[u8; 2]>::ENCODING,
31 <[u8; 4]>::ENCODING,
32 <[u8; 5]>::ENCODING,
33 ],
34 );
35}
36
37#[cfg(feature = "objc2")]
38unsafe impl RefEncode for MIDICIDeviceIdentification {
39 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
40}
41
42#[cfg(feature = "MIDIMessages")]
46pub static MIDIChannelsWholePort: MIDIChannelNumber = 0x7f;
47
48#[cfg(feature = "objc2-foundation")]
50pub type MIDICIInitiatiorMUID = NSNumber;
51
52#[cfg(all(feature = "objc2", feature = "objc2-foundation"))]
54pub type MIDICIProfileStateList = NSArray<MIDICIProfileState>;
55
56#[cfg(feature = "objc2")]
57extern_class!(
58 #[unsafe(super(NSObject))]
60 #[derive(Debug, PartialEq, Eq, Hash)]
61 #[cfg(feature = "objc2")]
62 #[deprecated = "No longer supported for CoreMIDI"]
63 pub struct MIDICIDeviceInfo;
64);
65
66#[cfg(all(feature = "objc2", feature = "objc2-foundation"))]
67extern_conformance!(
68 unsafe impl NSCoding for MIDICIDeviceInfo {}
69);
70
71#[cfg(feature = "objc2")]
72extern_conformance!(
73 unsafe impl NSObjectProtocol for MIDICIDeviceInfo {}
74);
75
76#[cfg(all(feature = "objc2", feature = "objc2-foundation"))]
77extern_conformance!(
78 unsafe impl NSSecureCoding for MIDICIDeviceInfo {}
79);
80
81#[cfg(feature = "objc2")]
82impl MIDICIDeviceInfo {
83 extern_methods!(
84 #[cfg(feature = "objc2-foundation")]
85 #[deprecated = "No longer supported for CoreMIDI"]
86 #[unsafe(method(manufacturerID))]
87 #[unsafe(method_family = none)]
88 pub unsafe fn manufacturerID(&self) -> Retained<NSData>;
89
90 #[cfg(feature = "objc2-foundation")]
91 #[deprecated = "No longer supported for CoreMIDI"]
92 #[unsafe(method(family))]
93 #[unsafe(method_family = none)]
94 pub unsafe fn family(&self) -> Retained<NSData>;
95
96 #[cfg(feature = "objc2-foundation")]
97 #[deprecated = "No longer supported for CoreMIDI"]
98 #[unsafe(method(modelNumber))]
99 #[unsafe(method_family = none)]
100 pub unsafe fn modelNumber(&self) -> Retained<NSData>;
101
102 #[cfg(feature = "objc2-foundation")]
103 #[deprecated = "No longer supported for CoreMIDI"]
104 #[unsafe(method(revisionLevel))]
105 #[unsafe(method_family = none)]
106 pub unsafe fn revisionLevel(&self) -> Retained<NSData>;
107
108 #[cfg(feature = "MIDIServices")]
109 #[deprecated = "No longer supported for CoreMIDI"]
110 #[unsafe(method(midiDestination))]
111 #[unsafe(method_family = none)]
112 pub unsafe fn midiDestination(&self) -> MIDIEndpointRef;
113
114 #[deprecated = "No longer supported for CoreMIDI"]
115 #[unsafe(method(init))]
116 #[unsafe(method_family = init)]
117 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
118
119 #[cfg(all(feature = "MIDIServices", feature = "objc2-foundation"))]
120 #[deprecated = "No longer supported for CoreMIDI"]
121 #[unsafe(method(initWithDestination:manufacturer:family:model:revision:))]
122 #[unsafe(method_family = init)]
123 pub unsafe fn initWithDestination_manufacturer_family_model_revision(
124 this: Allocated<Self>,
125 midi_destination: MIDIEntityRef,
126 manufacturer: &NSData,
127 family: &NSData,
128 model_number: &NSData,
129 revision_level: &NSData,
130 ) -> Retained<Self>;
131 );
132}
133
134#[cfg(feature = "objc2")]
136impl MIDICIDeviceInfo {
137 extern_methods!(
138 #[unsafe(method(new))]
139 #[unsafe(method_family = new)]
140 pub unsafe fn new() -> Retained<Self>;
141 );
142}
143
144#[cfg(feature = "objc2")]
145extern_class!(
146 #[unsafe(super(NSObject))]
148 #[derive(Debug, PartialEq, Eq, Hash)]
149 #[cfg(feature = "objc2")]
150 #[deprecated = "No longer supported for CoreMIDI"]
151 pub struct MIDICIDiscoveredNode;
152);
153
154#[cfg(all(feature = "objc2", feature = "objc2-foundation"))]
155extern_conformance!(
156 unsafe impl NSCoding for MIDICIDiscoveredNode {}
157);
158
159#[cfg(feature = "objc2")]
160extern_conformance!(
161 unsafe impl NSObjectProtocol for MIDICIDiscoveredNode {}
162);
163
164#[cfg(all(feature = "objc2", feature = "objc2-foundation"))]
165extern_conformance!(
166 unsafe impl NSSecureCoding for MIDICIDiscoveredNode {}
167);
168
169#[cfg(feature = "objc2")]
170impl MIDICIDiscoveredNode {
171 extern_methods!(
172 #[cfg(feature = "MIDIServices")]
173 #[deprecated = "No longer supported for CoreMIDI"]
174 #[unsafe(method(destination))]
175 #[unsafe(method_family = none)]
176 pub unsafe fn destination(&self) -> MIDIEntityRef;
177
178 #[deprecated = "No longer supported for CoreMIDI"]
179 #[unsafe(method(deviceInfo))]
180 #[unsafe(method_family = none)]
181 pub unsafe fn deviceInfo(&self) -> Retained<MIDICIDeviceInfo>;
182
183 #[deprecated = "No longer supported for CoreMIDI"]
184 #[unsafe(method(supportsProfiles))]
185 #[unsafe(method_family = none)]
186 pub unsafe fn supportsProfiles(&self) -> bool;
187
188 #[deprecated = "No longer supported for CoreMIDI"]
189 #[unsafe(method(supportsProperties))]
190 #[unsafe(method_family = none)]
191 pub unsafe fn supportsProperties(&self) -> bool;
192
193 #[cfg(feature = "objc2-foundation")]
194 #[deprecated = "No longer supported for CoreMIDI"]
195 #[unsafe(method(maximumSysExSize))]
196 #[unsafe(method_family = none)]
197 pub unsafe fn maximumSysExSize(&self) -> Retained<NSNumber>;
198
199 #[deprecated = "No longer supported for CoreMIDI"]
200 #[unsafe(method(init))]
201 #[unsafe(method_family = init)]
202 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
203 );
204}
205
206#[cfg(feature = "objc2")]
208impl MIDICIDiscoveredNode {
209 extern_methods!(
210 #[unsafe(method(new))]
211 #[unsafe(method_family = new)]
212 pub unsafe fn new() -> Retained<Self>;
213 );
214}
215
216#[cfg(feature = "objc2")]
217extern_class!(
218 #[unsafe(super(NSObject))]
231 #[derive(Debug, PartialEq, Eq, Hash)]
232 #[cfg(feature = "objc2")]
233 pub struct MIDICIProfile;
234);
235
236#[cfg(all(feature = "objc2", feature = "objc2-foundation"))]
237extern_conformance!(
238 unsafe impl NSCoding for MIDICIProfile {}
239);
240
241#[cfg(feature = "objc2")]
242extern_conformance!(
243 unsafe impl NSObjectProtocol for MIDICIProfile {}
244);
245
246#[cfg(all(feature = "objc2", feature = "objc2-foundation"))]
247extern_conformance!(
248 unsafe impl NSSecureCoding for MIDICIProfile {}
249);
250
251#[cfg(feature = "objc2")]
252impl MIDICIProfile {
253 extern_methods!(
254 #[cfg(feature = "objc2-foundation")]
255 #[unsafe(method(name))]
257 #[unsafe(method_family = none)]
258 pub unsafe fn name(&self) -> Retained<NSString>;
259
260 #[cfg(feature = "objc2-foundation")]
261 #[unsafe(method(profileID))]
263 #[unsafe(method_family = none)]
264 pub unsafe fn profileID(&self) -> Retained<NSData>;
265
266 #[unsafe(method(init))]
267 #[unsafe(method_family = init)]
268 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
269
270 #[cfg(feature = "objc2-foundation")]
271 #[unsafe(method(initWithData:))]
272 #[unsafe(method_family = init)]
273 pub unsafe fn initWithData(this: Allocated<Self>, data: &NSData) -> Retained<Self>;
274
275 #[cfg(feature = "objc2-foundation")]
276 #[unsafe(method(initWithData:name:))]
277 #[unsafe(method_family = init)]
278 pub unsafe fn initWithData_name(
279 this: Allocated<Self>,
280 data: &NSData,
281 in_name: &NSString,
282 ) -> Retained<Self>;
283 );
284}
285
286#[cfg(feature = "objc2")]
288impl MIDICIProfile {
289 extern_methods!(
290 #[unsafe(method(new))]
291 #[unsafe(method_family = new)]
292 pub unsafe fn new() -> Retained<Self>;
293 );
294}
295
296#[cfg(feature = "objc2")]
297extern_class!(
298 #[unsafe(super(NSObject))]
300 #[derive(Debug, PartialEq, Eq, Hash)]
301 #[cfg(feature = "objc2")]
302 pub struct MIDICIProfileState;
303);
304
305#[cfg(all(feature = "objc2", feature = "objc2-foundation"))]
306extern_conformance!(
307 unsafe impl NSCoding for MIDICIProfileState {}
308);
309
310#[cfg(feature = "objc2")]
311extern_conformance!(
312 unsafe impl NSObjectProtocol for MIDICIProfileState {}
313);
314
315#[cfg(all(feature = "objc2", feature = "objc2-foundation"))]
316extern_conformance!(
317 unsafe impl NSSecureCoding for MIDICIProfileState {}
318);
319
320#[cfg(feature = "objc2")]
321impl MIDICIProfileState {
322 extern_methods!(
323 #[cfg(feature = "MIDIMessages")]
324 #[unsafe(method(midiChannel))]
325 #[unsafe(method_family = none)]
326 pub unsafe fn midiChannel(&self) -> MIDIChannelNumber;
327
328 #[cfg(feature = "objc2-foundation")]
329 #[unsafe(method(enabledProfiles))]
330 #[unsafe(method_family = none)]
331 pub unsafe fn enabledProfiles(&self) -> Retained<NSArray<MIDICIProfile>>;
332
333 #[cfg(feature = "objc2-foundation")]
334 #[unsafe(method(disabledProfiles))]
335 #[unsafe(method_family = none)]
336 pub unsafe fn disabledProfiles(&self) -> Retained<NSArray<MIDICIProfile>>;
337
338 #[unsafe(method(init))]
339 #[unsafe(method_family = init)]
340 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
341
342 #[cfg(all(feature = "MIDIMessages", feature = "objc2-foundation"))]
343 #[deprecated]
344 #[unsafe(method(initWithChannel:enabledProfiles:disabledProfiles:))]
345 #[unsafe(method_family = init)]
346 pub unsafe fn initWithChannel_enabledProfiles_disabledProfiles(
347 this: Allocated<Self>,
348 midi_channel_num: MIDIChannelNumber,
349 enabled: &NSArray<MIDICIProfile>,
350 disabled: &NSArray<MIDICIProfile>,
351 ) -> Retained<Self>;
352
353 #[cfg(feature = "objc2-foundation")]
354 #[unsafe(method(initWithEnabledProfiles:disabledProfiles:))]
355 #[unsafe(method_family = init)]
356 pub unsafe fn initWithEnabledProfiles_disabledProfiles(
357 this: Allocated<Self>,
358 enabled: &NSArray<MIDICIProfile>,
359 disabled: &NSArray<MIDICIProfile>,
360 ) -> Retained<Self>;
361 );
362}
363
364#[cfg(feature = "objc2")]
366impl MIDICIProfileState {
367 extern_methods!(
368 #[unsafe(method(new))]
369 #[unsafe(method_family = new)]
370 pub unsafe fn new() -> Retained<Self>;
371 );
372}
373
374#[deprecated = "No longer supported for CoreMIDI"]
376#[cfg(all(feature = "MIDIMessages", feature = "block2", feature = "objc2"))]
377pub type MIDICIProfileChangedBlock = *mut block2::DynBlock<
378 dyn Fn(NonNull<MIDICISession>, MIDIChannelNumber, NonNull<MIDICIProfile>, Bool),
379>;
380
381#[deprecated = "No longer supported for CoreMIDI"]
383#[cfg(all(feature = "block2", feature = "objc2", feature = "objc2-foundation"))]
384pub type MIDICISessionDisconnectBlock =
385 *mut block2::DynBlock<dyn Fn(NonNull<MIDICISession>, NonNull<NSError>)>;
386
387#[deprecated = "No longer supported for CoreMIDI"]
389#[cfg(all(
390 feature = "MIDIMessages",
391 feature = "block2",
392 feature = "objc2",
393 feature = "objc2-foundation"
394))]
395pub type MIDICIProfileSpecificDataBlock = *mut block2::DynBlock<
396 dyn Fn(NonNull<MIDICISession>, MIDIChannelNumber, NonNull<MIDICIProfile>, NonNull<NSData>),
397>;
398
399#[deprecated = "No longer supported for CoreMIDI"]
401#[cfg(all(feature = "block2", feature = "objc2", feature = "objc2-foundation"))]
402pub type MIDICIDiscoveryResponseBlock =
403 *mut block2::DynBlock<dyn Fn(NonNull<NSArray<MIDICIDiscoveredNode>>)>;
404
405#[cfg(feature = "objc2")]
406extern_class!(
407 #[unsafe(super(NSObject))]
409 #[derive(Debug, PartialEq, Eq, Hash)]
410 #[cfg(feature = "objc2")]
411 #[deprecated = "No longer supported for CoreMIDI"]
412 pub struct MIDICISession;
413);
414
415#[cfg(feature = "objc2")]
416extern_conformance!(
417 unsafe impl NSObjectProtocol for MIDICISession {}
418);
419
420#[cfg(feature = "objc2")]
421impl MIDICISession {
422 extern_methods!(
423 #[deprecated = "No longer supported for CoreMIDI"]
424 #[unsafe(method(init))]
425 #[unsafe(method_family = init)]
426 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
427
428 #[cfg(all(feature = "block2", feature = "objc2-foundation"))]
429 #[deprecated = "No longer supported for CoreMIDI"]
433 #[unsafe(method(initWithDiscoveredNode:dataReadyHandler:disconnectHandler:))]
434 #[unsafe(method_family = init)]
435 pub unsafe fn initWithDiscoveredNode_dataReadyHandler_disconnectHandler(
436 this: Allocated<Self>,
437 discovered_node: &MIDICIDiscoveredNode,
438 handler: &block2::DynBlock<dyn Fn()>,
439 disconnect_handler: MIDICISessionDisconnectBlock,
440 ) -> Retained<Self>;
441
442 #[cfg(feature = "MIDIServices")]
443 #[deprecated = "No longer supported for CoreMIDI"]
444 #[unsafe(method(midiDestination))]
445 #[unsafe(method_family = none)]
446 pub unsafe fn midiDestination(&self) -> MIDIEntityRef;
447
448 #[deprecated = "No longer supported for CoreMIDI"]
449 #[unsafe(method(supportsProfileCapability))]
450 #[unsafe(method_family = none)]
451 pub unsafe fn supportsProfileCapability(&self) -> bool;
452
453 #[deprecated = "No longer supported for CoreMIDI"]
454 #[unsafe(method(supportsPropertyCapability))]
455 #[unsafe(method_family = none)]
456 pub unsafe fn supportsPropertyCapability(&self) -> bool;
457
458 #[deprecated = "No longer supported for CoreMIDI"]
459 #[unsafe(method(deviceInfo))]
460 #[unsafe(method_family = none)]
461 pub unsafe fn deviceInfo(&self) -> Retained<MIDICIDeviceInfo>;
462
463 #[cfg(feature = "objc2-foundation")]
464 #[deprecated = "No longer supported for CoreMIDI"]
465 #[unsafe(method(maxSysExSize))]
466 #[unsafe(method_family = none)]
467 pub unsafe fn maxSysExSize(&self) -> Retained<NSNumber>;
468
469 #[cfg(feature = "objc2-foundation")]
470 #[deprecated = "No longer supported for CoreMIDI"]
471 #[unsafe(method(maxPropertyRequests))]
472 #[unsafe(method_family = none)]
473 pub unsafe fn maxPropertyRequests(&self) -> Retained<NSNumber>;
474
475 #[cfg(feature = "MIDIMessages")]
476 #[deprecated = "No longer supported for CoreMIDI"]
477 #[unsafe(method(profileStateForChannel:))]
478 #[unsafe(method_family = none)]
479 pub unsafe fn profileStateForChannel(
480 &self,
481 channel: MIDIChannelNumber,
482 ) -> Retained<MIDICIProfileState>;
483
484 #[cfg(all(feature = "MIDIMessages", feature = "objc2-foundation"))]
485 #[deprecated = "No longer supported for CoreMIDI"]
486 #[unsafe(method(enableProfile:onChannel:error:_))]
487 #[unsafe(method_family = none)]
488 pub unsafe fn enableProfile_onChannel_error(
489 &self,
490 profile: &MIDICIProfile,
491 channel: MIDIChannelNumber,
492 ) -> Result<(), Retained<NSError>>;
493
494 #[cfg(all(feature = "MIDIMessages", feature = "objc2-foundation"))]
495 #[deprecated = "No longer supported for CoreMIDI"]
496 #[unsafe(method(disableProfile:onChannel:error:_))]
497 #[unsafe(method_family = none)]
498 pub unsafe fn disableProfile_onChannel_error(
499 &self,
500 profile: &MIDICIProfile,
501 channel: MIDIChannelNumber,
502 ) -> Result<(), Retained<NSError>>;
503
504 #[cfg(all(feature = "MIDIMessages", feature = "objc2-foundation"))]
505 #[unsafe(method(sendProfile:onChannel:profileData:))]
506 #[unsafe(method_family = none)]
507 pub unsafe fn sendProfile_onChannel_profileData(
508 &self,
509 profile: &MIDICIProfile,
510 channel: MIDIChannelNumber,
511 profile_specific_data: &NSData,
512 ) -> bool;
513
514 #[cfg(all(feature = "MIDIMessages", feature = "block2"))]
515 #[deprecated = "No longer supported for CoreMIDI"]
520 #[unsafe(method(profileChangedCallback))]
521 #[unsafe(method_family = none)]
522 pub unsafe fn profileChangedCallback(&self) -> MIDICIProfileChangedBlock;
523
524 #[cfg(all(feature = "MIDIMessages", feature = "block2"))]
525 #[deprecated = "No longer supported for CoreMIDI"]
533 #[unsafe(method(setProfileChangedCallback:))]
534 #[unsafe(method_family = none)]
535 pub unsafe fn setProfileChangedCallback(
536 &self,
537 profile_changed_callback: MIDICIProfileChangedBlock,
538 );
539
540 #[cfg(all(
541 feature = "MIDIMessages",
542 feature = "block2",
543 feature = "objc2-foundation"
544 ))]
545 #[deprecated = "No longer supported for CoreMIDI"]
551 #[unsafe(method(profileSpecificDataHandler))]
552 #[unsafe(method_family = none)]
553 pub unsafe fn profileSpecificDataHandler(&self) -> MIDICIProfileSpecificDataBlock;
554
555 #[cfg(all(
556 feature = "MIDIMessages",
557 feature = "block2",
558 feature = "objc2-foundation"
559 ))]
560 #[deprecated = "No longer supported for CoreMIDI"]
568 #[unsafe(method(setProfileSpecificDataHandler:))]
569 #[unsafe(method_family = none)]
570 pub unsafe fn setProfileSpecificDataHandler(
571 &self,
572 profile_specific_data_handler: MIDICIProfileSpecificDataBlock,
573 );
574 );
575}
576
577#[cfg(feature = "objc2")]
579impl MIDICISession {
580 extern_methods!(
581 #[unsafe(method(new))]
582 #[unsafe(method_family = new)]
583 pub unsafe fn new() -> Retained<Self>;
584 );
585}
586
587#[cfg(feature = "objc2")]
588extern_class!(
589 #[unsafe(super(NSObject))]
591 #[derive(Debug, PartialEq, Eq, Hash)]
592 #[cfg(feature = "objc2")]
593 #[deprecated = "No longer supported for CoreMIDI"]
594 pub struct MIDICIDiscoveryManager;
595);
596
597#[cfg(feature = "objc2")]
598extern_conformance!(
599 unsafe impl NSObjectProtocol for MIDICIDiscoveryManager {}
600);
601
602#[cfg(feature = "objc2")]
603impl MIDICIDiscoveryManager {
604 extern_methods!(
605 #[deprecated = "No longer supported for CoreMIDI"]
606 #[unsafe(method(sharedInstance))]
607 #[unsafe(method_family = none)]
608 pub unsafe fn sharedInstance() -> Retained<MIDICIDiscoveryManager>;
609
610 #[cfg(all(feature = "block2", feature = "objc2-foundation"))]
611 #[deprecated = "No longer supported for CoreMIDI"]
615 #[unsafe(method(discoverWithHandler:))]
616 #[unsafe(method_family = none)]
617 pub unsafe fn discoverWithHandler(&self, completed_handler: MIDICIDiscoveryResponseBlock);
618 );
619}
620
621#[cfg(feature = "objc2")]
623impl MIDICIDiscoveryManager {
624 extern_methods!(
625 #[unsafe(method(init))]
626 #[unsafe(method_family = init)]
627 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
628
629 #[unsafe(method(new))]
630 #[unsafe(method_family = new)]
631 pub unsafe fn new() -> Retained<Self>;
632 );
633}
634
635#[cfg(feature = "objc2")]
636extern_protocol!(
637 #[cfg(feature = "objc2")]
639 #[deprecated = "No longer supported for CoreMIDI"]
640 pub unsafe trait MIDICIProfileResponderDelegate: NSObjectProtocol {
641 #[cfg(feature = "objc2-foundation")]
642 #[deprecated = "No longer supported for CoreMIDI"]
643 #[unsafe(method(connectInitiator:withDeviceInfo:))]
644 #[unsafe(method_family = none)]
645 unsafe fn connectInitiator_withDeviceInfo(
646 &self,
647 initiator_muid: &MIDICIInitiatiorMUID,
648 device_info: &MIDICIDeviceInfo,
649 ) -> bool;
650
651 #[cfg(feature = "objc2-foundation")]
652 #[deprecated = "No longer supported for CoreMIDI"]
653 #[unsafe(method(initiatorDisconnected:))]
654 #[unsafe(method_family = none)]
655 unsafe fn initiatorDisconnected(&self, initiator_muid: &MIDICIInitiatiorMUID);
656
657 #[cfg(feature = "MIDIMessages")]
658 #[deprecated = "No longer supported for CoreMIDI"]
659 #[optional]
660 #[unsafe(method(willSetProfile:onChannel:enabled:))]
661 #[unsafe(method_family = none)]
662 unsafe fn willSetProfile_onChannel_enabled(
663 &self,
664 a_profile: &MIDICIProfile,
665 channel: MIDIChannelNumber,
666 should_enable: bool,
667 ) -> bool;
668
669 #[cfg(all(feature = "MIDIMessages", feature = "objc2-foundation"))]
670 #[deprecated = "No longer supported for CoreMIDI"]
671 #[optional]
672 #[unsafe(method(handleDataForProfile:onChannel:data:))]
673 #[unsafe(method_family = none)]
674 unsafe fn handleDataForProfile_onChannel_data(
675 &self,
676 a_profile: &MIDICIProfile,
677 channel: MIDIChannelNumber,
678 in_data: &NSData,
679 );
680 }
681);
682
683#[cfg(feature = "objc2")]
684extern_class!(
685 #[unsafe(super(NSObject))]
687 #[derive(Debug, PartialEq, Eq, Hash)]
688 #[cfg(feature = "objc2")]
689 #[deprecated = "No longer supported for CoreMIDI"]
690 pub struct MIDICIResponder;
691);
692
693#[cfg(feature = "objc2")]
694extern_conformance!(
695 unsafe impl NSObjectProtocol for MIDICIResponder {}
696);
697
698#[cfg(feature = "objc2")]
699impl MIDICIResponder {
700 extern_methods!(
701 #[cfg(feature = "objc2-foundation")]
702 #[deprecated = "No longer supported for CoreMIDI"]
703 #[unsafe(method(initiators))]
704 #[unsafe(method_family = none)]
705 pub unsafe fn initiators(&self) -> Retained<NSArray<MIDICIInitiatiorMUID>>;
706
707 #[deprecated = "No longer supported for CoreMIDI"]
708 #[unsafe(method(profileDelegate))]
709 #[unsafe(method_family = none)]
710 pub unsafe fn profileDelegate(
711 &self,
712 ) -> Retained<ProtocolObject<dyn MIDICIProfileResponderDelegate>>;
713
714 #[deprecated = "No longer supported for CoreMIDI"]
715 #[unsafe(method(deviceInfo))]
716 #[unsafe(method_family = none)]
717 pub unsafe fn deviceInfo(&self) -> Retained<MIDICIDeviceInfo>;
718
719 #[deprecated = "No longer supported for CoreMIDI"]
720 #[unsafe(method(init))]
721 #[unsafe(method_family = init)]
722 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
723
724 #[cfg(feature = "objc2-foundation")]
725 #[deprecated = "No longer supported for CoreMIDI"]
726 #[unsafe(method(initWithDeviceInfo:profileDelegate:profileStates:supportProperties:))]
727 #[unsafe(method_family = init)]
728 pub unsafe fn initWithDeviceInfo_profileDelegate_profileStates_supportProperties(
729 this: Allocated<Self>,
730 device_info: &MIDICIDeviceInfo,
731 delegate: &ProtocolObject<dyn MIDICIProfileResponderDelegate>,
732 profile_list: &MIDICIProfileStateList,
733 properties_supported: bool,
734 ) -> Retained<Self>;
735
736 #[cfg(feature = "MIDIMessages")]
737 #[deprecated = "No longer supported for CoreMIDI"]
738 #[unsafe(method(notifyProfile:onChannel:isEnabled:))]
739 #[unsafe(method_family = none)]
740 pub unsafe fn notifyProfile_onChannel_isEnabled(
741 &self,
742 a_profile: &MIDICIProfile,
743 channel: MIDIChannelNumber,
744 enabled_state: bool,
745 ) -> bool;
746
747 #[cfg(all(feature = "MIDIMessages", feature = "objc2-foundation"))]
748 #[deprecated = "No longer supported for CoreMIDI"]
749 #[unsafe(method(sendProfile:onChannel:profileData:))]
750 #[unsafe(method_family = none)]
751 pub unsafe fn sendProfile_onChannel_profileData(
752 &self,
753 a_profile: &MIDICIProfile,
754 channel: MIDIChannelNumber,
755 profile_specific_data: &NSData,
756 ) -> bool;
757
758 #[deprecated = "No longer supported for CoreMIDI"]
759 #[unsafe(method(start))]
760 #[unsafe(method_family = none)]
761 pub unsafe fn start(&self) -> bool;
762
763 #[deprecated = "No longer supported for CoreMIDI"]
764 #[unsafe(method(stop))]
765 #[unsafe(method_family = none)]
766 pub unsafe fn stop(&self);
767 );
768}
769
770#[cfg(feature = "objc2")]
772impl MIDICIResponder {
773 extern_methods!(
774 #[unsafe(method(new))]
775 #[unsafe(method_family = new)]
776 pub unsafe fn new() -> Retained<Self>;
777 );
778}