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 HKStatisticsQuery;
);
#[cfg(feature = "HKQuery")]
unsafe impl Send for HKStatisticsQuery {}
#[cfg(feature = "HKQuery")]
unsafe impl Sync for HKStatisticsQuery {}
#[cfg(feature = "HKQuery")]
extern_conformance!(
unsafe impl NSObjectProtocol for HKStatisticsQuery {}
);
#[cfg(feature = "HKQuery")]
impl HKStatisticsQuery {
extern_methods!(
#[cfg(all(feature = "HKObjectType", feature = "HKStatistics", feature = "block2"))]
#[unsafe(method(initWithQuantityType:quantitySamplePredicate:options:completionHandler:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithQuantityType_quantitySamplePredicate_options_completionHandler(
this: Allocated<Self>,
quantity_type: &HKQuantityType,
quantity_sample_predicate: Option<&NSPredicate>,
options: HKStatisticsOptions,
handler: &block2::DynBlock<
dyn Fn(NonNull<HKStatisticsQuery>, *mut HKStatistics, *mut NSError),
>,
) -> Retained<Self>;
);
}
#[cfg(feature = "HKQuery")]
impl HKStatisticsQuery {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
#[cfg(feature = "HKQuery")]
impl HKStatisticsQuery {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}