objc2_health_kit/generated/
HKActivitySummary.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSObject))]
15 #[derive(Debug, PartialEq, Eq, Hash)]
16 pub struct HKActivitySummary;
17);
18
19extern_conformance!(
20 unsafe impl NSCoding for HKActivitySummary {}
21);
22
23extern_conformance!(
24 unsafe impl NSCopying for HKActivitySummary {}
25);
26
27unsafe impl CopyingHelper for HKActivitySummary {
28 type Result = Self;
29}
30
31extern_conformance!(
32 unsafe impl NSObjectProtocol for HKActivitySummary {}
33);
34
35extern_conformance!(
36 unsafe impl NSSecureCoding for HKActivitySummary {}
37);
38
39impl HKActivitySummary {
40 extern_methods!(
41 #[unsafe(method(dateComponentsForCalendar:))]
45 #[unsafe(method_family = none)]
46 pub unsafe fn dateComponentsForCalendar(
47 &self,
48 calendar: &NSCalendar,
49 ) -> Retained<NSDateComponents>;
50
51 #[cfg(feature = "HKCharacteristicValues")]
52 #[unsafe(method(activityMoveMode))]
56 #[unsafe(method_family = none)]
57 pub unsafe fn activityMoveMode(&self) -> HKActivityMoveMode;
58
59 #[cfg(feature = "HKCharacteristicValues")]
60 #[unsafe(method(setActivityMoveMode:))]
62 #[unsafe(method_family = none)]
63 pub unsafe fn setActivityMoveMode(&self, activity_move_mode: HKActivityMoveMode);
64
65 #[unsafe(method(isPaused))]
69 #[unsafe(method_family = none)]
70 pub unsafe fn isPaused(&self) -> bool;
71
72 #[unsafe(method(setPaused:))]
74 #[unsafe(method_family = none)]
75 pub unsafe fn setPaused(&self, paused: bool);
76
77 #[cfg(feature = "HKQuantity")]
78 #[unsafe(method(activeEnergyBurned))]
82 #[unsafe(method_family = none)]
83 pub unsafe fn activeEnergyBurned(&self) -> Retained<HKQuantity>;
84
85 #[cfg(feature = "HKQuantity")]
86 #[unsafe(method(setActiveEnergyBurned:))]
88 #[unsafe(method_family = none)]
89 pub unsafe fn setActiveEnergyBurned(&self, active_energy_burned: &HKQuantity);
90
91 #[cfg(feature = "HKQuantity")]
92 #[unsafe(method(appleMoveTime))]
97 #[unsafe(method_family = none)]
98 pub unsafe fn appleMoveTime(&self) -> Retained<HKQuantity>;
99
100 #[cfg(feature = "HKQuantity")]
101 #[unsafe(method(setAppleMoveTime:))]
103 #[unsafe(method_family = none)]
104 pub unsafe fn setAppleMoveTime(&self, apple_move_time: &HKQuantity);
105
106 #[cfg(feature = "HKQuantity")]
107 #[unsafe(method(appleExerciseTime))]
112 #[unsafe(method_family = none)]
113 pub unsafe fn appleExerciseTime(&self) -> Retained<HKQuantity>;
114
115 #[cfg(feature = "HKQuantity")]
116 #[unsafe(method(setAppleExerciseTime:))]
118 #[unsafe(method_family = none)]
119 pub unsafe fn setAppleExerciseTime(&self, apple_exercise_time: &HKQuantity);
120
121 #[cfg(feature = "HKQuantity")]
122 #[unsafe(method(appleStandHours))]
127 #[unsafe(method_family = none)]
128 pub unsafe fn appleStandHours(&self) -> Retained<HKQuantity>;
129
130 #[cfg(feature = "HKQuantity")]
131 #[unsafe(method(setAppleStandHours:))]
133 #[unsafe(method_family = none)]
134 pub unsafe fn setAppleStandHours(&self, apple_stand_hours: &HKQuantity);
135
136 #[cfg(feature = "HKQuantity")]
137 #[unsafe(method(activeEnergyBurnedGoal))]
141 #[unsafe(method_family = none)]
142 pub unsafe fn activeEnergyBurnedGoal(&self) -> Retained<HKQuantity>;
143
144 #[cfg(feature = "HKQuantity")]
145 #[unsafe(method(setActiveEnergyBurnedGoal:))]
147 #[unsafe(method_family = none)]
148 pub unsafe fn setActiveEnergyBurnedGoal(&self, active_energy_burned_goal: &HKQuantity);
149
150 #[cfg(feature = "HKQuantity")]
151 #[unsafe(method(appleMoveTimeGoal))]
155 #[unsafe(method_family = none)]
156 pub unsafe fn appleMoveTimeGoal(&self) -> Retained<HKQuantity>;
157
158 #[cfg(feature = "HKQuantity")]
159 #[unsafe(method(setAppleMoveTimeGoal:))]
161 #[unsafe(method_family = none)]
162 pub unsafe fn setAppleMoveTimeGoal(&self, apple_move_time_goal: &HKQuantity);
163
164 #[cfg(feature = "HKQuantity")]
165 #[deprecated]
169 #[unsafe(method(appleExerciseTimeGoal))]
170 #[unsafe(method_family = none)]
171 pub unsafe fn appleExerciseTimeGoal(&self) -> Retained<HKQuantity>;
172
173 #[cfg(feature = "HKQuantity")]
174 #[deprecated]
176 #[unsafe(method(setAppleExerciseTimeGoal:))]
177 #[unsafe(method_family = none)]
178 pub unsafe fn setAppleExerciseTimeGoal(&self, apple_exercise_time_goal: &HKQuantity);
179
180 #[cfg(feature = "HKQuantity")]
181 #[unsafe(method(exerciseTimeGoal))]
185 #[unsafe(method_family = none)]
186 pub unsafe fn exerciseTimeGoal(&self) -> Option<Retained<HKQuantity>>;
187
188 #[cfg(feature = "HKQuantity")]
189 #[unsafe(method(setExerciseTimeGoal:))]
191 #[unsafe(method_family = none)]
192 pub unsafe fn setExerciseTimeGoal(&self, exercise_time_goal: Option<&HKQuantity>);
193
194 #[cfg(feature = "HKQuantity")]
195 #[deprecated]
199 #[unsafe(method(appleStandHoursGoal))]
200 #[unsafe(method_family = none)]
201 pub unsafe fn appleStandHoursGoal(&self) -> Retained<HKQuantity>;
202
203 #[cfg(feature = "HKQuantity")]
204 #[deprecated]
206 #[unsafe(method(setAppleStandHoursGoal:))]
207 #[unsafe(method_family = none)]
208 pub unsafe fn setAppleStandHoursGoal(&self, apple_stand_hours_goal: &HKQuantity);
209
210 #[cfg(feature = "HKQuantity")]
211 #[unsafe(method(standHoursGoal))]
215 #[unsafe(method_family = none)]
216 pub unsafe fn standHoursGoal(&self) -> Option<Retained<HKQuantity>>;
217
218 #[cfg(feature = "HKQuantity")]
219 #[unsafe(method(setStandHoursGoal:))]
221 #[unsafe(method_family = none)]
222 pub unsafe fn setStandHoursGoal(&self, stand_hours_goal: Option<&HKQuantity>);
223 );
224}
225
226impl HKActivitySummary {
228 extern_methods!(
229 #[unsafe(method(init))]
230 #[unsafe(method_family = init)]
231 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
232
233 #[unsafe(method(new))]
234 #[unsafe(method_family = new)]
235 pub unsafe fn new() -> Retained<Self>;
236 );
237}
238
239extern "C" {
240 pub static HKPredicateKeyPathDateComponents: &'static NSString;
242}