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
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkobject?language=objc)
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct HKObject;
);
unsafe impl Send for HKObject {}
unsafe impl Sync for HKObject {}
extern_conformance!(
unsafe impl NSCoding for HKObject {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for HKObject {}
);
extern_conformance!(
unsafe impl NSSecureCoding for HKObject {}
);
impl HKObject {
extern_methods!(
/// A unique identifier of the receiver in the HealthKit database.
#[unsafe(method(UUID))]
#[unsafe(method_family = none)]
pub unsafe fn UUID(&self) -> Retained<NSUUID>;
#[cfg(feature = "HKSource")]
#[deprecated]
#[unsafe(method(source))]
#[unsafe(method_family = none)]
pub unsafe fn source(&self) -> Retained<HKSource>;
#[cfg(feature = "HKSourceRevision")]
/// Represents the revision of the source responsible for saving the receiver.
#[unsafe(method(sourceRevision))]
#[unsafe(method_family = none)]
pub unsafe fn sourceRevision(&self) -> Retained<HKSourceRevision>;
#[cfg(feature = "HKDevice")]
/// Represents the device that generated the data of the receiver.
#[unsafe(method(device))]
#[unsafe(method_family = none)]
pub unsafe fn device(&self) -> Option<Retained<HKDevice>>;
/// Extra information describing properties of the receiver.
///
/// Keys must be NSString and values must be either NSString, NSNumber, NSDate, or
/// HKQuantity. See HKMetadata.h for potential metadata keys and values.
#[unsafe(method(metadata))]
#[unsafe(method_family = none)]
pub unsafe fn metadata(&self) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
/// Methods declared on superclass `NSObject`.
impl HKObject {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkpredicatekeypathuuid?language=objc)
pub static HKPredicateKeyPathUUID: &'static NSString;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkpredicatekeypathsource?language=objc)
pub static HKPredicateKeyPathSource: &'static NSString;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkpredicatekeypathmetadata?language=objc)
pub static HKPredicateKeyPathMetadata: &'static NSString;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkpredicatekeypathcorrelation?language=objc)
pub static HKPredicateKeyPathCorrelation: &'static NSString;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkpredicatekeypathworkout?language=objc)
pub static HKPredicateKeyPathWorkout: &'static NSString;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkpredicatekeypathdevice?language=objc)
pub static HKPredicateKeyPathDevice: &'static NSString;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkpredicatekeypathsourcerevision?language=objc)
pub static HKPredicateKeyPathSourceRevision: &'static NSString;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkpredicatekeypathworkouteffortrelationship?language=objc)
pub static HKPredicateKeyPathWorkoutEffortRelationship: &'static NSString;
}