Source code

Revision control

Copy as Markdown

Other Tools

//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use crate::*;
extern_class!(
#[unsafe(super(NSProxy))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "NSProxy")]
#[deprecated = "Use NSXPCConnection instead"]
pub struct NSDistantObject;
);
#[cfg(all(feature = "NSObject", feature = "NSProxy"))]
extern_conformance!(
unsafe impl NSCoding for NSDistantObject {}
);
#[cfg(feature = "NSProxy")]
extern_conformance!(
unsafe impl NSObjectProtocol for NSDistantObject {}
);
#[cfg(feature = "NSProxy")]
impl NSDistantObject {
extern_methods!(
#[cfg(feature = "NSConnection")]
/// # Safety
///
/// `target` should be of the correct type.
#[deprecated = "Use NSXPCConnection instead"]
#[unsafe(method(proxyWithTarget:connection:))]
#[unsafe(method_family = none)]
pub unsafe fn proxyWithTarget_connection(
target: &AnyObject,
connection: &NSConnection,
) -> Option<Retained<AnyObject>>;
#[cfg(feature = "NSConnection")]
/// # Safety
///
/// `target` should be of the correct type.
#[deprecated = "Use NSXPCConnection instead"]
#[unsafe(method(initWithTarget:connection:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithTarget_connection(
this: Allocated<Self>,
target: &AnyObject,
connection: &NSConnection,
) -> Option<Retained<Self>>;
#[cfg(feature = "NSConnection")]
/// # Safety
///
/// `target` should be of the correct type.
#[deprecated = "Use NSXPCConnection instead"]
#[unsafe(method(proxyWithLocal:connection:))]
#[unsafe(method_family = none)]
pub unsafe fn proxyWithLocal_connection(
target: &AnyObject,
connection: &NSConnection,
) -> Retained<AnyObject>;
#[cfg(feature = "NSConnection")]
/// # Safety
///
/// `target` should be of the correct type.
#[deprecated = "Use NSXPCConnection instead"]
#[unsafe(method(initWithLocal:connection:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithLocal_connection(
this: Allocated<Self>,
target: &AnyObject,
connection: &NSConnection,
) -> Retained<Self>;
#[cfg(feature = "NSCoder")]
/// # Safety
///
/// `in_coder` possibly has further requirements.
#[deprecated = "Use NSXPCConnection instead"]
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(
this: Allocated<Self>,
in_coder: &NSCoder,
) -> Option<Retained<Self>>;
/// # Safety
///
/// `proto` possibly has further requirements.
#[deprecated = "Use NSXPCConnection instead"]
#[unsafe(method(setProtocolForProxy:))]
#[unsafe(method_family = none)]
pub unsafe fn setProtocolForProxy(&self, proto: Option<&AnyProtocol>);
#[cfg(feature = "NSConnection")]
#[deprecated = "Use NSXPCConnection instead"]
#[unsafe(method(connectionForProxy))]
#[unsafe(method_family = none)]
pub fn connectionForProxy(&self) -> Retained<NSConnection>;
);
}