objc2_health_kit/generated/
HKVerifiableClinicalRecordQuery.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkverifiableclinicalrecordquery?language=objc)
12    #[unsafe(super(HKQuery, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(feature = "HKQuery")]
15    pub struct HKVerifiableClinicalRecordQuery;
16);
17
18#[cfg(feature = "HKQuery")]
19unsafe impl Send for HKVerifiableClinicalRecordQuery {}
20
21#[cfg(feature = "HKQuery")]
22unsafe impl Sync for HKVerifiableClinicalRecordQuery {}
23
24#[cfg(feature = "HKQuery")]
25extern_conformance!(
26    unsafe impl NSObjectProtocol for HKVerifiableClinicalRecordQuery {}
27);
28
29#[cfg(feature = "HKQuery")]
30impl HKVerifiableClinicalRecordQuery {
31    extern_methods!(
32        /// The record types that need to be present on desired records.
33        #[unsafe(method(recordTypes))]
34        #[unsafe(method_family = none)]
35        pub unsafe fn recordTypes(&self) -> Retained<NSArray<NSString>>;
36
37        #[cfg(feature = "HKVerifiableClinicalRecord")]
38        /// The source type(s) of the records.
39        #[unsafe(method(sourceTypes))]
40        #[unsafe(method_family = none)]
41        pub unsafe fn sourceTypes(&self)
42            -> Retained<NSArray<HKVerifiableClinicalRecordSourceType>>;
43
44        #[unsafe(method(init))]
45        #[unsafe(method_family = init)]
46        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
47
48        #[unsafe(method(new))]
49        #[unsafe(method_family = new)]
50        pub unsafe fn new() -> Retained<Self>;
51
52        #[cfg(all(
53            feature = "HKObject",
54            feature = "HKSample",
55            feature = "HKVerifiableClinicalRecord",
56            feature = "block2"
57        ))]
58        /// Returns an one-time query that will ask for access to verifiable clinical records that match the query.
59        ///
60        ///
61        /// Parameter `recordTypes`: The record types that need to be present on a verifiable clinical record.
62        ///
63        /// Parameter `predicate`: The predicate which records should match.
64        ///
65        /// Parameter `resultsHandler`: The block to invoke with the verifiable clinical records from the query.
66        ///
67        /// # Safety
68        ///
69        /// `results_handler` block must be sendable.
70        #[unsafe(method(initWithRecordTypes:predicate:resultsHandler:))]
71        #[unsafe(method_family = init)]
72        pub unsafe fn initWithRecordTypes_predicate_resultsHandler(
73            this: Allocated<Self>,
74            record_types: &NSArray<NSString>,
75            predicate: Option<&NSPredicate>,
76            results_handler: &block2::DynBlock<
77                dyn Fn(
78                    NonNull<HKVerifiableClinicalRecordQuery>,
79                    *mut NSArray<HKVerifiableClinicalRecord>,
80                    *mut NSError,
81                ),
82            >,
83        ) -> Retained<Self>;
84
85        #[cfg(all(
86            feature = "HKObject",
87            feature = "HKSample",
88            feature = "HKVerifiableClinicalRecord",
89            feature = "block2"
90        ))]
91        /// Returns a one-time query that will ask for access to and return verifiable clinical records that match the query.
92        ///
93        ///
94        /// Parameter `recordTypes`: The record types that need to be present on a verifiable clinical record.
95        ///
96        /// Parameter `sourceTypes`: The source type(s) of the records.
97        ///
98        /// Parameter `predicate`: The predicate which records should match.
99        ///
100        /// Parameter `resultsHandler`: The block to invoke with the verifiable clinical records from the query.
101        ///
102        /// # Safety
103        ///
104        /// `results_handler` block must be sendable.
105        #[unsafe(method(initWithRecordTypes:sourceTypes:predicate:resultsHandler:))]
106        #[unsafe(method_family = init)]
107        pub unsafe fn initWithRecordTypes_sourceTypes_predicate_resultsHandler(
108            this: Allocated<Self>,
109            record_types: &NSArray<NSString>,
110            source_types: &NSArray<HKVerifiableClinicalRecordSourceType>,
111            predicate: Option<&NSPredicate>,
112            results_handler: &block2::DynBlock<
113                dyn Fn(
114                    NonNull<HKVerifiableClinicalRecordQuery>,
115                    *mut NSArray<HKVerifiableClinicalRecord>,
116                    *mut NSError,
117                ),
118            >,
119        ) -> Retained<Self>;
120    );
121}