objc2_foundation/generated/
NSDistantObject.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(NSProxy))]
12 #[derive(Debug, PartialEq, Eq, Hash)]
13 #[cfg(feature = "NSProxy")]
14 #[deprecated = "Use NSXPCConnection instead"]
15 pub struct NSDistantObject;
16);
17
18#[cfg(all(feature = "NSObject", feature = "NSProxy"))]
19extern_conformance!(
20 unsafe impl NSCoding for NSDistantObject {}
21);
22
23#[cfg(feature = "NSProxy")]
24extern_conformance!(
25 unsafe impl NSObjectProtocol for NSDistantObject {}
26);
27
28#[cfg(feature = "NSProxy")]
29impl NSDistantObject {
30 extern_methods!(
31 #[cfg(feature = "NSConnection")]
32 #[deprecated = "Use NSXPCConnection instead"]
36 #[unsafe(method(proxyWithTarget:connection:))]
37 #[unsafe(method_family = none)]
38 pub unsafe fn proxyWithTarget_connection(
39 target: &AnyObject,
40 connection: &NSConnection,
41 ) -> Option<Retained<AnyObject>>;
42
43 #[cfg(feature = "NSConnection")]
44 #[deprecated = "Use NSXPCConnection instead"]
48 #[unsafe(method(initWithTarget:connection:))]
49 #[unsafe(method_family = init)]
50 pub unsafe fn initWithTarget_connection(
51 this: Allocated<Self>,
52 target: &AnyObject,
53 connection: &NSConnection,
54 ) -> Option<Retained<Self>>;
55
56 #[cfg(feature = "NSConnection")]
57 #[deprecated = "Use NSXPCConnection instead"]
61 #[unsafe(method(proxyWithLocal:connection:))]
62 #[unsafe(method_family = none)]
63 pub unsafe fn proxyWithLocal_connection(
64 target: &AnyObject,
65 connection: &NSConnection,
66 ) -> Retained<AnyObject>;
67
68 #[cfg(feature = "NSConnection")]
69 #[deprecated = "Use NSXPCConnection instead"]
73 #[unsafe(method(initWithLocal:connection:))]
74 #[unsafe(method_family = init)]
75 pub unsafe fn initWithLocal_connection(
76 this: Allocated<Self>,
77 target: &AnyObject,
78 connection: &NSConnection,
79 ) -> Retained<Self>;
80
81 #[cfg(feature = "NSCoder")]
82 #[deprecated = "Use NSXPCConnection instead"]
86 #[unsafe(method(initWithCoder:))]
87 #[unsafe(method_family = init)]
88 pub unsafe fn initWithCoder(
89 this: Allocated<Self>,
90 in_coder: &NSCoder,
91 ) -> Option<Retained<Self>>;
92
93 #[deprecated = "Use NSXPCConnection instead"]
97 #[unsafe(method(setProtocolForProxy:))]
98 #[unsafe(method_family = none)]
99 pub unsafe fn setProtocolForProxy(&self, proto: Option<&AnyProtocol>);
100
101 #[cfg(feature = "NSConnection")]
102 #[deprecated = "Use NSXPCConnection instead"]
103 #[unsafe(method(connectionForProxy))]
104 #[unsafe(method_family = none)]
105 pub fn connectionForProxy(&self) -> Retained<NSConnection>;
106 );
107}