objc2_foundation/generated/
NSDistantObject.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6
7use crate::*;
8
9extern_class!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/foundation/nsdistantobject?language=objc)
11    #[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"))]
19unsafe impl NSCoding for NSDistantObject {}
20
21#[cfg(feature = "NSProxy")]
22unsafe impl NSObjectProtocol for NSDistantObject {}
23
24#[cfg(feature = "NSProxy")]
25impl NSDistantObject {
26    extern_methods!(
27        #[cfg(feature = "NSConnection")]
28        #[deprecated = "Use NSXPCConnection instead"]
29        #[unsafe(method(proxyWithTarget:connection:))]
30        #[unsafe(method_family = none)]
31        pub unsafe fn proxyWithTarget_connection(
32            target: &AnyObject,
33            connection: &NSConnection,
34        ) -> Option<Retained<AnyObject>>;
35
36        #[cfg(feature = "NSConnection")]
37        #[deprecated = "Use NSXPCConnection instead"]
38        #[unsafe(method(initWithTarget:connection:))]
39        #[unsafe(method_family = init)]
40        pub unsafe fn initWithTarget_connection(
41            this: Allocated<Self>,
42            target: &AnyObject,
43            connection: &NSConnection,
44        ) -> Option<Retained<Self>>;
45
46        #[cfg(feature = "NSConnection")]
47        #[deprecated = "Use NSXPCConnection instead"]
48        #[unsafe(method(proxyWithLocal:connection:))]
49        #[unsafe(method_family = none)]
50        pub unsafe fn proxyWithLocal_connection(
51            target: &AnyObject,
52            connection: &NSConnection,
53        ) -> Retained<AnyObject>;
54
55        #[cfg(feature = "NSConnection")]
56        #[deprecated = "Use NSXPCConnection instead"]
57        #[unsafe(method(initWithLocal:connection:))]
58        #[unsafe(method_family = init)]
59        pub unsafe fn initWithLocal_connection(
60            this: Allocated<Self>,
61            target: &AnyObject,
62            connection: &NSConnection,
63        ) -> Retained<Self>;
64
65        #[cfg(feature = "NSCoder")]
66        #[deprecated = "Use NSXPCConnection instead"]
67        #[unsafe(method(initWithCoder:))]
68        #[unsafe(method_family = init)]
69        pub unsafe fn initWithCoder(
70            this: Allocated<Self>,
71            in_coder: &NSCoder,
72        ) -> Option<Retained<Self>>;
73
74        #[deprecated = "Use NSXPCConnection instead"]
75        #[unsafe(method(setProtocolForProxy:))]
76        #[unsafe(method_family = none)]
77        pub unsafe fn setProtocolForProxy(&self, proto: Option<&AnyProtocol>);
78
79        #[cfg(feature = "NSConnection")]
80        #[deprecated = "Use NSXPCConnection instead"]
81        #[unsafe(method(connectionForProxy))]
82        #[unsafe(method_family = none)]
83        pub unsafe fn connectionForProxy(&self) -> Retained<NSConnection>;
84    );
85}