use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UIPrinterDestination;
);
extern_conformance!(
unsafe impl NSCoding for UIPrinterDestination {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for UIPrinterDestination {}
);
extern_conformance!(
unsafe impl NSSecureCoding for UIPrinterDestination {}
);
impl UIPrinterDestination {
extern_methods!(
#[unsafe(method(initWithURL:))]
#[unsafe(method_family = init)]
pub fn initWithURL(this: Allocated<Self>, url: &NSURL) -> Retained<Self>;
#[unsafe(method(URL))]
#[unsafe(method_family = none)]
pub fn URL(&self) -> Retained<NSURL>;
#[unsafe(method(setURL:))]
#[unsafe(method_family = none)]
pub fn setURL(&self, url: &NSURL);
#[unsafe(method(displayName))]
#[unsafe(method_family = none)]
pub fn displayName(&self) -> Option<Retained<NSString>>;
#[unsafe(method(setDisplayName:))]
#[unsafe(method_family = none)]
pub fn setDisplayName(&self, display_name: Option<&NSString>);
#[unsafe(method(txtRecord))]
#[unsafe(method_family = none)]
pub fn txtRecord(&self) -> Option<Retained<NSData>>;
#[unsafe(method(setTxtRecord:))]
#[unsafe(method_family = none)]
pub fn setTxtRecord(&self, txt_record: Option<&NSData>);
);
}
impl UIPrinterDestination {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UIPrintServiceExtension;
);
extern_conformance!(
unsafe impl NSObjectProtocol for UIPrintServiceExtension {}
);
impl UIPrintServiceExtension {
extern_methods!(
#[cfg(feature = "UIPrintInfo")]
#[unsafe(method(printerDestinationsForPrintInfo:))]
#[unsafe(method_family = none)]
pub fn printerDestinationsForPrintInfo(
&self,
print_info: &UIPrintInfo,
) -> Retained<NSArray<UIPrinterDestination>>;
);
}
impl UIPrintServiceExtension {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}