objc2_accessory_setup_kit/generated/
ASCommon.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
9/// The type used to identify a Bluetooth accessory provider.
10///
11/// See also [Apple's documentation](https://developer.apple.com/documentation/accessorysetupkit/asbluetoothcompanyidentifier?language=objc)
12// NS_TYPED_EXTENSIBLE_ENUM
13pub type ASBluetoothCompanyIdentifier = u16;
14
15extern_class!(
16    /// A type that specifies how to filter a property against a given string and comparison options.
17    ///
18    /// See also [Apple's documentation](https://developer.apple.com/documentation/accessorysetupkit/aspropertycomparestring?language=objc)
19    #[unsafe(super(NSObject))]
20    #[derive(Debug, PartialEq, Eq, Hash)]
21    pub struct ASPropertyCompareString;
22);
23
24unsafe impl Send for ASPropertyCompareString {}
25
26unsafe impl Sync for ASPropertyCompareString {}
27
28extern_conformance!(
29    unsafe impl NSObjectProtocol for ASPropertyCompareString {}
30);
31
32impl ASPropertyCompareString {
33    extern_methods!(
34        /// The string to compare against.
35        ///
36        /// This property is not atomic.
37        ///
38        /// # Safety
39        ///
40        /// This might not be thread-safe.
41        #[unsafe(method(string))]
42        #[unsafe(method_family = none)]
43        pub unsafe fn string(&self) -> Retained<NSString>;
44
45        /// Comparison options to apply when comparing strings.
46        ///
47        /// This property is not atomic.
48        ///
49        /// # Safety
50        ///
51        /// This might not be thread-safe.
52        #[unsafe(method(compareOptions))]
53        #[unsafe(method_family = none)]
54        pub unsafe fn compareOptions(&self) -> NSStringCompareOptions;
55
56        /// Creates a property compare string instance with the given string and comparison options.
57        /// - Parameters:
58        /// - string: The string to compare against.
59        /// - compareOptions: Options to apply when comparing strings.
60        #[unsafe(method(initWithString:compareOptions:))]
61        #[unsafe(method_family = init)]
62        pub unsafe fn initWithString_compareOptions(
63            this: Allocated<Self>,
64            string: &NSString,
65            compare_options: NSStringCompareOptions,
66        ) -> Retained<Self>;
67
68        #[unsafe(method(init))]
69        #[unsafe(method_family = init)]
70        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
71
72        #[unsafe(method(new))]
73        #[unsafe(method_family = new)]
74        pub unsafe fn new(&self) -> Retained<Self>;
75    );
76}
77
78/// Methods declared on superclass `NSObject`.
79impl ASPropertyCompareString {
80    extern_methods!(
81        #[unsafe(method(new))]
82        #[unsafe(method_family = new)]
83        pub unsafe fn new_class() -> Retained<Self>;
84    );
85}