objc2_core_location/generated/
CLMonitorConfiguration.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5#[cfg(feature = "dispatch2")]
6use dispatch2::*;
7use objc2::__framework_prelude::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_class!(
13    /// [Apple's documentation](https://developer.apple.com/documentation/corelocation/clmonitorconfiguration?language=objc)
14    #[unsafe(super(NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    pub struct CLMonitorConfiguration;
17);
18
19unsafe impl Send for CLMonitorConfiguration {}
20
21unsafe impl Sync for CLMonitorConfiguration {}
22
23extern_conformance!(
24    unsafe impl NSObjectProtocol for CLMonitorConfiguration {}
25);
26
27impl CLMonitorConfiguration {
28    extern_methods!(
29        #[unsafe(method(name))]
30        #[unsafe(method_family = none)]
31        pub unsafe fn name(&self) -> Retained<NSString>;
32
33        #[cfg(feature = "dispatch2")]
34        #[unsafe(method(queue))]
35        #[unsafe(method_family = none)]
36        pub unsafe fn queue(&self) -> Retained<DispatchQueue>;
37
38        #[cfg(all(
39            feature = "CLMonitor",
40            feature = "CLMonitoringEvent",
41            feature = "block2"
42        ))]
43        /// This property is not atomic.
44        ///
45        /// # Safety
46        ///
47        /// - The returned block's argument 1 must be a valid pointer.
48        /// - The returned block's argument 2 must be a valid pointer.
49        /// - This might not be thread-safe.
50        #[unsafe(method(eventHandler))]
51        #[unsafe(method_family = none)]
52        pub unsafe fn eventHandler(
53            &self,
54        ) -> NonNull<block2::DynBlock<dyn Fn(NonNull<CLMonitor>, NonNull<CLMonitoringEvent>)>>;
55
56        #[cfg(all(
57            feature = "CLMonitor",
58            feature = "CLMonitoringEvent",
59            feature = "block2",
60            feature = "dispatch2"
61        ))]
62        /// # Safety
63        ///
64        /// `queue` possibly has additional threading requirements.
65        #[unsafe(method(configWithMonitorName:queue:eventHandler:))]
66        #[unsafe(method_family = none)]
67        pub unsafe fn configWithMonitorName_queue_eventHandler(
68            name: &NSString,
69            queue: &DispatchQueue,
70            event_handler: &block2::DynBlock<
71                dyn Fn(NonNull<CLMonitor>, NonNull<CLMonitoringEvent>),
72            >,
73        ) -> Retained<CLMonitorConfiguration>;
74    );
75}
76
77/// Methods declared on superclass `NSObject`.
78impl CLMonitorConfiguration {
79    extern_methods!(
80        #[unsafe(method(init))]
81        #[unsafe(method_family = init)]
82        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
83
84        #[unsafe(method(new))]
85        #[unsafe(method_family = new)]
86        pub unsafe fn new() -> Retained<Self>;
87    );
88}