objc2-health-kit 0.3.2

Bindings to the HealthKit framework
Documentation
//! 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 the entity that created an object stored by HealthKit.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hksource?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct HKSource;
);

unsafe impl Send for HKSource {}

unsafe impl Sync for HKSource {}

extern_conformance!(
    unsafe impl NSCoding for HKSource {}
);

extern_conformance!(
    unsafe impl NSCopying for HKSource {}
);

unsafe impl CopyingHelper for HKSource {
    type Result = Self;
}

extern_conformance!(
    unsafe impl NSObjectProtocol for HKSource {}
);

extern_conformance!(
    unsafe impl NSSecureCoding for HKSource {}
);

impl HKSource {
    extern_methods!(
        /// The name of the source represented by the receiver.  If the source is an app, then the name is the
        /// localized name of the app.
        #[unsafe(method(name))]
        #[unsafe(method_family = none)]
        pub unsafe fn name(&self) -> Retained<NSString>;

        /// The bundle identifier of the source represented by the receiver.
        #[unsafe(method(bundleIdentifier))]
        #[unsafe(method_family = none)]
        pub unsafe fn bundleIdentifier(&self) -> Retained<NSString>;

        /// Returns the source representing the calling application.
        #[unsafe(method(defaultSource))]
        #[unsafe(method_family = none)]
        pub unsafe fn defaultSource() -> Retained<HKSource>;

        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
    );
}

/// Methods declared on superclass `NSObject`.
impl HKSource {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}