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"]
33 #[unsafe(method(proxyWithTarget:connection:))]
34 #[unsafe(method_family = none)]
35 pub unsafe fn proxyWithTarget_connection(
36 target: &AnyObject,
37 connection: &NSConnection,
38 ) -> Option<Retained<AnyObject>>;
39
40 #[cfg(feature = "NSConnection")]
41 #[deprecated = "Use NSXPCConnection instead"]
42 #[unsafe(method(initWithTarget:connection:))]
43 #[unsafe(method_family = init)]
44 pub unsafe fn initWithTarget_connection(
45 this: Allocated<Self>,
46 target: &AnyObject,
47 connection: &NSConnection,
48 ) -> Option<Retained<Self>>;
49
50 #[cfg(feature = "NSConnection")]
51 #[deprecated = "Use NSXPCConnection instead"]
52 #[unsafe(method(proxyWithLocal:connection:))]
53 #[unsafe(method_family = none)]
54 pub unsafe fn proxyWithLocal_connection(
55 target: &AnyObject,
56 connection: &NSConnection,
57 ) -> Retained<AnyObject>;
58
59 #[cfg(feature = "NSConnection")]
60 #[deprecated = "Use NSXPCConnection instead"]
61 #[unsafe(method(initWithLocal:connection:))]
62 #[unsafe(method_family = init)]
63 pub unsafe fn initWithLocal_connection(
64 this: Allocated<Self>,
65 target: &AnyObject,
66 connection: &NSConnection,
67 ) -> Retained<Self>;
68
69 #[cfg(feature = "NSCoder")]
70 #[deprecated = "Use NSXPCConnection instead"]
71 #[unsafe(method(initWithCoder:))]
72 #[unsafe(method_family = init)]
73 pub unsafe fn initWithCoder(
74 this: Allocated<Self>,
75 in_coder: &NSCoder,
76 ) -> Option<Retained<Self>>;
77
78 #[deprecated = "Use NSXPCConnection instead"]
79 #[unsafe(method(setProtocolForProxy:))]
80 #[unsafe(method_family = none)]
81 pub unsafe fn setProtocolForProxy(&self, proto: Option<&AnyProtocol>);
82
83 #[cfg(feature = "NSConnection")]
84 #[deprecated = "Use NSXPCConnection instead"]
85 #[unsafe(method(connectionForProxy))]
86 #[unsafe(method_family = none)]
87 pub unsafe fn connectionForProxy(&self) -> Retained<NSConnection>;
88 );
89}