1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;

use crate::*;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "NSProxy")]
    #[deprecated = "Use NSXPCConnection instead"]
    pub struct NSDistantObject;

    #[cfg(feature = "NSProxy")]
    unsafe impl ClassType for NSDistantObject {
        type Super = NSProxy;
        type Mutability = InteriorMutable;
    }
);

#[cfg(all(feature = "NSObject", feature = "NSProxy"))]
unsafe impl NSCoding for NSDistantObject {}

#[cfg(feature = "NSProxy")]
unsafe impl NSObjectProtocol for NSDistantObject {}

extern_methods!(
    #[cfg(feature = "NSProxy")]
    unsafe impl NSDistantObject {
        #[cfg(feature = "NSConnection")]
        #[deprecated = "Use NSXPCConnection instead"]
        #[method_id(@__retain_semantics Other proxyWithTarget:connection:)]
        pub unsafe fn proxyWithTarget_connection(
            target: &AnyObject,
            connection: &NSConnection,
        ) -> Option<Retained<AnyObject>>;

        #[cfg(feature = "NSConnection")]
        #[deprecated = "Use NSXPCConnection instead"]
        #[method_id(@__retain_semantics Init initWithTarget:connection:)]
        pub unsafe fn initWithTarget_connection(
            this: Allocated<Self>,
            target: &AnyObject,
            connection: &NSConnection,
        ) -> Option<Retained<Self>>;

        #[cfg(feature = "NSConnection")]
        #[deprecated = "Use NSXPCConnection instead"]
        #[method_id(@__retain_semantics Other proxyWithLocal:connection:)]
        pub unsafe fn proxyWithLocal_connection(
            target: &AnyObject,
            connection: &NSConnection,
        ) -> Retained<AnyObject>;

        #[cfg(feature = "NSConnection")]
        #[deprecated = "Use NSXPCConnection instead"]
        #[method_id(@__retain_semantics Init initWithLocal:connection:)]
        pub unsafe fn initWithLocal_connection(
            this: Allocated<Self>,
            target: &AnyObject,
            connection: &NSConnection,
        ) -> Retained<Self>;

        #[cfg(feature = "NSCoder")]
        #[deprecated = "Use NSXPCConnection instead"]
        #[method_id(@__retain_semantics Init initWithCoder:)]
        pub unsafe fn initWithCoder(
            this: Allocated<Self>,
            in_coder: &NSCoder,
        ) -> Option<Retained<Self>>;

        #[deprecated = "Use NSXPCConnection instead"]
        #[method(setProtocolForProxy:)]
        pub unsafe fn setProtocolForProxy(&self, proto: Option<&AnyProtocol>);

        #[cfg(feature = "NSConnection")]
        #[deprecated = "Use NSXPCConnection instead"]
        #[method_id(@__retain_semantics Other connectionForProxy)]
        pub unsafe fn connectionForProxy(&self) -> Retained<NSConnection>;
    }
);