objc2_ar_kit/generated/
ARCollaborationData.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4#[cfg(feature = "objc2")]
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-foundation")]
7use objc2_foundation::*;
8
9use crate::*;
10
11/// A value describing the priority of the collaboration data.
12///
13/// See also [Apple's documentation](https://developer.apple.com/documentation/arkit/arcollaborationdatapriority?language=objc)
14// NS_ENUM
15#[cfg(feature = "objc2")]
16#[repr(transparent)]
17#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
18pub struct ARCollaborationDataPriority(pub NSInteger);
19#[cfg(feature = "objc2")]
20impl ARCollaborationDataPriority {
21    /// The data is important for establishing or continuing a collaborative session. For best results, use network transmission mechanisms that ensure delivery, such as MCSessionSendDataModeReliable.
22    #[doc(alias = "ARCollaborationDataPriorityCritical")]
23    pub const Critical: Self = Self(0);
24    /// The data is time-sensitive but not important to collaborative session quality. Timely synchronization of this data between participants produces a smoother shared session, but the session can continue if the data is not received.
25    /// For best results, use network transmission mechanisms that prioritize speed over delivery guarantees, such as MCSessionSendDataModeUnreliable.
26    #[doc(alias = "ARCollaborationDataPriorityOptional")]
27    pub const Optional: Self = Self(1);
28}
29
30#[cfg(feature = "objc2")]
31unsafe impl Encode for ARCollaborationDataPriority {
32    const ENCODING: Encoding = NSInteger::ENCODING;
33}
34
35#[cfg(feature = "objc2")]
36unsafe impl RefEncode for ARCollaborationDataPriority {
37    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
38}
39
40#[cfg(feature = "objc2")]
41extern_class!(
42    /// Object representing data for collaborative session.
43    ///
44    ///
45    /// This data needs to be sent to each participants in the collaborative session.
46    ///
47    /// See also [Apple's documentation](https://developer.apple.com/documentation/arkit/arcollaborationdata?language=objc)
48    #[unsafe(super(NSObject))]
49    #[derive(Debug, PartialEq, Eq, Hash)]
50    #[cfg(feature = "objc2")]
51    pub struct ARCollaborationData;
52);
53
54#[cfg(feature = "objc2")]
55unsafe impl Send for ARCollaborationData {}
56
57#[cfg(feature = "objc2")]
58unsafe impl Sync for ARCollaborationData {}
59
60#[cfg(all(feature = "objc2", feature = "objc2-foundation"))]
61extern_conformance!(
62    unsafe impl NSCoding for ARCollaborationData {}
63);
64
65#[cfg(feature = "objc2")]
66extern_conformance!(
67    unsafe impl NSObjectProtocol for ARCollaborationData {}
68);
69
70#[cfg(all(feature = "objc2", feature = "objc2-foundation"))]
71extern_conformance!(
72    unsafe impl NSSecureCoding for ARCollaborationData {}
73);
74
75#[cfg(feature = "objc2")]
76impl ARCollaborationData {
77    extern_methods!(
78        /// Network priority of the data.
79        ///
80        /// The network implementation should respect this flag and choose the appropriate protocol.
81        ///
82        /// This property is not atomic.
83        ///
84        /// # Safety
85        ///
86        /// This might not be thread-safe.
87        #[unsafe(method(priority))]
88        #[unsafe(method_family = none)]
89        pub unsafe fn priority(&self) -> ARCollaborationDataPriority;
90
91        /// Unavailable
92        #[unsafe(method(init))]
93        #[unsafe(method_family = init)]
94        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
95
96        #[unsafe(method(new))]
97        #[unsafe(method_family = new)]
98        pub unsafe fn new() -> Retained<Self>;
99    );
100}