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
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_protocol!(
/// The base protocol to which analysis results conform
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/soundanalysis/snresult?language=objc)
pub unsafe trait SNResult: NSObjectProtocol {}
);
extern_protocol!(
/// The interface through which clients receive the results of an analysis request
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/soundanalysis/snresultsobserving?language=objc)
pub unsafe trait SNResultsObserving: NSObjectProtocol {
#[cfg(feature = "SNRequest")]
/// Provides a new analysis result to the client with the specified time range
///
/// This function will be called each time a new analysis result is available. Different types of analysis may produce results at different rates, spanning different time ranges.
#[unsafe(method(request:didProduceResult:))]
#[unsafe(method_family = none)]
unsafe fn request_didProduceResult(
&self,
request: &ProtocolObject<dyn SNRequest>,
result: &ProtocolObject<dyn SNResult>,
);
#[cfg(feature = "SNRequest")]
/// Informs the client of an error produced during analysis
///
/// If an error is produced by a request, that request will not produce any more results, and is in a terminal state. The request:didFailWithError and requestDidComplete methods are mutually exclusive.
#[optional]
#[unsafe(method(request:didFailWithError:))]
#[unsafe(method_family = none)]
unsafe fn request_didFailWithError(
&self,
request: &ProtocolObject<dyn SNRequest>,
error: &NSError,
);
#[cfg(feature = "SNRequest")]
/// Informs the client that the analysis request was completed normally
///
/// If an analysis request completes normally, that request will not produce any more results, and is in a terminal state. The request:didFailWithError and requestDidComplete methods are mutually exclusive.
#[optional]
#[unsafe(method(requestDidComplete:))]
#[unsafe(method_family = none)]
unsafe fn requestDidComplete(&self, request: &ProtocolObject<dyn SNRequest>);
}
);