objc2_core_motion/generated/
CMSensorRecorder.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSObject))]
13 #[derive(Debug, PartialEq, Eq, Hash)]
14 pub struct CMSensorDataList;
15);
16
17unsafe impl NSFastEnumeration for CMSensorDataList {}
18
19unsafe impl NSObjectProtocol for CMSensorDataList {}
20
21impl CMSensorDataList {
22 extern_methods!();
23}
24
25impl CMSensorDataList {
27 extern_methods!(
28 #[unsafe(method(init))]
29 #[unsafe(method_family = init)]
30 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
31
32 #[unsafe(method(new))]
33 #[unsafe(method_family = new)]
34 pub unsafe fn new() -> Retained<Self>;
35 );
36}
37
38extern_class!(
39 #[unsafe(super(NSObject))]
41 #[derive(Debug, PartialEq, Eq, Hash)]
42 pub struct CMSensorRecorder;
43);
44
45unsafe impl NSObjectProtocol for CMSensorRecorder {}
46
47impl CMSensorRecorder {
48 extern_methods!(
49 #[unsafe(method(isAccelerometerRecordingAvailable))]
50 #[unsafe(method_family = none)]
51 pub unsafe fn isAccelerometerRecordingAvailable() -> bool;
52
53 #[cfg(feature = "CMAuthorization")]
54 #[unsafe(method(authorizationStatus))]
55 #[unsafe(method_family = none)]
56 pub unsafe fn authorizationStatus() -> CMAuthorizationStatus;
57
58 #[deprecated]
59 #[unsafe(method(isAuthorizedForRecording))]
60 #[unsafe(method_family = none)]
61 pub unsafe fn isAuthorizedForRecording() -> bool;
62
63 #[unsafe(method(accelerometerDataFromDate:toDate:))]
64 #[unsafe(method_family = none)]
65 pub unsafe fn accelerometerDataFromDate_toDate(
66 &self,
67 from_date: &NSDate,
68 to_date: &NSDate,
69 ) -> Option<Retained<CMSensorDataList>>;
70
71 #[unsafe(method(recordAccelerometerForDuration:))]
72 #[unsafe(method_family = none)]
73 pub unsafe fn recordAccelerometerForDuration(&self, duration: NSTimeInterval);
74 );
75}
76
77impl CMSensorRecorder {
79 extern_methods!(
80 #[unsafe(method(init))]
81 #[unsafe(method_family = init)]
82 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
83
84 #[unsafe(method(new))]
85 #[unsafe(method_family = new)]
86 pub unsafe fn new() -> Retained<Self>;
87 );
88}