objc2-core-location 0.3.2

Bindings to the CoreLocation framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
#[cfg(feature = "dispatch2")]
use dispatch2::*;
use objc2::__framework_prelude::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/corelocation/clbackgroundactivitysessiondiagnostic?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct CLBackgroundActivitySessionDiagnostic;
);

extern_conformance!(
    unsafe impl NSObjectProtocol for CLBackgroundActivitySessionDiagnostic {}
);

impl CLBackgroundActivitySessionDiagnostic {
    extern_methods!(
        #[unsafe(method(authorizationDenied))]
        #[unsafe(method_family = none)]
        pub unsafe fn authorizationDenied(&self) -> bool;

        #[unsafe(method(authorizationDeniedGlobally))]
        #[unsafe(method_family = none)]
        pub unsafe fn authorizationDeniedGlobally(&self) -> bool;

        #[unsafe(method(authorizationRestricted))]
        #[unsafe(method_family = none)]
        pub unsafe fn authorizationRestricted(&self) -> bool;

        #[unsafe(method(insufficientlyInUse))]
        #[unsafe(method_family = none)]
        pub unsafe fn insufficientlyInUse(&self) -> bool;

        #[unsafe(method(serviceSessionRequired))]
        #[unsafe(method_family = none)]
        pub unsafe fn serviceSessionRequired(&self) -> bool;

        #[unsafe(method(authorizationRequestInProgress))]
        #[unsafe(method_family = none)]
        pub unsafe fn authorizationRequestInProgress(&self) -> bool;
    );
}

/// Methods declared on superclass `NSObject`.
impl CLBackgroundActivitySessionDiagnostic {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/corelocation/clbackgroundactivitysession?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct CLBackgroundActivitySession;
);

extern_conformance!(
    unsafe impl NSObjectProtocol for CLBackgroundActivitySession {}
);

impl CLBackgroundActivitySession {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;

        #[unsafe(method(invalidate))]
        #[unsafe(method_family = none)]
        pub unsafe fn invalidate(&self);

        #[unsafe(method(backgroundActivitySession))]
        #[unsafe(method_family = none)]
        pub unsafe fn backgroundActivitySession() -> Retained<Self>;

        #[cfg(all(feature = "block2", feature = "dispatch2"))]
        /// # Safety
        ///
        /// `queue` possibly has additional threading requirements.
        #[unsafe(method(backgroundActivitySessionWithQueue:handler:))]
        #[unsafe(method_family = none)]
        pub unsafe fn backgroundActivitySessionWithQueue_handler(
            queue: &DispatchQueue,
            handler: &block2::DynBlock<dyn Fn(NonNull<CLBackgroundActivitySessionDiagnostic>)>,
        ) -> Retained<Self>;
    );
}