use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(HKQuery, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "HKQuery")]
pub struct HKSourceQuery;
);
#[cfg(feature = "HKQuery")]
unsafe impl Send for HKSourceQuery {}
#[cfg(feature = "HKQuery")]
unsafe impl Sync for HKSourceQuery {}
#[cfg(feature = "HKQuery")]
extern_conformance!(
unsafe impl NSObjectProtocol for HKSourceQuery {}
);
#[cfg(feature = "HKQuery")]
impl HKSourceQuery {
extern_methods!(
#[cfg(all(feature = "HKObjectType", feature = "HKSource", feature = "block2"))]
#[unsafe(method(initWithSampleType:samplePredicate:completionHandler:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSampleType_samplePredicate_completionHandler(
this: Allocated<Self>,
sample_type: &HKSampleType,
object_predicate: Option<&NSPredicate>,
completion_handler: &block2::DynBlock<
dyn Fn(NonNull<HKSourceQuery>, *mut NSSet<HKSource>, *mut NSError),
>,
) -> Retained<Self>;
);
}
#[cfg(feature = "HKQuery")]
impl HKSourceQuery {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
#[cfg(feature = "HKQuery")]
impl HKSourceQuery {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}