icrate/generated/HealthKit/
HKCategorySample.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use 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_HKCategorySample")]
12    pub struct HKCategorySample;
13
14    #[cfg(feature = "HealthKit_HKCategorySample")]
15    unsafe impl ClassType for HKCategorySample {
16        #[inherits(HKObject, NSObject)]
17        type Super = HKSample;
18        type Mutability = InteriorMutable;
19    }
20);
21
22#[cfg(feature = "HealthKit_HKCategorySample")]
23unsafe impl NSCoding for HKCategorySample {}
24
25#[cfg(feature = "HealthKit_HKCategorySample")]
26unsafe impl NSObjectProtocol for HKCategorySample {}
27
28#[cfg(feature = "HealthKit_HKCategorySample")]
29unsafe impl NSSecureCoding for HKCategorySample {}
30
31extern_methods!(
32    #[cfg(feature = "HealthKit_HKCategorySample")]
33    unsafe impl HKCategorySample {
34        #[cfg(feature = "HealthKit_HKCategoryType")]
35        #[method_id(@__retain_semantics Other categoryType)]
36        pub unsafe fn categoryType(&self) -> Id<HKCategoryType>;
37
38        #[method(value)]
39        pub unsafe fn value(&self) -> NSInteger;
40
41        #[method_id(@__retain_semantics Init init)]
42        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
43
44        #[cfg(all(
45            feature = "Foundation_NSDate",
46            feature = "Foundation_NSDictionary",
47            feature = "Foundation_NSString",
48            feature = "HealthKit_HKCategoryType"
49        ))]
50        #[method_id(@__retain_semantics Other categorySampleWithType:value:startDate:endDate:metadata:)]
51        pub unsafe fn categorySampleWithType_value_startDate_endDate_metadata(
52            r#type: &HKCategoryType,
53            value: NSInteger,
54            start_date: &NSDate,
55            end_date: &NSDate,
56            metadata: Option<&NSDictionary<NSString, AnyObject>>,
57        ) -> Id<Self>;
58
59        #[cfg(all(feature = "Foundation_NSDate", feature = "HealthKit_HKCategoryType"))]
60        #[method_id(@__retain_semantics Other categorySampleWithType:value:startDate:endDate:)]
61        pub unsafe fn categorySampleWithType_value_startDate_endDate(
62            r#type: &HKCategoryType,
63            value: NSInteger,
64            start_date: &NSDate,
65            end_date: &NSDate,
66        ) -> Id<Self>;
67
68        #[cfg(all(
69            feature = "Foundation_NSDate",
70            feature = "Foundation_NSDictionary",
71            feature = "Foundation_NSString",
72            feature = "HealthKit_HKCategoryType",
73            feature = "HealthKit_HKDevice"
74        ))]
75        #[method_id(@__retain_semantics Other categorySampleWithType:value:startDate:endDate:device:metadata:)]
76        pub unsafe fn categorySampleWithType_value_startDate_endDate_device_metadata(
77            r#type: &HKCategoryType,
78            value: NSInteger,
79            start_date: &NSDate,
80            end_date: &NSDate,
81            device: Option<&HKDevice>,
82            metadata: Option<&NSDictionary<NSString, AnyObject>>,
83        ) -> Id<Self>;
84    }
85);
86
87extern_methods!(
88    /// Methods declared on superclass `NSObject`
89    #[cfg(feature = "HealthKit_HKCategorySample")]
90    unsafe impl HKCategorySample {
91        #[method_id(@__retain_semantics New new)]
92        pub unsafe fn new() -> Id<Self>;
93    }
94);
95
96extern_static!(HKPredicateKeyPathCategoryValue: &'static NSString);