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
//! 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/hkheartbeatseriesquery?language=objc)
#[unsafe(super(HKQuery, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "HKQuery")]
pub struct HKHeartbeatSeriesQuery;
);
#[cfg(feature = "HKQuery")]
unsafe impl Send for HKHeartbeatSeriesQuery {}
#[cfg(feature = "HKQuery")]
unsafe impl Sync for HKHeartbeatSeriesQuery {}
#[cfg(feature = "HKQuery")]
extern_conformance!(
unsafe impl NSObjectProtocol for HKHeartbeatSeriesQuery {}
);
#[cfg(feature = "HKQuery")]
impl HKHeartbeatSeriesQuery {
extern_methods!(
#[cfg(all(
feature = "HKHeartbeatSeriesSample",
feature = "HKObject",
feature = "HKSample",
feature = "HKSeriesSample",
feature = "block2"
))]
/// Returns a query that will retrieve heartbeat timestamps for the specified HKHeartbeatSeriesSample.
///
///
/// Parameter `heartbeatSeries`: The HKHeartbeatSeriesSample for which the heartbeat data will be returned.
///
/// Parameter `dataHandler`: The block to invoke with results from the query. It is called repeatedly for each
/// heartbeat in the series. timeSinceSeriesStart is the time elapsed in seconds after the
/// series startDate that represents when the heartbeat occured. precededByGap indicates if
/// there was a gap in data collection before the current heartbeat, meaning that one or more
/// heartbeats may have occured since the previous heartbeat in the series. Once done is YES,
/// or stopQuery called, the query is complete and no more calls to the handler will be made.
///
/// # Safety
///
/// `data_handler` block must be sendable.
#[unsafe(method(initWithHeartbeatSeries:dataHandler:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithHeartbeatSeries_dataHandler(
this: Allocated<Self>,
heartbeat_series: &HKHeartbeatSeriesSample,
data_handler: &block2::DynBlock<
dyn Fn(NonNull<HKHeartbeatSeriesQuery>, NSTimeInterval, Bool, Bool, *mut NSError),
>,
) -> Retained<Self>;
);
}
/// Methods declared on superclass `HKQuery`.
#[cfg(feature = "HKQuery")]
impl HKHeartbeatSeriesQuery {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
/// Methods declared on superclass `NSObject`.
#[cfg(feature = "HKQuery")]
impl HKHeartbeatSeriesQuery {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}