objc2_shazam_kit/generated/
SHMatch.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// An object that represents the catalog media items that match a query.
11    ///
12    /// A single query signature may match more than one reference signature. In addition, one reference signature may map to many media items.
13    ///
14    /// See also [Apple's documentation](https://developer.apple.com/documentation/shazamkit/shmatch?language=objc)
15    #[unsafe(super(NSObject))]
16    #[derive(Debug, PartialEq, Eq, Hash)]
17    pub struct SHMatch;
18);
19
20unsafe impl Send for SHMatch {}
21
22unsafe impl Sync for SHMatch {}
23
24extern_conformance!(
25    unsafe impl NSCoding for SHMatch {}
26);
27
28extern_conformance!(
29    unsafe impl NSObjectProtocol for SHMatch {}
30);
31
32extern_conformance!(
33    unsafe impl NSSecureCoding for SHMatch {}
34);
35
36impl SHMatch {
37    extern_methods!(
38        #[cfg(all(feature = "SHMatchedMediaItem", feature = "SHMediaItem"))]
39        /// An array of the media items in the catalog that match the query signature, in order of the quality of the match.
40        #[unsafe(method(mediaItems))]
41        #[unsafe(method_family = none)]
42        pub unsafe fn mediaItems(&self) -> Retained<NSArray<SHMatchedMediaItem>>;
43
44        #[cfg(feature = "SHSignature")]
45        /// The query signature for the match.
46        #[unsafe(method(querySignature))]
47        #[unsafe(method_family = none)]
48        pub unsafe fn querySignature(&self) -> Retained<SHSignature>;
49
50        #[unsafe(method(new))]
51        #[unsafe(method_family = new)]
52        pub unsafe fn new() -> Retained<Self>;
53
54        #[unsafe(method(init))]
55        #[unsafe(method_family = init)]
56        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
57    );
58}