icrate 0.1.2

Bindings to Apple's frameworks
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use crate::common::*;
use crate::CoreLocation::*;
use crate::Foundation::*;
use crate::HealthKit::*;
use crate::UniformTypeIdentifiers::*;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "HealthKit_HKHeartbeatSeriesBuilder")]
    pub struct HKHeartbeatSeriesBuilder;

    #[cfg(feature = "HealthKit_HKHeartbeatSeriesBuilder")]
    unsafe impl ClassType for HKHeartbeatSeriesBuilder {
        #[inherits(NSObject)]
        type Super = HKSeriesBuilder;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "HealthKit_HKHeartbeatSeriesBuilder")]
unsafe impl NSObjectProtocol for HKHeartbeatSeriesBuilder {}

extern_methods!(
    #[cfg(feature = "HealthKit_HKHeartbeatSeriesBuilder")]
    unsafe impl HKHeartbeatSeriesBuilder {
        #[method(maximumCount)]
        pub unsafe fn maximumCount() -> NSUInteger;

        #[cfg(all(
            feature = "Foundation_NSDate",
            feature = "HealthKit_HKDevice",
            feature = "HealthKit_HKHealthStore"
        ))]
        #[method_id(@__retain_semantics Init initWithHealthStore:device:startDate:)]
        pub unsafe fn initWithHealthStore_device_startDate(
            this: Allocated<Self>,
            health_store: &HKHealthStore,
            device: Option<&HKDevice>,
            start_date: &NSDate,
        ) -> Id<Self>;

        #[cfg(feature = "Foundation_NSError")]
        #[method(addHeartbeatWithTimeIntervalSinceSeriesStartDate:precededByGap:completion:)]
        pub unsafe fn addHeartbeatWithTimeIntervalSinceSeriesStartDate_precededByGap_completion(
            &self,
            time_interval_since_start: NSTimeInterval,
            preceded_by_gap: bool,
            completion: &Block<(Bool, *mut NSError), ()>,
        );

        #[cfg(all(
            feature = "Foundation_NSDictionary",
            feature = "Foundation_NSError",
            feature = "Foundation_NSString"
        ))]
        #[method(addMetadata:completion:)]
        pub unsafe fn addMetadata_completion(
            &self,
            metadata: &NSDictionary<NSString, AnyObject>,
            completion: &Block<(Bool, *mut NSError), ()>,
        );

        #[cfg(all(
            feature = "Foundation_NSError",
            feature = "HealthKit_HKHeartbeatSeriesSample"
        ))]
        #[method(finishSeriesWithCompletion:)]
        pub unsafe fn finishSeriesWithCompletion(
            &self,
            completion: &Block<(*mut HKHeartbeatSeriesSample, *mut NSError), ()>,
        );
    }
);

extern_methods!(
    /// Methods declared on superclass `HKSeriesBuilder`
    #[cfg(feature = "HealthKit_HKHeartbeatSeriesBuilder")]
    unsafe impl HKHeartbeatSeriesBuilder {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "HealthKit_HKHeartbeatSeriesBuilder")]
    unsafe impl HKHeartbeatSeriesBuilder {
        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;
    }
);