objc2_foundation/generated/
NSPortCoder.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(NSCoder, NSObject))]
12 #[derive(Debug, PartialEq, Eq, Hash)]
13 #[cfg(feature = "NSCoder")]
14 #[deprecated = "Use NSXPCConnection instead"]
15 pub struct NSPortCoder;
16);
17
18#[cfg(feature = "NSCoder")]
19extern_conformance!(
20 unsafe impl NSObjectProtocol for NSPortCoder {}
21);
22
23#[cfg(feature = "NSCoder")]
24impl NSPortCoder {
25 extern_methods!(
26 #[deprecated = "Use NSXPCConnection instead"]
27 #[unsafe(method(isBycopy))]
28 #[unsafe(method_family = none)]
29 pub unsafe fn isBycopy(&self) -> bool;
30
31 #[deprecated = "Use NSXPCConnection instead"]
32 #[unsafe(method(isByref))]
33 #[unsafe(method_family = none)]
34 pub unsafe fn isByref(&self) -> bool;
35
36 #[cfg(feature = "NSPort")]
37 #[deprecated = "Use NSXPCConnection instead"]
38 #[unsafe(method(encodePortObject:))]
39 #[unsafe(method_family = none)]
40 pub unsafe fn encodePortObject(&self, aport: &NSPort);
41
42 #[cfg(feature = "NSPort")]
43 #[deprecated = "Use NSXPCConnection instead"]
44 #[unsafe(method(decodePortObject))]
45 #[unsafe(method_family = none)]
46 pub unsafe fn decodePortObject(&self) -> Option<Retained<NSPort>>;
47
48 #[cfg(feature = "NSConnection")]
49 #[deprecated]
50 #[unsafe(method(connection))]
51 #[unsafe(method_family = none)]
52 pub unsafe fn connection(&self) -> Option<Retained<NSConnection>>;
53
54 #[cfg(all(feature = "NSArray", feature = "NSPort"))]
55 #[deprecated]
59 #[unsafe(method(portCoderWithReceivePort:sendPort:components:))]
60 #[unsafe(method_family = none)]
61 pub unsafe fn portCoderWithReceivePort_sendPort_components(
62 rcv_port: Option<&NSPort>,
63 snd_port: Option<&NSPort>,
64 comps: Option<&NSArray>,
65 ) -> Retained<AnyObject>;
66
67 #[cfg(all(feature = "NSArray", feature = "NSPort"))]
68 #[deprecated]
72 #[unsafe(method(initWithReceivePort:sendPort:components:))]
73 #[unsafe(method_family = init)]
74 pub unsafe fn initWithReceivePort_sendPort_components(
75 this: Allocated<Self>,
76 rcv_port: Option<&NSPort>,
77 snd_port: Option<&NSPort>,
78 comps: Option<&NSArray>,
79 ) -> Retained<Self>;
80
81 #[deprecated]
82 #[unsafe(method(dispatch))]
83 #[unsafe(method_family = none)]
84 pub unsafe fn dispatch(&self);
85 );
86}
87
88#[cfg(feature = "NSCoder")]
90impl NSPortCoder {
91 extern_methods!(
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}