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
122
123
//! 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!(
/// Represents a specific revision of an HKSource.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hksourcerevision?language=objc)
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct HKSourceRevision;
);
unsafe impl Send for HKSourceRevision {}
unsafe impl Sync for HKSourceRevision {}
extern_conformance!(
unsafe impl NSCoding for HKSourceRevision {}
);
extern_conformance!(
unsafe impl NSCopying for HKSourceRevision {}
);
unsafe impl CopyingHelper for HKSourceRevision {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for HKSourceRevision {}
);
extern_conformance!(
unsafe impl NSSecureCoding for HKSourceRevision {}
);
impl HKSourceRevision {
extern_methods!(
#[cfg(feature = "HKSource")]
/// The HKSource of the receiver.
#[unsafe(method(source))]
#[unsafe(method_family = none)]
pub unsafe fn source(&self) -> Retained<HKSource>;
/// The version of the source property.
///
/// This value is taken from the CFBundleVersion of the source. May be nil for older data.
#[unsafe(method(version))]
#[unsafe(method_family = none)]
pub unsafe fn version(&self) -> Option<Retained<NSString>>;
/// Represents the product type of the device running HealthKit when the object was created.
///
/// This value may be nil for older data, which indicates an unknown product type.
#[unsafe(method(productType))]
#[unsafe(method_family = none)]
pub unsafe fn productType(&self) -> Option<Retained<NSString>>;
/// Represents the operating system version of the device running HealthKit when the object was created.
///
/// iOS versions after 8.0 but prior to 8.2 are saved as 8.0, and iOS version after 8.2 but prior to 9.0
/// are saved as 8.2.
#[unsafe(method(operatingSystemVersion))]
#[unsafe(method_family = none)]
pub unsafe fn operatingSystemVersion(&self) -> NSOperatingSystemVersion;
#[cfg(feature = "HKSource")]
/// Initializes a new HKSourceRevision with the given source, version, product type, and operating system
/// version.
#[unsafe(method(initWithSource:version:productType:operatingSystemVersion:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_version_productType_operatingSystemVersion(
this: Allocated<Self>,
source: &HKSource,
version: Option<&NSString>,
product_type: Option<&NSString>,
operating_system_version: NSOperatingSystemVersion,
) -> Retained<Self>;
#[cfg(feature = "HKSource")]
/// Initializes a new HKSourceRevision with the given source and version.
#[unsafe(method(initWithSource:version:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSource_version(
this: Allocated<Self>,
source: &HKSource,
version: Option<&NSString>,
) -> Retained<Self>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
/// Methods declared on superclass `NSObject`.
impl HKSourceRevision {
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/hksourcerevisionanyversion?language=objc)
pub static HKSourceRevisionAnyVersion: &'static NSString;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hksourcerevisionanyproducttype?language=objc)
pub static HKSourceRevisionAnyProductType: &'static NSString;
}
extern "C" {
/// [Apple's documentation](https://developer.apple.com/documentation/healthkit/hksourcerevisionanyoperatingsystem?language=objc)
pub static HKSourceRevisionAnyOperatingSystem: NSOperatingSystemVersion;
}