use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct WCSessionFile;
);
extern_conformance!(
unsafe impl NSObjectProtocol for WCSessionFile {}
);
impl WCSessionFile {
extern_methods!(
#[unsafe(method(fileURL))]
#[unsafe(method_family = none)]
pub unsafe fn fileURL(&self) -> Retained<NSURL>;
#[unsafe(method(metadata))]
#[unsafe(method_family = none)]
pub unsafe fn metadata(&self) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;
);
}
impl WCSessionFile {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct WCSessionFileTransfer;
);
extern_conformance!(
unsafe impl NSObjectProtocol for WCSessionFileTransfer {}
);
impl WCSessionFileTransfer {
extern_methods!(
#[unsafe(method(file))]
#[unsafe(method_family = none)]
pub unsafe fn file(&self) -> Retained<WCSessionFile>;
#[unsafe(method(progress))]
#[unsafe(method_family = none)]
pub unsafe fn progress(&self) -> Retained<NSProgress>;
#[unsafe(method(isTransferring))]
#[unsafe(method_family = none)]
pub unsafe fn isTransferring(&self) -> bool;
#[unsafe(method(cancel))]
#[unsafe(method_family = none)]
pub unsafe fn cancel(&self);
);
}
impl WCSessionFileTransfer {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}