objc2_health_kit/generated/
HKSource.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// Represents the entity that created an object stored by HealthKit.
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hksource?language=objc)
13    #[unsafe(super(NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    pub struct HKSource;
16);
17
18unsafe impl Send for HKSource {}
19
20unsafe impl Sync for HKSource {}
21
22extern_conformance!(
23    unsafe impl NSCoding for HKSource {}
24);
25
26extern_conformance!(
27    unsafe impl NSCopying for HKSource {}
28);
29
30unsafe impl CopyingHelper for HKSource {
31    type Result = Self;
32}
33
34extern_conformance!(
35    unsafe impl NSObjectProtocol for HKSource {}
36);
37
38extern_conformance!(
39    unsafe impl NSSecureCoding for HKSource {}
40);
41
42impl HKSource {
43    extern_methods!(
44        /// The name of the source represented by the receiver.  If the source is an app, then the name is the
45        /// localized name of the app.
46        #[unsafe(method(name))]
47        #[unsafe(method_family = none)]
48        pub unsafe fn name(&self) -> Retained<NSString>;
49
50        /// The bundle identifier of the source represented by the receiver.
51        #[unsafe(method(bundleIdentifier))]
52        #[unsafe(method_family = none)]
53        pub unsafe fn bundleIdentifier(&self) -> Retained<NSString>;
54
55        /// Returns the source representing the calling application.
56        #[unsafe(method(defaultSource))]
57        #[unsafe(method_family = none)]
58        pub unsafe fn defaultSource() -> Retained<HKSource>;
59
60        #[unsafe(method(init))]
61        #[unsafe(method_family = init)]
62        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
63    );
64}
65
66/// Methods declared on superclass `NSObject`.
67impl HKSource {
68    extern_methods!(
69        #[unsafe(method(new))]
70        #[unsafe(method_family = new)]
71        pub unsafe fn new() -> Retained<Self>;
72    );
73}