objc2_foundation/generated/
NSPortCoder.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/nsportcoder?language=objc)
11    #[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]
56        #[unsafe(method(portCoderWithReceivePort:sendPort:components:))]
57        #[unsafe(method_family = none)]
58        pub unsafe fn portCoderWithReceivePort_sendPort_components(
59            rcv_port: Option<&NSPort>,
60            snd_port: Option<&NSPort>,
61            comps: Option<&NSArray>,
62        ) -> Retained<AnyObject>;
63
64        #[cfg(all(feature = "NSArray", feature = "NSPort"))]
65        #[deprecated]
66        #[unsafe(method(initWithReceivePort:sendPort:components:))]
67        #[unsafe(method_family = init)]
68        pub unsafe fn initWithReceivePort_sendPort_components(
69            this: Allocated<Self>,
70            rcv_port: Option<&NSPort>,
71            snd_port: Option<&NSPort>,
72            comps: Option<&NSArray>,
73        ) -> Retained<Self>;
74
75        #[deprecated]
76        #[unsafe(method(dispatch))]
77        #[unsafe(method_family = none)]
78        pub unsafe fn dispatch(&self);
79    );
80}
81
82/// Methods declared on superclass `NSObject`.
83#[cfg(feature = "NSCoder")]
84impl NSPortCoder {
85    extern_methods!(
86        #[unsafe(method(init))]
87        #[unsafe(method_family = init)]
88        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
89
90        #[unsafe(method(new))]
91        #[unsafe(method_family = new)]
92        pub unsafe fn new() -> Retained<Self>;
93    );
94}