objc2_health_kit/generated/
HKSourceQuery.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(HKQuery, NSObject))]
13 #[derive(Debug, PartialEq, Eq, Hash)]
14 #[cfg(feature = "HKQuery")]
15 pub struct HKSourceQuery;
16);
17
18#[cfg(feature = "HKQuery")]
19unsafe impl Send for HKSourceQuery {}
20
21#[cfg(feature = "HKQuery")]
22unsafe impl Sync for HKSourceQuery {}
23
24#[cfg(feature = "HKQuery")]
25extern_conformance!(
26 unsafe impl NSObjectProtocol for HKSourceQuery {}
27);
28
29#[cfg(feature = "HKQuery")]
30impl HKSourceQuery {
31 extern_methods!(
32 #[cfg(all(feature = "HKObjectType", feature = "HKSource", feature = "block2"))]
33 #[unsafe(method(initWithSampleType:samplePredicate:completionHandler:))]
47 #[unsafe(method_family = init)]
48 pub unsafe fn initWithSampleType_samplePredicate_completionHandler(
49 this: Allocated<Self>,
50 sample_type: &HKSampleType,
51 object_predicate: Option<&NSPredicate>,
52 completion_handler: &block2::DynBlock<
53 dyn Fn(NonNull<HKSourceQuery>, *mut NSSet<HKSource>, *mut NSError),
54 >,
55 ) -> Retained<Self>;
56 );
57}
58
59#[cfg(feature = "HKQuery")]
61impl HKSourceQuery {
62 extern_methods!(
63 #[unsafe(method(init))]
64 #[unsafe(method_family = init)]
65 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
66 );
67}
68
69#[cfg(feature = "HKQuery")]
71impl HKSourceQuery {
72 extern_methods!(
73 #[unsafe(method(new))]
74 #[unsafe(method_family = new)]
75 pub unsafe fn new() -> Retained<Self>;
76 );
77}