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")]
19unsafe impl NSObjectProtocol for NSPortCoder {}
20
21#[cfg(feature = "NSCoder")]
22impl NSPortCoder {
23    extern_methods!(
24        #[deprecated = "Use NSXPCConnection instead"]
25        #[unsafe(method(isBycopy))]
26        #[unsafe(method_family = none)]
27        pub unsafe fn isBycopy(&self) -> bool;
28
29        #[deprecated = "Use NSXPCConnection instead"]
30        #[unsafe(method(isByref))]
31        #[unsafe(method_family = none)]
32        pub unsafe fn isByref(&self) -> bool;
33
34        #[cfg(feature = "NSPort")]
35        #[deprecated = "Use NSXPCConnection instead"]
36        #[unsafe(method(encodePortObject:))]
37        #[unsafe(method_family = none)]
38        pub unsafe fn encodePortObject(&self, aport: &NSPort);
39
40        #[cfg(feature = "NSPort")]
41        #[deprecated = "Use NSXPCConnection instead"]
42        #[unsafe(method(decodePortObject))]
43        #[unsafe(method_family = none)]
44        pub unsafe fn decodePortObject(&self) -> Option<Retained<NSPort>>;
45
46        #[cfg(feature = "NSConnection")]
47        #[deprecated]
48        #[unsafe(method(connection))]
49        #[unsafe(method_family = none)]
50        pub unsafe fn connection(&self) -> Option<Retained<NSConnection>>;
51
52        #[cfg(all(feature = "NSArray", feature = "NSPort"))]
53        #[deprecated]
54        #[unsafe(method(portCoderWithReceivePort:sendPort:components:))]
55        #[unsafe(method_family = none)]
56        pub unsafe fn portCoderWithReceivePort_sendPort_components(
57            rcv_port: Option<&NSPort>,
58            snd_port: Option<&NSPort>,
59            comps: Option<&NSArray>,
60        ) -> Retained<AnyObject>;
61
62        #[cfg(all(feature = "NSArray", feature = "NSPort"))]
63        #[deprecated]
64        #[unsafe(method(initWithReceivePort:sendPort:components:))]
65        #[unsafe(method_family = init)]
66        pub unsafe fn initWithReceivePort_sendPort_components(
67            this: Allocated<Self>,
68            rcv_port: Option<&NSPort>,
69            snd_port: Option<&NSPort>,
70            comps: Option<&NSArray>,
71        ) -> Retained<Self>;
72
73        #[deprecated]
74        #[unsafe(method(dispatch))]
75        #[unsafe(method_family = none)]
76        pub unsafe fn dispatch(&self);
77    );
78}
79
80/// Methods declared on superclass `NSObject`.
81#[cfg(feature = "NSCoder")]
82impl NSPortCoder {
83    extern_methods!(
84        #[unsafe(method(init))]
85        #[unsafe(method_family = init)]
86        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
87
88        #[unsafe(method(new))]
89        #[unsafe(method_family = new)]
90        pub unsafe fn new() -> Retained<Self>;
91    );
92}