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