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!(
    /// A wrapper object for HKBiologicalSex enumeration.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkbiologicalsexobject?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct HKBiologicalSexObject;
);

unsafe impl Send for HKBiologicalSexObject {}

unsafe impl Sync for HKBiologicalSexObject {}

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

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

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

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

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

impl HKBiologicalSexObject {
    extern_methods!(
        #[cfg(feature = "HKCharacteristicValues")]
        #[unsafe(method(biologicalSex))]
        #[unsafe(method_family = none)]
        pub unsafe fn biologicalSex(&self) -> HKBiologicalSex;
    );
}

/// Methods declared on superclass `NSObject`.
impl HKBiologicalSexObject {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}

extern_class!(
    /// A wrapper object for HKBloodType enumeration.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkbloodtypeobject?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct HKBloodTypeObject;
);

unsafe impl Send for HKBloodTypeObject {}

unsafe impl Sync for HKBloodTypeObject {}

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

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

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

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

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

impl HKBloodTypeObject {
    extern_methods!(
        #[cfg(feature = "HKCharacteristicValues")]
        #[unsafe(method(bloodType))]
        #[unsafe(method_family = none)]
        pub unsafe fn bloodType(&self) -> HKBloodType;
    );
}

/// Methods declared on superclass `NSObject`.
impl HKBloodTypeObject {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}

extern_class!(
    /// A wrapper object for HKFitzpatrickSkinType enumeration.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkfitzpatrickskintypeobject?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct HKFitzpatrickSkinTypeObject;
);

unsafe impl Send for HKFitzpatrickSkinTypeObject {}

unsafe impl Sync for HKFitzpatrickSkinTypeObject {}

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

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

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

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

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

impl HKFitzpatrickSkinTypeObject {
    extern_methods!(
        #[cfg(feature = "HKCharacteristicValues")]
        #[unsafe(method(skinType))]
        #[unsafe(method_family = none)]
        pub unsafe fn skinType(&self) -> HKFitzpatrickSkinType;
    );
}

/// Methods declared on superclass `NSObject`.
impl HKFitzpatrickSkinTypeObject {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}

extern_class!(
    /// A wrapper object for HKWheelchairUse enumeration.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkwheelchairuseobject?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct HKWheelchairUseObject;
);

unsafe impl Send for HKWheelchairUseObject {}

unsafe impl Sync for HKWheelchairUseObject {}

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

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

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

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

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

impl HKWheelchairUseObject {
    extern_methods!(
        #[cfg(feature = "HKCharacteristicValues")]
        #[unsafe(method(wheelchairUse))]
        #[unsafe(method_family = none)]
        pub unsafe fn wheelchairUse(&self) -> HKWheelchairUse;
    );
}

/// Methods declared on superclass `NSObject`.
impl HKWheelchairUseObject {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}

extern_class!(
    /// A wrapper object for HKActivityMoveMode enumeration.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/healthkit/hkactivitymovemodeobject?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct HKActivityMoveModeObject;
);

unsafe impl Send for HKActivityMoveModeObject {}

unsafe impl Sync for HKActivityMoveModeObject {}

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

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

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

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

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

impl HKActivityMoveModeObject {
    extern_methods!(
        #[cfg(feature = "HKCharacteristicValues")]
        #[unsafe(method(activityMoveMode))]
        #[unsafe(method_family = none)]
        pub unsafe fn activityMoveMode(&self) -> HKActivityMoveMode;
    );
}

/// Methods declared on superclass `NSObject`.
impl HKActivityMoveModeObject {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}