1#![allow(unused_imports)]
5#![allow(deprecated)]
6#![allow(non_snake_case)]
7#![allow(non_camel_case_types)]
8#![allow(non_upper_case_globals)]
9#![allow(missing_docs)]
10#![allow(clippy::too_many_arguments)]
11#![allow(clippy::type_complexity)]
12#![allow(clippy::upper_case_acronyms)]
13#![allow(clippy::identity_op)]
14#![allow(clippy::missing_safety_doc)]
15#![allow(clippy::doc_lazy_continuation)]
16#![allow(rustdoc::broken_intra_doc_links)]
17#![allow(rustdoc::bare_urls)]
18#![allow(rustdoc::invalid_html_tags)]
19
20#[link(name = "SensorKit", kind = "framework")]
21extern "C" {}
22
23use core::ffi::*;
24use core::ptr::NonNull;
25use objc2::__framework_prelude::*;
26#[cfg(feature = "objc2-ar-kit")]
27use objc2_ar_kit::*;
28#[cfg(feature = "objc2-core-foundation")]
29use objc2_core_foundation::*;
30#[cfg(feature = "objc2-core-location")]
31use objc2_core_location::*;
32#[cfg(feature = "objc2-core-media")]
33use objc2_core_media::*;
34use objc2_foundation::*;
35#[cfg(feature = "objc2-sound-analysis")]
36use objc2_sound_analysis::*;
37#[cfg(feature = "objc2-speech")]
38use objc2_speech::*;
39
40use crate::*;
41
42pub type SRSensor = NSString;
47
48extern "C" {
49 pub static SRSensorAmbientLightSensor: &'static SRSensor;
57}
58
59extern "C" {
60 pub static SRSensorAccelerometer: &'static SRSensor;
70}
71
72extern "C" {
73 pub static SRSensorRotationRate: &'static SRSensor;
83}
84
85extern "C" {
86 pub static SRSensorVisits: &'static SRSensor;
101}
102
103extern "C" {
104 pub static SRSensorPedometerData: &'static SRSensor;
112}
113
114extern "C" {
115 pub static SRSensorDeviceUsageReport: &'static SRSensor;
132}
133
134extern "C" {
135 pub static SRSensorMessagesUsageReport: &'static SRSensor;
149}
150
151extern "C" {
152 pub static SRSensorPhoneUsageReport: &'static SRSensor;
166}
167
168extern "C" {
169 pub static SRSensorOnWristState: &'static SRSensor;
183}
184
185extern "C" {
186 pub static SRSensorKeyboardMetrics: &'static SRSensor;
202}
203
204extern "C" {
205 pub static SRSensorSiriSpeechMetrics: &'static SRSensor;
222}
223
224extern "C" {
225 pub static SRSensorTelephonySpeechMetrics: &'static SRSensor;
242}
243
244extern "C" {
245 pub static SRSensorAmbientPressure: &'static SRSensor;
261}
262
263extern "C" {
264 pub static SRSensorMediaEvents: &'static SRSensor;
278}
279
280extern "C" {
281 pub static SRSensorWristTemperature: &'static SRSensor;
297}
298
299extern "C" {
300 pub static SRSensorHeartRate: &'static SRSensor;
308}
309
310extern "C" {
311 pub static SRSensorFaceMetrics: &'static SRSensor;
326}
327
328extern "C" {
329 pub static SRSensorOdometer: &'static SRSensor;
338}
339
340extern "C" {
341 pub static SRSensorElectrocardiogram: &'static SRSensor;
350}
351
352extern "C" {
353 pub static SRSensorPhotoplethysmogram: &'static SRSensor;
362}
363
364extern "C" {
365 pub static SRSensorAcousticSettings: &'static SRSensor;
374}
375
376extern "C" {
377 pub static SRSensorSleepSessions: &'static SRSensor;
386}
387
388#[cfg(feature = "objc2-core-foundation")]
390pub type SRAbsoluteTime = CFTimeInterval;
391
392extern "C-unwind" {
393 #[cfg(feature = "objc2-core-foundation")]
397 pub fn SRAbsoluteTimeGetCurrent() -> SRAbsoluteTime;
398}
399
400extern "C-unwind" {
401 #[cfg(feature = "objc2-core-foundation")]
409 pub fn SRAbsoluteTimeFromContinuousTime(cont: u64) -> SRAbsoluteTime;
410}
411
412extern "C-unwind" {
413 #[cfg(feature = "objc2-core-foundation")]
419 pub fn SRAbsoluteTimeToCFAbsoluteTime(sr: SRAbsoluteTime) -> CFAbsoluteTime;
420}
421
422extern "C-unwind" {
423 #[cfg(feature = "objc2-core-foundation")]
429 pub fn SRAbsoluteTimeFromCFAbsoluteTime(cf: CFAbsoluteTime) -> SRAbsoluteTime;
430}
431
432mod private_NSDateSensorKit {
433 pub trait Sealed {}
434}
435
436#[doc(alias = "SensorKit")]
438pub unsafe trait NSDateSensorKit:
439 ClassType + Sized + private_NSDateSensorKit::Sealed
440{
441 extern_methods!(
442 #[cfg(feature = "objc2-core-foundation")]
443 #[unsafe(method(dateWithSRAbsoluteTime:))]
444 #[unsafe(method_family = none)]
445 unsafe fn dateWithSRAbsoluteTime(time: SRAbsoluteTime) -> Retained<Self>;
446
447 #[cfg(feature = "objc2-core-foundation")]
448 #[unsafe(method(initWithSRAbsoluteTime:))]
449 #[unsafe(method_family = init)]
450 unsafe fn initWithSRAbsoluteTime(
451 this: Allocated<Self>,
452 time: SRAbsoluteTime,
453 ) -> Retained<Self>;
454
455 #[cfg(feature = "objc2-core-foundation")]
456 #[unsafe(method(srAbsoluteTime))]
457 #[unsafe(method_family = none)]
458 unsafe fn srAbsoluteTime(&self) -> SRAbsoluteTime;
459 );
460}
461
462impl private_NSDateSensorKit::Sealed for NSDate {}
463unsafe impl NSDateSensorKit for NSDate {}
464
465extern_class!(
466 #[unsafe(super(NSObject))]
468 #[derive(Debug, PartialEq, Eq, Hash)]
469 pub struct SRFetchResult<SampleType: ?Sized = AnyObject>;
470);
471
472impl<SampleType: ?Sized + Message> SRFetchResult<SampleType> {
473 #[inline]
479 pub unsafe fn cast_unchecked<NewSampleType: ?Sized + Message>(
480 &self,
481 ) -> &SRFetchResult<NewSampleType> {
482 unsafe { &*((self as *const Self).cast()) }
483 }
484}
485
486extern_conformance!(
487 unsafe impl<SampleType: ?Sized> NSCopying for SRFetchResult<SampleType> {}
488);
489
490unsafe impl<SampleType: ?Sized + Message> CopyingHelper for SRFetchResult<SampleType> {
491 type Result = Self;
492}
493
494extern_conformance!(
495 unsafe impl<SampleType: ?Sized> NSObjectProtocol for SRFetchResult<SampleType> {}
496);
497
498impl<SampleType: Message> SRFetchResult<SampleType> {
499 extern_methods!(
500 #[unsafe(method(sample))]
507 #[unsafe(method_family = none)]
508 pub unsafe fn sample(&self) -> Retained<SampleType>;
509
510 #[cfg(feature = "objc2-core-foundation")]
511 #[unsafe(method(timestamp))]
513 #[unsafe(method_family = none)]
514 pub unsafe fn timestamp(&self) -> SRAbsoluteTime;
515
516 #[unsafe(method(init))]
517 #[unsafe(method_family = init)]
518 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
519
520 #[unsafe(method(new))]
521 #[unsafe(method_family = new)]
522 pub unsafe fn new() -> Retained<Self>;
523 );
524}
525
526extern_class!(
527 #[unsafe(super(NSObject))]
529 #[derive(Debug, PartialEq, Eq, Hash)]
530 pub struct SRDevice;
531);
532
533extern_conformance!(
534 unsafe impl NSCoding for SRDevice {}
535);
536
537extern_conformance!(
538 unsafe impl NSCopying for SRDevice {}
539);
540
541unsafe impl CopyingHelper for SRDevice {
542 type Result = Self;
543}
544
545extern_conformance!(
546 unsafe impl NSObjectProtocol for SRDevice {}
547);
548
549extern_conformance!(
550 unsafe impl NSSecureCoding for SRDevice {}
551);
552
553impl SRDevice {
554 extern_methods!(
555 #[unsafe(method(currentDevice))]
556 #[unsafe(method_family = none)]
557 pub unsafe fn currentDevice() -> Retained<SRDevice>;
558
559 #[unsafe(method(name))]
560 #[unsafe(method_family = none)]
561 pub unsafe fn name(&self) -> Retained<NSString>;
562
563 #[unsafe(method(model))]
564 #[unsafe(method_family = none)]
565 pub unsafe fn model(&self) -> Retained<NSString>;
566
567 #[unsafe(method(systemName))]
568 #[unsafe(method_family = none)]
569 pub unsafe fn systemName(&self) -> Retained<NSString>;
570
571 #[unsafe(method(systemVersion))]
572 #[unsafe(method_family = none)]
573 pub unsafe fn systemVersion(&self) -> Retained<NSString>;
574
575 #[unsafe(method(productType))]
576 #[unsafe(method_family = none)]
577 pub unsafe fn productType(&self) -> Retained<NSString>;
578 );
579}
580
581impl SRDevice {
583 extern_methods!(
584 #[unsafe(method(init))]
585 #[unsafe(method_family = init)]
586 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
587
588 #[unsafe(method(new))]
589 #[unsafe(method_family = new)]
590 pub unsafe fn new() -> Retained<Self>;
591 );
592}
593
594extern_class!(
595 #[unsafe(super(NSObject))]
597 #[derive(Debug, PartialEq, Eq, Hash)]
598 pub struct SRFetchRequest;
599);
600
601extern_conformance!(
602 unsafe impl NSObjectProtocol for SRFetchRequest {}
603);
604
605impl SRFetchRequest {
606 extern_methods!(
607 #[cfg(feature = "objc2-core-foundation")]
608 #[unsafe(method(from))]
618 #[unsafe(method_family = none)]
619 pub unsafe fn from(&self) -> SRAbsoluteTime;
620
621 #[cfg(feature = "objc2-core-foundation")]
622 #[unsafe(method(setFrom:))]
624 #[unsafe(method_family = none)]
625 pub unsafe fn setFrom(&self, from: SRAbsoluteTime);
626
627 #[cfg(feature = "objc2-core-foundation")]
628 #[unsafe(method(to))]
634 #[unsafe(method_family = none)]
635 pub unsafe fn to(&self) -> SRAbsoluteTime;
636
637 #[cfg(feature = "objc2-core-foundation")]
638 #[unsafe(method(setTo:))]
640 #[unsafe(method_family = none)]
641 pub unsafe fn setTo(&self, to: SRAbsoluteTime);
642
643 #[unsafe(method(device))]
647 #[unsafe(method_family = none)]
648 pub unsafe fn device(&self) -> Retained<SRDevice>;
649
650 #[unsafe(method(setDevice:))]
652 #[unsafe(method_family = none)]
653 pub unsafe fn setDevice(&self, device: &SRDevice);
654 );
655}
656
657impl SRFetchRequest {
659 extern_methods!(
660 #[unsafe(method(init))]
661 #[unsafe(method_family = init)]
662 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
663
664 #[unsafe(method(new))]
665 #[unsafe(method_family = new)]
666 pub unsafe fn new() -> Retained<Self>;
667 );
668}
669
670#[repr(transparent)]
673#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
674pub struct SRAuthorizationStatus(pub NSInteger);
675impl SRAuthorizationStatus {
676 #[doc(alias = "SRAuthorizationStatusNotDetermined")]
678 pub const NotDetermined: Self = Self(0);
679 #[doc(alias = "SRAuthorizationStatusAuthorized")]
681 pub const Authorized: Self = Self(1);
682 #[doc(alias = "SRAuthorizationStatusDenied")]
685 pub const Denied: Self = Self(2);
686}
687
688unsafe impl Encode for SRAuthorizationStatus {
689 const ENCODING: Encoding = NSInteger::ENCODING;
690}
691
692unsafe impl RefEncode for SRAuthorizationStatus {
693 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
694}
695
696extern_protocol!(
697 pub unsafe trait SRSensorReaderDelegate: NSObjectProtocol {
699 #[optional]
721 #[unsafe(method(sensorReader:fetchingRequest:didFetchResult:))]
722 #[unsafe(method_family = none)]
723 unsafe fn sensorReader_fetchingRequest_didFetchResult(
724 &self,
725 reader: &SRSensorReader,
726 fetch_request: &SRFetchRequest,
727 result: &SRFetchResult,
728 ) -> bool;
729
730 #[optional]
732 #[unsafe(method(sensorReader:didCompleteFetch:))]
733 #[unsafe(method_family = none)]
734 unsafe fn sensorReader_didCompleteFetch(
735 &self,
736 reader: &SRSensorReader,
737 fetch_request: &SRFetchRequest,
738 );
739
740 #[optional]
742 #[unsafe(method(sensorReader:fetchingRequest:failedWithError:))]
743 #[unsafe(method_family = none)]
744 unsafe fn sensorReader_fetchingRequest_failedWithError(
745 &self,
746 reader: &SRSensorReader,
747 fetch_request: &SRFetchRequest,
748 error: &NSError,
749 );
750
751 #[optional]
753 #[unsafe(method(sensorReader:didChangeAuthorizationStatus:))]
754 #[unsafe(method_family = none)]
755 unsafe fn sensorReader_didChangeAuthorizationStatus(
756 &self,
757 reader: &SRSensorReader,
758 authorization_status: SRAuthorizationStatus,
759 );
760
761 #[optional]
764 #[unsafe(method(sensorReaderWillStartRecording:))]
765 #[unsafe(method_family = none)]
766 unsafe fn sensorReaderWillStartRecording(&self, reader: &SRSensorReader);
767
768 #[optional]
770 #[unsafe(method(sensorReader:startRecordingFailedWithError:))]
771 #[unsafe(method_family = none)]
772 unsafe fn sensorReader_startRecordingFailedWithError(
773 &self,
774 reader: &SRSensorReader,
775 error: &NSError,
776 );
777
778 #[optional]
781 #[unsafe(method(sensorReaderDidStopRecording:))]
782 #[unsafe(method_family = none)]
783 unsafe fn sensorReaderDidStopRecording(&self, reader: &SRSensorReader);
784
785 #[optional]
787 #[unsafe(method(sensorReader:stopRecordingFailedWithError:))]
788 #[unsafe(method_family = none)]
789 unsafe fn sensorReader_stopRecordingFailedWithError(
790 &self,
791 reader: &SRSensorReader,
792 error: &NSError,
793 );
794
795 #[optional]
796 #[unsafe(method(sensorReader:didFetchDevices:))]
797 #[unsafe(method_family = none)]
798 unsafe fn sensorReader_didFetchDevices(
799 &self,
800 reader: &SRSensorReader,
801 devices: &NSArray<SRDevice>,
802 );
803
804 #[optional]
805 #[unsafe(method(sensorReader:fetchDevicesDidFailWithError:))]
806 #[unsafe(method_family = none)]
807 unsafe fn sensorReader_fetchDevicesDidFailWithError(
808 &self,
809 reader: &SRSensorReader,
810 error: &NSError,
811 );
812 }
813);
814
815extern_class!(
816 #[unsafe(super(NSObject))]
818 #[derive(Debug, PartialEq, Eq, Hash)]
819 pub struct SRSensorReader;
820);
821
822extern_conformance!(
823 unsafe impl NSObjectProtocol for SRSensorReader {}
824);
825
826impl SRSensorReader {
827 extern_methods!(
828 #[unsafe(method(initWithSensor:))]
831 #[unsafe(method_family = init)]
832 pub unsafe fn initWithSensor(this: Allocated<Self>, sensor: &SRSensor) -> Retained<Self>;
833
834 #[unsafe(method(init))]
835 #[unsafe(method_family = init)]
836 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
837
838 #[unsafe(method(new))]
839 #[unsafe(method_family = new)]
840 pub unsafe fn new() -> Retained<Self>;
841
842 #[unsafe(method(startRecording))]
860 #[unsafe(method_family = none)]
861 pub unsafe fn startRecording(&self);
862
863 #[unsafe(method(stopRecording))]
879 #[unsafe(method_family = none)]
880 pub unsafe fn stopRecording(&self);
881
882 #[unsafe(method(fetchDevices))]
891 #[unsafe(method_family = none)]
892 pub unsafe fn fetchDevices(&self);
893
894 #[unsafe(method(fetch:))]
911 #[unsafe(method_family = none)]
912 pub unsafe fn fetch(&self, request: &SRFetchRequest);
913
914 #[unsafe(method(authorizationStatus))]
916 #[unsafe(method_family = none)]
917 pub unsafe fn authorizationStatus(&self) -> SRAuthorizationStatus;
918
919 #[unsafe(method(sensor))]
921 #[unsafe(method_family = none)]
922 pub unsafe fn sensor(&self) -> Retained<SRSensor>;
923
924 #[unsafe(method(delegate))]
925 #[unsafe(method_family = none)]
926 pub unsafe fn delegate(
927 &self,
928 ) -> Option<Retained<ProtocolObject<dyn SRSensorReaderDelegate>>>;
929
930 #[unsafe(method(setDelegate:))]
934 #[unsafe(method_family = none)]
935 pub unsafe fn setDelegate(
936 &self,
937 delegate: Option<&ProtocolObject<dyn SRSensorReaderDelegate>>,
938 );
939
940 #[cfg(feature = "block2")]
941 #[unsafe(method(requestAuthorizationForSensors:completion:))]
965 #[unsafe(method_family = none)]
966 pub unsafe fn requestAuthorizationForSensors_completion(
967 sensors: &NSSet<SRSensor>,
968 completion: &block2::DynBlock<dyn Fn(*mut NSError)>,
969 );
970 );
971}
972
973extern "C" {
974 pub static SRErrorDomain: &'static NSErrorDomain;
976}
977
978#[repr(transparent)]
981#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
982pub struct SRErrorCode(pub NSInteger);
983impl SRErrorCode {
984 #[doc(alias = "SRErrorInvalidEntitlement")]
986 pub const InvalidEntitlement: Self = Self(0);
987 #[doc(alias = "SRErrorNoAuthorization")]
989 pub const NoAuthorization: Self = Self(1);
990 #[doc(alias = "SRErrorDataInaccessible")]
992 pub const DataInaccessible: Self = Self(2);
993 #[doc(alias = "SRErrorFetchRequestInvalid")]
995 pub const FetchRequestInvalid: Self = Self(3);
996 #[doc(alias = "SRErrorPromptDeclined")]
998 pub const PromptDeclined: Self = Self(4);
999}
1000
1001unsafe impl Encode for SRErrorCode {
1002 const ENCODING: Encoding = NSInteger::ENCODING;
1003}
1004
1005unsafe impl RefEncode for SRErrorCode {
1006 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1007}
1008
1009#[repr(transparent)]
1012#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
1013pub struct SRAmbientLightSensorPlacement(pub NSInteger);
1014impl SRAmbientLightSensorPlacement {
1015 #[doc(alias = "SRAmbientLightSensorPlacementUnknown")]
1016 pub const Unknown: Self = Self(0);
1017 #[doc(alias = "SRAmbientLightSensorPlacementFrontTop")]
1018 pub const FrontTop: Self = Self(1);
1019 #[doc(alias = "SRAmbientLightSensorPlacementFrontBottom")]
1020 pub const FrontBottom: Self = Self(2);
1021 #[doc(alias = "SRAmbientLightSensorPlacementFrontRight")]
1022 pub const FrontRight: Self = Self(3);
1023 #[doc(alias = "SRAmbientLightSensorPlacementFrontLeft")]
1024 pub const FrontLeft: Self = Self(4);
1025 #[doc(alias = "SRAmbientLightSensorPlacementFrontTopRight")]
1026 pub const FrontTopRight: Self = Self(5);
1027 #[doc(alias = "SRAmbientLightSensorPlacementFrontTopLeft")]
1028 pub const FrontTopLeft: Self = Self(6);
1029 #[doc(alias = "SRAmbientLightSensorPlacementFrontBottomRight")]
1030 pub const FrontBottomRight: Self = Self(7);
1031 #[doc(alias = "SRAmbientLightSensorPlacementFrontBottomLeft")]
1032 pub const FrontBottomLeft: Self = Self(8);
1033}
1034
1035unsafe impl Encode for SRAmbientLightSensorPlacement {
1036 const ENCODING: Encoding = NSInteger::ENCODING;
1037}
1038
1039unsafe impl RefEncode for SRAmbientLightSensorPlacement {
1040 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1041}
1042
1043#[repr(C)]
1045#[derive(Clone, Copy, Debug, PartialEq)]
1046pub struct SRAmbientLightChromaticity {
1047 pub x: f32,
1048 pub y: f32,
1049}
1050
1051unsafe impl Encode for SRAmbientLightChromaticity {
1052 const ENCODING: Encoding = Encoding::Struct("?", &[<f32>::ENCODING, <f32>::ENCODING]);
1053}
1054
1055unsafe impl RefEncode for SRAmbientLightChromaticity {
1056 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1057}
1058
1059extern_class!(
1060 #[unsafe(super(NSObject))]
1062 #[derive(Debug, PartialEq, Eq, Hash)]
1063 pub struct SRAmbientLightSample;
1064);
1065
1066extern_conformance!(
1067 unsafe impl NSObjectProtocol for SRAmbientLightSample {}
1068);
1069
1070impl SRAmbientLightSample {
1071 extern_methods!(
1072 #[unsafe(method(placement))]
1073 #[unsafe(method_family = none)]
1074 pub unsafe fn placement(&self) -> SRAmbientLightSensorPlacement;
1075
1076 #[unsafe(method(chromaticity))]
1079 #[unsafe(method_family = none)]
1080 pub unsafe fn chromaticity(&self) -> SRAmbientLightChromaticity;
1081
1082 #[unsafe(method(lux))]
1083 #[unsafe(method_family = none)]
1084 pub unsafe fn lux(&self) -> Retained<NSMeasurement<NSUnitIlluminance>>;
1085 );
1086}
1087
1088impl SRAmbientLightSample {
1090 extern_methods!(
1091 #[unsafe(method(init))]
1092 #[unsafe(method_family = init)]
1093 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1094
1095 #[unsafe(method(new))]
1096 #[unsafe(method_family = new)]
1097 pub unsafe fn new() -> Retained<Self>;
1098 );
1099}
1100
1101#[repr(transparent)]
1104#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
1105pub struct SRLocationCategory(pub NSInteger);
1106impl SRLocationCategory {
1107 #[doc(alias = "SRLocationCategoryUnknown")]
1108 pub const Unknown: Self = Self(0);
1109 #[doc(alias = "SRLocationCategoryHome")]
1110 pub const Home: Self = Self(1);
1111 #[doc(alias = "SRLocationCategoryWork")]
1112 pub const Work: Self = Self(2);
1113 #[doc(alias = "SRLocationCategorySchool")]
1114 pub const School: Self = Self(3);
1115 #[doc(alias = "SRLocationCategoryGym")]
1116 pub const Gym: Self = Self(4);
1117}
1118
1119unsafe impl Encode for SRLocationCategory {
1120 const ENCODING: Encoding = NSInteger::ENCODING;
1121}
1122
1123unsafe impl RefEncode for SRLocationCategory {
1124 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1125}
1126
1127extern_class!(
1128 #[unsafe(super(NSObject))]
1130 #[derive(Debug, PartialEq, Eq, Hash)]
1131 pub struct SRVisit;
1132);
1133
1134extern_conformance!(
1135 unsafe impl NSObjectProtocol for SRVisit {}
1136);
1137
1138impl SRVisit {
1139 extern_methods!(
1140 #[cfg(feature = "objc2-core-location")]
1141 #[unsafe(method(distanceFromHome))]
1143 #[unsafe(method_family = none)]
1144 pub unsafe fn distanceFromHome(&self) -> CLLocationDistance;
1145
1146 #[unsafe(method(arrivalDateInterval))]
1148 #[unsafe(method_family = none)]
1149 pub unsafe fn arrivalDateInterval(&self) -> Retained<NSDateInterval>;
1150
1151 #[unsafe(method(departureDateInterval))]
1153 #[unsafe(method_family = none)]
1154 pub unsafe fn departureDateInterval(&self) -> Retained<NSDateInterval>;
1155
1156 #[unsafe(method(locationCategory))]
1157 #[unsafe(method_family = none)]
1158 pub unsafe fn locationCategory(&self) -> SRLocationCategory;
1159
1160 #[unsafe(method(identifier))]
1163 #[unsafe(method_family = none)]
1164 pub unsafe fn identifier(&self) -> Retained<NSUUID>;
1165 );
1166}
1167
1168impl SRVisit {
1170 extern_methods!(
1171 #[unsafe(method(init))]
1172 #[unsafe(method_family = init)]
1173 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1174
1175 #[unsafe(method(new))]
1176 #[unsafe(method_family = new)]
1177 pub unsafe fn new() -> Retained<Self>;
1178 );
1179}
1180
1181pub type SRDeviceUsageCategoryKey = NSString;
1184
1185extern "C" {
1186 pub static SRDeviceUsageCategoryGames: &'static SRDeviceUsageCategoryKey;
1188}
1189
1190extern "C" {
1191 pub static SRDeviceUsageCategoryBusiness: &'static SRDeviceUsageCategoryKey;
1193}
1194
1195extern "C" {
1196 pub static SRDeviceUsageCategoryWeather: &'static SRDeviceUsageCategoryKey;
1198}
1199
1200extern "C" {
1201 pub static SRDeviceUsageCategoryUtilities: &'static SRDeviceUsageCategoryKey;
1203}
1204
1205extern "C" {
1206 pub static SRDeviceUsageCategoryTravel: &'static SRDeviceUsageCategoryKey;
1208}
1209
1210extern "C" {
1211 pub static SRDeviceUsageCategorySports: &'static SRDeviceUsageCategoryKey;
1213}
1214
1215extern "C" {
1216 pub static SRDeviceUsageCategorySocialNetworking: &'static SRDeviceUsageCategoryKey;
1218}
1219
1220extern "C" {
1221 pub static SRDeviceUsageCategoryReference: &'static SRDeviceUsageCategoryKey;
1223}
1224
1225extern "C" {
1226 pub static SRDeviceUsageCategoryProductivity: &'static SRDeviceUsageCategoryKey;
1228}
1229
1230extern "C" {
1231 pub static SRDeviceUsageCategoryPhotoAndVideo: &'static SRDeviceUsageCategoryKey;
1233}
1234
1235extern "C" {
1236 pub static SRDeviceUsageCategoryNews: &'static SRDeviceUsageCategoryKey;
1238}
1239
1240extern "C" {
1241 pub static SRDeviceUsageCategoryNavigation: &'static SRDeviceUsageCategoryKey;
1243}
1244
1245extern "C" {
1246 pub static SRDeviceUsageCategoryMusic: &'static SRDeviceUsageCategoryKey;
1248}
1249
1250extern "C" {
1251 pub static SRDeviceUsageCategoryLifestyle: &'static SRDeviceUsageCategoryKey;
1253}
1254
1255extern "C" {
1256 pub static SRDeviceUsageCategoryHealthAndFitness: &'static SRDeviceUsageCategoryKey;
1258}
1259
1260extern "C" {
1261 pub static SRDeviceUsageCategoryFinance: &'static SRDeviceUsageCategoryKey;
1263}
1264
1265extern "C" {
1266 pub static SRDeviceUsageCategoryEntertainment: &'static SRDeviceUsageCategoryKey;
1268}
1269
1270extern "C" {
1271 pub static SRDeviceUsageCategoryEducation: &'static SRDeviceUsageCategoryKey;
1273}
1274
1275extern "C" {
1276 pub static SRDeviceUsageCategoryBooks: &'static SRDeviceUsageCategoryKey;
1278}
1279
1280extern "C" {
1281 pub static SRDeviceUsageCategoryMedical: &'static SRDeviceUsageCategoryKey;
1283}
1284
1285extern "C" {
1286 pub static SRDeviceUsageCategoryNewsstand: &'static SRDeviceUsageCategoryKey;
1288}
1289
1290extern "C" {
1291 pub static SRDeviceUsageCategoryCatalogs: &'static SRDeviceUsageCategoryKey;
1293}
1294
1295extern "C" {
1296 pub static SRDeviceUsageCategoryKids: &'static SRDeviceUsageCategoryKey;
1298}
1299
1300extern "C" {
1301 pub static SRDeviceUsageCategoryMiscellaneous: &'static SRDeviceUsageCategoryKey;
1303}
1304
1305extern "C" {
1306 pub static SRDeviceUsageCategoryFoodAndDrink: &'static SRDeviceUsageCategoryKey;
1308}
1309
1310extern "C" {
1311 pub static SRDeviceUsageCategoryDeveloperTools: &'static SRDeviceUsageCategoryKey;
1313}
1314
1315extern "C" {
1316 pub static SRDeviceUsageCategoryGraphicsAndDesign: &'static SRDeviceUsageCategoryKey;
1318}
1319
1320extern "C" {
1321 pub static SRDeviceUsageCategoryShopping: &'static SRDeviceUsageCategoryKey;
1323}
1324
1325extern "C" {
1326 pub static SRDeviceUsageCategoryStickers: &'static SRDeviceUsageCategoryKey;
1328}
1329
1330extern_class!(
1331 #[unsafe(super(NSObject))]
1341 #[derive(Debug, PartialEq, Eq, Hash)]
1342 pub struct SRSupplementalCategory;
1343);
1344
1345unsafe impl Send for SRSupplementalCategory {}
1346
1347unsafe impl Sync for SRSupplementalCategory {}
1348
1349extern_conformance!(
1350 unsafe impl NSCoding for SRSupplementalCategory {}
1351);
1352
1353extern_conformance!(
1354 unsafe impl NSCopying for SRSupplementalCategory {}
1355);
1356
1357unsafe impl CopyingHelper for SRSupplementalCategory {
1358 type Result = Self;
1359}
1360
1361extern_conformance!(
1362 unsafe impl NSObjectProtocol for SRSupplementalCategory {}
1363);
1364
1365extern_conformance!(
1366 unsafe impl NSSecureCoding for SRSupplementalCategory {}
1367);
1368
1369impl SRSupplementalCategory {
1370 extern_methods!(
1371 #[unsafe(method(identifier))]
1381 #[unsafe(method_family = none)]
1382 pub unsafe fn identifier(&self) -> Retained<NSString>;
1383
1384 #[unsafe(method(init))]
1385 #[unsafe(method_family = init)]
1386 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1387
1388 #[unsafe(method(new))]
1389 #[unsafe(method_family = new)]
1390 pub unsafe fn new() -> Retained<Self>;
1391 );
1392}
1393
1394extern_class!(
1395 #[unsafe(super(NSObject))]
1397 #[derive(Debug, PartialEq, Eq, Hash)]
1398 pub struct SRDeviceUsageReport;
1399);
1400
1401extern_conformance!(
1402 unsafe impl NSObjectProtocol for SRDeviceUsageReport {}
1403);
1404
1405impl SRDeviceUsageReport {
1406 extern_methods!(
1407 #[unsafe(method(duration))]
1409 #[unsafe(method_family = none)]
1410 pub unsafe fn duration(&self) -> NSTimeInterval;
1411
1412 #[unsafe(method(applicationUsageByCategory))]
1417 #[unsafe(method_family = none)]
1418 pub unsafe fn applicationUsageByCategory(
1419 &self,
1420 ) -> Retained<NSDictionary<SRDeviceUsageCategoryKey, NSArray<SRApplicationUsage>>>;
1421
1422 #[unsafe(method(notificationUsageByCategory))]
1427 #[unsafe(method_family = none)]
1428 pub unsafe fn notificationUsageByCategory(
1429 &self,
1430 ) -> Retained<NSDictionary<SRDeviceUsageCategoryKey, NSArray<SRNotificationUsage>>>;
1431
1432 #[unsafe(method(webUsageByCategory))]
1437 #[unsafe(method_family = none)]
1438 pub unsafe fn webUsageByCategory(
1439 &self,
1440 ) -> Retained<NSDictionary<SRDeviceUsageCategoryKey, NSArray<SRWebUsage>>>;
1441
1442 #[unsafe(method(totalScreenWakes))]
1444 #[unsafe(method_family = none)]
1445 pub unsafe fn totalScreenWakes(&self) -> NSInteger;
1446
1447 #[unsafe(method(totalUnlocks))]
1449 #[unsafe(method_family = none)]
1450 pub unsafe fn totalUnlocks(&self) -> NSInteger;
1451
1452 #[unsafe(method(totalUnlockDuration))]
1454 #[unsafe(method_family = none)]
1455 pub unsafe fn totalUnlockDuration(&self) -> NSTimeInterval;
1456
1457 #[unsafe(method(version))]
1459 #[unsafe(method_family = none)]
1460 pub unsafe fn version(&self) -> Retained<NSString>;
1461 );
1462}
1463
1464impl SRDeviceUsageReport {
1466 extern_methods!(
1467 #[unsafe(method(init))]
1468 #[unsafe(method_family = init)]
1469 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1470
1471 #[unsafe(method(new))]
1472 #[unsafe(method_family = new)]
1473 pub unsafe fn new() -> Retained<Self>;
1474 );
1475}
1476
1477#[repr(transparent)]
1480#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
1481pub struct SRTextInputSessionType(pub NSInteger);
1482impl SRTextInputSessionType {
1483 #[doc(alias = "SRTextInputSessionTypeKeyboard")]
1484 pub const Keyboard: Self = Self(1);
1485 #[doc(alias = "SRTextInputSessionTypeThirdPartyKeyboard")]
1486 pub const ThirdPartyKeyboard: Self = Self(2);
1487 #[doc(alias = "SRTextInputSessionTypePencil")]
1488 pub const Pencil: Self = Self(3);
1489 #[doc(alias = "SRTextInputSessionTypeDictation")]
1490 pub const Dictation: Self = Self(4);
1491}
1492
1493unsafe impl Encode for SRTextInputSessionType {
1494 const ENCODING: Encoding = NSInteger::ENCODING;
1495}
1496
1497unsafe impl RefEncode for SRTextInputSessionType {
1498 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1499}
1500
1501extern_class!(
1502 #[unsafe(super(NSObject))]
1504 #[derive(Debug, PartialEq, Eq, Hash)]
1505 pub struct SRTextInputSession;
1506);
1507
1508extern_conformance!(
1509 unsafe impl NSObjectProtocol for SRTextInputSession {}
1510);
1511
1512impl SRTextInputSession {
1513 extern_methods!(
1514 #[unsafe(method(duration))]
1515 #[unsafe(method_family = none)]
1516 pub unsafe fn duration(&self) -> NSTimeInterval;
1517
1518 #[unsafe(method(sessionType))]
1519 #[unsafe(method_family = none)]
1520 pub unsafe fn sessionType(&self) -> SRTextInputSessionType;
1521
1522 #[unsafe(method(sessionIdentifier))]
1524 #[unsafe(method_family = none)]
1525 pub unsafe fn sessionIdentifier(&self) -> Retained<NSString>;
1526 );
1527}
1528
1529impl SRTextInputSession {
1531 extern_methods!(
1532 #[unsafe(method(init))]
1533 #[unsafe(method_family = init)]
1534 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1535
1536 #[unsafe(method(new))]
1537 #[unsafe(method_family = new)]
1538 pub unsafe fn new() -> Retained<Self>;
1539 );
1540}
1541
1542extern_class!(
1543 #[unsafe(super(NSObject))]
1545 #[derive(Debug, PartialEq, Eq, Hash)]
1546 pub struct SRApplicationUsage;
1547);
1548
1549extern_conformance!(
1550 unsafe impl NSObjectProtocol for SRApplicationUsage {}
1551);
1552
1553impl SRApplicationUsage {
1554 extern_methods!(
1555 #[unsafe(method(bundleIdentifier))]
1557 #[unsafe(method_family = none)]
1558 pub unsafe fn bundleIdentifier(&self) -> Option<Retained<NSString>>;
1559
1560 #[unsafe(method(usageTime))]
1562 #[unsafe(method_family = none)]
1563 pub unsafe fn usageTime(&self) -> NSTimeInterval;
1564
1565 #[unsafe(method(reportApplicationIdentifier))]
1571 #[unsafe(method_family = none)]
1572 pub unsafe fn reportApplicationIdentifier(&self) -> Retained<NSString>;
1573
1574 #[unsafe(method(textInputSessions))]
1582 #[unsafe(method_family = none)]
1583 pub unsafe fn textInputSessions(&self) -> Retained<NSArray<SRTextInputSession>>;
1584
1585 #[unsafe(method(supplementalCategories))]
1587 #[unsafe(method_family = none)]
1588 pub unsafe fn supplementalCategories(&self) -> Retained<NSArray<SRSupplementalCategory>>;
1589
1590 #[unsafe(method(relativeStartTime))]
1596 #[unsafe(method_family = none)]
1597 pub unsafe fn relativeStartTime(&self) -> NSTimeInterval;
1598 );
1599}
1600
1601impl SRApplicationUsage {
1603 extern_methods!(
1604 #[unsafe(method(init))]
1605 #[unsafe(method_family = init)]
1606 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1607
1608 #[unsafe(method(new))]
1609 #[unsafe(method_family = new)]
1610 pub unsafe fn new() -> Retained<Self>;
1611 );
1612}
1613
1614#[repr(transparent)]
1617#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
1618pub struct SRNotificationEvent(pub NSInteger);
1619impl SRNotificationEvent {
1620 #[doc(alias = "SRNotificationEventUnknown")]
1621 pub const Unknown: Self = Self(0);
1622 #[doc(alias = "SRNotificationEventReceived")]
1623 pub const Received: Self = Self(1);
1624 #[doc(alias = "SRNotificationEventDefaultAction")]
1625 pub const DefaultAction: Self = Self(2);
1626 #[doc(alias = "SRNotificationEventSupplementaryAction")]
1627 pub const SupplementaryAction: Self = Self(3);
1628 #[doc(alias = "SRNotificationEventClear")]
1629 pub const Clear: Self = Self(4);
1630 #[doc(alias = "SRNotificationEventNotificationCenterClearAll")]
1631 pub const NotificationCenterClearAll: Self = Self(5);
1632 #[doc(alias = "SRNotificationEventRemoved")]
1633 pub const Removed: Self = Self(6);
1634 #[doc(alias = "SRNotificationEventHide")]
1635 pub const Hide: Self = Self(7);
1636 #[doc(alias = "SRNotificationEventLongLook")]
1637 pub const LongLook: Self = Self(8);
1638 #[doc(alias = "SRNotificationEventSilence")]
1639 pub const Silence: Self = Self(9);
1640 #[doc(alias = "SRNotificationEventAppLaunch")]
1641 pub const AppLaunch: Self = Self(10);
1642 #[doc(alias = "SRNotificationEventExpired")]
1643 pub const Expired: Self = Self(11);
1644 #[doc(alias = "SRNotificationEventBannerPulldown")]
1645 pub const BannerPulldown: Self = Self(12);
1646 #[doc(alias = "SRNotificationEventTapCoalesce")]
1647 pub const TapCoalesce: Self = Self(13);
1648 #[doc(alias = "SRNotificationEventDeduped")]
1649 pub const Deduped: Self = Self(14);
1650 #[doc(alias = "SRNotificationEventDeviceActivated")]
1651 pub const DeviceActivated: Self = Self(15);
1652 #[doc(alias = "SRNotificationEventDeviceUnlocked")]
1653 pub const DeviceUnlocked: Self = Self(16);
1654}
1655
1656unsafe impl Encode for SRNotificationEvent {
1657 const ENCODING: Encoding = NSInteger::ENCODING;
1658}
1659
1660unsafe impl RefEncode for SRNotificationEvent {
1661 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
1662}
1663
1664extern_class!(
1665 #[unsafe(super(NSObject))]
1667 #[derive(Debug, PartialEq, Eq, Hash)]
1668 pub struct SRNotificationUsage;
1669);
1670
1671extern_conformance!(
1672 unsafe impl NSObjectProtocol for SRNotificationUsage {}
1673);
1674
1675impl SRNotificationUsage {
1676 extern_methods!(
1677 #[unsafe(method(bundleIdentifier))]
1679 #[unsafe(method_family = none)]
1680 pub unsafe fn bundleIdentifier(&self) -> Option<Retained<NSString>>;
1681
1682 #[unsafe(method(event))]
1683 #[unsafe(method_family = none)]
1684 pub unsafe fn event(&self) -> SRNotificationEvent;
1685 );
1686}
1687
1688impl SRNotificationUsage {
1690 extern_methods!(
1691 #[unsafe(method(init))]
1692 #[unsafe(method_family = init)]
1693 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1694
1695 #[unsafe(method(new))]
1696 #[unsafe(method_family = new)]
1697 pub unsafe fn new() -> Retained<Self>;
1698 );
1699}
1700
1701extern_class!(
1702 #[unsafe(super(NSObject))]
1704 #[derive(Debug, PartialEq, Eq, Hash)]
1705 pub struct SRWebUsage;
1706);
1707
1708extern_conformance!(
1709 unsafe impl NSObjectProtocol for SRWebUsage {}
1710);
1711
1712impl SRWebUsage {
1713 extern_methods!(
1714 #[unsafe(method(totalUsageTime))]
1715 #[unsafe(method_family = none)]
1716 pub unsafe fn totalUsageTime(&self) -> NSTimeInterval;
1717 );
1718}
1719
1720impl SRWebUsage {
1722 extern_methods!(
1723 #[unsafe(method(init))]
1724 #[unsafe(method_family = init)]
1725 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1726
1727 #[unsafe(method(new))]
1728 #[unsafe(method_family = new)]
1729 pub unsafe fn new() -> Retained<Self>;
1730 );
1731}
1732
1733extern_class!(
1734 #[unsafe(super(NSObject))]
1736 #[derive(Debug, PartialEq, Eq, Hash)]
1737 pub struct SRMessagesUsageReport;
1738);
1739
1740extern_conformance!(
1741 unsafe impl NSObjectProtocol for SRMessagesUsageReport {}
1742);
1743
1744impl SRMessagesUsageReport {
1745 extern_methods!(
1746 #[unsafe(method(duration))]
1747 #[unsafe(method_family = none)]
1748 pub unsafe fn duration(&self) -> NSTimeInterval;
1749
1750 #[unsafe(method(totalOutgoingMessages))]
1751 #[unsafe(method_family = none)]
1752 pub unsafe fn totalOutgoingMessages(&self) -> NSInteger;
1753
1754 #[unsafe(method(totalIncomingMessages))]
1755 #[unsafe(method_family = none)]
1756 pub unsafe fn totalIncomingMessages(&self) -> NSInteger;
1757
1758 #[unsafe(method(totalUniqueContacts))]
1759 #[unsafe(method_family = none)]
1760 pub unsafe fn totalUniqueContacts(&self) -> NSInteger;
1761 );
1762}
1763
1764impl SRMessagesUsageReport {
1766 extern_methods!(
1767 #[unsafe(method(init))]
1768 #[unsafe(method_family = init)]
1769 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1770
1771 #[unsafe(method(new))]
1772 #[unsafe(method_family = new)]
1773 pub unsafe fn new() -> Retained<Self>;
1774 );
1775}
1776
1777extern_class!(
1778 #[unsafe(super(NSObject))]
1780 #[derive(Debug, PartialEq, Eq, Hash)]
1781 pub struct SRPhoneUsageReport;
1782);
1783
1784extern_conformance!(
1785 unsafe impl NSObjectProtocol for SRPhoneUsageReport {}
1786);
1787
1788impl SRPhoneUsageReport {
1789 extern_methods!(
1790 #[unsafe(method(duration))]
1791 #[unsafe(method_family = none)]
1792 pub unsafe fn duration(&self) -> NSTimeInterval;
1793
1794 #[unsafe(method(totalOutgoingCalls))]
1795 #[unsafe(method_family = none)]
1796 pub unsafe fn totalOutgoingCalls(&self) -> NSInteger;
1797
1798 #[unsafe(method(totalIncomingCalls))]
1799 #[unsafe(method_family = none)]
1800 pub unsafe fn totalIncomingCalls(&self) -> NSInteger;
1801
1802 #[unsafe(method(totalUniqueContacts))]
1803 #[unsafe(method_family = none)]
1804 pub unsafe fn totalUniqueContacts(&self) -> NSInteger;
1805
1806 #[unsafe(method(totalPhoneCallDuration))]
1807 #[unsafe(method_family = none)]
1808 pub unsafe fn totalPhoneCallDuration(&self) -> NSTimeInterval;
1809 );
1810}
1811
1812impl SRPhoneUsageReport {
1814 extern_methods!(
1815 #[unsafe(method(init))]
1816 #[unsafe(method_family = init)]
1817 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1818
1819 #[unsafe(method(new))]
1820 #[unsafe(method_family = new)]
1821 pub unsafe fn new() -> Retained<Self>;
1822 );
1823}
1824
1825extern_class!(
1826 #[unsafe(super(NSObject))]
1828 #[derive(Debug, PartialEq, Eq, Hash)]
1829 pub struct SRKeyboardMetrics;
1830);
1831
1832extern_conformance!(
1833 unsafe impl NSObjectProtocol for SRKeyboardMetrics {}
1834);
1835
1836impl SRKeyboardMetrics {
1837 extern_methods!(
1838 #[unsafe(method(duration))]
1840 #[unsafe(method_family = none)]
1841 pub unsafe fn duration(&self) -> NSTimeInterval;
1842
1843 #[unsafe(method(keyboardIdentifier))]
1845 #[unsafe(method_family = none)]
1846 pub unsafe fn keyboardIdentifier(&self) -> Retained<NSString>;
1847
1848 #[unsafe(method(version))]
1850 #[unsafe(method_family = none)]
1851 pub unsafe fn version(&self) -> Retained<NSString>;
1852
1853 #[unsafe(method(width))]
1855 #[unsafe(method_family = none)]
1856 pub unsafe fn width(&self) -> Retained<NSMeasurement<NSUnitLength>>;
1857
1858 #[unsafe(method(height))]
1860 #[unsafe(method_family = none)]
1861 pub unsafe fn height(&self) -> Retained<NSMeasurement<NSUnitLength>>;
1862
1863 #[unsafe(method(inputModes))]
1865 #[unsafe(method_family = none)]
1866 pub unsafe fn inputModes(&self) -> Retained<NSArray<NSString>>;
1867
1868 #[unsafe(method(sessionIdentifiers))]
1870 #[unsafe(method_family = none)]
1871 pub unsafe fn sessionIdentifiers(&self) -> Retained<NSArray<NSString>>;
1872 );
1873}
1874
1875impl SRKeyboardMetrics {
1877 extern_methods!(
1878 #[unsafe(method(init))]
1879 #[unsafe(method_family = init)]
1880 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
1881
1882 #[unsafe(method(new))]
1883 #[unsafe(method_family = new)]
1884 pub unsafe fn new() -> Retained<Self>;
1885 );
1886}
1887
1888impl SRKeyboardMetrics {
1890 extern_methods!(
1891 #[unsafe(method(totalWords))]
1893 #[unsafe(method_family = none)]
1894 pub unsafe fn totalWords(&self) -> NSInteger;
1895
1896 #[unsafe(method(totalAlteredWords))]
1898 #[unsafe(method_family = none)]
1899 pub unsafe fn totalAlteredWords(&self) -> NSInteger;
1900
1901 #[unsafe(method(totalTaps))]
1903 #[unsafe(method_family = none)]
1904 pub unsafe fn totalTaps(&self) -> NSInteger;
1905
1906 #[unsafe(method(totalDrags))]
1908 #[unsafe(method_family = none)]
1909 pub unsafe fn totalDrags(&self) -> NSInteger;
1910
1911 #[unsafe(method(totalDeletes))]
1913 #[unsafe(method_family = none)]
1914 pub unsafe fn totalDeletes(&self) -> NSInteger;
1915
1916 #[unsafe(method(totalEmojis))]
1918 #[unsafe(method_family = none)]
1919 pub unsafe fn totalEmojis(&self) -> NSInteger;
1920
1921 #[unsafe(method(totalPaths))]
1923 #[unsafe(method_family = none)]
1924 pub unsafe fn totalPaths(&self) -> NSInteger;
1925
1926 #[unsafe(method(totalPathTime))]
1928 #[unsafe(method_family = none)]
1929 pub unsafe fn totalPathTime(&self) -> NSTimeInterval;
1930
1931 #[unsafe(method(totalPathLength))]
1933 #[unsafe(method_family = none)]
1934 pub unsafe fn totalPathLength(&self) -> Retained<NSMeasurement<NSUnitLength>>;
1935
1936 #[unsafe(method(totalAutoCorrections))]
1938 #[unsafe(method_family = none)]
1939 pub unsafe fn totalAutoCorrections(&self) -> NSInteger;
1940
1941 #[unsafe(method(totalSpaceCorrections))]
1943 #[unsafe(method_family = none)]
1944 pub unsafe fn totalSpaceCorrections(&self) -> NSInteger;
1945
1946 #[unsafe(method(totalRetroCorrections))]
1948 #[unsafe(method_family = none)]
1949 pub unsafe fn totalRetroCorrections(&self) -> NSInteger;
1950
1951 #[unsafe(method(totalTranspositionCorrections))]
1953 #[unsafe(method_family = none)]
1954 pub unsafe fn totalTranspositionCorrections(&self) -> NSInteger;
1955
1956 #[unsafe(method(totalInsertKeyCorrections))]
1958 #[unsafe(method_family = none)]
1959 pub unsafe fn totalInsertKeyCorrections(&self) -> NSInteger;
1960
1961 #[unsafe(method(totalSkipTouchCorrections))]
1963 #[unsafe(method_family = none)]
1964 pub unsafe fn totalSkipTouchCorrections(&self) -> NSInteger;
1965
1966 #[unsafe(method(totalNearKeyCorrections))]
1968 #[unsafe(method_family = none)]
1969 pub unsafe fn totalNearKeyCorrections(&self) -> NSInteger;
1970
1971 #[unsafe(method(totalSubstitutionCorrections))]
1973 #[unsafe(method_family = none)]
1974 pub unsafe fn totalSubstitutionCorrections(&self) -> NSInteger;
1975
1976 #[unsafe(method(totalHitTestCorrections))]
1978 #[unsafe(method_family = none)]
1979 pub unsafe fn totalHitTestCorrections(&self) -> NSInteger;
1980
1981 #[unsafe(method(totalTypingDuration))]
1983 #[unsafe(method_family = none)]
1984 pub unsafe fn totalTypingDuration(&self) -> NSTimeInterval;
1985 );
1986}
1987
1988extern_class!(
1989 #[unsafe(super(NSObject))]
1991 #[derive(Debug, PartialEq, Eq, Hash)]
1992 pub struct SRKeyboardProbabilityMetric<UnitType: ?Sized = AnyObject>;
1993);
1994
1995impl<UnitType: ?Sized + Message + AsRef<NSUnit>> SRKeyboardProbabilityMetric<UnitType> {
1996 #[inline]
2002 pub unsafe fn cast_unchecked<NewUnitType: ?Sized + Message + AsRef<NSUnit>>(
2003 &self,
2004 ) -> &SRKeyboardProbabilityMetric<NewUnitType> {
2005 unsafe { &*((self as *const Self).cast()) }
2006 }
2007}
2008
2009extern_conformance!(
2010 unsafe impl<UnitType: ?Sized + AsRef<NSUnit>> NSObjectProtocol
2011 for SRKeyboardProbabilityMetric<UnitType>
2012 {
2013 }
2014);
2015
2016impl<UnitType: Message + AsRef<NSUnit>> SRKeyboardProbabilityMetric<UnitType> {
2017 extern_methods!(
2018 #[unsafe(method(distributionSampleValues))]
2020 #[unsafe(method_family = none)]
2021 pub unsafe fn distributionSampleValues(&self)
2022 -> Retained<NSArray<NSMeasurement<UnitType>>>;
2023 );
2024}
2025
2026impl<UnitType: Message + AsRef<NSUnit>> SRKeyboardProbabilityMetric<UnitType> {
2028 extern_methods!(
2029 #[unsafe(method(init))]
2030 #[unsafe(method_family = init)]
2031 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
2032
2033 #[unsafe(method(new))]
2034 #[unsafe(method_family = new)]
2035 pub unsafe fn new() -> Retained<Self>;
2036 );
2037}
2038
2039impl SRKeyboardMetrics {
2041 extern_methods!(
2042 #[unsafe(method(upErrorDistance))]
2044 #[unsafe(method_family = none)]
2045 pub unsafe fn upErrorDistance(&self)
2046 -> Retained<SRKeyboardProbabilityMetric<NSUnitLength>>;
2047
2048 #[unsafe(method(downErrorDistance))]
2050 #[unsafe(method_family = none)]
2051 pub unsafe fn downErrorDistance(
2052 &self,
2053 ) -> Retained<SRKeyboardProbabilityMetric<NSUnitLength>>;
2054
2055 #[unsafe(method(spaceUpErrorDistance))]
2057 #[unsafe(method_family = none)]
2058 pub unsafe fn spaceUpErrorDistance(
2059 &self,
2060 ) -> Retained<SRKeyboardProbabilityMetric<NSUnitLength>>;
2061
2062 #[unsafe(method(spaceDownErrorDistance))]
2064 #[unsafe(method_family = none)]
2065 pub unsafe fn spaceDownErrorDistance(
2066 &self,
2067 ) -> Retained<SRKeyboardProbabilityMetric<NSUnitLength>>;
2068
2069 #[unsafe(method(deleteUpErrorDistance))]
2071 #[unsafe(method_family = none)]
2072 pub unsafe fn deleteUpErrorDistance(
2073 &self,
2074 ) -> Retained<SRKeyboardProbabilityMetric<NSUnitLength>>;
2075
2076 #[unsafe(method(deleteDownErrorDistance))]
2078 #[unsafe(method_family = none)]
2079 pub unsafe fn deleteDownErrorDistance(
2080 &self,
2081 ) -> Retained<SRKeyboardProbabilityMetric<NSUnitLength>>;
2082
2083 #[unsafe(method(shortWordCharKeyUpErrorDistance))]
2085 #[unsafe(method_family = none)]
2086 pub unsafe fn shortWordCharKeyUpErrorDistance(
2087 &self,
2088 ) -> Retained<SRKeyboardProbabilityMetric<NSUnitLength>>;
2089
2090 #[unsafe(method(shortWordCharKeyDownErrorDistance))]
2092 #[unsafe(method_family = none)]
2093 pub unsafe fn shortWordCharKeyDownErrorDistance(
2094 &self,
2095 ) -> Retained<SRKeyboardProbabilityMetric<NSUnitLength>>;
2096
2097 #[unsafe(method(touchDownUp))]
2099 #[unsafe(method_family = none)]
2100 pub unsafe fn touchDownUp(&self) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
2101
2102 #[unsafe(method(spaceTouchDownUp))]
2104 #[unsafe(method_family = none)]
2105 pub unsafe fn spaceTouchDownUp(
2106 &self,
2107 ) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
2108
2109 #[unsafe(method(deleteTouchDownUp))]
2111 #[unsafe(method_family = none)]
2112 pub unsafe fn deleteTouchDownUp(
2113 &self,
2114 ) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
2115
2116 #[unsafe(method(shortWordCharKeyTouchDownUp))]
2118 #[unsafe(method_family = none)]
2119 pub unsafe fn shortWordCharKeyTouchDownUp(
2120 &self,
2121 ) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
2122
2123 #[unsafe(method(touchDownDown))]
2125 #[unsafe(method_family = none)]
2126 pub unsafe fn touchDownDown(&self)
2127 -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
2128
2129 #[unsafe(method(touchUpDown))]
2131 #[unsafe(method_family = none)]
2132 pub unsafe fn touchUpDown(&self) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
2133
2134 #[unsafe(method(charKeyToPrediction))]
2136 #[unsafe(method_family = none)]
2137 pub unsafe fn charKeyToPrediction(
2138 &self,
2139 ) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
2140
2141 #[unsafe(method(shortWordCharKeyToCharKey))]
2143 #[unsafe(method_family = none)]
2144 pub unsafe fn shortWordCharKeyToCharKey(
2145 &self,
2146 ) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
2147
2148 #[unsafe(method(charKeyToAnyTapKey))]
2150 #[unsafe(method_family = none)]
2151 pub unsafe fn charKeyToAnyTapKey(
2152 &self,
2153 ) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
2154
2155 #[unsafe(method(anyTapToCharKey))]
2157 #[unsafe(method_family = none)]
2158 pub unsafe fn anyTapToCharKey(
2159 &self,
2160 ) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
2161
2162 #[unsafe(method(spaceToCharKey))]
2164 #[unsafe(method_family = none)]
2165 pub unsafe fn spaceToCharKey(
2166 &self,
2167 ) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
2168
2169 #[unsafe(method(charKeyToSpaceKey))]
2171 #[unsafe(method_family = none)]
2172 pub unsafe fn charKeyToSpaceKey(
2173 &self,
2174 ) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
2175
2176 #[unsafe(method(spaceToDeleteKey))]
2178 #[unsafe(method_family = none)]
2179 pub unsafe fn spaceToDeleteKey(
2180 &self,
2181 ) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
2182
2183 #[unsafe(method(deleteToSpaceKey))]
2185 #[unsafe(method_family = none)]
2186 pub unsafe fn deleteToSpaceKey(
2187 &self,
2188 ) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
2189
2190 #[unsafe(method(spaceToSpaceKey))]
2192 #[unsafe(method_family = none)]
2193 pub unsafe fn spaceToSpaceKey(
2194 &self,
2195 ) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
2196
2197 #[unsafe(method(spaceToShiftKey))]
2199 #[unsafe(method_family = none)]
2200 pub unsafe fn spaceToShiftKey(
2201 &self,
2202 ) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
2203
2204 #[unsafe(method(spaceToPlaneChangeKey))]
2206 #[unsafe(method_family = none)]
2207 pub unsafe fn spaceToPlaneChangeKey(
2208 &self,
2209 ) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
2210
2211 #[unsafe(method(spaceToPredictionKey))]
2213 #[unsafe(method_family = none)]
2214 pub unsafe fn spaceToPredictionKey(
2215 &self,
2216 ) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
2217
2218 #[unsafe(method(deleteToCharKey))]
2220 #[unsafe(method_family = none)]
2221 pub unsafe fn deleteToCharKey(
2222 &self,
2223 ) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
2224
2225 #[unsafe(method(charKeyToDelete))]
2227 #[unsafe(method_family = none)]
2228 pub unsafe fn charKeyToDelete(
2229 &self,
2230 ) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
2231
2232 #[unsafe(method(deleteToDelete))]
2234 #[unsafe(method_family = none)]
2235 pub unsafe fn deleteToDelete(
2236 &self,
2237 ) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
2238
2239 #[unsafe(method(deleteToShiftKey))]
2241 #[unsafe(method_family = none)]
2242 pub unsafe fn deleteToShiftKey(
2243 &self,
2244 ) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
2245
2246 #[unsafe(method(deleteToPlaneChangeKey))]
2248 #[unsafe(method_family = none)]
2249 pub unsafe fn deleteToPlaneChangeKey(
2250 &self,
2251 ) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
2252
2253 #[unsafe(method(anyTapToPlaneChangeKey))]
2255 #[unsafe(method_family = none)]
2256 pub unsafe fn anyTapToPlaneChangeKey(
2257 &self,
2258 ) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
2259
2260 #[unsafe(method(planeChangeToAnyTap))]
2262 #[unsafe(method_family = none)]
2263 pub unsafe fn planeChangeToAnyTap(
2264 &self,
2265 ) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
2266
2267 #[unsafe(method(charKeyToPlaneChangeKey))]
2269 #[unsafe(method_family = none)]
2270 pub unsafe fn charKeyToPlaneChangeKey(
2271 &self,
2272 ) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
2273
2274 #[unsafe(method(planeChangeKeyToCharKey))]
2276 #[unsafe(method_family = none)]
2277 pub unsafe fn planeChangeKeyToCharKey(
2278 &self,
2279 ) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
2280
2281 #[unsafe(method(pathErrorDistanceRatio))]
2283 #[unsafe(method_family = none)]
2284 pub unsafe fn pathErrorDistanceRatio(&self) -> Retained<NSArray<NSNumber>>;
2285
2286 #[unsafe(method(deleteToPath))]
2288 #[unsafe(method_family = none)]
2289 pub unsafe fn deleteToPath(&self) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
2290
2291 #[unsafe(method(pathToDelete))]
2293 #[unsafe(method_family = none)]
2294 pub unsafe fn pathToDelete(&self) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
2295
2296 #[unsafe(method(spaceToPath))]
2298 #[unsafe(method_family = none)]
2299 pub unsafe fn spaceToPath(&self) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
2300
2301 #[unsafe(method(pathToSpace))]
2303 #[unsafe(method_family = none)]
2304 pub unsafe fn pathToSpace(&self) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
2305
2306 #[unsafe(method(pathToPath))]
2308 #[unsafe(method_family = none)]
2309 pub unsafe fn pathToPath(&self) -> Retained<SRKeyboardProbabilityMetric<NSUnitDuration>>;
2310 );
2311}
2312
2313impl SRKeyboardMetrics {
2317 extern_methods!(
2318 #[unsafe(method(longWordUpErrorDistance))]
2320 #[unsafe(method_family = none)]
2321 pub unsafe fn longWordUpErrorDistance(
2322 &self,
2323 ) -> Retained<NSArray<SRKeyboardProbabilityMetric<NSUnitLength>>>;
2324
2325 #[unsafe(method(longWordDownErrorDistance))]
2327 #[unsafe(method_family = none)]
2328 pub unsafe fn longWordDownErrorDistance(
2329 &self,
2330 ) -> Retained<NSArray<SRKeyboardProbabilityMetric<NSUnitLength>>>;
2331
2332 #[unsafe(method(longWordTouchDownUp))]
2334 #[unsafe(method_family = none)]
2335 pub unsafe fn longWordTouchDownUp(
2336 &self,
2337 ) -> Retained<NSArray<SRKeyboardProbabilityMetric<NSUnitDuration>>>;
2338
2339 #[unsafe(method(longWordTouchDownDown))]
2341 #[unsafe(method_family = none)]
2342 pub unsafe fn longWordTouchDownDown(
2343 &self,
2344 ) -> Retained<NSArray<SRKeyboardProbabilityMetric<NSUnitDuration>>>;
2345
2346 #[unsafe(method(longWordTouchUpDown))]
2348 #[unsafe(method_family = none)]
2349 pub unsafe fn longWordTouchUpDown(
2350 &self,
2351 ) -> Retained<NSArray<SRKeyboardProbabilityMetric<NSUnitDuration>>>;
2352
2353 #[unsafe(method(deleteToDeletes))]
2355 #[unsafe(method_family = none)]
2356 pub unsafe fn deleteToDeletes(
2357 &self,
2358 ) -> Retained<NSArray<SRKeyboardProbabilityMetric<NSUnitDuration>>>;
2359 );
2360}
2361
2362impl SRKeyboardMetrics {
2364 extern_methods!(
2365 #[unsafe(method(totalPauses))]
2367 #[unsafe(method_family = none)]
2368 pub unsafe fn totalPauses(&self) -> NSInteger;
2369
2370 #[unsafe(method(totalPathPauses))]
2372 #[unsafe(method_family = none)]
2373 pub unsafe fn totalPathPauses(&self) -> NSInteger;
2374
2375 #[unsafe(method(typingSpeed))]
2377 #[unsafe(method_family = none)]
2378 pub unsafe fn typingSpeed(&self) -> c_double;
2379
2380 #[unsafe(method(pathTypingSpeed))]
2382 #[unsafe(method_family = none)]
2383 pub unsafe fn pathTypingSpeed(&self) -> c_double;
2384
2385 #[unsafe(method(totalTypingEpisodes))]
2387 #[unsafe(method_family = none)]
2388 pub unsafe fn totalTypingEpisodes(&self) -> NSInteger;
2389 );
2390}
2391
2392#[repr(transparent)]
2397#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
2398pub struct SRKeyboardMetricsSentimentCategory(pub NSInteger);
2399impl SRKeyboardMetricsSentimentCategory {
2400 #[doc(alias = "SRKeyboardMetricsSentimentCategoryAbsolutist")]
2401 pub const Absolutist: Self = Self(0);
2402 #[doc(alias = "SRKeyboardMetricsSentimentCategoryDown")]
2403 pub const Down: Self = Self(1);
2404 #[doc(alias = "SRKeyboardMetricsSentimentCategoryDeath")]
2405 pub const Death: Self = Self(2);
2406 #[doc(alias = "SRKeyboardMetricsSentimentCategoryAnxiety")]
2407 pub const Anxiety: Self = Self(3);
2408 #[doc(alias = "SRKeyboardMetricsSentimentCategoryAnger")]
2409 pub const Anger: Self = Self(4);
2410 #[doc(alias = "SRKeyboardMetricsSentimentCategoryHealth")]
2411 pub const Health: Self = Self(5);
2412 #[doc(alias = "SRKeyboardMetricsSentimentCategoryPositive")]
2413 pub const Positive: Self = Self(6);
2414 #[doc(alias = "SRKeyboardMetricsSentimentCategorySad")]
2415 pub const Sad: Self = Self(7);
2416 #[doc(alias = "SRKeyboardMetricsSentimentCategoryLowEnergy")]
2417 pub const LowEnergy: Self = Self(8);
2418 #[doc(alias = "SRKeyboardMetricsSentimentCategoryConfused")]
2419 pub const Confused: Self = Self(9);
2420}
2421
2422unsafe impl Encode for SRKeyboardMetricsSentimentCategory {
2423 const ENCODING: Encoding = NSInteger::ENCODING;
2424}
2425
2426unsafe impl RefEncode for SRKeyboardMetricsSentimentCategory {
2427 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2428}
2429
2430impl SRKeyboardMetrics {
2435 extern_methods!(
2436 #[unsafe(method(wordCountForSentimentCategory:))]
2438 #[unsafe(method_family = none)]
2439 pub unsafe fn wordCountForSentimentCategory(
2440 &self,
2441 category: SRKeyboardMetricsSentimentCategory,
2442 ) -> NSInteger;
2443
2444 #[unsafe(method(emojiCountForSentimentCategory:))]
2446 #[unsafe(method_family = none)]
2447 pub unsafe fn emojiCountForSentimentCategory(
2448 &self,
2449 category: SRKeyboardMetricsSentimentCategory,
2450 ) -> NSInteger;
2451 );
2452}
2453
2454#[repr(transparent)]
2457#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
2458pub struct SRDeletionReason(pub NSInteger);
2459impl SRDeletionReason {
2460 #[doc(alias = "SRDeletionReasonUserInitiated")]
2462 pub const UserInitiated: Self = Self(0);
2463 #[doc(alias = "SRDeletionReasonLowDiskSpace")]
2465 pub const LowDiskSpace: Self = Self(1);
2466 #[doc(alias = "SRDeletionReasonAgeLimit")]
2468 pub const AgeLimit: Self = Self(2);
2469 #[doc(alias = "SRDeletionReasonNoInterestedClients")]
2471 pub const NoInterestedClients: Self = Self(3);
2472 #[doc(alias = "SRDeletionReasonSystemInitiated")]
2474 pub const SystemInitiated: Self = Self(4);
2475}
2476
2477unsafe impl Encode for SRDeletionReason {
2478 const ENCODING: Encoding = NSInteger::ENCODING;
2479}
2480
2481unsafe impl RefEncode for SRDeletionReason {
2482 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2483}
2484
2485extern_class!(
2486 #[unsafe(super(NSObject))]
2488 #[derive(Debug, PartialEq, Eq, Hash)]
2489 pub struct SRDeletionRecord;
2490);
2491
2492extern_conformance!(
2493 unsafe impl NSCoding for SRDeletionRecord {}
2494);
2495
2496extern_conformance!(
2497 unsafe impl NSObjectProtocol for SRDeletionRecord {}
2498);
2499
2500extern_conformance!(
2501 unsafe impl NSSecureCoding for SRDeletionRecord {}
2502);
2503
2504impl SRDeletionRecord {
2505 extern_methods!(
2506 #[cfg(feature = "objc2-core-foundation")]
2507 #[unsafe(method(startTime))]
2508 #[unsafe(method_family = none)]
2509 pub unsafe fn startTime(&self) -> SRAbsoluteTime;
2510
2511 #[cfg(feature = "objc2-core-foundation")]
2512 #[unsafe(method(endTime))]
2513 #[unsafe(method_family = none)]
2514 pub unsafe fn endTime(&self) -> SRAbsoluteTime;
2515
2516 #[unsafe(method(reason))]
2517 #[unsafe(method_family = none)]
2518 pub unsafe fn reason(&self) -> SRDeletionReason;
2519 );
2520}
2521
2522impl SRDeletionRecord {
2524 extern_methods!(
2525 #[unsafe(method(init))]
2526 #[unsafe(method_family = init)]
2527 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
2528
2529 #[unsafe(method(new))]
2530 #[unsafe(method_family = new)]
2531 pub unsafe fn new() -> Retained<Self>;
2532 );
2533}
2534
2535mod private_NSStringSRDeletionRecord {
2536 pub trait Sealed {}
2537}
2538
2539#[doc(alias = "SRDeletionRecord")]
2541pub unsafe trait NSStringSRDeletionRecord:
2542 ClassType + Sized + private_NSStringSRDeletionRecord::Sealed
2543{
2544 extern_methods!(
2545 #[unsafe(method(sr_sensorForDeletionRecordsFromSensor))]
2555 #[unsafe(method_family = none)]
2556 unsafe fn sr_sensorForDeletionRecordsFromSensor(&self) -> Option<Retained<SRSensor>>;
2557 );
2558}
2559
2560impl private_NSStringSRDeletionRecord::Sealed for NSString {}
2561unsafe impl NSStringSRDeletionRecord for NSString {}
2562
2563#[repr(transparent)]
2566#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
2567pub struct SRWristLocation(pub NSInteger);
2568impl SRWristLocation {
2569 #[doc(alias = "SRWristLocationLeft")]
2570 pub const Left: Self = Self(0);
2571 #[doc(alias = "SRWristLocationRight")]
2572 pub const Right: Self = Self(1);
2573}
2574
2575unsafe impl Encode for SRWristLocation {
2576 const ENCODING: Encoding = NSInteger::ENCODING;
2577}
2578
2579unsafe impl RefEncode for SRWristLocation {
2580 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2581}
2582
2583#[repr(transparent)]
2586#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
2587pub struct SRCrownOrientation(pub NSInteger);
2588impl SRCrownOrientation {
2589 #[doc(alias = "SRCrownOrientationLeft")]
2590 pub const Left: Self = Self(0);
2591 #[doc(alias = "SRCrownOrientationRight")]
2592 pub const Right: Self = Self(1);
2593}
2594
2595unsafe impl Encode for SRCrownOrientation {
2596 const ENCODING: Encoding = NSInteger::ENCODING;
2597}
2598
2599unsafe impl RefEncode for SRCrownOrientation {
2600 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2601}
2602
2603extern_class!(
2604 #[unsafe(super(NSObject))]
2606 #[derive(Debug, PartialEq, Eq, Hash)]
2607 pub struct SRWristDetection;
2608);
2609
2610extern_conformance!(
2611 unsafe impl NSObjectProtocol for SRWristDetection {}
2612);
2613
2614impl SRWristDetection {
2615 extern_methods!(
2616 #[unsafe(method(onWrist))]
2617 #[unsafe(method_family = none)]
2618 pub unsafe fn onWrist(&self) -> bool;
2619
2620 #[unsafe(method(wristLocation))]
2621 #[unsafe(method_family = none)]
2622 pub unsafe fn wristLocation(&self) -> SRWristLocation;
2623
2624 #[unsafe(method(crownOrientation))]
2625 #[unsafe(method_family = none)]
2626 pub unsafe fn crownOrientation(&self) -> SRCrownOrientation;
2627
2628 #[unsafe(method(onWristDate))]
2634 #[unsafe(method_family = none)]
2635 pub unsafe fn onWristDate(&self) -> Option<Retained<NSDate>>;
2636
2637 #[unsafe(method(offWristDate))]
2643 #[unsafe(method_family = none)]
2644 pub unsafe fn offWristDate(&self) -> Option<Retained<NSDate>>;
2645 );
2646}
2647
2648impl SRWristDetection {
2650 extern_methods!(
2651 #[unsafe(method(init))]
2652 #[unsafe(method_family = init)]
2653 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
2654
2655 #[unsafe(method(new))]
2656 #[unsafe(method_family = new)]
2657 pub unsafe fn new() -> Retained<Self>;
2658 );
2659}
2660
2661#[repr(transparent)]
2664#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
2665pub struct SRWristTemperatureCondition(pub NSUInteger);
2666bitflags::bitflags! {
2667 impl SRWristTemperatureCondition: NSUInteger {
2668 #[doc(alias = "SRWristTemperatureConditionNone")]
2669 const None = 0;
2670 #[doc(alias = "SRWristTemperatureConditionOffWrist")]
2671 const OffWrist = 1<<0;
2672 #[doc(alias = "SRWristTemperatureConditionOnCharger")]
2673 const OnCharger = 1<<1;
2674 #[doc(alias = "SRWristTemperatureConditionInMotion")]
2675 const InMotion = 1<<2;
2676 }
2677}
2678
2679unsafe impl Encode for SRWristTemperatureCondition {
2680 const ENCODING: Encoding = NSUInteger::ENCODING;
2681}
2682
2683unsafe impl RefEncode for SRWristTemperatureCondition {
2684 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2685}
2686
2687extern_class!(
2688 #[unsafe(super(NSObject))]
2690 #[derive(Debug, PartialEq, Eq, Hash)]
2691 pub struct SRWristTemperature;
2692);
2693
2694unsafe impl Send for SRWristTemperature {}
2695
2696unsafe impl Sync for SRWristTemperature {}
2697
2698extern_conformance!(
2699 unsafe impl NSCoding for SRWristTemperature {}
2700);
2701
2702extern_conformance!(
2703 unsafe impl NSCopying for SRWristTemperature {}
2704);
2705
2706unsafe impl CopyingHelper for SRWristTemperature {
2707 type Result = Self;
2708}
2709
2710extern_conformance!(
2711 unsafe impl NSObjectProtocol for SRWristTemperature {}
2712);
2713
2714extern_conformance!(
2715 unsafe impl NSSecureCoding for SRWristTemperature {}
2716);
2717
2718impl SRWristTemperature {
2719 extern_methods!(
2720 #[unsafe(method(init))]
2721 #[unsafe(method_family = init)]
2722 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
2723
2724 #[unsafe(method(new))]
2725 #[unsafe(method_family = new)]
2726 pub unsafe fn new() -> Retained<Self>;
2727
2728 #[unsafe(method(timestamp))]
2736 #[unsafe(method_family = none)]
2737 pub unsafe fn timestamp(&self) -> Retained<NSDate>;
2738
2739 #[unsafe(method(value))]
2747 #[unsafe(method_family = none)]
2748 pub unsafe fn value(&self) -> Retained<NSMeasurement<NSUnitTemperature>>;
2749
2750 #[unsafe(method(condition))]
2758 #[unsafe(method_family = none)]
2759 pub unsafe fn condition(&self) -> SRWristTemperatureCondition;
2760
2761 #[unsafe(method(errorEstimate))]
2770 #[unsafe(method_family = none)]
2771 pub unsafe fn errorEstimate(&self) -> Retained<NSMeasurement<NSUnitTemperature>>;
2772 );
2773}
2774
2775extern_class!(
2776 #[unsafe(super(NSObject))]
2778 #[derive(Debug, PartialEq, Eq, Hash)]
2779 pub struct SRWristTemperatureSession;
2780);
2781
2782unsafe impl Send for SRWristTemperatureSession {}
2783
2784unsafe impl Sync for SRWristTemperatureSession {}
2785
2786extern_conformance!(
2787 unsafe impl NSCoding for SRWristTemperatureSession {}
2788);
2789
2790extern_conformance!(
2791 unsafe impl NSCopying for SRWristTemperatureSession {}
2792);
2793
2794unsafe impl CopyingHelper for SRWristTemperatureSession {
2795 type Result = Self;
2796}
2797
2798extern_conformance!(
2799 unsafe impl NSObjectProtocol for SRWristTemperatureSession {}
2800);
2801
2802extern_conformance!(
2803 unsafe impl NSSecureCoding for SRWristTemperatureSession {}
2804);
2805
2806impl SRWristTemperatureSession {
2807 extern_methods!(
2808 #[unsafe(method(init))]
2809 #[unsafe(method_family = init)]
2810 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
2811
2812 #[unsafe(method(new))]
2813 #[unsafe(method_family = new)]
2814 pub unsafe fn new() -> Retained<Self>;
2815
2816 #[unsafe(method(startDate))]
2824 #[unsafe(method_family = none)]
2825 pub unsafe fn startDate(&self) -> Retained<NSDate>;
2826
2827 #[unsafe(method(duration))]
2835 #[unsafe(method_family = none)]
2836 pub unsafe fn duration(&self) -> NSTimeInterval;
2837
2838 #[unsafe(method(version))]
2846 #[unsafe(method_family = none)]
2847 pub unsafe fn version(&self) -> Retained<NSString>;
2848
2849 #[unsafe(method(temperatures))]
2858 #[unsafe(method_family = none)]
2859 pub unsafe fn temperatures(&self) -> Retained<NSEnumerator<SRWristTemperature>>;
2860 );
2861}
2862
2863#[repr(transparent)]
2866#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
2867pub struct SRMediaEventType(pub NSInteger);
2868impl SRMediaEventType {
2869 #[doc(alias = "SRMediaEventOnScreen")]
2870 pub const OnScreen: Self = Self(1);
2871 #[doc(alias = "SRMediaEventOffScreen")]
2872 pub const OffScreen: Self = Self(2);
2873}
2874
2875unsafe impl Encode for SRMediaEventType {
2876 const ENCODING: Encoding = NSInteger::ENCODING;
2877}
2878
2879unsafe impl RefEncode for SRMediaEventType {
2880 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
2881}
2882
2883extern_class!(
2884 #[unsafe(super(NSObject))]
2886 #[derive(Debug, PartialEq, Eq, Hash)]
2887 pub struct SRMediaEvent;
2888);
2889
2890unsafe impl Send for SRMediaEvent {}
2891
2892unsafe impl Sync for SRMediaEvent {}
2893
2894extern_conformance!(
2895 unsafe impl NSCoding for SRMediaEvent {}
2896);
2897
2898extern_conformance!(
2899 unsafe impl NSCopying for SRMediaEvent {}
2900);
2901
2902unsafe impl CopyingHelper for SRMediaEvent {
2903 type Result = Self;
2904}
2905
2906extern_conformance!(
2907 unsafe impl NSObjectProtocol for SRMediaEvent {}
2908);
2909
2910extern_conformance!(
2911 unsafe impl NSSecureCoding for SRMediaEvent {}
2912);
2913
2914impl SRMediaEvent {
2915 extern_methods!(
2916 #[unsafe(method(mediaIdentifier))]
2927 #[unsafe(method_family = none)]
2928 pub unsafe fn mediaIdentifier(&self) -> Retained<NSString>;
2929
2930 #[unsafe(method(eventType))]
2941 #[unsafe(method_family = none)]
2942 pub unsafe fn eventType(&self) -> SRMediaEventType;
2943 );
2944}
2945
2946impl SRMediaEvent {
2948 extern_methods!(
2949 #[unsafe(method(init))]
2950 #[unsafe(method_family = init)]
2951 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
2952
2953 #[unsafe(method(new))]
2954 #[unsafe(method_family = new)]
2955 pub unsafe fn new() -> Retained<Self>;
2956 );
2957}
2958
2959extern_class!(
2960 #[unsafe(super(NSObject))]
2962 #[derive(Debug, PartialEq, Eq, Hash)]
2963 pub struct SRSpeechExpression;
2964);
2965
2966unsafe impl Send for SRSpeechExpression {}
2967
2968unsafe impl Sync for SRSpeechExpression {}
2969
2970extern_conformance!(
2971 unsafe impl NSCoding for SRSpeechExpression {}
2972);
2973
2974extern_conformance!(
2975 unsafe impl NSCopying for SRSpeechExpression {}
2976);
2977
2978unsafe impl CopyingHelper for SRSpeechExpression {
2979 type Result = Self;
2980}
2981
2982extern_conformance!(
2983 unsafe impl NSObjectProtocol for SRSpeechExpression {}
2984);
2985
2986extern_conformance!(
2987 unsafe impl NSSecureCoding for SRSpeechExpression {}
2988);
2989
2990impl SRSpeechExpression {
2991 extern_methods!(
2992 #[unsafe(method(init))]
2993 #[unsafe(method_family = init)]
2994 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
2995
2996 #[unsafe(method(new))]
2997 #[unsafe(method_family = new)]
2998 pub unsafe fn new() -> Retained<Self>;
2999
3000 #[unsafe(method(version))]
3009 #[unsafe(method_family = none)]
3010 pub unsafe fn version(&self) -> Retained<NSString>;
3011
3012 #[cfg(feature = "objc2-core-media")]
3013 #[unsafe(method(timeRange))]
3022 #[unsafe(method_family = none)]
3023 pub unsafe fn timeRange(&self) -> CMTimeRange;
3024
3025 #[unsafe(method(confidence))]
3033 #[unsafe(method_family = none)]
3034 pub unsafe fn confidence(&self) -> c_double;
3035
3036 #[unsafe(method(mood))]
3048 #[unsafe(method_family = none)]
3049 pub unsafe fn mood(&self) -> c_double;
3050
3051 #[unsafe(method(valence))]
3063 #[unsafe(method_family = none)]
3064 pub unsafe fn valence(&self) -> c_double;
3065
3066 #[unsafe(method(activation))]
3078 #[unsafe(method_family = none)]
3079 pub unsafe fn activation(&self) -> c_double;
3080
3081 #[unsafe(method(dominance))]
3093 #[unsafe(method_family = none)]
3094 pub unsafe fn dominance(&self) -> c_double;
3095 );
3096}
3097
3098extern_class!(
3099 #[unsafe(super(NSObject))]
3101 #[derive(Debug, PartialEq, Eq, Hash)]
3102 pub struct SRAudioLevel;
3103);
3104
3105unsafe impl Send for SRAudioLevel {}
3106
3107unsafe impl Sync for SRAudioLevel {}
3108
3109extern_conformance!(
3110 unsafe impl NSCoding for SRAudioLevel {}
3111);
3112
3113extern_conformance!(
3114 unsafe impl NSCopying for SRAudioLevel {}
3115);
3116
3117unsafe impl CopyingHelper for SRAudioLevel {
3118 type Result = Self;
3119}
3120
3121extern_conformance!(
3122 unsafe impl NSObjectProtocol for SRAudioLevel {}
3123);
3124
3125extern_conformance!(
3126 unsafe impl NSSecureCoding for SRAudioLevel {}
3127);
3128
3129impl SRAudioLevel {
3130 extern_methods!(
3131 #[unsafe(method(init))]
3132 #[unsafe(method_family = init)]
3133 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
3134
3135 #[unsafe(method(new))]
3136 #[unsafe(method_family = new)]
3137 pub unsafe fn new() -> Retained<Self>;
3138
3139 #[cfg(feature = "objc2-core-media")]
3140 #[unsafe(method(timeRange))]
3149 #[unsafe(method_family = none)]
3150 pub unsafe fn timeRange(&self) -> CMTimeRange;
3151
3152 #[unsafe(method(loudness))]
3160 #[unsafe(method_family = none)]
3161 pub unsafe fn loudness(&self) -> c_double;
3162 );
3163}
3164
3165#[repr(transparent)]
3179#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
3180pub struct SRSpeechMetricsSessionFlags(pub NSUInteger);
3181bitflags::bitflags! {
3182 impl SRSpeechMetricsSessionFlags: NSUInteger {
3183 #[doc(alias = "SRSpeechMetricsSessionFlagsDefault")]
3184 const Default = 0;
3185 #[doc(alias = "SRSpeechMetricsSessionFlagsBypassVoiceProcessing")]
3186 const BypassVoiceProcessing = 1<<0;
3187 }
3188}
3189
3190unsafe impl Encode for SRSpeechMetricsSessionFlags {
3191 const ENCODING: Encoding = NSUInteger::ENCODING;
3192}
3193
3194unsafe impl RefEncode for SRSpeechMetricsSessionFlags {
3195 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3196}
3197
3198extern_class!(
3199 #[unsafe(super(NSObject))]
3201 #[derive(Debug, PartialEq, Eq, Hash)]
3202 pub struct SRSpeechMetrics;
3203);
3204
3205unsafe impl Send for SRSpeechMetrics {}
3206
3207unsafe impl Sync for SRSpeechMetrics {}
3208
3209extern_conformance!(
3210 unsafe impl NSCoding for SRSpeechMetrics {}
3211);
3212
3213extern_conformance!(
3214 unsafe impl NSCopying for SRSpeechMetrics {}
3215);
3216
3217unsafe impl CopyingHelper for SRSpeechMetrics {
3218 type Result = Self;
3219}
3220
3221extern_conformance!(
3222 unsafe impl NSObjectProtocol for SRSpeechMetrics {}
3223);
3224
3225extern_conformance!(
3226 unsafe impl NSSecureCoding for SRSpeechMetrics {}
3227);
3228
3229impl SRSpeechMetrics {
3230 extern_methods!(
3231 #[unsafe(method(init))]
3232 #[unsafe(method_family = init)]
3233 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
3234
3235 #[unsafe(method(new))]
3236 #[unsafe(method_family = new)]
3237 pub unsafe fn new() -> Retained<Self>;
3238
3239 #[unsafe(method(sessionIdentifier))]
3247 #[unsafe(method_family = none)]
3248 pub unsafe fn sessionIdentifier(&self) -> Retained<NSString>;
3249
3250 #[unsafe(method(sessionFlags))]
3256 #[unsafe(method_family = none)]
3257 pub unsafe fn sessionFlags(&self) -> SRSpeechMetricsSessionFlags;
3258
3259 #[unsafe(method(timestamp))]
3267 #[unsafe(method_family = none)]
3268 pub unsafe fn timestamp(&self) -> Retained<NSDate>;
3269
3270 #[unsafe(method(timeSinceAudioStart))]
3283 #[unsafe(method_family = none)]
3284 pub unsafe fn timeSinceAudioStart(&self) -> NSTimeInterval;
3285
3286 #[unsafe(method(audioLevel))]
3292 #[unsafe(method_family = none)]
3293 pub unsafe fn audioLevel(&self) -> Option<Retained<SRAudioLevel>>;
3294
3295 #[cfg(feature = "objc2-speech")]
3296 #[unsafe(method(speechRecognition))]
3302 #[unsafe(method_family = none)]
3303 pub unsafe fn speechRecognition(&self) -> Option<Retained<SFSpeechRecognitionResult>>;
3304
3305 #[cfg(feature = "objc2-sound-analysis")]
3306 #[unsafe(method(soundClassification))]
3312 #[unsafe(method_family = none)]
3313 pub unsafe fn soundClassification(&self) -> Option<Retained<SNClassificationResult>>;
3314
3315 #[unsafe(method(speechExpression))]
3321 #[unsafe(method_family = none)]
3322 pub unsafe fn speechExpression(&self) -> Option<Retained<SRSpeechExpression>>;
3323 );
3324}
3325
3326#[repr(transparent)]
3329#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
3330pub struct SRFaceMetricsContext(pub NSUInteger);
3331bitflags::bitflags! {
3332 impl SRFaceMetricsContext: NSUInteger {
3333 #[doc(alias = "SRFaceMetricsContextDeviceUnlock")]
3334 const DeviceUnlock = 1<<0;
3335 #[doc(alias = "SRFaceMetricsContextMessagingAppUsage")]
3336 const MessagingAppUsage = 1<<1;
3337 }
3338}
3339
3340unsafe impl Encode for SRFaceMetricsContext {
3341 const ENCODING: Encoding = NSUInteger::ENCODING;
3342}
3343
3344unsafe impl RefEncode for SRFaceMetricsContext {
3345 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3346}
3347
3348extern_class!(
3349 #[unsafe(super(NSObject))]
3351 #[derive(Debug, PartialEq, Eq, Hash)]
3352 pub struct SRFaceMetricsExpression;
3353);
3354
3355unsafe impl Send for SRFaceMetricsExpression {}
3356
3357unsafe impl Sync for SRFaceMetricsExpression {}
3358
3359extern_conformance!(
3360 unsafe impl NSCoding for SRFaceMetricsExpression {}
3361);
3362
3363extern_conformance!(
3364 unsafe impl NSCopying for SRFaceMetricsExpression {}
3365);
3366
3367unsafe impl CopyingHelper for SRFaceMetricsExpression {
3368 type Result = Self;
3369}
3370
3371extern_conformance!(
3372 unsafe impl NSObjectProtocol for SRFaceMetricsExpression {}
3373);
3374
3375extern_conformance!(
3376 unsafe impl NSSecureCoding for SRFaceMetricsExpression {}
3377);
3378
3379impl SRFaceMetricsExpression {
3380 extern_methods!(
3381 #[unsafe(method(init))]
3382 #[unsafe(method_family = init)]
3383 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
3384
3385 #[unsafe(method(new))]
3386 #[unsafe(method_family = new)]
3387 pub unsafe fn new() -> Retained<Self>;
3388
3389 #[unsafe(method(identifier))]
3399 #[unsafe(method_family = none)]
3400 pub unsafe fn identifier(&self) -> Retained<NSString>;
3401
3402 #[unsafe(method(value))]
3410 #[unsafe(method_family = none)]
3411 pub unsafe fn value(&self) -> c_double;
3412 );
3413}
3414
3415extern_class!(
3416 #[unsafe(super(NSObject))]
3418 #[derive(Debug, PartialEq, Eq, Hash)]
3419 pub struct SRFaceMetrics;
3420);
3421
3422unsafe impl Send for SRFaceMetrics {}
3423
3424unsafe impl Sync for SRFaceMetrics {}
3425
3426extern_conformance!(
3427 unsafe impl NSCoding for SRFaceMetrics {}
3428);
3429
3430extern_conformance!(
3431 unsafe impl NSCopying for SRFaceMetrics {}
3432);
3433
3434unsafe impl CopyingHelper for SRFaceMetrics {
3435 type Result = Self;
3436}
3437
3438extern_conformance!(
3439 unsafe impl NSObjectProtocol for SRFaceMetrics {}
3440);
3441
3442extern_conformance!(
3443 unsafe impl NSSecureCoding for SRFaceMetrics {}
3444);
3445
3446impl SRFaceMetrics {
3447 extern_methods!(
3448 #[unsafe(method(init))]
3449 #[unsafe(method_family = init)]
3450 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
3451
3452 #[unsafe(method(new))]
3453 #[unsafe(method_family = new)]
3454 pub unsafe fn new() -> Retained<Self>;
3455
3456 #[unsafe(method(version))]
3464 #[unsafe(method_family = none)]
3465 pub unsafe fn version(&self) -> Retained<NSString>;
3466
3467 #[unsafe(method(sessionIdentifier))]
3475 #[unsafe(method_family = none)]
3476 pub unsafe fn sessionIdentifier(&self) -> Retained<NSString>;
3477
3478 #[unsafe(method(context))]
3486 #[unsafe(method_family = none)]
3487 pub unsafe fn context(&self) -> SRFaceMetricsContext;
3488
3489 #[cfg(feature = "objc2-ar-kit")]
3490 #[unsafe(method(faceAnchor))]
3496 #[unsafe(method_family = none)]
3497 pub unsafe fn faceAnchor(&self) -> Retained<ARFaceAnchor>;
3498
3499 #[unsafe(method(wholeFaceExpressions))]
3507 #[unsafe(method_family = none)]
3508 pub unsafe fn wholeFaceExpressions(&self) -> Retained<NSArray<SRFaceMetricsExpression>>;
3509
3510 #[unsafe(method(partialFaceExpressions))]
3518 #[unsafe(method_family = none)]
3519 pub unsafe fn partialFaceExpressions(&self) -> Retained<NSArray<SRFaceMetricsExpression>>;
3520 );
3521}
3522
3523#[repr(transparent)]
3528#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
3529pub struct SRElectrocardiogramSessionState(pub NSInteger);
3530impl SRElectrocardiogramSessionState {
3531 #[doc(alias = "SRElectrocardiogramSessionStateBegin")]
3532 pub const Begin: Self = Self(1);
3533 #[doc(alias = "SRElectrocardiogramSessionStateActive")]
3534 pub const Active: Self = Self(2);
3535 #[doc(alias = "SRElectrocardiogramSessionStateEnd")]
3536 pub const End: Self = Self(3);
3537}
3538
3539unsafe impl Encode for SRElectrocardiogramSessionState {
3540 const ENCODING: Encoding = NSInteger::ENCODING;
3541}
3542
3543unsafe impl RefEncode for SRElectrocardiogramSessionState {
3544 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3545}
3546
3547#[repr(transparent)]
3560#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
3561pub struct SRElectrocardiogramSessionGuidance(pub NSInteger);
3562impl SRElectrocardiogramSessionGuidance {
3563 #[doc(alias = "SRElectrocardiogramSessionGuidanceGuided")]
3564 pub const Guided: Self = Self(1);
3565 #[doc(alias = "SRElectrocardiogramSessionGuidanceUnguided")]
3566 pub const Unguided: Self = Self(2);
3567}
3568
3569unsafe impl Encode for SRElectrocardiogramSessionGuidance {
3570 const ENCODING: Encoding = NSInteger::ENCODING;
3571}
3572
3573unsafe impl RefEncode for SRElectrocardiogramSessionGuidance {
3574 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3575}
3576
3577extern_class!(
3578 #[unsafe(super(NSObject))]
3580 #[derive(Debug, PartialEq, Eq, Hash)]
3581 pub struct SRElectrocardiogramSession;
3582);
3583
3584unsafe impl Send for SRElectrocardiogramSession {}
3585
3586unsafe impl Sync for SRElectrocardiogramSession {}
3587
3588extern_conformance!(
3589 unsafe impl NSCoding for SRElectrocardiogramSession {}
3590);
3591
3592extern_conformance!(
3593 unsafe impl NSCopying for SRElectrocardiogramSession {}
3594);
3595
3596unsafe impl CopyingHelper for SRElectrocardiogramSession {
3597 type Result = Self;
3598}
3599
3600extern_conformance!(
3601 unsafe impl NSObjectProtocol for SRElectrocardiogramSession {}
3602);
3603
3604extern_conformance!(
3605 unsafe impl NSSecureCoding for SRElectrocardiogramSession {}
3606);
3607
3608impl SRElectrocardiogramSession {
3609 extern_methods!(
3610 #[unsafe(method(init))]
3611 #[unsafe(method_family = init)]
3612 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
3613
3614 #[unsafe(method(new))]
3615 #[unsafe(method_family = new)]
3616 pub unsafe fn new() -> Retained<Self>;
3617
3618 #[unsafe(method(state))]
3626 #[unsafe(method_family = none)]
3627 pub unsafe fn state(&self) -> SRElectrocardiogramSessionState;
3628
3629 #[unsafe(method(sessionGuidance))]
3637 #[unsafe(method_family = none)]
3638 pub unsafe fn sessionGuidance(&self) -> SRElectrocardiogramSessionGuidance;
3639
3640 #[unsafe(method(identifier))]
3649 #[unsafe(method_family = none)]
3650 pub unsafe fn identifier(&self) -> Retained<NSString>;
3651 );
3652}
3653
3654#[repr(transparent)]
3664#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
3665pub struct SRElectrocardiogramDataFlags(pub NSUInteger);
3666bitflags::bitflags! {
3667 impl SRElectrocardiogramDataFlags: NSUInteger {
3668 #[doc(alias = "SRElectrocardiogramDataFlagsNone")]
3669 const None = 0;
3670#[doc(alias = "SRElectrocardiogramDataFlagsSignalInvalid")]
3672 const SignalInvalid = 1<<0;
3673#[doc(alias = "SRElectrocardiogramDataFlagsCrownTouched")]
3675 const CrownTouched = 1<<1;
3676 }
3677}
3678
3679unsafe impl Encode for SRElectrocardiogramDataFlags {
3680 const ENCODING: Encoding = NSUInteger::ENCODING;
3681}
3682
3683unsafe impl RefEncode for SRElectrocardiogramDataFlags {
3684 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3685}
3686
3687extern_class!(
3688 #[unsafe(super(NSObject))]
3690 #[derive(Debug, PartialEq, Eq, Hash)]
3691 pub struct SRElectrocardiogramData;
3692);
3693
3694unsafe impl Send for SRElectrocardiogramData {}
3695
3696unsafe impl Sync for SRElectrocardiogramData {}
3697
3698extern_conformance!(
3699 unsafe impl NSCoding for SRElectrocardiogramData {}
3700);
3701
3702extern_conformance!(
3703 unsafe impl NSCopying for SRElectrocardiogramData {}
3704);
3705
3706unsafe impl CopyingHelper for SRElectrocardiogramData {
3707 type Result = Self;
3708}
3709
3710extern_conformance!(
3711 unsafe impl NSObjectProtocol for SRElectrocardiogramData {}
3712);
3713
3714extern_conformance!(
3715 unsafe impl NSSecureCoding for SRElectrocardiogramData {}
3716);
3717
3718impl SRElectrocardiogramData {
3719 extern_methods!(
3720 #[unsafe(method(init))]
3721 #[unsafe(method_family = init)]
3722 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
3723
3724 #[unsafe(method(new))]
3725 #[unsafe(method_family = new)]
3726 pub unsafe fn new() -> Retained<Self>;
3727
3728 #[unsafe(method(flags))]
3734 #[unsafe(method_family = none)]
3735 pub unsafe fn flags(&self) -> SRElectrocardiogramDataFlags;
3736
3737 #[unsafe(method(value))]
3745 #[unsafe(method_family = none)]
3746 pub unsafe fn value(&self) -> Retained<NSMeasurement<NSUnitElectricPotentialDifference>>;
3747 );
3748}
3749
3750#[repr(transparent)]
3755#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
3756pub struct SRElectrocardiogramLead(pub NSInteger);
3757impl SRElectrocardiogramLead {
3758 #[doc(alias = "SRElectrocardiogramLeadRightArmMinusLeftArm")]
3759 pub const RightArmMinusLeftArm: Self = Self(1);
3760 #[doc(alias = "SRElectrocardiogramLeadLeftArmMinusRightArm")]
3761 pub const LeftArmMinusRightArm: Self = Self(2);
3762}
3763
3764unsafe impl Encode for SRElectrocardiogramLead {
3765 const ENCODING: Encoding = NSInteger::ENCODING;
3766}
3767
3768unsafe impl RefEncode for SRElectrocardiogramLead {
3769 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
3770}
3771
3772extern_class!(
3773 #[unsafe(super(NSObject))]
3775 #[derive(Debug, PartialEq, Eq, Hash)]
3776 pub struct SRElectrocardiogramSample;
3777);
3778
3779unsafe impl Send for SRElectrocardiogramSample {}
3780
3781unsafe impl Sync for SRElectrocardiogramSample {}
3782
3783extern_conformance!(
3784 unsafe impl NSCoding for SRElectrocardiogramSample {}
3785);
3786
3787extern_conformance!(
3788 unsafe impl NSCopying for SRElectrocardiogramSample {}
3789);
3790
3791unsafe impl CopyingHelper for SRElectrocardiogramSample {
3792 type Result = Self;
3793}
3794
3795extern_conformance!(
3796 unsafe impl NSObjectProtocol for SRElectrocardiogramSample {}
3797);
3798
3799extern_conformance!(
3800 unsafe impl NSSecureCoding for SRElectrocardiogramSample {}
3801);
3802
3803impl SRElectrocardiogramSample {
3804 extern_methods!(
3805 #[unsafe(method(init))]
3806 #[unsafe(method_family = init)]
3807 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
3808
3809 #[unsafe(method(new))]
3810 #[unsafe(method_family = new)]
3811 pub unsafe fn new() -> Retained<Self>;
3812
3813 #[unsafe(method(date))]
3821 #[unsafe(method_family = none)]
3822 pub unsafe fn date(&self) -> Retained<NSDate>;
3823
3824 #[unsafe(method(frequency))]
3832 #[unsafe(method_family = none)]
3833 pub unsafe fn frequency(&self) -> Retained<NSMeasurement<NSUnitFrequency>>;
3834
3835 #[unsafe(method(session))]
3843 #[unsafe(method_family = none)]
3844 pub unsafe fn session(&self) -> Retained<SRElectrocardiogramSession>;
3845
3846 #[unsafe(method(lead))]
3852 #[unsafe(method_family = none)]
3853 pub unsafe fn lead(&self) -> SRElectrocardiogramLead;
3854
3855 #[unsafe(method(data))]
3861 #[unsafe(method_family = none)]
3862 pub unsafe fn data(&self) -> Retained<NSArray<SRElectrocardiogramData>>;
3863 );
3864}
3865
3866pub type SRPhotoplethysmogramOpticalSampleCondition = NSString;
3869
3870extern "C" {
3871 pub static SRPhotoplethysmogramOpticalSampleConditionSignalSaturation:
3873 &'static SRPhotoplethysmogramOpticalSampleCondition;
3874}
3875
3876extern "C" {
3877 pub static SRPhotoplethysmogramOpticalSampleConditionUnreliableNoise:
3879 &'static SRPhotoplethysmogramOpticalSampleCondition;
3880}
3881
3882extern_class!(
3883 #[unsafe(super(NSObject))]
3885 #[derive(Debug, PartialEq, Eq, Hash)]
3886 pub struct SRPhotoplethysmogramOpticalSample;
3887);
3888
3889unsafe impl Send for SRPhotoplethysmogramOpticalSample {}
3890
3891unsafe impl Sync for SRPhotoplethysmogramOpticalSample {}
3892
3893extern_conformance!(
3894 unsafe impl NSCoding for SRPhotoplethysmogramOpticalSample {}
3895);
3896
3897extern_conformance!(
3898 unsafe impl NSCopying for SRPhotoplethysmogramOpticalSample {}
3899);
3900
3901unsafe impl CopyingHelper for SRPhotoplethysmogramOpticalSample {
3902 type Result = Self;
3903}
3904
3905extern_conformance!(
3906 unsafe impl NSObjectProtocol for SRPhotoplethysmogramOpticalSample {}
3907);
3908
3909extern_conformance!(
3910 unsafe impl NSSecureCoding for SRPhotoplethysmogramOpticalSample {}
3911);
3912
3913impl SRPhotoplethysmogramOpticalSample {
3914 extern_methods!(
3915 #[unsafe(method(init))]
3916 #[unsafe(method_family = init)]
3917 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
3918
3919 #[unsafe(method(new))]
3920 #[unsafe(method_family = new)]
3921 pub unsafe fn new() -> Retained<Self>;
3922
3923 #[unsafe(method(emitter))]
3931 #[unsafe(method_family = none)]
3932 pub unsafe fn emitter(&self) -> NSInteger;
3933
3934 #[unsafe(method(activePhotodiodeIndexes))]
3942 #[unsafe(method_family = none)]
3943 pub unsafe fn activePhotodiodeIndexes(&self) -> Retained<NSIndexSet>;
3944
3945 #[unsafe(method(signalIdentifier))]
3960 #[unsafe(method_family = none)]
3961 pub unsafe fn signalIdentifier(&self) -> NSInteger;
3962
3963 #[unsafe(method(nominalWavelength))]
3972 #[unsafe(method_family = none)]
3973 pub unsafe fn nominalWavelength(&self) -> Retained<NSMeasurement<NSUnitLength>>;
3974
3975 #[unsafe(method(effectiveWavelength))]
3983 #[unsafe(method_family = none)]
3984 pub unsafe fn effectiveWavelength(&self) -> Retained<NSMeasurement<NSUnitLength>>;
3985
3986 #[unsafe(method(samplingFrequency))]
3994 #[unsafe(method_family = none)]
3995 pub unsafe fn samplingFrequency(&self) -> Retained<NSMeasurement<NSUnitFrequency>>;
3996
3997 #[unsafe(method(nanosecondsSinceStart))]
4007 #[unsafe(method_family = none)]
4008 pub unsafe fn nanosecondsSinceStart(&self) -> i64;
4009
4010 #[unsafe(method(normalizedReflectance))]
4022 #[unsafe(method_family = none)]
4023 pub unsafe fn normalizedReflectance(&self) -> Option<Retained<NSNumber>>;
4024
4025 #[unsafe(method(whiteNoise))]
4037 #[unsafe(method_family = none)]
4038 pub unsafe fn whiteNoise(&self) -> Option<Retained<NSNumber>>;
4039
4040 #[unsafe(method(pinkNoise))]
4052 #[unsafe(method_family = none)]
4053 pub unsafe fn pinkNoise(&self) -> Option<Retained<NSNumber>>;
4054
4055 #[unsafe(method(backgroundNoise))]
4067 #[unsafe(method_family = none)]
4068 pub unsafe fn backgroundNoise(&self) -> Option<Retained<NSNumber>>;
4069
4070 #[unsafe(method(backgroundNoiseOffset))]
4085 #[unsafe(method_family = none)]
4086 pub unsafe fn backgroundNoiseOffset(&self) -> Option<Retained<NSNumber>>;
4087
4088 #[unsafe(method(conditions))]
4101 #[unsafe(method_family = none)]
4102 pub unsafe fn conditions(
4103 &self,
4104 ) -> Retained<NSArray<SRPhotoplethysmogramOpticalSampleCondition>>;
4105 );
4106}
4107
4108extern_class!(
4109 #[unsafe(super(NSObject))]
4111 #[derive(Debug, PartialEq, Eq, Hash)]
4112 pub struct SRPhotoplethysmogramAccelerometerSample;
4113);
4114
4115unsafe impl Send for SRPhotoplethysmogramAccelerometerSample {}
4116
4117unsafe impl Sync for SRPhotoplethysmogramAccelerometerSample {}
4118
4119extern_conformance!(
4120 unsafe impl NSCoding for SRPhotoplethysmogramAccelerometerSample {}
4121);
4122
4123extern_conformance!(
4124 unsafe impl NSCopying for SRPhotoplethysmogramAccelerometerSample {}
4125);
4126
4127unsafe impl CopyingHelper for SRPhotoplethysmogramAccelerometerSample {
4128 type Result = Self;
4129}
4130
4131extern_conformance!(
4132 unsafe impl NSObjectProtocol for SRPhotoplethysmogramAccelerometerSample {}
4133);
4134
4135extern_conformance!(
4136 unsafe impl NSSecureCoding for SRPhotoplethysmogramAccelerometerSample {}
4137);
4138
4139impl SRPhotoplethysmogramAccelerometerSample {
4140 extern_methods!(
4141 #[unsafe(method(init))]
4142 #[unsafe(method_family = init)]
4143 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
4144
4145 #[unsafe(method(new))]
4146 #[unsafe(method_family = new)]
4147 pub unsafe fn new() -> Retained<Self>;
4148
4149 #[unsafe(method(nanosecondsSinceStart))]
4159 #[unsafe(method_family = none)]
4160 pub unsafe fn nanosecondsSinceStart(&self) -> i64;
4161
4162 #[unsafe(method(samplingFrequency))]
4170 #[unsafe(method_family = none)]
4171 pub unsafe fn samplingFrequency(&self) -> Retained<NSMeasurement<NSUnitFrequency>>;
4172
4173 #[unsafe(method(x))]
4181 #[unsafe(method_family = none)]
4182 pub unsafe fn x(&self) -> Retained<NSMeasurement<NSUnitAcceleration>>;
4183
4184 #[unsafe(method(y))]
4192 #[unsafe(method_family = none)]
4193 pub unsafe fn y(&self) -> Retained<NSMeasurement<NSUnitAcceleration>>;
4194
4195 #[unsafe(method(z))]
4203 #[unsafe(method_family = none)]
4204 pub unsafe fn z(&self) -> Retained<NSMeasurement<NSUnitAcceleration>>;
4205 );
4206}
4207
4208pub type SRPhotoplethysmogramSampleUsage = NSString;
4211
4212extern "C" {
4213 pub static SRPhotoplethysmogramSampleUsageForegroundHeartRate:
4220 &'static SRPhotoplethysmogramSampleUsage;
4221}
4222
4223extern "C" {
4224 pub static SRPhotoplethysmogramSampleUsageDeepBreathing:
4232 &'static SRPhotoplethysmogramSampleUsage;
4233}
4234
4235extern "C" {
4236 pub static SRPhotoplethysmogramSampleUsageForegroundBloodOxygen:
4243 &'static SRPhotoplethysmogramSampleUsage;
4244}
4245
4246extern "C" {
4247 pub static SRPhotoplethysmogramSampleUsageBackgroundSystem:
4255 &'static SRPhotoplethysmogramSampleUsage;
4256}
4257
4258extern_class!(
4259 #[unsafe(super(NSObject))]
4261 #[derive(Debug, PartialEq, Eq, Hash)]
4262 pub struct SRPhotoplethysmogramSample;
4263);
4264
4265unsafe impl Send for SRPhotoplethysmogramSample {}
4266
4267unsafe impl Sync for SRPhotoplethysmogramSample {}
4268
4269extern_conformance!(
4270 unsafe impl NSCoding for SRPhotoplethysmogramSample {}
4271);
4272
4273extern_conformance!(
4274 unsafe impl NSCopying for SRPhotoplethysmogramSample {}
4275);
4276
4277unsafe impl CopyingHelper for SRPhotoplethysmogramSample {
4278 type Result = Self;
4279}
4280
4281extern_conformance!(
4282 unsafe impl NSObjectProtocol for SRPhotoplethysmogramSample {}
4283);
4284
4285extern_conformance!(
4286 unsafe impl NSSecureCoding for SRPhotoplethysmogramSample {}
4287);
4288
4289impl SRPhotoplethysmogramSample {
4290 extern_methods!(
4291 #[unsafe(method(init))]
4292 #[unsafe(method_family = init)]
4293 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
4294
4295 #[unsafe(method(new))]
4296 #[unsafe(method_family = new)]
4297 pub unsafe fn new() -> Retained<Self>;
4298
4299 #[unsafe(method(startDate))]
4307 #[unsafe(method_family = none)]
4308 pub unsafe fn startDate(&self) -> Retained<NSDate>;
4309
4310 #[unsafe(method(nanosecondsSinceStart))]
4318 #[unsafe(method_family = none)]
4319 pub unsafe fn nanosecondsSinceStart(&self) -> i64;
4320
4321 #[unsafe(method(usage))]
4332 #[unsafe(method_family = none)]
4333 pub unsafe fn usage(&self) -> Retained<NSArray<SRPhotoplethysmogramSampleUsage>>;
4334
4335 #[unsafe(method(opticalSamples))]
4341 #[unsafe(method_family = none)]
4342 pub unsafe fn opticalSamples(&self)
4343 -> Retained<NSArray<SRPhotoplethysmogramOpticalSample>>;
4344
4345 #[unsafe(method(accelerometerSamples))]
4351 #[unsafe(method_family = none)]
4352 pub unsafe fn accelerometerSamples(
4353 &self,
4354 ) -> Retained<NSArray<SRPhotoplethysmogramAccelerometerSample>>;
4355
4356 #[unsafe(method(temperature))]
4368 #[unsafe(method_family = none)]
4369 pub unsafe fn temperature(&self) -> Option<Retained<NSMeasurement<NSUnitTemperature>>>;
4370 );
4371}
4372
4373#[repr(transparent)]
4376#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
4377pub struct SRAcousticSettingsSampleLifetime(pub NSInteger);
4378impl SRAcousticSettingsSampleLifetime {
4379 #[doc(alias = "SRAcousticSettingsSampleLifetimeEightDays")]
4380 pub const EightDays: Self = Self(1);
4381 #[doc(alias = "SRAcousticSettingsSampleLifetimeUntilUserDeletes")]
4382 pub const UntilUserDeletes: Self = Self(2);
4383}
4384
4385unsafe impl Encode for SRAcousticSettingsSampleLifetime {
4386 const ENCODING: Encoding = NSInteger::ENCODING;
4387}
4388
4389unsafe impl RefEncode for SRAcousticSettingsSampleLifetime {
4390 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
4391}
4392
4393#[repr(transparent)]
4396#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
4397pub struct SRAcousticSettingsAccessibilityBackgroundSoundsName(pub NSInteger);
4398impl SRAcousticSettingsAccessibilityBackgroundSoundsName {
4399 #[doc(alias = "SRAcousticSettingsAccessibilityBackgroundSoundsNameBalancedNoise")]
4400 pub const BalancedNoise: Self = Self(1);
4401 #[doc(alias = "SRAcousticSettingsAccessibilityBackgroundSoundsNameBrightNoise")]
4402 pub const BrightNoise: Self = Self(2);
4403 #[doc(alias = "SRAcousticSettingsAccessibilityBackgroundSoundsNameDarkNoise")]
4404 pub const DarkNoise: Self = Self(3);
4405 #[doc(alias = "SRAcousticSettingsAccessibilityBackgroundSoundsNameOcean")]
4406 pub const Ocean: Self = Self(4);
4407 #[doc(alias = "SRAcousticSettingsAccessibilityBackgroundSoundsNameRain")]
4408 pub const Rain: Self = Self(5);
4409 #[doc(alias = "SRAcousticSettingsAccessibilityBackgroundSoundsNameStream")]
4410 pub const Stream: Self = Self(6);
4411 #[doc(alias = "SRAcousticSettingsAccessibilityBackgroundSoundsNameNight")]
4412 pub const Night: Self = Self(7);
4413 #[doc(alias = "SRAcousticSettingsAccessibilityBackgroundSoundsNameFire")]
4414 pub const Fire: Self = Self(8);
4415 #[doc(alias = "SRAcousticSettingsAccessibilityBackgroundSoundsNameBabble")]
4416 pub const Babble: Self = Self(9);
4417 #[doc(alias = "SRAcousticSettingsAccessibilityBackgroundSoundsNameSteam")]
4418 pub const Steam: Self = Self(10);
4419 #[doc(alias = "SRAcousticSettingsAccessibilityBackgroundSoundsNameAirplane")]
4420 pub const Airplane: Self = Self(11);
4421 #[doc(alias = "SRAcousticSettingsAccessibilityBackgroundSoundsNameBoat")]
4422 pub const Boat: Self = Self(12);
4423 #[doc(alias = "SRAcousticSettingsAccessibilityBackgroundSoundsNameBus")]
4424 pub const Bus: Self = Self(13);
4425 #[doc(alias = "SRAcousticSettingsAccessibilityBackgroundSoundsNameTrain")]
4426 pub const Train: Self = Self(14);
4427 #[doc(alias = "SRAcousticSettingsAccessibilityBackgroundSoundsNameRainOnRoof")]
4428 pub const RainOnRoof: Self = Self(15);
4429 #[doc(alias = "SRAcousticSettingsAccessibilityBackgroundSoundsNameQuietNight")]
4430 pub const QuietNight: Self = Self(16);
4431}
4432
4433unsafe impl Encode for SRAcousticSettingsAccessibilityBackgroundSoundsName {
4434 const ENCODING: Encoding = NSInteger::ENCODING;
4435}
4436
4437unsafe impl RefEncode for SRAcousticSettingsAccessibilityBackgroundSoundsName {
4438 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
4439}
4440
4441#[repr(transparent)]
4444#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
4445pub struct SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceTuning(pub NSInteger);
4446impl SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceTuning {
4447 #[doc(
4448 alias = "SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceTuningBalancedTone"
4449 )]
4450 pub const BalancedTone: Self = Self(1);
4451 #[doc(
4452 alias = "SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceTuningVocalRange"
4453 )]
4454 pub const VocalRange: Self = Self(2);
4455 #[doc(
4456 alias = "SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceTuningBrightness"
4457 )]
4458 pub const Brightness: Self = Self(3);
4459}
4460
4461unsafe impl Encode for SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceTuning {
4462 const ENCODING: Encoding = NSInteger::ENCODING;
4463}
4464
4465unsafe impl RefEncode for SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceTuning {
4466 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
4467}
4468
4469#[repr(transparent)]
4472#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
4473pub struct SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceBoosting(
4474 pub NSInteger,
4475);
4476impl SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceBoosting {
4477 #[doc(
4478 alias = "SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceBoostingSlight"
4479 )]
4480 pub const Slight: Self = Self(1);
4481 #[doc(
4482 alias = "SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceBoostingModerate"
4483 )]
4484 pub const Moderate: Self = Self(2);
4485 #[doc(
4486 alias = "SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceBoostingStrong"
4487 )]
4488 pub const Strong: Self = Self(3);
4489}
4490
4491unsafe impl Encode for SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceBoosting {
4492 const ENCODING: Encoding = NSInteger::ENCODING;
4493}
4494
4495unsafe impl RefEncode
4496 for SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceBoosting
4497{
4498 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
4499}
4500
4501#[repr(transparent)]
4504#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
4505pub struct SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceApplication(
4506 pub NSInteger,
4507);
4508impl SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceApplication {
4509 #[doc(
4510 alias = "SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceApplicationNone"
4511 )]
4512 pub const None: Self = Self(1);
4513 #[doc(
4514 alias = "SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceApplicationPhone"
4515 )]
4516 pub const Phone: Self = Self(2);
4517 #[doc(
4518 alias = "SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceApplicationMedia"
4519 )]
4520 pub const Media: Self = Self(3);
4521 #[doc(
4522 alias = "SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceApplicationPhoneAndMedia"
4523 )]
4524 pub const PhoneAndMedia: Self = Self(4);
4525}
4526
4527unsafe impl Encode
4528 for SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceApplication
4529{
4530 const ENCODING: Encoding = NSInteger::ENCODING;
4531}
4532
4533unsafe impl RefEncode
4534 for SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceApplication
4535{
4536 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
4537}
4538
4539extern_class!(
4540 #[unsafe(super(NSObject))]
4542 #[derive(Debug, PartialEq, Eq, Hash)]
4543 pub struct SRAcousticSettingsMusicEQ;
4544);
4545
4546unsafe impl Send for SRAcousticSettingsMusicEQ {}
4547
4548unsafe impl Sync for SRAcousticSettingsMusicEQ {}
4549
4550extern_conformance!(
4551 unsafe impl NSCoding for SRAcousticSettingsMusicEQ {}
4552);
4553
4554extern_conformance!(
4555 unsafe impl NSCopying for SRAcousticSettingsMusicEQ {}
4556);
4557
4558unsafe impl CopyingHelper for SRAcousticSettingsMusicEQ {
4559 type Result = Self;
4560}
4561
4562extern_conformance!(
4563 unsafe impl NSObjectProtocol for SRAcousticSettingsMusicEQ {}
4564);
4565
4566extern_conformance!(
4567 unsafe impl NSSecureCoding for SRAcousticSettingsMusicEQ {}
4568);
4569
4570impl SRAcousticSettingsMusicEQ {
4571 extern_methods!(
4572 #[unsafe(method(isSoundCheckEnabled))]
4580 #[unsafe(method_family = none)]
4581 pub unsafe fn isSoundCheckEnabled(&self) -> bool;
4582
4583 #[unsafe(method(isLateNightModeEnabled))]
4594 #[unsafe(method_family = none)]
4595 pub unsafe fn isLateNightModeEnabled(&self) -> bool;
4596 );
4597}
4598
4599impl SRAcousticSettingsMusicEQ {
4601 extern_methods!(
4602 #[unsafe(method(init))]
4603 #[unsafe(method_family = init)]
4604 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
4605
4606 #[unsafe(method(new))]
4607 #[unsafe(method_family = new)]
4608 pub unsafe fn new() -> Retained<Self>;
4609 );
4610}
4611
4612extern_class!(
4613 #[unsafe(super(NSObject))]
4615 #[derive(Debug, PartialEq, Eq, Hash)]
4616 pub struct SRAcousticSettingsAccessibilityBackgroundSounds;
4617);
4618
4619unsafe impl Send for SRAcousticSettingsAccessibilityBackgroundSounds {}
4620
4621unsafe impl Sync for SRAcousticSettingsAccessibilityBackgroundSounds {}
4622
4623extern_conformance!(
4624 unsafe impl NSCoding for SRAcousticSettingsAccessibilityBackgroundSounds {}
4625);
4626
4627extern_conformance!(
4628 unsafe impl NSCopying for SRAcousticSettingsAccessibilityBackgroundSounds {}
4629);
4630
4631unsafe impl CopyingHelper for SRAcousticSettingsAccessibilityBackgroundSounds {
4632 type Result = Self;
4633}
4634
4635extern_conformance!(
4636 unsafe impl NSObjectProtocol for SRAcousticSettingsAccessibilityBackgroundSounds {}
4637);
4638
4639extern_conformance!(
4640 unsafe impl NSSecureCoding for SRAcousticSettingsAccessibilityBackgroundSounds {}
4641);
4642
4643impl SRAcousticSettingsAccessibilityBackgroundSounds {
4644 extern_methods!(
4645 #[unsafe(method(isEnabled))]
4656 #[unsafe(method_family = none)]
4657 pub unsafe fn isEnabled(&self) -> bool;
4658
4659 #[unsafe(method(soundName))]
4667 #[unsafe(method_family = none)]
4668 pub unsafe fn soundName(&self) -> SRAcousticSettingsAccessibilityBackgroundSoundsName;
4669
4670 #[unsafe(method(relativeVolume))]
4681 #[unsafe(method_family = none)]
4682 pub unsafe fn relativeVolume(&self) -> c_double;
4683
4684 #[unsafe(method(isPlayWithMediaEnabled))]
4692 #[unsafe(method_family = none)]
4693 pub unsafe fn isPlayWithMediaEnabled(&self) -> bool;
4694
4695 #[unsafe(method(relativeVolumeWithMedia))]
4706 #[unsafe(method_family = none)]
4707 pub unsafe fn relativeVolumeWithMedia(&self) -> c_double;
4708
4709 #[unsafe(method(isStopOnLockEnabled))]
4717 #[unsafe(method_family = none)]
4718 pub unsafe fn isStopOnLockEnabled(&self) -> bool;
4719 );
4720}
4721
4722impl SRAcousticSettingsAccessibilityBackgroundSounds {
4724 extern_methods!(
4725 #[unsafe(method(init))]
4726 #[unsafe(method_family = init)]
4727 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
4728
4729 #[unsafe(method(new))]
4730 #[unsafe(method_family = new)]
4731 pub unsafe fn new() -> Retained<Self>;
4732 );
4733}
4734
4735extern_class!(
4736 #[unsafe(super(NSObject))]
4738 #[derive(Debug, PartialEq, Eq, Hash)]
4739 pub struct SRAcousticSettingsAccessibilityHeadphoneAccommodations;
4740);
4741
4742unsafe impl Send for SRAcousticSettingsAccessibilityHeadphoneAccommodations {}
4743
4744unsafe impl Sync for SRAcousticSettingsAccessibilityHeadphoneAccommodations {}
4745
4746extern_conformance!(
4747 unsafe impl NSCoding for SRAcousticSettingsAccessibilityHeadphoneAccommodations {}
4748);
4749
4750extern_conformance!(
4751 unsafe impl NSCopying for SRAcousticSettingsAccessibilityHeadphoneAccommodations {}
4752);
4753
4754unsafe impl CopyingHelper for SRAcousticSettingsAccessibilityHeadphoneAccommodations {
4755 type Result = Self;
4756}
4757
4758extern_conformance!(
4759 unsafe impl NSObjectProtocol for SRAcousticSettingsAccessibilityHeadphoneAccommodations {}
4760);
4761
4762extern_conformance!(
4763 unsafe impl NSSecureCoding for SRAcousticSettingsAccessibilityHeadphoneAccommodations {}
4764);
4765
4766impl SRAcousticSettingsAccessibilityHeadphoneAccommodations {
4767 extern_methods!(
4768 #[unsafe(method(isEnabled))]
4776 #[unsafe(method_family = none)]
4777 pub unsafe fn isEnabled(&self) -> bool;
4778
4779 #[unsafe(method(mediaEnhanceTuning))]
4790 #[unsafe(method_family = none)]
4791 pub unsafe fn mediaEnhanceTuning(
4792 &self,
4793 ) -> SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceTuning;
4794
4795 #[unsafe(method(mediaEnhanceBoosting))]
4806 #[unsafe(method_family = none)]
4807 pub unsafe fn mediaEnhanceBoosting(
4808 &self,
4809 ) -> SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceBoosting;
4810
4811 #[unsafe(method(mediaEnhanceApplication))]
4822 #[unsafe(method_family = none)]
4823 pub unsafe fn mediaEnhanceApplication(
4824 &self,
4825 ) -> SRAcousticSettingsAccessibilityHeadphoneAccommodationsMediaEnhanceApplication;
4826 );
4827}
4828
4829impl SRAcousticSettingsAccessibilityHeadphoneAccommodations {
4831 extern_methods!(
4832 #[unsafe(method(init))]
4833 #[unsafe(method_family = init)]
4834 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
4835
4836 #[unsafe(method(new))]
4837 #[unsafe(method_family = new)]
4838 pub unsafe fn new() -> Retained<Self>;
4839 );
4840}
4841
4842extern_class!(
4843 #[unsafe(super(NSObject))]
4845 #[derive(Debug, PartialEq, Eq, Hash)]
4846 pub struct SRAcousticSettingsAccessibility;
4847);
4848
4849unsafe impl Send for SRAcousticSettingsAccessibility {}
4850
4851unsafe impl Sync for SRAcousticSettingsAccessibility {}
4852
4853extern_conformance!(
4854 unsafe impl NSCoding for SRAcousticSettingsAccessibility {}
4855);
4856
4857extern_conformance!(
4858 unsafe impl NSCopying for SRAcousticSettingsAccessibility {}
4859);
4860
4861unsafe impl CopyingHelper for SRAcousticSettingsAccessibility {
4862 type Result = Self;
4863}
4864
4865extern_conformance!(
4866 unsafe impl NSObjectProtocol for SRAcousticSettingsAccessibility {}
4867);
4868
4869extern_conformance!(
4870 unsafe impl NSSecureCoding for SRAcousticSettingsAccessibility {}
4871);
4872
4873impl SRAcousticSettingsAccessibility {
4874 extern_methods!(
4875 #[unsafe(method(leftRightBalance))]
4883 #[unsafe(method_family = none)]
4884 pub unsafe fn leftRightBalance(&self) -> c_double;
4885
4886 #[unsafe(method(isMonoAudioEnabled))]
4894 #[unsafe(method_family = none)]
4895 pub unsafe fn isMonoAudioEnabled(&self) -> bool;
4896
4897 #[unsafe(method(backgroundSounds))]
4905 #[unsafe(method_family = none)]
4906 pub unsafe fn backgroundSounds(
4907 &self,
4908 ) -> Retained<SRAcousticSettingsAccessibilityBackgroundSounds>;
4909
4910 #[unsafe(method(headphoneAccommodations))]
4918 #[unsafe(method_family = none)]
4919 pub unsafe fn headphoneAccommodations(
4920 &self,
4921 ) -> Retained<SRAcousticSettingsAccessibilityHeadphoneAccommodations>;
4922 );
4923}
4924
4925impl SRAcousticSettingsAccessibility {
4927 extern_methods!(
4928 #[unsafe(method(init))]
4929 #[unsafe(method_family = init)]
4930 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
4931
4932 #[unsafe(method(new))]
4933 #[unsafe(method_family = new)]
4934 pub unsafe fn new() -> Retained<Self>;
4935 );
4936}
4937
4938extern_class!(
4939 #[unsafe(super(NSObject))]
4941 #[derive(Debug, PartialEq, Eq, Hash)]
4942 pub struct SRAcousticSettings;
4943);
4944
4945unsafe impl Send for SRAcousticSettings {}
4946
4947unsafe impl Sync for SRAcousticSettings {}
4948
4949extern_conformance!(
4950 unsafe impl NSCoding for SRAcousticSettings {}
4951);
4952
4953extern_conformance!(
4954 unsafe impl NSCopying for SRAcousticSettings {}
4955);
4956
4957unsafe impl CopyingHelper for SRAcousticSettings {
4958 type Result = Self;
4959}
4960
4961extern_conformance!(
4962 unsafe impl NSObjectProtocol for SRAcousticSettings {}
4963);
4964
4965extern_conformance!(
4966 unsafe impl NSSecureCoding for SRAcousticSettings {}
4967);
4968
4969impl SRAcousticSettings {
4970 extern_methods!(
4971 #[unsafe(method(isEnvironmentalSoundMeasurementsEnabled))]
4982 #[unsafe(method_family = none)]
4983 pub unsafe fn isEnvironmentalSoundMeasurementsEnabled(&self) -> bool;
4984
4985 #[unsafe(method(audioExposureSampleLifetime))]
4993 #[unsafe(method_family = none)]
4994 pub unsafe fn audioExposureSampleLifetime(&self) -> SRAcousticSettingsSampleLifetime;
4995
4996 #[unsafe(method(headphoneSafetyAudioLevel))]
5009 #[unsafe(method_family = none)]
5010 pub unsafe fn headphoneSafetyAudioLevel(&self) -> Option<Retained<NSNumber>>;
5011
5012 #[unsafe(method(musicEQSettings))]
5020 #[unsafe(method_family = none)]
5021 pub unsafe fn musicEQSettings(&self) -> Retained<SRAcousticSettingsMusicEQ>;
5022
5023 #[unsafe(method(accessibilitySettings))]
5031 #[unsafe(method_family = none)]
5032 pub unsafe fn accessibilitySettings(&self) -> Retained<SRAcousticSettingsAccessibility>;
5033
5034 #[unsafe(method(init))]
5035 #[unsafe(method_family = init)]
5036 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
5037
5038 #[unsafe(method(new))]
5039 #[unsafe(method_family = new)]
5040 pub unsafe fn new() -> Retained<Self>;
5041 );
5042}
5043
5044extern_class!(
5045 #[unsafe(super(NSObject))]
5047 #[derive(Debug, PartialEq, Eq, Hash)]
5048 pub struct SRSleepSession;
5049);
5050
5051unsafe impl Send for SRSleepSession {}
5052
5053unsafe impl Sync for SRSleepSession {}
5054
5055extern_conformance!(
5056 unsafe impl NSCoding for SRSleepSession {}
5057);
5058
5059extern_conformance!(
5060 unsafe impl NSCopying for SRSleepSession {}
5061);
5062
5063unsafe impl CopyingHelper for SRSleepSession {
5064 type Result = Self;
5065}
5066
5067extern_conformance!(
5068 unsafe impl NSObjectProtocol for SRSleepSession {}
5069);
5070
5071extern_conformance!(
5072 unsafe impl NSSecureCoding for SRSleepSession {}
5073);
5074
5075impl SRSleepSession {
5076 extern_methods!(
5077 #[unsafe(method(init))]
5078 #[unsafe(method_family = init)]
5079 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
5080
5081 #[unsafe(method(new))]
5082 #[unsafe(method_family = new)]
5083 pub unsafe fn new() -> Retained<Self>;
5084
5085 #[unsafe(method(startDate))]
5093 #[unsafe(method_family = none)]
5094 pub unsafe fn startDate(&self) -> Retained<NSDate>;
5095
5096 #[unsafe(method(duration))]
5107 #[unsafe(method_family = none)]
5108 pub unsafe fn duration(&self) -> NSTimeInterval;
5109
5110 #[unsafe(method(identifier))]
5118 #[unsafe(method_family = none)]
5119 pub unsafe fn identifier(&self) -> Retained<NSString>;
5120 );
5121}