#![allow(unused_imports)]
#![allow(deprecated)]
#![allow(non_snake_case)]
#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#![allow(missing_docs)]
#![allow(clippy::too_many_arguments)]
#![allow(clippy::type_complexity)]
#![allow(clippy::upper_case_acronyms)]
#![allow(clippy::identity_op)]
#![allow(clippy::missing_safety_doc)]
#![allow(clippy::doc_lazy_continuation)]
#![allow(rustdoc::broken_intra_doc_links)]
#![allow(rustdoc::bare_urls)]
#![allow(rustdoc::invalid_html_tags)]
#[link(name = "SensorKit", kind = "framework")]
extern "C" {}
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-ar-kit")]
use objc2_ar_kit::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
#[cfg(feature = "objc2-core-location")]
use objc2_core_location::*;
#[cfg(feature = "objc2-core-media")]
use objc2_core_media::*;
use objc2_foundation::*;
#[cfg(feature = "objc2-sound-analysis")]
use objc2_sound_analysis::*;
#[cfg(feature = "objc2-speech")]
use objc2_speech::*;
use crate::*;
pub type SRSensor = NSString;
extern "C" {
pub static SRSensorAmbientLightSensor: &'static SRSensor;
}
extern "C" {
pub static SRSensorAccelerometer: &'static SRSensor;
}
extern "C" {
pub static SRSensorRotationRate: &'static SRSensor;
}
extern "C" {
pub static SRSensorVisits: &'static SRSensor;
}
extern "C" {
pub static SRSensorPedometerData: &'static SRSensor;
}
extern "C" {
pub static SRSensorDeviceUsageReport: &'static SRSensor;
}
extern "C" {
pub static SRSensorMessagesUsageReport: &'static SRSensor;
}
extern "C" {
pub static SRSensorPhoneUsageReport: &'static SRSensor;
}
extern "C" {
pub static SRSensorOnWristState: &'static SRSensor;
}
extern "C" {
pub static SRSensorKeyboardMetrics: &'static SRSensor;
}
extern "C" {
pub static SRSensorSiriSpeechMetrics: &'static SRSensor;
}
extern "C" {
pub static SRSensorTelephonySpeechMetrics: &'static SRSensor;
}
extern "C" {
pub static SRSensorAmbientPressure: &'static SRSensor;
}
extern "C" {
pub static SRSensorMediaEvents: &'static SRSensor;
}
extern "C" {
pub static SRSensorWristTemperature: &'static SRSensor;
}
extern "C" {
pub static SRSensorHeartRate: &'static SRSensor;
}
extern "C" {
pub static SRSensorFaceMetrics: &'static SRSensor;
}
extern "C" {
pub static SRSensorOdometer: &'static SRSensor;
}
extern "C" {
pub static SRSensorElectrocardiogram: &'static SRSensor;
}
extern "C" {
pub static SRSensorPhotoplethysmogram: &'static SRSensor;
}
extern "C" {
pub static SRSensorAcousticSettings: &'static SRSensor;
}
extern "C" {
pub static SRSensorSleepSessions: &'static SRSensor;
}
#[cfg(feature = "objc2-core-foundation")]
pub type SRAbsoluteTime = CFTimeInterval;
extern "C-unwind" {
#[cfg(feature = "objc2-core-foundation")]
pub fn SRAbsoluteTimeGetCurrent() -> SRAbsoluteTime;
}
extern "C-unwind" {
#[cfg(feature = "objc2-core-foundation")]
pub fn SRAbsoluteTimeFromContinuousTime(cont: u64) -> SRAbsoluteTime;
}
extern "C-unwind" {
#[cfg(feature = "objc2-core-foundation")]
pub fn SRAbsoluteTimeToCFAbsoluteTime(sr: SRAbsoluteTime) -> CFAbsoluteTime;
}
extern "C-unwind" {
#[cfg(feature = "objc2-core-foundation")]
pub fn SRAbsoluteTimeFromCFAbsoluteTime(cf: CFAbsoluteTime) -> SRAbsoluteTime;
}
mod private_NSDateSensorKit {
pub trait Sealed {}
}
#[doc(alias = "SensorKit")]
pub unsafe trait NSDateSensorKit:
ClassType + Sized + private_NSDateSensorKit::Sealed
{
extern_methods!(
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(dateWithSRAbsoluteTime:))]
#[unsafe(method_family = none)]
unsafe fn dateWithSRAbsoluteTime(time: SRAbsoluteTime) -> Retained<Self>;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(initWithSRAbsoluteTime:))]
#[unsafe(method_family = init)]
unsafe fn initWithSRAbsoluteTime(
this: Allocated<Self>,
time: SRAbsoluteTime,
) -> Retained<Self>;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(srAbsoluteTime))]
#[unsafe(method_family = none)]
unsafe fn srAbsoluteTime(&self) -> SRAbsoluteTime;
);
}
impl private_NSDateSensorKit::Sealed for NSDate {}
unsafe impl NSDateSensorKit for NSDate {}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SRFetchResult<SampleType: ?Sized = AnyObject>;
);
impl<SampleType: ?Sized + Message> SRFetchResult<SampleType> {
#[inline]
pub unsafe fn cast_unchecked<NewSampleType: ?Sized + Message>(
&self,
) -> &SRFetchResult<NewSampleType> {
unsafe { &*((self as *const Self).cast()) }
}
}
extern_conformance!(
unsafe impl<SampleType: ?Sized> NSCopying for SRFetchResult<SampleType> {}
);
unsafe impl<SampleType: ?Sized + Message> CopyingHelper for SRFetchResult<SampleType> {
type Result = Self;
}
extern_conformance!(
unsafe impl<SampleType: ?Sized> NSObjectProtocol for SRFetchResult<SampleType> {}
);
impl<SampleType: Message> SRFetchResult<SampleType> {
extern_methods!(
#[unsafe(method(sample))]
#[unsafe(method_family = none)]
pub unsafe fn sample(&self) -> Retained<SampleType>;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(timestamp))]
#[unsafe(method_family = none)]
pub unsafe fn timestamp(&self) -> SRAbsoluteTime;
#[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!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SRDevice;
);
extern_conformance!(
unsafe impl NSCoding for SRDevice {}
);
extern_conformance!(
unsafe impl NSCopying for SRDevice {}
);
unsafe impl CopyingHelper for SRDevice {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for SRDevice {}
);
extern_conformance!(
unsafe impl NSSecureCoding for SRDevice {}
);
impl SRDevice {
extern_methods!(
#[unsafe(method(currentDevice))]
#[unsafe(method_family = none)]
pub unsafe fn currentDevice() -> Retained<SRDevice>;
#[unsafe(method(name))]
#[unsafe(method_family = none)]
pub unsafe fn name(&self) -> Retained<NSString>;
#[unsafe(method(model))]
#[unsafe(method_family = none)]
pub unsafe fn model(&self) -> Retained<NSString>;
#[unsafe(method(systemName))]
#[unsafe(method_family = none)]
pub unsafe fn systemName(&self) -> Retained<NSString>;
#[unsafe(method(systemVersion))]
#[unsafe(method_family = none)]
pub unsafe fn systemVersion(&self) -> Retained<NSString>;
#[unsafe(method(productType))]
#[unsafe(method_family = none)]
pub unsafe fn productType(&self) -> Retained<NSString>;
);
}
impl SRDevice {
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!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SRFetchRequest;
);
extern_conformance!(
unsafe impl NSObjectProtocol for SRFetchRequest {}
);
impl SRFetchRequest {
extern_methods!(
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(from))]
#[unsafe(method_family = none)]
pub unsafe fn from(&self) -> SRAbsoluteTime;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setFrom:))]
#[unsafe(method_family = none)]
pub unsafe fn setFrom(&self, from: SRAbsoluteTime);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(to))]
#[unsafe(method_family = none)]
pub unsafe fn to(&self) -> SRAbsoluteTime;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setTo:))]
#[unsafe(method_family = none)]
pub unsafe fn setTo(&self, to: SRAbsoluteTime);
#[unsafe(method(device))]
#[unsafe(method_family = none)]
pub unsafe fn device(&self) -> Retained<SRDevice>;
#[unsafe(method(setDevice:))]
#[unsafe(method_family = none)]
pub unsafe fn setDevice(&self, device: &SRDevice);
);
}
impl SRFetchRequest {
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>;
);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct SRAuthorizationStatus(pub NSInteger);
impl SRAuthorizationStatus {
#[doc(alias = "SRAuthorizationStatusNotDetermined")]
pub const NotDetermined: Self = Self(0);
#[doc(alias = "SRAuthorizationStatusAuthorized")]
pub const Authorized: Self = Self(1);
#[doc(alias = "SRAuthorizationStatusDenied")]
pub const Denied: Self = Self(2);
}
unsafe impl Encode for SRAuthorizationStatus {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for SRAuthorizationStatus {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_protocol!(
pub unsafe trait SRSensorReaderDelegate: NSObjectProtocol {
#[optional]
#[unsafe(method(sensorReader:fetchingRequest:didFetchResult:))]
#[unsafe(method_family = none)]
unsafe fn sensorReader_fetchingRequest_didFetchResult(
&self,
reader: &SRSensorReader,
fetch_request: &SRFetchRequest,
result: &SRFetchResult,
) -> bool;
#[optional]
#[unsafe(method(sensorReader:didCompleteFetch:))]
#[unsafe(method_family = none)]
unsafe fn sensorReader_didCompleteFetch(
&self,
reader: &SRSensorReader,
fetch_request: &SRFetchRequest,
);
#[optional]
#[unsafe(method(sensorReader:fetchingRequest:failedWithError:))]
#[unsafe(method_family = none)]
unsafe fn sensorReader_fetchingRequest_failedWithError(
&self,
reader: &SRSensorReader,
fetch_request: &SRFetchRequest,
error: &NSError,
);
#[optional]
#[unsafe(method(sensorReader:didChangeAuthorizationStatus:))]
#[unsafe(method_family = none)]
unsafe fn sensorReader_didChangeAuthorizationStatus(
&self,
reader: &SRSensorReader,
authorization_status: SRAuthorizationStatus,
);
#[optional]
#[unsafe(method(sensorReaderWillStartRecording:))]
#[unsafe(method_family = none)]
unsafe fn sensorReaderWillStartRecording(&self, reader: &SRSensorReader);
#[optional]
#[unsafe(method(sensorReader:startRecordingFailedWithError:))]
#[unsafe(method_family = none)]
unsafe fn sensorReader_startRecordingFailedWithError(
&self,
reader: &SRSensorReader,
error: &NSError,
);
#[optional]
#[unsafe(method(sensorReaderDidStopRecording:))]
#[unsafe(method_family = none)]
unsafe fn sensorReaderDidStopRecording(&self, reader: &SRSensorReader);
#[optional]
#[unsafe(method(sensorReader:stopRecordingFailedWithError:))]
#[unsafe(method_family = none)]
unsafe fn sensorReader_stopRecordingFailedWithError(
&self,
reader: &SRSensorReader,
error: &NSError,
);
#[optional]
#[unsafe(method(sensorReader:didFetchDevices:))]
#[unsafe(method_family = none)]
unsafe fn sensorReader_didFetchDevices(
&self,
reader: &SRSensorReader,
devices: &NSArray<SRDevice>,
);
#[optional]
#[unsafe(method(sensorReader:fetchDevicesDidFailWithError:))]
#[unsafe(method_family = none)]
unsafe fn sensorReader_fetchDevicesDidFailWithError(
&self,
reader: &SRSensorReader,
error: &NSError,
);
}
);
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SRSensorReader;
);
extern_conformance!(
unsafe impl NSObjectProtocol for SRSensorReader {}
);
impl SRSensorReader {
extern_methods!(
#[unsafe(method(initWithSensor:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithSensor(this: Allocated<Self>, sensor: &SRSensor) -> Retained<Self>;
#[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>;
#[unsafe(method(startRecording))]
#[unsafe(method_family = none)]
pub unsafe fn startRecording(&self);
#[unsafe(method(stopRecording))]
#[unsafe(method_family = none)]
pub unsafe fn stopRecording(&self);
#[unsafe(method(fetchDevices))]
#[unsafe(method_family = none)]
pub unsafe fn fetchDevices(&self);
#[unsafe(method(fetch:))]
#[unsafe(method_family = none)]
pub unsafe fn fetch(&self, request: &SRFetchRequest);
#[unsafe(method(authorizationStatus))]
#[unsafe(method_family = none)]
pub unsafe fn authorizationStatus(&self) -> SRAuthorizationStatus;
#[unsafe(method(sensor))]
#[unsafe(method_family = none)]
pub unsafe fn sensor(&self) -> Retained<SRSensor>;
#[unsafe(method(delegate))]
#[unsafe(method_family = none)]
pub unsafe fn delegate(
&self,
) -> Option<Retained<ProtocolObject<dyn SRSensorReaderDelegate>>>;
#[unsafe(method(setDelegate:))]
#[unsafe(method_family = none)]
pub unsafe fn setDelegate(
&self,
delegate: Option<&ProtocolObject<dyn SRSensorReaderDelegate>>,
);
#[cfg(feature = "block2")]
#[unsafe(method(requestAuthorizationForSensors:completion:))]
#[unsafe(method_family = none)]
pub unsafe fn requestAuthorizationForSensors_completion(
sensors: &NSSet<SRSensor>,
completion: &block2::DynBlock<dyn Fn(*mut NSError)>,
);
);
}
extern "C" {
pub static SRErrorDomain: &'static NSErrorDomain;
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct SRErrorCode(pub NSInteger);
impl SRErrorCode {
#[doc(alias = "SRErrorInvalidEntitlement")]
pub const InvalidEntitlement: Self = Self(0);
#[doc(alias = "SRErrorNoAuthorization")]
pub const NoAuthorization: Self = Self(1);
#[doc(alias = "SRErrorDataInaccessible")]
pub const DataInaccessible: Self = Self(2);
#[doc(alias = "SRErrorFetchRequestInvalid")]
pub const FetchRequestInvalid: Self = Self(3);
#[doc(alias = "SRErrorPromptDeclined")]
pub const PromptDeclined: Self = Self(4);
}
unsafe impl Encode for SRErrorCode {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for SRErrorCode {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct SRAmbientLightSensorPlacement(pub NSInteger);
impl SRAmbientLightSensorPlacement {
#[doc(alias = "SRAmbientLightSensorPlacementUnknown")]
pub const Unknown: Self = Self(0);
#[doc(alias = "SRAmbientLightSensorPlacementFrontTop")]
pub const FrontTop: Self = Self(1);
#[doc(alias = "SRAmbientLightSensorPlacementFrontBottom")]
pub const FrontBottom: Self = Self(2);
#[doc(alias = "SRAmbientLightSensorPlacementFrontRight")]
pub const FrontRight: Self = Self(3);
#[doc(alias = "SRAmbientLightSensorPlacementFrontLeft")]
pub const FrontLeft: Self = Self(4);
#[doc(alias = "SRAmbientLightSensorPlacementFrontTopRight")]
pub const FrontTopRight: Self = Self(5);
#[doc(alias = "SRAmbientLightSensorPlacementFrontTopLeft")]
pub const FrontTopLeft: Self = Self(6);
#[doc(alias = "SRAmbientLightSensorPlacementFrontBottomRight")]
pub const FrontBottomRight: Self = Self(7);
#[doc(alias = "SRAmbientLightSensorPlacementFrontBottomLeft")]
pub const FrontBottomLeft: Self = Self(8);
}
unsafe impl Encode for SRAmbientLightSensorPlacement {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for SRAmbientLightSensorPlacement {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct SRAmbientLightChromaticity {
pub x: f32,
pub y: f32,
}
unsafe impl Encode for SRAmbientLightChromaticity {
const ENCODING: Encoding = Encoding::Struct("?", &[<f32>::ENCODING, <f32>::ENCODING]);
}
unsafe impl RefEncode for SRAmbientLightChromaticity {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SRAmbientLightSample;
);
extern_conformance!(
unsafe impl NSObjectProtocol for SRAmbientLightSample {}
);
impl SRAmbientLightSample {
extern_methods!(
#[unsafe(method(placement))]
#[unsafe(method_family = none)]
pub unsafe fn placement(&self) -> SRAmbientLightSensorPlacement;
#[unsafe(method(chromaticity))]
#[unsafe(method_family = none)]
pub unsafe fn chromaticity(&self) -> SRAmbientLightChromaticity;
#[unsafe(method(lux))]
#[unsafe(method_family = none)]
pub unsafe fn lux(&self) -> Retained<NSMeasurement<NSUnitIlluminance>>;
);
}
impl SRAmbientLightSample {
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>;
);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct SRLocationCategory(pub NSInteger);
impl SRLocationCategory {
#[doc(alias = "SRLocationCategoryUnknown")]
pub const Unknown: Self = Self(0);
#[doc(alias = "SRLocationCategoryHome")]
pub const Home: Self = Self(1);
#[doc(alias = "SRLocationCategoryWork")]
pub const Work: Self = Self(2);
#[doc(alias = "SRLocationCategorySchool")]
pub const School: Self = Self(3);
#[doc(alias = "SRLocationCategoryGym")]
pub const Gym: Self = Self(4);
}
unsafe impl Encode for SRLocationCategory {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for SRLocationCategory {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SRVisit;
);
extern_conformance!(
unsafe impl NSObjectProtocol for SRVisit {}
);
impl SRVisit {
extern_methods!(
#[cfg(feature = "objc2-core-location")]
#[unsafe(method(distanceFromHome))]
#[unsafe(method_family = none)]
pub unsafe fn distanceFromHome(&self) -> CLLocationDistance;
#[unsafe(method(arrivalDateInterval))]
#[unsafe(method_family = none)]
pub unsafe fn arrivalDateInterval(&self) -> Retained<NSDateInterval>;
#[unsafe(method(departureDateInterval))]
#[unsafe(method_family = none)]
pub unsafe fn departureDateInterval(&self) -> Retained<NSDateInterval>;
#[unsafe(method(locationCategory))]
#[unsafe(method_family = none)]
pub unsafe fn locationCategory(&self) -> SRLocationCategory;
#[unsafe(method(identifier))]
#[unsafe(method_family = none)]
pub unsafe fn identifier(&self) -> Retained<NSUUID>;
);
}
impl SRVisit {
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>;
);
}
pub type SRDeviceUsageCategoryKey = NSString;
extern "C" {
pub static SRDeviceUsageCategoryGames: &'static SRDeviceUsageCategoryKey;
}
extern "C" {
pub static SRDeviceUsageCategoryBusiness: &'static SRDeviceUsageCategoryKey;
}
extern "C" {
pub static SRDeviceUsageCategoryWeather: &'static SRDeviceUsageCategoryKey;
}
extern "C" {
pub static SRDeviceUsageCategoryUtilities: &'static SRDeviceUsageCategoryKey;
}
extern "C" {
pub static SRDeviceUsageCategoryTravel: &'static SRDeviceUsageCategoryKey;
}
extern "C" {
pub static SRDeviceUsageCategorySports: &'static SRDeviceUsageCategoryKey;
}
extern "C" {
pub static SRDeviceUsageCategorySocialNetworking: &'static SRDeviceUsageCategoryKey;
}
extern "C" {
pub static SRDeviceUsageCategoryReference: &'static SRDeviceUsageCategoryKey;
}
extern "C" {
pub static SRDeviceUsageCategoryProductivity: &'static SRDeviceUsageCategoryKey;
}
extern "C" {
pub static SRDeviceUsageCategoryPhotoAndVideo: &'static SRDeviceUsageCategoryKey;
}
extern "C" {
pub static SRDeviceUsageCategoryNews: &'static SRDeviceUsageCategoryKey;
}
extern "C" {
pub static SRDeviceUsageCategoryNavigation: &'static SRDeviceUsageCategoryKey;
}
extern "C" {
pub static SRDeviceUsageCategoryMusic: &'static SRDeviceUsageCategoryKey;
}
extern "C" {
pub static SRDeviceUsageCategoryLifestyle: &'static SRDeviceUsageCategoryKey;
}
extern "C" {
pub static SRDeviceUsageCategoryHealthAndFitness: &'static SRDeviceUsageCategoryKey;
}
extern "C" {
pub static SRDeviceUsageCategoryFinance: &'static SRDeviceUsageCategoryKey;
}
extern "C" {
pub static SRDeviceUsageCategoryEntertainment: &'static SRDeviceUsageCategoryKey;
}
extern "C" {
pub static SRDeviceUsageCategoryEducation: &'static SRDeviceUsageCategoryKey;
}
extern "C" {
pub static SRDeviceUsageCategoryBooks: &'static SRDeviceUsageCategoryKey;
}
extern "C" {
pub static SRDeviceUsageCategoryMedical: &'static SRDeviceUsageCategoryKey;
}
extern "C" {
pub static SRDeviceUsageCategoryNewsstand: &'static SRDeviceUsageCategoryKey;
}
extern "C" {
pub static SRDeviceUsageCategoryCatalogs: &'static SRDeviceUsageCategoryKey;
}
extern "C" {
pub static SRDeviceUsageCategoryKids: &'static SRDeviceUsageCategoryKey;
}
extern "C" {
pub static SRDeviceUsageCategoryMiscellaneous: &'static SRDeviceUsageCategoryKey;
}
extern "C" {
pub static SRDeviceUsageCategoryFoodAndDrink: &'static SRDeviceUsageCategoryKey;
}
extern "C" {
pub static SRDeviceUsageCategoryDeveloperTools: &'static SRDeviceUsageCategoryKey;
}
extern "C" {
pub static SRDeviceUsageCategoryGraphicsAndDesign: &'static SRDeviceUsageCategoryKey;
}
extern "C" {
pub static SRDeviceUsageCategoryShopping: &'static SRDeviceUsageCategoryKey;
}
extern "C" {
pub static SRDeviceUsageCategoryStickers: &'static SRDeviceUsageCategoryKey;
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SRSupplementalCategory;
);
unsafe impl Send for SRSupplementalCategory {}
unsafe impl Sync for SRSupplementalCategory {}
extern_conformance!(
unsafe impl NSCoding for SRSupplementalCategory {}
);
extern_conformance!(
unsafe impl NSCopying for SRSupplementalCategory {}
);
unsafe impl CopyingHelper for SRSupplementalCategory {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for SRSupplementalCategory {}
);
extern_conformance!(
unsafe impl NSSecureCoding for SRSupplementalCategory {}
);
impl SRSupplementalCategory {
extern_methods!(
#[unsafe(method(identifier))]
#[unsafe(method_family = none)]
pub unsafe fn identifier(&self) -> Retained<NSString>;
#[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!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SRDeviceUsageReport;
);
extern_conformance!(
unsafe impl NSObjectProtocol for SRDeviceUsageReport {}
);
impl SRDeviceUsageReport {
extern_methods!(
#[unsafe(method(duration))]
#[unsafe(method_family = none)]
pub unsafe fn duration(&self) -> NSTimeInterval;
#[unsafe(method(applicationUsageByCategory))]
#[unsafe(method_family = none)]
pub unsafe fn applicationUsageByCategory(
&self,
) -> Retained<NSDictionary<SRDeviceUsageCategoryKey, NSArray<SRApplicationUsage>>>;
#[unsafe(method(notificationUsageByCategory))]
#[unsafe(method_family = none)]
pub unsafe fn notificationUsageByCategory(
&self,
) -> Retained<NSDictionary<SRDeviceUsageCategoryKey, NSArray<SRNotificationUsage>>>;
#[unsafe(method(webUsageByCategory))]
#[unsafe(method_family = none)]
pub unsafe fn webUsageByCategory(
&self,
) -> Retained<NSDictionary<SRDeviceUsageCategoryKey, NSArray<SRWebUsage>>>;
#[unsafe(method(totalScreenWakes))]
#[unsafe(method_family = none)]
pub unsafe fn totalScreenWakes(&self) -> NSInteger;
#[unsafe(method(totalUnlocks))]
#[unsafe(method_family = none)]
pub unsafe fn totalUnlocks(&self) -> NSInteger;
#[unsafe(method(totalUnlockDuration))]
#[unsafe(method_family = none)]
pub unsafe fn totalUnlockDuration(&self) -> NSTimeInterval;
#[unsafe(method(version))]
#[unsafe(method_family = none)]
pub unsafe fn version(&self) -> Retained<NSString>;
);
}
impl SRDeviceUsageReport {
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>;
);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct SRTextInputSessionType(pub NSInteger);
impl SRTextInputSessionType {
#[doc(alias = "SRTextInputSessionTypeKeyboard")]
pub const Keyboard: Self = Self(1);
#[doc(alias = "SRTextInputSessionTypeThirdPartyKeyboard")]
pub const ThirdPartyKeyboard: Self = Self(2);
#[doc(alias = "SRTextInputSessionTypePencil")]
pub const Pencil: Self = Self(3);
#[doc(alias = "SRTextInputSessionTypeDictation")]
pub const Dictation: Self = Self(4);
}
unsafe impl Encode for SRTextInputSessionType {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for SRTextInputSessionType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SRTextInputSession;
);
extern_conformance!(
unsafe impl NSObjectProtocol for SRTextInputSession {}
);
impl SRTextInputSession {
extern_methods!(
#[unsafe(method(duration))]
#[unsafe(method_family = none)]
pub unsafe fn duration(&self) -> NSTimeInterval;
#[unsafe(method(sessionType))]
#[unsafe(method_family = none)]
pub unsafe fn sessionType(&self) -> SRTextInputSessionType;
#[unsafe(method(sessionIdentifier))]
#[unsafe(method_family = none)]
pub unsafe fn sessionIdentifier(&self) -> Retained<NSString>;
);
}
impl SRTextInputSession {
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!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SRApplicationUsage;
);
extern_conformance!(
unsafe impl NSObjectProtocol for SRApplicationUsage {}
);
impl SRApplicationUsage {
extern_methods!(
#[unsafe(method(bundleIdentifier))]
#[unsafe(method_family = none)]
pub unsafe fn bundleIdentifier(&self) -> Option<Retained<NSString>>;
#[unsafe(method(usageTime))]
#[unsafe(method_family = none)]
pub unsafe fn usageTime(&self) -> NSTimeInterval;
#[unsafe(method(reportApplicationIdentifier))]
#[unsafe(method_family = none)]
pub unsafe fn reportApplicationIdentifier(&self) -> Retained<NSString>;
#[unsafe(method(textInputSessions))]
#[unsafe(method_family = none)]
pub unsafe fn textInputSessions(&self) -> Retained<NSArray<SRTextInputSession>>;
#[unsafe(method(supplementalCategories))]
#[unsafe(method_family = none)]
pub unsafe fn supplementalCategories(&self) -> Retained<NSArray<SRSupplementalCategory>>;
#[unsafe(method(relativeStartTime))]
#[unsafe(method_family = none)]
pub unsafe fn relativeStartTime(&self) -> NSTimeInterval;
);
}
impl SRApplicationUsage {
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>;
);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct SRNotificationEvent(pub NSInteger);
impl SRNotificationEvent {
#[doc(alias = "SRNotificationEventUnknown")]
pub const Unknown: Self = Self(0);
#[doc(alias = "SRNotificationEventReceived")]
pub const Received: Self = Self(1);
#[doc(alias = "SRNotificationEventDefaultAction")]
pub const DefaultAction: Self = Self(2);
#[doc(alias = "SRNotificationEventSupplementaryAction")]
pub const SupplementaryAction: Self = Self(3);
#[doc(alias = "SRNotificationEventClear")]
pub const Clear: Self = Self(4);
#[doc(alias = "SRNotificationEventNotificationCenterClearAll")]
pub const NotificationCenterClearAll: Self = Self(5);
#[doc(alias = "SRNotificationEventRemoved")]
pub const Removed: Self = Self(6);
#[doc(alias = "SRNotificationEventHide")]
pub const Hide: Self = Self(7);
#[doc(alias = "SRNotificationEventLongLook")]
pub const LongLook: Self = Self(8);
#[doc(alias = "SRNotificationEventSilence")]
pub const Silence: Self = Self(9);
#[doc(alias = "SRNotificationEventAppLaunch")]
pub const AppLaunch: Self = Self(10);
#[doc(alias = "SRNotificationEventExpired")]
pub const Expired: Self = Self(11);
#[doc(alias = "SRNotificationEventBannerPulldown")]
pub const BannerPulldown: Self = Self(12);
#[doc(alias = "SRNotificationEventTapCoalesce")]
pub const TapCoalesce: Self = Self(13);
#[doc(alias = "SRNotificationEventDeduped")]
pub const Deduped: Self = Self(14);
#[doc(alias = "SRNotificationEventDeviceActivated")]
pub const DeviceActivated: Self = Self(15);
#[doc(alias = "SRNotificationEventDeviceUnlocked")]
pub const DeviceUnlocked: Self = Self(16);
}
unsafe impl Encode for SRNotificationEvent {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for SRNotificationEvent {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SRNotificationUsage;
);
extern_conformance!(
unsafe impl NSObjectProtocol for SRNotificationUsage {}
);
impl SRNotificationUsage {
extern_methods!(
#[unsafe(method(bundleIdentifier))]
#[unsafe(method_family = none)]
pub unsafe fn bundleIdentifier(&self) -> Option<Retained<NSString>>;
#[unsafe(method(event))]
#[unsafe(method_family = none)]
pub unsafe fn event(&self) -> SRNotificationEvent;
);
}
impl SRNotificationUsage {
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!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SRWebUsage;
);
extern_conformance!(
unsafe impl NSObjectProtocol for SRWebUsage {}
);
impl SRWebUsage {
extern_methods!(
#[unsafe(method(totalUsageTime))]
#[unsafe(method_family = none)]
pub unsafe fn totalUsageTime(&self) -> NSTimeInterval;
);
}
impl SRWebUsage {
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!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SRMessagesUsageReport;
);
extern_conformance!(
unsafe impl NSObjectProtocol for SRMessagesUsageReport {}
);
impl SRMessagesUsageReport {
extern_methods!(
#[unsafe(method(duration))]
#[unsafe(method_family = none)]
pub unsafe fn duration(&self) -> NSTimeInterval;
#[unsafe(method(totalOutgoingMessages))]
#[unsafe(method_family = none)]
pub unsafe fn totalOutgoingMessages(&self) -> NSInteger;
#[unsafe(method(totalIncomingMessages))]
#[unsafe(method_family = none)]
pub unsafe fn totalIncomingMessages(&self) -> NSInteger;
#[unsafe(method(totalUniqueContacts))]
#[unsafe(method_family = none)]
pub unsafe fn totalUniqueContacts(&self) -> NSInteger;
);
}
impl SRMessagesUsageReport {
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!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SRPhoneUsageReport;
);
extern_conformance!(
unsafe impl NSObjectProtocol for SRPhoneUsageReport {}
);
impl SRPhoneUsageReport {
extern_methods!(
#[unsafe(method(duration))]
#[unsafe(method_family = none)]
pub unsafe fn duration(&self) -> NSTimeInterval;
#[unsafe(method(totalOutgoingCalls))]
#[unsafe(method_family = none)]
pub unsafe fn totalOutgoingCalls(&self) -> NSInteger;
#[unsafe(method(totalIncomingCalls))]
#[unsafe(method_family = none)]
pub unsafe fn totalIncomingCalls(&self) -> NSInteger;
#[unsafe(method(totalUniqueContacts))]
#[unsafe(method_family = none)]
pub unsafe fn totalUniqueContacts(&self) -> NSInteger;
#[unsafe(method(totalPhoneCallDuration))]
#[unsafe(method_family = none)]
pub unsafe fn totalPhoneCallDuration(&self) -> NSTimeInterval;
);
}
impl SRPhoneUsageReport {
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!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SRKeyboardMetrics;
);
extern_conformance!(
unsafe impl NSObjectProtocol for SRKeyboardMetrics {}
);
impl SRKeyboardMetrics {
extern_methods!(
#[unsafe(method(duration))]
#[unsafe(method_family = none)]
pub unsafe fn duration(&self) -> NSTimeInterval;
#[unsafe(method(keyboardIdentifier))]
#[unsafe(method_family = none)]
pub unsafe fn keyboardIdentifier(&self) -> Retained<NSString>;
#[unsafe(method(version))]
#[unsafe(method_family = none)]
pub unsafe fn version(&self) -> Retained<NSString>;
#[unsafe(method(width))]
#[unsafe(method_family = none)]
pub unsafe fn width(&self) -> Retained<NSMeasurement<NSUnitLength>>;
#[unsafe(method(height))]
#[unsafe(method_family = none)]
pub unsafe fn height(&self) -> Retained<NSMeasurement<NSUnitLength>>;
#[unsafe(method(inputModes))]
#[unsafe(method_family = none)]
pub unsafe fn inputModes(&self) -> Retained<NSArray<NSString>>;
#[unsafe(method(sessionIdentifiers))]
#[unsafe(method_family = none)]
pub unsafe fn sessionIdentifiers(&self) -> Retained<NSArray<NSString>>;
);
}
impl SRKeyboardMetrics {
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>;
);
}
impl SRKeyboardMetrics {
extern_methods!(
#[unsafe(method(totalWords))]
#[unsafe(method_family = none)]
pub unsafe fn totalWords(&self) -> NSInteger;
#[unsafe(method(totalAlteredWords))]
#[unsafe(method_family = none)]
pub unsafe fn totalAlteredWords(&self) -> NSInteger;
#[unsafe(method(totalTaps))]
#[unsafe(method_family = none)]
pub unsafe fn totalTaps(&self) -> NSInteger;
#[unsafe(method(totalDrags))]
#[unsafe(method_family = none)]
pub unsafe fn totalDrags(&self) -> NSInteger;
#[unsafe(method(totalDeletes))]
#[unsafe(method_family = none)]
pub unsafe fn totalDeletes(&self) -> NSInteger;
#[unsafe(method(totalEmojis))]
#[unsafe(method_family = none)]
pub unsafe fn totalEmojis(&self) -> NSInteger;
#[unsafe(method(totalPaths))]
#[unsafe(method_family = none)]
pub unsafe fn totalPaths(&self) -> NSInteger;
#[unsafe(method(totalPathTime))]
#[unsafe(method_family = none)]
pub unsafe fn totalPathTime(&self) -> NSTimeInterval;
#[unsafe(method(totalPathLength))]
#[unsafe(method_family = none)]
pub unsafe fn totalPathLength(&self) -> Retained<NSMeasurement<NSUnitLength>>;
#[unsafe(method(totalAutoCorrections))]
#[unsafe(method_family = none)]
pub unsafe fn totalAutoCorrections(&self) -> NSInteger;
#[unsafe(method(totalSpaceCorrections))]
#[unsafe(method_family = none)]
pub unsafe fn totalSpaceCorrections(&self) -> NSInteger;
#[unsafe(method(totalRetroCorrections))]
#[unsafe(method_family = none)]
pub unsafe fn totalRetroCorrections(&self) -> NSInteger;
#[unsafe(method(totalTranspositionCorrections))]
#[unsafe(method_family = none)]
pub unsafe fn totalTranspositionCorrections(&self) -> NSInteger;
#[unsafe(method(totalInsertKeyCorrections))]
#[unsafe(method_family = none)]
pub unsafe fn totalInsertKeyCorrections(&self) -> NSInteger;
#[unsafe(method(totalSkipTouchCorrections))]
#[unsafe(method_family = none)]
pub unsafe fn totalSkipTouchCorrections(&self) -> NSInteger;
#[unsafe(method(totalNearKeyCorrections))]
#[unsafe(method_family = none)]
pub unsafe fn totalNearKeyCorrections(&self) -> NSInteger;
#[unsafe(method(totalSubstitutionCorrections))]
#[unsafe(method_family = none)]
pub unsafe fn totalSubstitutionCorrections(&self) -> NSInteger;
#[unsafe(method(totalHitTestCorrections))]
#[unsafe(method_family = none)]
pub unsafe fn totalHitTestCorrections(&self) -> NSInteger;
#[unsafe(method(totalTypingDuration))]
#[unsafe(method_family = none)]
pub unsafe fn totalTypingDuration(&self) -> NSTimeInterval;
);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SRKeyboardProbabilityMetric<UnitType: ?Sized = AnyObject>;
);
impl<UnitType: ?Sized + Message + AsRef<NSUnit>> SRKeyboardProbabilityMetric<UnitType> {
#[inline]
pub unsafe fn cast_unchecked<NewUnitType: ?Sized + Message + AsRef<NSUnit>>(
&self,
) -> &SRKeyboardProbabilityMetric<NewUnitType> {
unsafe { &*((self as *const Self).cast()) }
}
}
extern_conformance!(
unsafe impl<UnitType: ?Sized + AsRef<NSUnit>> NSObjectProtocol
for SRKeyboardProbabilityMetric<UnitType>
{
}
);
impl<UnitType: Message + AsRef<NSUnit>> SRKeyboardProbabilityMetric<UnitType> {
extern_methods!(
#[unsafe(method(distributionSampleValues))]
#[unsafe(method_family = none)]
pub unsafe fn distributionSampleValues(&self)
-> Retained<NSArray<NSMeasurement<UnitType>>>;
);
}
impl<UnitType: Message + AsRef<NSUnit>> SRKeyboardProbabilityMetric<UnitType> {
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>;
);
}
impl SRKeyboardMetrics {
extern_methods!(
#[unsafe(method(upErrorDistance))]
#[unsafe(method_family = none)]
pub unsafe fn upErrorDistance(&self)
-> Retained<SRKeyboardProbabilityMetric<NSUnitLength>>;
#[unsafe(method(downErrorDistance))]
#[unsafe(method_family = none)]
pub unsafe fn downErrorDistance(
&self,
) -> Retained<SRKeyboardProbabilityMetric<NSUnitLength>>;
#[unsafe(method(spaceUpErrorDistance))]
#[unsafe(method_family = none)]
pub unsafe fn spaceUpErrorDistance(
&self,
) -> Retained<SRKeyboardProbabilityMetric<NSUnitLength>>;
#[unsafe(method(spaceDownErrorDistance))]
#[unsafe(method_family = none)]
pub unsafe fn spaceDownErrorDistance(
&self,
) -> Retained<SRKeyboardProbabilityMetric<NSUnitLength>>;
#[unsafe(method(deleteUpErrorDistance))]
#[unsafe(method_family = none)]
pub unsafe fn deleteUpErrorDistance(
&self,
) -> Retained<SRKeyboardProbabilityMetric<NSUnitLength>>;
#[unsafe(method(deleteDownErrorDistance))]
#[unsafe(method_family = none)]
pub unsafe fn deleteDownErrorDistance(
&self,
) -> Retained<SRKeyboardProbabilityMetric<NSUnitLength>>;
#[unsafe(method(shortWordCharKeyUpErrorDistance))]
#[unsafe(method_family = none)]
pub unsafe fn shortWordCharKeyUpErrorDistance(
&self,
) -> Retained<SRKeyboardProbabilityMetric<NSUnitLength>>;
#[unsafe(method(shortWordCharKeyDownErrorDistance))]
#[unsafe(method_family = none)]
pub unsafe fn shortWordCharKeyDownErrorDistance(
&self,
) -> Retained<SRKeyboardProbabilityMetric<NSUnitLength>>;
#[unsafe(method(touchDownUp))]
#[unsafe(method_family = none)]
pub unsafe fn touchDownUp(&self) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
#[unsafe(method(spaceTouchDownUp))]
#[unsafe(method_family = none)]
pub unsafe fn spaceTouchDownUp(
&self,
) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
#[unsafe(method(deleteTouchDownUp))]
#[unsafe(method_family = none)]
pub unsafe fn deleteTouchDownUp(
&self,
) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
#[unsafe(method(shortWordCharKeyTouchDownUp))]
#[unsafe(method_family = none)]
pub unsafe fn shortWordCharKeyTouchDownUp(
&self,
) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
#[unsafe(method(touchDownDown))]
#[unsafe(method_family = none)]
pub unsafe fn touchDownDown(&self)
-> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
#[unsafe(method(touchUpDown))]
#[unsafe(method_family = none)]
pub unsafe fn touchUpDown(&self) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
#[unsafe(method(charKeyToPrediction))]
#[unsafe(method_family = none)]
pub unsafe fn charKeyToPrediction(
&self,
) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
#[unsafe(method(shortWordCharKeyToCharKey))]
#[unsafe(method_family = none)]
pub unsafe fn shortWordCharKeyToCharKey(
&self,
) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
#[unsafe(method(charKeyToAnyTapKey))]
#[unsafe(method_family = none)]
pub unsafe fn charKeyToAnyTapKey(
&self,
) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
#[unsafe(method(anyTapToCharKey))]
#[unsafe(method_family = none)]
pub unsafe fn anyTapToCharKey(
&self,
) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
#[unsafe(method(spaceToCharKey))]
#[unsafe(method_family = none)]
pub unsafe fn spaceToCharKey(
&self,
) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
#[unsafe(method(charKeyToSpaceKey))]
#[unsafe(method_family = none)]
pub unsafe fn charKeyToSpaceKey(
&self,
) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
#[unsafe(method(spaceToDeleteKey))]
#[unsafe(method_family = none)]
pub unsafe fn spaceToDeleteKey(
&self,
) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
#[unsafe(method(deleteToSpaceKey))]
#[unsafe(method_family = none)]
pub unsafe fn deleteToSpaceKey(
&self,
) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
#[unsafe(method(spaceToSpaceKey))]
#[unsafe(method_family = none)]
pub unsafe fn spaceToSpaceKey(
&self,
) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
#[unsafe(method(spaceToShiftKey))]
#[unsafe(method_family = none)]
pub unsafe fn spaceToShiftKey(
&self,
) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
#[unsafe(method(spaceToPlaneChangeKey))]
#[unsafe(method_family = none)]
pub unsafe fn spaceToPlaneChangeKey(
&self,
) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
#[unsafe(method(spaceToPredictionKey))]
#[unsafe(method_family = none)]
pub unsafe fn spaceToPredictionKey(
&self,
) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
#[unsafe(method(deleteToCharKey))]
#[unsafe(method_family = none)]
pub unsafe fn deleteToCharKey(
&self,
) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
#[unsafe(method(charKeyToDelete))]
#[unsafe(method_family = none)]
pub unsafe fn charKeyToDelete(
&self,
) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
#[unsafe(method(deleteToDelete))]
#[unsafe(method_family = none)]
pub unsafe fn deleteToDelete(
&self,
) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
#[unsafe(method(deleteToShiftKey))]
#[unsafe(method_family = none)]
pub unsafe fn deleteToShiftKey(
&self,
) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
#[unsafe(method(deleteToPlaneChangeKey))]
#[unsafe(method_family = none)]
pub unsafe fn deleteToPlaneChangeKey(
&self,
) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
#[unsafe(method(anyTapToPlaneChangeKey))]
#[unsafe(method_family = none)]
pub unsafe fn anyTapToPlaneChangeKey(
&self,
) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
#[unsafe(method(planeChangeToAnyTap))]
#[unsafe(method_family = none)]
pub unsafe fn planeChangeToAnyTap(
&self,
) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
#[unsafe(method(charKeyToPlaneChangeKey))]
#[unsafe(method_family = none)]
pub unsafe fn charKeyToPlaneChangeKey(
&self,
) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
#[unsafe(method(planeChangeKeyToCharKey))]
#[unsafe(method_family = none)]
pub unsafe fn planeChangeKeyToCharKey(
&self,
) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
#[unsafe(method(pathErrorDistanceRatio))]
#[unsafe(method_family = none)]
pub unsafe fn pathErrorDistanceRatio(&self) -> Retained<NSArray<NSNumber>>;
#[unsafe(method(deleteToPath))]
#[unsafe(method_family = none)]
pub unsafe fn deleteToPath(&self) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
#[unsafe(method(pathToDelete))]
#[unsafe(method_family = none)]
pub unsafe fn pathToDelete(&self) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
#[unsafe(method(spaceToPath))]
#[unsafe(method_family = none)]
pub unsafe fn spaceToPath(&self) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
#[unsafe(method(pathToSpace))]
#[unsafe(method_family = none)]
pub unsafe fn pathToSpace(&self) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
#[unsafe(method(pathToPath))]
#[unsafe(method_family = none)]
pub unsafe fn pathToPath(&self) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
);
}
impl SRKeyboardMetrics {
extern_methods!(
#[unsafe(method(longWordUpErrorDistance))]
#[unsafe(method_family = none)]
pub unsafe fn longWordUpErrorDistance(
&self,
) -> Retained<NSArray<SRKeyboardProbabilityMetric<NSUnitLength>>>;
#[unsafe(method(longWordDownErrorDistance))]
#[unsafe(method_family = none)]
pub unsafe fn longWordDownErrorDistance(
&self,
) -> Retained<NSArray<SRKeyboardProbabilityMetric<NSUnitLength>>>;
#[unsafe(method(longWordTouchDownUp))]
#[unsafe(method_family = none)]
pub unsafe fn longWordTouchDownUp(
&self,
) -> Retained<NSArray<SRKeyboardProbabilityMetric<NSUnitDuration>>>;
#[unsafe(method(longWordTouchDownDown))]
#[unsafe(method_family = none)]
pub unsafe fn longWordTouchDownDown(
&self,
) -> Retained<NSArray<SRKeyboardProbabilityMetric<NSUnitDuration>>>;
#[unsafe(method(longWordTouchUpDown))]
#[unsafe(method_family = none)]
pub unsafe fn longWordTouchUpDown(
&self,
) -> Retained<NSArray<SRKeyboardProbabilityMetric<NSUnitDuration>>>;
#[unsafe(method(deleteToDeletes))]
#[unsafe(method_family = none)]
pub unsafe fn deleteToDeletes(
&self,
) -> Retained<NSArray<SRKeyboardProbabilityMetric<NSUnitDuration>>>;
);
}
impl SRKeyboardMetrics {
extern_methods!(
#[unsafe(method(totalPauses))]
#[unsafe(method_family = none)]
pub unsafe fn totalPauses(&self) -> NSInteger;
#[unsafe(method(totalPathPauses))]
#[unsafe(method_family = none)]
pub unsafe fn totalPathPauses(&self) -> NSInteger;
#[unsafe(method(typingSpeed))]
#[unsafe(method_family = none)]
pub unsafe fn typingSpeed(&self) -> c_double;
#[unsafe(method(pathTypingSpeed))]
#[unsafe(method_family = none)]
pub unsafe fn pathTypingSpeed(&self) -> c_double;
#[unsafe(method(totalTypingEpisodes))]
#[unsafe(method_family = none)]
pub unsafe fn totalTypingEpisodes(&self) -> NSInteger;
);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct SRKeyboardMetricsSentimentCategory(pub NSInteger);
impl SRKeyboardMetricsSentimentCategory {
#[doc(alias = "SRKeyboardMetricsSentimentCategoryAbsolutist")]
pub const Absolutist: Self = Self(0);
#[doc(alias = "SRKeyboardMetricsSentimentCategoryDown")]
pub const Down: Self = Self(1);
#[doc(alias = "SRKeyboardMetricsSentimentCategoryDeath")]
pub const Death: Self = Self(2);
#[doc(alias = "SRKeyboardMetricsSentimentCategoryAnxiety")]
pub const Anxiety: Self = Self(3);
#[doc(alias = "SRKeyboardMetricsSentimentCategoryAnger")]
pub const Anger: Self = Self(4);
#[doc(alias = "SRKeyboardMetricsSentimentCategoryHealth")]
pub const Health: Self = Self(5);
#[doc(alias = "SRKeyboardMetricsSentimentCategoryPositive")]
pub const Positive: Self = Self(6);
#[doc(alias = "SRKeyboardMetricsSentimentCategorySad")]
pub const Sad: Self = Self(7);
#[doc(alias = "SRKeyboardMetricsSentimentCategoryLowEnergy")]
pub const LowEnergy: Self = Self(8);
#[doc(alias = "SRKeyboardMetricsSentimentCategoryConfused")]
pub const Confused: Self = Self(9);
}
unsafe impl Encode for SRKeyboardMetricsSentimentCategory {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for SRKeyboardMetricsSentimentCategory {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
impl SRKeyboardMetrics {
extern_methods!(
#[unsafe(method(wordCountForSentimentCategory:))]
#[unsafe(method_family = none)]
pub unsafe fn wordCountForSentimentCategory(
&self,
category: SRKeyboardMetricsSentimentCategory,
) -> NSInteger;
#[unsafe(method(emojiCountForSentimentCategory:))]
#[unsafe(method_family = none)]
pub unsafe fn emojiCountForSentimentCategory(
&self,
category: SRKeyboardMetricsSentimentCategory,
) -> NSInteger;
);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct SRDeletionReason(pub NSInteger);
impl SRDeletionReason {
#[doc(alias = "SRDeletionReasonUserInitiated")]
pub const UserInitiated: Self = Self(0);
#[doc(alias = "SRDeletionReasonLowDiskSpace")]
pub const LowDiskSpace: Self = Self(1);
#[doc(alias = "SRDeletionReasonAgeLimit")]
pub const AgeLimit: Self = Self(2);
#[doc(alias = "SRDeletionReasonNoInterestedClients")]
pub const NoInterestedClients: Self = Self(3);
#[doc(alias = "SRDeletionReasonSystemInitiated")]
pub const SystemInitiated: Self = Self(4);
}
unsafe impl Encode for SRDeletionReason {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for SRDeletionReason {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SRDeletionRecord;
);
extern_conformance!(
unsafe impl NSCoding for SRDeletionRecord {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for SRDeletionRecord {}
);
extern_conformance!(
unsafe impl NSSecureCoding for SRDeletionRecord {}
);
impl SRDeletionRecord {
extern_methods!(
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(startTime))]
#[unsafe(method_family = none)]
pub unsafe fn startTime(&self) -> SRAbsoluteTime;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(endTime))]
#[unsafe(method_family = none)]
pub unsafe fn endTime(&self) -> SRAbsoluteTime;
#[unsafe(method(reason))]
#[unsafe(method_family = none)]
pub unsafe fn reason(&self) -> SRDeletionReason;
);
}
impl SRDeletionRecord {
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>;
);
}
mod private_NSStringSRDeletionRecord {
pub trait Sealed {}
}
#[doc(alias = "SRDeletionRecord")]
pub unsafe trait NSStringSRDeletionRecord:
ClassType + Sized + private_NSStringSRDeletionRecord::Sealed
{
extern_methods!(
#[unsafe(method(sr_sensorForDeletionRecordsFromSensor))]
#[unsafe(method_family = none)]
unsafe fn sr_sensorForDeletionRecordsFromSensor(&self) -> Option<Retained<SRSensor>>;
);
}
impl private_NSStringSRDeletionRecord::Sealed for NSString {}
unsafe impl NSStringSRDeletionRecord for NSString {}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct SRWristLocation(pub NSInteger);
impl SRWristLocation {
#[doc(alias = "SRWristLocationLeft")]
pub const Left: Self = Self(0);
#[doc(alias = "SRWristLocationRight")]
pub const Right: Self = Self(1);
}
unsafe impl Encode for SRWristLocation {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for SRWristLocation {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct SRCrownOrientation(pub NSInteger);
impl SRCrownOrientation {
#[doc(alias = "SRCrownOrientationLeft")]
pub const Left: Self = Self(0);
#[doc(alias = "SRCrownOrientationRight")]
pub const Right: Self = Self(1);
}
unsafe impl Encode for SRCrownOrientation {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for SRCrownOrientation {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SRWristDetection;
);
extern_conformance!(
unsafe impl NSObjectProtocol for SRWristDetection {}
);
impl SRWristDetection {
extern_methods!(
#[unsafe(method(onWrist))]
#[unsafe(method_family = none)]
pub unsafe fn onWrist(&self) -> bool;
#[unsafe(method(wristLocation))]
#[unsafe(method_family = none)]
pub unsafe fn wristLocation(&self) -> SRWristLocation;
#[unsafe(method(crownOrientation))]
#[unsafe(method_family = none)]
pub unsafe fn crownOrientation(&self) -> SRCrownOrientation;
#[unsafe(method(onWristDate))]
#[unsafe(method_family = none)]
pub unsafe fn onWristDate(&self) -> Option<Retained<NSDate>>;
#[unsafe(method(offWristDate))]
#[unsafe(method_family = none)]
pub unsafe fn offWristDate(&self) -> Option<Retained<NSDate>>;
);
}
impl SRWristDetection {
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>;
);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct SRWristTemperatureCondition(pub NSUInteger);
bitflags::bitflags! {
impl SRWristTemperatureCondition: NSUInteger {
#[doc(alias = "SRWristTemperatureConditionNone")]
const None = 0;
#[doc(alias = "SRWristTemperatureConditionOffWrist")]
const OffWrist = 1<<0;
#[doc(alias = "SRWristTemperatureConditionOnCharger")]
const OnCharger = 1<<1;
#[doc(alias = "SRWristTemperatureConditionInMotion")]
const InMotion = 1<<2;
}
}
unsafe impl Encode for SRWristTemperatureCondition {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for SRWristTemperatureCondition {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SRWristTemperature;
);
unsafe impl Send for SRWristTemperature {}
unsafe impl Sync for SRWristTemperature {}
extern_conformance!(
unsafe impl NSCoding for SRWristTemperature {}
);
extern_conformance!(
unsafe impl NSCopying for SRWristTemperature {}
);
unsafe impl CopyingHelper for SRWristTemperature {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for SRWristTemperature {}
);
extern_conformance!(
unsafe impl NSSecureCoding for SRWristTemperature {}
);
impl SRWristTemperature {
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>;
#[unsafe(method(timestamp))]
#[unsafe(method_family = none)]
pub unsafe fn timestamp(&self) -> Retained<NSDate>;
#[unsafe(method(value))]
#[unsafe(method_family = none)]
pub unsafe fn value(&self) -> Retained<NSMeasurement<NSUnitTemperature>>;
#[unsafe(method(condition))]
#[unsafe(method_family = none)]
pub unsafe fn condition(&self) -> SRWristTemperatureCondition;
#[unsafe(method(errorEstimate))]
#[unsafe(method_family = none)]
pub unsafe fn errorEstimate(&self) -> Retained<NSMeasurement<NSUnitTemperature>>;
);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SRWristTemperatureSession;
);
unsafe impl Send for SRWristTemperatureSession {}
unsafe impl Sync for SRWristTemperatureSession {}
extern_conformance!(
unsafe impl NSCoding for SRWristTemperatureSession {}
);
extern_conformance!(
unsafe impl NSCopying for SRWristTemperatureSession {}
);
unsafe impl CopyingHelper for SRWristTemperatureSession {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for SRWristTemperatureSession {}
);
extern_conformance!(
unsafe impl NSSecureCoding for SRWristTemperatureSession {}
);
impl SRWristTemperatureSession {
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>;
#[unsafe(method(startDate))]
#[unsafe(method_family = none)]
pub unsafe fn startDate(&self) -> Retained<NSDate>;
#[unsafe(method(duration))]
#[unsafe(method_family = none)]
pub unsafe fn duration(&self) -> NSTimeInterval;
#[unsafe(method(version))]
#[unsafe(method_family = none)]
pub unsafe fn version(&self) -> Retained<NSString>;
#[unsafe(method(temperatures))]
#[unsafe(method_family = none)]
pub unsafe fn temperatures(&self) -> Retained<NSEnumerator<SRWristTemperature>>;
);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct SRMediaEventType(pub NSInteger);
impl SRMediaEventType {
#[doc(alias = "SRMediaEventOnScreen")]
pub const OnScreen: Self = Self(1);
#[doc(alias = "SRMediaEventOffScreen")]
pub const OffScreen: Self = Self(2);
}
unsafe impl Encode for SRMediaEventType {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for SRMediaEventType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SRMediaEvent;
);
unsafe impl Send for SRMediaEvent {}
unsafe impl Sync for SRMediaEvent {}
extern_conformance!(
unsafe impl NSCoding for SRMediaEvent {}
);
extern_conformance!(
unsafe impl NSCopying for SRMediaEvent {}
);
unsafe impl CopyingHelper for SRMediaEvent {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for SRMediaEvent {}
);
extern_conformance!(
unsafe impl NSSecureCoding for SRMediaEvent {}
);
impl SRMediaEvent {
extern_methods!(
#[unsafe(method(mediaIdentifier))]
#[unsafe(method_family = none)]
pub unsafe fn mediaIdentifier(&self) -> Retained<NSString>;
#[unsafe(method(eventType))]
#[unsafe(method_family = none)]
pub unsafe fn eventType(&self) -> SRMediaEventType;
);
}
impl SRMediaEvent {
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!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SRSpeechExpression;
);
unsafe impl Send for SRSpeechExpression {}
unsafe impl Sync for SRSpeechExpression {}
extern_conformance!(
unsafe impl NSCoding for SRSpeechExpression {}
);
extern_conformance!(
unsafe impl NSCopying for SRSpeechExpression {}
);
unsafe impl CopyingHelper for SRSpeechExpression {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for SRSpeechExpression {}
);
extern_conformance!(
unsafe impl NSSecureCoding for SRSpeechExpression {}
);
impl SRSpeechExpression {
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>;
#[unsafe(method(version))]
#[unsafe(method_family = none)]
pub unsafe fn version(&self) -> Retained<NSString>;
#[cfg(feature = "objc2-core-media")]
#[unsafe(method(timeRange))]
#[unsafe(method_family = none)]
pub unsafe fn timeRange(&self) -> CMTimeRange;
#[unsafe(method(confidence))]
#[unsafe(method_family = none)]
pub unsafe fn confidence(&self) -> c_double;
#[unsafe(method(mood))]
#[unsafe(method_family = none)]
pub unsafe fn mood(&self) -> c_double;
#[unsafe(method(valence))]
#[unsafe(method_family = none)]
pub unsafe fn valence(&self) -> c_double;
#[unsafe(method(activation))]
#[unsafe(method_family = none)]
pub unsafe fn activation(&self) -> c_double;
#[unsafe(method(dominance))]
#[unsafe(method_family = none)]
pub unsafe fn dominance(&self) -> c_double;
);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SRAudioLevel;
);
unsafe impl Send for SRAudioLevel {}
unsafe impl Sync for SRAudioLevel {}
extern_conformance!(
unsafe impl NSCoding for SRAudioLevel {}
);
extern_conformance!(
unsafe impl NSCopying for SRAudioLevel {}
);
unsafe impl CopyingHelper for SRAudioLevel {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for SRAudioLevel {}
);
extern_conformance!(
unsafe impl NSSecureCoding for SRAudioLevel {}
);
impl SRAudioLevel {
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>;
#[cfg(feature = "objc2-core-media")]
#[unsafe(method(timeRange))]
#[unsafe(method_family = none)]
pub unsafe fn timeRange(&self) -> CMTimeRange;
#[unsafe(method(loudness))]
#[unsafe(method_family = none)]
pub unsafe fn loudness(&self) -> c_double;
);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct SRSpeechMetricsSessionFlags(pub NSUInteger);
bitflags::bitflags! {
impl SRSpeechMetricsSessionFlags: NSUInteger {
#[doc(alias = "SRSpeechMetricsSessionFlagsDefault")]
const Default = 0;
#[doc(alias = "SRSpeechMetricsSessionFlagsBypassVoiceProcessing")]
const BypassVoiceProcessing = 1<<0;
}
}
unsafe impl Encode for SRSpeechMetricsSessionFlags {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for SRSpeechMetricsSessionFlags {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SRSpeechMetrics;
);
unsafe impl Send for SRSpeechMetrics {}
unsafe impl Sync for SRSpeechMetrics {}
extern_conformance!(
unsafe impl NSCoding for SRSpeechMetrics {}
);
extern_conformance!(
unsafe impl NSCopying for SRSpeechMetrics {}
);
unsafe impl CopyingHelper for SRSpeechMetrics {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for SRSpeechMetrics {}
);
extern_conformance!(
unsafe impl NSSecureCoding for SRSpeechMetrics {}
);
impl SRSpeechMetrics {
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>;
#[unsafe(method(sessionIdentifier))]
#[unsafe(method_family = none)]
pub unsafe fn sessionIdentifier(&self) -> Retained<NSString>;
#[unsafe(method(sessionFlags))]
#[unsafe(method_family = none)]
pub unsafe fn sessionFlags(&self) -> SRSpeechMetricsSessionFlags;
#[unsafe(method(timestamp))]
#[unsafe(method_family = none)]
pub unsafe fn timestamp(&self) -> Retained<NSDate>;
#[unsafe(method(timeSinceAudioStart))]
#[unsafe(method_family = none)]
pub unsafe fn timeSinceAudioStart(&self) -> NSTimeInterval;
#[unsafe(method(audioLevel))]
#[unsafe(method_family = none)]
pub unsafe fn audioLevel(&self) -> Option<Retained<SRAudioLevel>>;
#[cfg(feature = "objc2-speech")]
#[unsafe(method(speechRecognition))]
#[unsafe(method_family = none)]
pub unsafe fn speechRecognition(&self) -> Option<Retained<SFSpeechRecognitionResult>>;
#[cfg(feature = "objc2-sound-analysis")]
#[unsafe(method(soundClassification))]
#[unsafe(method_family = none)]
pub unsafe fn soundClassification(&self) -> Option<Retained<SNClassificationResult>>;
#[unsafe(method(speechExpression))]
#[unsafe(method_family = none)]
pub unsafe fn speechExpression(&self) -> Option<Retained<SRSpeechExpression>>;
);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct SRFaceMetricsContext(pub NSUInteger);
bitflags::bitflags! {
impl SRFaceMetricsContext: NSUInteger {
#[doc(alias = "SRFaceMetricsContextDeviceUnlock")]
const DeviceUnlock = 1<<0;
#[doc(alias = "SRFaceMetricsContextMessagingAppUsage")]
const MessagingAppUsage = 1<<1;
}
}
unsafe impl Encode for SRFaceMetricsContext {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for SRFaceMetricsContext {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SRFaceMetricsExpression;
);
unsafe impl Send for SRFaceMetricsExpression {}
unsafe impl Sync for SRFaceMetricsExpression {}
extern_conformance!(
unsafe impl NSCoding for SRFaceMetricsExpression {}
);
extern_conformance!(
unsafe impl NSCopying for SRFaceMetricsExpression {}
);
unsafe impl CopyingHelper for SRFaceMetricsExpression {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for SRFaceMetricsExpression {}
);
extern_conformance!(
unsafe impl NSSecureCoding for SRFaceMetricsExpression {}
);
impl SRFaceMetricsExpression {
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>;
#[unsafe(method(identifier))]
#[unsafe(method_family = none)]
pub unsafe fn identifier(&self) -> Retained<NSString>;
#[unsafe(method(value))]
#[unsafe(method_family = none)]
pub unsafe fn value(&self) -> c_double;
);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SRFaceMetrics;
);
unsafe impl Send for SRFaceMetrics {}
unsafe impl Sync for SRFaceMetrics {}
extern_conformance!(
unsafe impl NSCoding for SRFaceMetrics {}
);
extern_conformance!(
unsafe impl NSCopying for SRFaceMetrics {}
);
unsafe impl CopyingHelper for SRFaceMetrics {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for SRFaceMetrics {}
);
extern_conformance!(
unsafe impl NSSecureCoding for SRFaceMetrics {}
);
impl SRFaceMetrics {
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>;
#[unsafe(method(version))]
#[unsafe(method_family = none)]
pub unsafe fn version(&self) -> Retained<NSString>;
#[unsafe(method(sessionIdentifier))]
#[unsafe(method_family = none)]
pub unsafe fn sessionIdentifier(&self) -> Retained<NSString>;
#[unsafe(method(context))]
#[unsafe(method_family = none)]
pub unsafe fn context(&self) -> SRFaceMetricsContext;
#[cfg(feature = "objc2-ar-kit")]
#[unsafe(method(faceAnchor))]
#[unsafe(method_family = none)]
pub unsafe fn faceAnchor(&self) -> Retained<ARFaceAnchor>;
#[unsafe(method(wholeFaceExpressions))]
#[unsafe(method_family = none)]
pub unsafe fn wholeFaceExpressions(&self) -> Retained<NSArray<SRFaceMetricsExpression>>;
#[unsafe(method(partialFaceExpressions))]
#[unsafe(method_family = none)]
pub unsafe fn partialFaceExpressions(&self) -> Retained<NSArray<SRFaceMetricsExpression>>;
);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct SRElectrocardiogramSessionState(pub NSInteger);
impl SRElectrocardiogramSessionState {
#[doc(alias = "SRElectrocardiogramSessionStateBegin")]
pub const Begin: Self = Self(1);
#[doc(alias = "SRElectrocardiogramSessionStateActive")]
pub const Active: Self = Self(2);
#[doc(alias = "SRElectrocardiogramSessionStateEnd")]
pub const End: Self = Self(3);
}
unsafe impl Encode for SRElectrocardiogramSessionState {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for SRElectrocardiogramSessionState {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct SRElectrocardiogramSessionGuidance(pub NSInteger);
impl SRElectrocardiogramSessionGuidance {
#[doc(alias = "SRElectrocardiogramSessionGuidanceGuided")]
pub const Guided: Self = Self(1);
#[doc(alias = "SRElectrocardiogramSessionGuidanceUnguided")]
pub const Unguided: Self = Self(2);
}
unsafe impl Encode for SRElectrocardiogramSessionGuidance {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for SRElectrocardiogramSessionGuidance {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SRElectrocardiogramSession;
);
unsafe impl Send for SRElectrocardiogramSession {}
unsafe impl Sync for SRElectrocardiogramSession {}
extern_conformance!(
unsafe impl NSCoding for SRElectrocardiogramSession {}
);
extern_conformance!(
unsafe impl NSCopying for SRElectrocardiogramSession {}
);
unsafe impl CopyingHelper for SRElectrocardiogramSession {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for SRElectrocardiogramSession {}
);
extern_conformance!(
unsafe impl NSSecureCoding for SRElectrocardiogramSession {}
);
impl SRElectrocardiogramSession {
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>;
#[unsafe(method(state))]
#[unsafe(method_family = none)]
pub unsafe fn state(&self) -> SRElectrocardiogramSessionState;
#[unsafe(method(sessionGuidance))]
#[unsafe(method_family = none)]
pub unsafe fn sessionGuidance(&self) -> SRElectrocardiogramSessionGuidance;
#[unsafe(method(identifier))]
#[unsafe(method_family = none)]
pub unsafe fn identifier(&self) -> Retained<NSString>;
);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct SRElectrocardiogramDataFlags(pub NSUInteger);
bitflags::bitflags! {
impl SRElectrocardiogramDataFlags: NSUInteger {
#[doc(alias = "SRElectrocardiogramDataFlagsNone")]
const None = 0;
#[doc(alias = "SRElectrocardiogramDataFlagsSignalInvalid")]
const SignalInvalid = 1<<0;
#[doc(alias = "SRElectrocardiogramDataFlagsCrownTouched")]
const CrownTouched = 1<<1;
}
}
unsafe impl Encode for SRElectrocardiogramDataFlags {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for SRElectrocardiogramDataFlags {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SRElectrocardiogramData;
);
unsafe impl Send for SRElectrocardiogramData {}
unsafe impl Sync for SRElectrocardiogramData {}
extern_conformance!(
unsafe impl NSCoding for SRElectrocardiogramData {}
);
extern_conformance!(
unsafe impl NSCopying for SRElectrocardiogramData {}
);
unsafe impl CopyingHelper for SRElectrocardiogramData {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for SRElectrocardiogramData {}
);
extern_conformance!(
unsafe impl NSSecureCoding for SRElectrocardiogramData {}
);
impl SRElectrocardiogramData {
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>;
#[unsafe(method(flags))]
#[unsafe(method_family = none)]
pub unsafe fn flags(&self) -> SRElectrocardiogramDataFlags;
#[unsafe(method(value))]
#[unsafe(method_family = none)]
pub unsafe fn value(&self) -> Retained<NSMeasurement<NSUnitElectricPotentialDifference>>;
);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct SRElectrocardiogramLead(pub NSInteger);
impl SRElectrocardiogramLead {
#[doc(alias = "SRElectrocardiogramLeadRightArmMinusLeftArm")]
pub const RightArmMinusLeftArm: Self = Self(1);
#[doc(alias = "SRElectrocardiogramLeadLeftArmMinusRightArm")]
pub const LeftArmMinusRightArm: Self = Self(2);
}
unsafe impl Encode for SRElectrocardiogramLead {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for SRElectrocardiogramLead {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SRElectrocardiogramSample;
);
unsafe impl Send for SRElectrocardiogramSample {}
unsafe impl Sync for SRElectrocardiogramSample {}
extern_conformance!(
unsafe impl NSCoding for SRElectrocardiogramSample {}
);
extern_conformance!(
unsafe impl NSCopying for SRElectrocardiogramSample {}
);
unsafe impl CopyingHelper for SRElectrocardiogramSample {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for SRElectrocardiogramSample {}
);
extern_conformance!(
unsafe impl NSSecureCoding for SRElectrocardiogramSample {}
);
impl SRElectrocardiogramSample {
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>;
#[unsafe(method(date))]
#[unsafe(method_family = none)]
pub unsafe fn date(&self) -> Retained<NSDate>;
#[unsafe(method(frequency))]
#[unsafe(method_family = none)]
pub unsafe fn frequency(&self) -> Retained<NSMeasurement<NSUnitFrequency>>;
#[unsafe(method(session))]
#[unsafe(method_family = none)]
pub unsafe fn session(&self) -> Retained<SRElectrocardiogramSession>;
#[unsafe(method(lead))]
#[unsafe(method_family = none)]
pub unsafe fn lead(&self) -> SRElectrocardiogramLead;
#[unsafe(method(data))]
#[unsafe(method_family = none)]
pub unsafe fn data(&self) -> Retained<NSArray<SRElectrocardiogramData>>;
);
}
pub type SRPhotoplethysmogramOpticalSampleCondition = NSString;
extern "C" {
pub static SRPhotoplethysmogramOpticalSampleConditionSignalSaturation:
&'static SRPhotoplethysmogramOpticalSampleCondition;
}
extern "C" {
pub static SRPhotoplethysmogramOpticalSampleConditionUnreliableNoise:
&'static SRPhotoplethysmogramOpticalSampleCondition;
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SRPhotoplethysmogramOpticalSample;
);
unsafe impl Send for SRPhotoplethysmogramOpticalSample {}
unsafe impl Sync for SRPhotoplethysmogramOpticalSample {}
extern_conformance!(
unsafe impl NSCoding for SRPhotoplethysmogramOpticalSample {}
);
extern_conformance!(
unsafe impl NSCopying for SRPhotoplethysmogramOpticalSample {}
);
unsafe impl CopyingHelper for SRPhotoplethysmogramOpticalSample {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for SRPhotoplethysmogramOpticalSample {}
);
extern_conformance!(
unsafe impl NSSecureCoding for SRPhotoplethysmogramOpticalSample {}
);
impl SRPhotoplethysmogramOpticalSample {
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>;
#[unsafe(method(emitter))]
#[unsafe(method_family = none)]
pub unsafe fn emitter(&self) -> NSInteger;
#[unsafe(method(activePhotodiodeIndexes))]
#[unsafe(method_family = none)]
pub unsafe fn activePhotodiodeIndexes(&self) -> Retained<NSIndexSet>;
#[unsafe(method(signalIdentifier))]
#[unsafe(method_family = none)]
pub unsafe fn signalIdentifier(&self) -> NSInteger;
#[unsafe(method(nominalWavelength))]
#[unsafe(method_family = none)]
pub unsafe fn nominalWavelength(&self) -> Retained<NSMeasurement<NSUnitLength>>;
#[unsafe(method(effectiveWavelength))]
#[unsafe(method_family = none)]
pub unsafe fn effectiveWavelength(&self) -> Retained<NSMeasurement<NSUnitLength>>;
#[unsafe(method(samplingFrequency))]
#[unsafe(method_family = none)]
pub unsafe fn samplingFrequency(&self) -> Retained<NSMeasurement<NSUnitFrequency>>;
#[unsafe(method(nanosecondsSinceStart))]
#[unsafe(method_family = none)]
pub unsafe fn nanosecondsSinceStart(&self) -> i64;
#[unsafe(method(normalizedReflectance))]
#[unsafe(method_family = none)]
pub unsafe fn normalizedReflectance(&self) -> Option<Retained<NSNumber>>;
#[unsafe(method(whiteNoise))]
#[unsafe(method_family = none)]
pub unsafe fn whiteNoise(&self) -> Option<Retained<NSNumber>>;
#[unsafe(method(pinkNoise))]
#[unsafe(method_family = none)]
pub unsafe fn pinkNoise(&self) -> Option<Retained<NSNumber>>;
#[unsafe(method(backgroundNoise))]
#[unsafe(method_family = none)]
pub unsafe fn backgroundNoise(&self) -> Option<Retained<NSNumber>>;
#[unsafe(method(backgroundNoiseOffset))]
#[unsafe(method_family = none)]
pub unsafe fn backgroundNoiseOffset(&self) -> Option<Retained<NSNumber>>;
#[unsafe(method(conditions))]
#[unsafe(method_family = none)]
pub unsafe fn conditions(
&self,
) -> Retained<NSArray<SRPhotoplethysmogramOpticalSampleCondition>>;
);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SRPhotoplethysmogramAccelerometerSample;
);
unsafe impl Send for SRPhotoplethysmogramAccelerometerSample {}
unsafe impl Sync for SRPhotoplethysmogramAccelerometerSample {}
extern_conformance!(
unsafe impl NSCoding for SRPhotoplethysmogramAccelerometerSample {}
);
extern_conformance!(
unsafe impl NSCopying for SRPhotoplethysmogramAccelerometerSample {}
);
unsafe impl CopyingHelper for SRPhotoplethysmogramAccelerometerSample {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for SRPhotoplethysmogramAccelerometerSample {}
);
extern_conformance!(
unsafe impl NSSecureCoding for SRPhotoplethysmogramAccelerometerSample {}
);
impl SRPhotoplethysmogramAccelerometerSample {
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>;
#[unsafe(method(nanosecondsSinceStart))]
#[unsafe(method_family = none)]
pub unsafe fn nanosecondsSinceStart(&self) -> i64;
#[unsafe(method(samplingFrequency))]
#[unsafe(method_family = none)]
pub unsafe fn samplingFrequency(&self) -> Retained<NSMeasurement<NSUnitFrequency>>;
#[unsafe(method(x))]
#[unsafe(method_family = none)]
pub unsafe fn x(&self) -> Retained<NSMeasurement<NSUnitAcceleration>>;
#[unsafe(method(y))]
#[unsafe(method_family = none)]
pub unsafe fn y(&self) -> Retained<NSMeasurement<NSUnitAcceleration>>;
#[unsafe(method(z))]
#[unsafe(method_family = none)]
pub unsafe fn z(&self) -> Retained<NSMeasurement<NSUnitAcceleration>>;
);
}
pub type SRPhotoplethysmogramSampleUsage = NSString;
extern "C" {
pub static SRPhotoplethysmogramSampleUsageForegroundHeartRate:
&'static SRPhotoplethysmogramSampleUsage;
}
extern "C" {
pub static SRPhotoplethysmogramSampleUsageDeepBreathing:
&'static SRPhotoplethysmogramSampleUsage;
}
extern "C" {
pub static SRPhotoplethysmogramSampleUsageForegroundBloodOxygen:
&'static SRPhotoplethysmogramSampleUsage;
}
extern "C" {
pub static SRPhotoplethysmogramSampleUsageBackgroundSystem:
&'static SRPhotoplethysmogramSampleUsage;
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SRPhotoplethysmogramSample;
);
unsafe impl Send for SRPhotoplethysmogramSample {}
unsafe impl Sync for SRPhotoplethysmogramSample {}
extern_conformance!(
unsafe impl NSCoding for SRPhotoplethysmogramSample {}
);
extern_conformance!(
unsafe impl NSCopying for SRPhotoplethysmogramSample {}
);
unsafe impl CopyingHelper for SRPhotoplethysmogramSample {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for SRPhotoplethysmogramSample {}
);
extern_conformance!(
unsafe impl NSSecureCoding for SRPhotoplethysmogramSample {}
);
impl SRPhotoplethysmogramSample {
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>;
#[unsafe(method(startDate))]
#[unsafe(method_family = none)]
pub unsafe fn startDate(&self) -> Retained<NSDate>;
#[unsafe(method(nanosecondsSinceStart))]
#[unsafe(method_family = none)]
pub unsafe fn nanosecondsSinceStart(&self) -> i64;
#[unsafe(method(usage))]
#[unsafe(method_family = none)]
pub unsafe fn usage(&self) -> Retained<NSArray<SRPhotoplethysmogramSampleUsage>>;
#[unsafe(method(opticalSamples))]
#[unsafe(method_family = none)]
pub unsafe fn opticalSamples(&self)
-> Retained<NSArray<SRPhotoplethysmogramOpticalSample>>;
#[unsafe(method(accelerometerSamples))]
#[unsafe(method_family = none)]
pub unsafe fn accelerometerSamples(
&self,
) -> Retained<NSArray<SRPhotoplethysmogramAccelerometerSample>>;
#[unsafe(method(temperature))]
#[unsafe(method_family = none)]
pub unsafe fn temperature(&self) -> Option<Retained<NSMeasurement<NSUnitTemperature>>>;
);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct SRAcousticSettingsSampleLifetime(pub NSInteger);
impl SRAcousticSettingsSampleLifetime {
#[doc(alias = "SRAcousticSettingsSampleLifetimeEightDays")]
pub const EightDays: Self = Self(1);
#[doc(alias = "SRAcousticSettingsSampleLifetimeUntilUserDeletes")]
pub const UntilUserDeletes: Self = Self(2);
}
unsafe impl Encode for SRAcousticSettingsSampleLifetime {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for SRAcousticSettingsSampleLifetime {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct SRAcousticSettingsAccessibilityBackgroundSoundsName(pub NSInteger);
impl SRAcousticSettingsAccessibilityBackgroundSoundsName {
#[doc(alias = "SRAcousticSettingsAccessibilityBackgroundSoundsNameBalancedNoise")]
pub const BalancedNoise: Self = Self(1);
#[doc(alias = "SRAcousticSettingsAccessibilityBackgroundSoundsNameBrightNoise")]
pub const BrightNoise: Self = Self(2);
#[doc(alias = "SRAcousticSettingsAccessibilityBackgroundSoundsNameDarkNoise")]
pub const DarkNoise: Self = Self(3);
#[doc(alias = "SRAcousticSettingsAccessibilityBackgroundSoundsNameOcean")]
pub const Ocean: Self = Self(4);
#[doc(alias = "SRAcousticSettingsAccessibilityBackgroundSoundsNameRain")]
pub const Rain: Self = Self(5);
#[doc(alias = "SRAcousticSettingsAccessibilityBackgroundSoundsNameStream")]
pub const Stream: Self = Self(6);
#[doc(alias = "SRAcousticSettingsAccessibilityBackgroundSoundsNameNight")]
pub const Night: Self = Self(7);
#[doc(alias = "SRAcousticSettingsAccessibilityBackgroundSoundsNameFire")]
pub const Fire: Self = Self(8);
#[doc(alias = "SRAcousticSettingsAccessibilityBackgroundSoundsNameBabble")]
pub const Babble: Self = Self(9);
#[doc(alias = "SRAcousticSettingsAccessibilityBackgroundSoundsNameSteam")]
pub const Steam: Self = Self(10);
#[doc(alias = "SRAcousticSettingsAccessibilityBackgroundSoundsNameAirplane")]
pub const Airplane: Self = Self(11);
#[doc(alias = "SRAcousticSettingsAccessibilityBackgroundSoundsNameBoat")]
pub const Boat: Self = Self(12);
#[doc(alias = "SRAcousticSettingsAccessibilityBackgroundSoundsNameBus")]
pub const Bus: Self = Self(13);
#[doc(alias = "SRAcousticSettingsAccessibilityBackgroundSoundsNameTrain")]
pub const Train: Self = Self(14);
#[doc(alias = "SRAcousticSettingsAccessibilityBackgroundSoundsNameRainOnRoof")]
pub const RainOnRoof: Self = Self(15);
#[doc(alias = "SRAcousticSettingsAccessibilityBackgroundSoundsNameQuietNight")]
pub const QuietNight: Self = Self(16);
}
unsafe impl Encode for SRAcousticSettingsAccessibilityBackgroundSoundsName {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for SRAcousticSettingsAccessibilityBackgroundSoundsName {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceTuning(pub NSInteger);
impl SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceTuning {
#[doc(
alias = "SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceTuningBalancedTone"
)]
pub const BalancedTone: Self = Self(1);
#[doc(
alias = "SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceTuningVocalRange"
)]
pub const VocalRange: Self = Self(2);
#[doc(
alias = "SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceTuningBrightness"
)]
pub const Brightness: Self = Self(3);
}
unsafe impl Encode for SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceTuning {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceTuning {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceBoosting(
pub NSInteger,
);
impl SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceBoosting {
#[doc(
alias = "SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceBoostingSlight"
)]
pub const Slight: Self = Self(1);
#[doc(
alias = "SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceBoostingModerate"
)]
pub const Moderate: Self = Self(2);
#[doc(
alias = "SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceBoostingStrong"
)]
pub const Strong: Self = Self(3);
}
unsafe impl Encode for SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceBoosting {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode
for SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceBoosting
{
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceApplication(
pub NSInteger,
);
impl SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceApplication {
#[doc(
alias = "SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceApplicationNone"
)]
pub const None: Self = Self(1);
#[doc(
alias = "SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceApplicationPhone"
)]
pub const Phone: Self = Self(2);
#[doc(
alias = "SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceApplicationMedia"
)]
pub const Media: Self = Self(3);
#[doc(
alias = "SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceApplicationPhoneAndMedia"
)]
pub const PhoneAndMedia: Self = Self(4);
}
unsafe impl Encode
for SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceApplication
{
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode
for SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceApplication
{
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SRAcousticSettingsMusicEQ;
);
unsafe impl Send for SRAcousticSettingsMusicEQ {}
unsafe impl Sync for SRAcousticSettingsMusicEQ {}
extern_conformance!(
unsafe impl NSCoding for SRAcousticSettingsMusicEQ {}
);
extern_conformance!(
unsafe impl NSCopying for SRAcousticSettingsMusicEQ {}
);
unsafe impl CopyingHelper for SRAcousticSettingsMusicEQ {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for SRAcousticSettingsMusicEQ {}
);
extern_conformance!(
unsafe impl NSSecureCoding for SRAcousticSettingsMusicEQ {}
);
impl SRAcousticSettingsMusicEQ {
extern_methods!(
#[unsafe(method(isSoundCheckEnabled))]
#[unsafe(method_family = none)]
pub unsafe fn isSoundCheckEnabled(&self) -> bool;
#[unsafe(method(isLateNightModeEnabled))]
#[unsafe(method_family = none)]
pub unsafe fn isLateNightModeEnabled(&self) -> bool;
);
}
impl SRAcousticSettingsMusicEQ {
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!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SRAcousticSettingsAccessibilityBackgroundSounds;
);
unsafe impl Send for SRAcousticSettingsAccessibilityBackgroundSounds {}
unsafe impl Sync for SRAcousticSettingsAccessibilityBackgroundSounds {}
extern_conformance!(
unsafe impl NSCoding for SRAcousticSettingsAccessibilityBackgroundSounds {}
);
extern_conformance!(
unsafe impl NSCopying for SRAcousticSettingsAccessibilityBackgroundSounds {}
);
unsafe impl CopyingHelper for SRAcousticSettingsAccessibilityBackgroundSounds {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for SRAcousticSettingsAccessibilityBackgroundSounds {}
);
extern_conformance!(
unsafe impl NSSecureCoding for SRAcousticSettingsAccessibilityBackgroundSounds {}
);
impl SRAcousticSettingsAccessibilityBackgroundSounds {
extern_methods!(
#[unsafe(method(isEnabled))]
#[unsafe(method_family = none)]
pub unsafe fn isEnabled(&self) -> bool;
#[unsafe(method(soundName))]
#[unsafe(method_family = none)]
pub unsafe fn soundName(&self) -> SRAcousticSettingsAccessibilityBackgroundSoundsName;
#[unsafe(method(relativeVolume))]
#[unsafe(method_family = none)]
pub unsafe fn relativeVolume(&self) -> c_double;
#[unsafe(method(isPlayWithMediaEnabled))]
#[unsafe(method_family = none)]
pub unsafe fn isPlayWithMediaEnabled(&self) -> bool;
#[unsafe(method(relativeVolumeWithMedia))]
#[unsafe(method_family = none)]
pub unsafe fn relativeVolumeWithMedia(&self) -> c_double;
#[unsafe(method(isStopOnLockEnabled))]
#[unsafe(method_family = none)]
pub unsafe fn isStopOnLockEnabled(&self) -> bool;
);
}
impl SRAcousticSettingsAccessibilityBackgroundSounds {
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!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SRAcousticSettingsAccessibilityHeadphoneAccommodations;
);
unsafe impl Send for SRAcousticSettingsAccessibilityHeadphoneAccommodations {}
unsafe impl Sync for SRAcousticSettingsAccessibilityHeadphoneAccommodations {}
extern_conformance!(
unsafe impl NSCoding for SRAcousticSettingsAccessibilityHeadphoneAccommodations {}
);
extern_conformance!(
unsafe impl NSCopying for SRAcousticSettingsAccessibilityHeadphoneAccommodations {}
);
unsafe impl CopyingHelper for SRAcousticSettingsAccessibilityHeadphoneAccommodations {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for SRAcousticSettingsAccessibilityHeadphoneAccommodations {}
);
extern_conformance!(
unsafe impl NSSecureCoding for SRAcousticSettingsAccessibilityHeadphoneAccommodations {}
);
impl SRAcousticSettingsAccessibilityHeadphoneAccommodations {
extern_methods!(
#[unsafe(method(isEnabled))]
#[unsafe(method_family = none)]
pub unsafe fn isEnabled(&self) -> bool;
#[unsafe(method(mediaEnhanceTuning))]
#[unsafe(method_family = none)]
pub unsafe fn mediaEnhanceTuning(
&self,
) -> SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceTuning;
#[unsafe(method(mediaEnhanceBoosting))]
#[unsafe(method_family = none)]
pub unsafe fn mediaEnhanceBoosting(
&self,
) -> SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceBoosting;
#[unsafe(method(mediaEnhanceApplication))]
#[unsafe(method_family = none)]
pub unsafe fn mediaEnhanceApplication(
&self,
) -> SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceApplication;
);
}
impl SRAcousticSettingsAccessibilityHeadphoneAccommodations {
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!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SRAcousticSettingsAccessibility;
);
unsafe impl Send for SRAcousticSettingsAccessibility {}
unsafe impl Sync for SRAcousticSettingsAccessibility {}
extern_conformance!(
unsafe impl NSCoding for SRAcousticSettingsAccessibility {}
);
extern_conformance!(
unsafe impl NSCopying for SRAcousticSettingsAccessibility {}
);
unsafe impl CopyingHelper for SRAcousticSettingsAccessibility {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for SRAcousticSettingsAccessibility {}
);
extern_conformance!(
unsafe impl NSSecureCoding for SRAcousticSettingsAccessibility {}
);
impl SRAcousticSettingsAccessibility {
extern_methods!(
#[unsafe(method(leftRightBalance))]
#[unsafe(method_family = none)]
pub unsafe fn leftRightBalance(&self) -> c_double;
#[unsafe(method(isMonoAudioEnabled))]
#[unsafe(method_family = none)]
pub unsafe fn isMonoAudioEnabled(&self) -> bool;
#[unsafe(method(backgroundSounds))]
#[unsafe(method_family = none)]
pub unsafe fn backgroundSounds(
&self,
) -> Retained<SRAcousticSettingsAccessibilityBackgroundSounds>;
#[unsafe(method(headphoneAccommodations))]
#[unsafe(method_family = none)]
pub unsafe fn headphoneAccommodations(
&self,
) -> Retained<SRAcousticSettingsAccessibilityHeadphoneAccommodations>;
);
}
impl SRAcousticSettingsAccessibility {
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!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SRAcousticSettings;
);
unsafe impl Send for SRAcousticSettings {}
unsafe impl Sync for SRAcousticSettings {}
extern_conformance!(
unsafe impl NSCoding for SRAcousticSettings {}
);
extern_conformance!(
unsafe impl NSCopying for SRAcousticSettings {}
);
unsafe impl CopyingHelper for SRAcousticSettings {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for SRAcousticSettings {}
);
extern_conformance!(
unsafe impl NSSecureCoding for SRAcousticSettings {}
);
impl SRAcousticSettings {
extern_methods!(
#[unsafe(method(isEnvironmentalSoundMeasurementsEnabled))]
#[unsafe(method_family = none)]
pub unsafe fn isEnvironmentalSoundMeasurementsEnabled(&self) -> bool;
#[unsafe(method(audioExposureSampleLifetime))]
#[unsafe(method_family = none)]
pub unsafe fn audioExposureSampleLifetime(&self) -> SRAcousticSettingsSampleLifetime;
#[unsafe(method(headphoneSafetyAudioLevel))]
#[unsafe(method_family = none)]
pub unsafe fn headphoneSafetyAudioLevel(&self) -> Option<Retained<NSNumber>>;
#[unsafe(method(musicEQSettings))]
#[unsafe(method_family = none)]
pub unsafe fn musicEQSettings(&self) -> Retained<SRAcousticSettingsMusicEQ>;
#[unsafe(method(accessibilitySettings))]
#[unsafe(method_family = none)]
pub unsafe fn accessibilitySettings(&self) -> Retained<SRAcousticSettingsAccessibility>;
#[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!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct SRSleepSession;
);
unsafe impl Send for SRSleepSession {}
unsafe impl Sync for SRSleepSession {}
extern_conformance!(
unsafe impl NSCoding for SRSleepSession {}
);
extern_conformance!(
unsafe impl NSCopying for SRSleepSession {}
);
unsafe impl CopyingHelper for SRSleepSession {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for SRSleepSession {}
);
extern_conformance!(
unsafe impl NSSecureCoding for SRSleepSession {}
);
impl SRSleepSession {
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>;
#[unsafe(method(startDate))]
#[unsafe(method_family = none)]
pub unsafe fn startDate(&self) -> Retained<NSDate>;
#[unsafe(method(duration))]
#[unsafe(method_family = none)]
pub unsafe fn duration(&self) -> NSTimeInterval;
#[unsafe(method(identifier))]
#[unsafe(method_family = none)]
pub unsafe fn identifier(&self) -> Retained<NSString>;
);
}