icrate/generated/HealthKit/
HKQuantitySeriesSampleBuilder.rs1use crate::common::*;
4use crate::CoreLocation::*;
5use crate::Foundation::*;
6use crate::HealthKit::*;
7use crate::UniformTypeIdentifiers::*;
8
9extern_class!(
10 #[derive(Debug, PartialEq, Eq, Hash)]
11 #[cfg(feature = "HealthKit_HKQuantitySeriesSampleBuilder")]
12 pub struct HKQuantitySeriesSampleBuilder;
13
14 #[cfg(feature = "HealthKit_HKQuantitySeriesSampleBuilder")]
15 unsafe impl ClassType for HKQuantitySeriesSampleBuilder {
16 type Super = NSObject;
17 type Mutability = InteriorMutable;
18 }
19);
20
21#[cfg(feature = "HealthKit_HKQuantitySeriesSampleBuilder")]
22unsafe impl NSObjectProtocol for HKQuantitySeriesSampleBuilder {}
23
24extern_methods!(
25 #[cfg(feature = "HealthKit_HKQuantitySeriesSampleBuilder")]
26 unsafe impl HKQuantitySeriesSampleBuilder {
27 #[cfg(all(
28 feature = "Foundation_NSDate",
29 feature = "HealthKit_HKDevice",
30 feature = "HealthKit_HKHealthStore",
31 feature = "HealthKit_HKQuantityType"
32 ))]
33 #[method_id(@__retain_semantics Init initWithHealthStore:quantityType:startDate:device:)]
34 pub unsafe fn initWithHealthStore_quantityType_startDate_device(
35 this: Allocated<Self>,
36 health_store: &HKHealthStore,
37 quantity_type: &HKQuantityType,
38 start_date: &NSDate,
39 device: Option<&HKDevice>,
40 ) -> Id<Self>;
41
42 #[method_id(@__retain_semantics Init init)]
43 pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
44
45 #[cfg(feature = "HealthKit_HKQuantityType")]
46 #[method_id(@__retain_semantics Other quantityType)]
47 pub unsafe fn quantityType(&self) -> Id<HKQuantityType>;
48
49 #[cfg(feature = "Foundation_NSDate")]
50 #[method_id(@__retain_semantics Other startDate)]
51 pub unsafe fn startDate(&self) -> Id<NSDate>;
52
53 #[cfg(feature = "HealthKit_HKDevice")]
54 #[method_id(@__retain_semantics Other device)]
55 pub unsafe fn device(&self) -> Option<Id<HKDevice>>;
56
57 #[cfg(all(
58 feature = "Foundation_NSDateInterval",
59 feature = "Foundation_NSError",
60 feature = "HealthKit_HKQuantity"
61 ))]
62 #[method(insertQuantity:dateInterval:error:_)]
63 pub unsafe fn insertQuantity_dateInterval_error(
64 &self,
65 quantity: &HKQuantity,
66 date_interval: &NSDateInterval,
67 ) -> Result<(), Id<NSError>>;
68
69 #[cfg(all(
70 feature = "Foundation_NSDate",
71 feature = "Foundation_NSError",
72 feature = "HealthKit_HKQuantity"
73 ))]
74 #[method(insertQuantity:date:error:_)]
75 pub unsafe fn insertQuantity_date_error(
76 &self,
77 quantity: &HKQuantity,
78 date: &NSDate,
79 ) -> Result<(), Id<NSError>>;
80
81 #[cfg(all(
82 feature = "Foundation_NSArray",
83 feature = "Foundation_NSDate",
84 feature = "Foundation_NSDictionary",
85 feature = "Foundation_NSError",
86 feature = "Foundation_NSString",
87 feature = "HealthKit_HKQuantitySample"
88 ))]
89 #[method(finishSeriesWithMetadata:endDate:completion:)]
90 pub unsafe fn finishSeriesWithMetadata_endDate_completion(
91 &self,
92 metadata: Option<&NSDictionary<NSString, AnyObject>>,
93 end_date: Option<&NSDate>,
94 completion: &Block<(*mut NSArray<HKQuantitySample>, *mut NSError), ()>,
95 );
96
97 #[cfg(all(
98 feature = "Foundation_NSArray",
99 feature = "Foundation_NSDictionary",
100 feature = "Foundation_NSError",
101 feature = "Foundation_NSString",
102 feature = "HealthKit_HKQuantitySample"
103 ))]
104 #[method(finishSeriesWithMetadata:completion:)]
105 pub unsafe fn finishSeriesWithMetadata_completion(
106 &self,
107 metadata: Option<&NSDictionary<NSString, AnyObject>>,
108 completion: &Block<(*mut NSArray<HKQuantitySample>, *mut NSError), ()>,
109 );
110
111 #[method(discard)]
112 pub unsafe fn discard(&self);
113 }
114);
115
116extern_methods!(
117 #[cfg(feature = "HealthKit_HKQuantitySeriesSampleBuilder")]
119 unsafe impl HKQuantitySeriesSampleBuilder {
120 #[method_id(@__retain_semantics New new)]
121 pub unsafe fn new() -> Id<Self>;
122 }
123);