objc2_watch_connectivity/generated/
WCSessionFile.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSObject))]
15 #[derive(Debug, PartialEq, Eq, Hash)]
16 pub struct WCSessionFile;
17);
18
19extern_conformance!(
20 unsafe impl NSObjectProtocol for WCSessionFile {}
21);
22
23impl WCSessionFile {
24 extern_methods!(
25 #[unsafe(method(fileURL))]
26 #[unsafe(method_family = none)]
27 pub unsafe fn fileURL(&self) -> Retained<NSURL>;
28
29 #[unsafe(method(metadata))]
30 #[unsafe(method_family = none)]
31 pub unsafe fn metadata(&self) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;
32 );
33}
34
35impl WCSessionFile {
37 extern_methods!(
38 #[unsafe(method(init))]
39 #[unsafe(method_family = init)]
40 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
41
42 #[unsafe(method(new))]
43 #[unsafe(method_family = new)]
44 pub unsafe fn new() -> Retained<Self>;
45 );
46}
47
48extern_class!(
49 #[unsafe(super(NSObject))]
53 #[derive(Debug, PartialEq, Eq, Hash)]
54 pub struct WCSessionFileTransfer;
55);
56
57extern_conformance!(
58 unsafe impl NSObjectProtocol for WCSessionFileTransfer {}
59);
60
61impl WCSessionFileTransfer {
62 extern_methods!(
63 #[unsafe(method(file))]
64 #[unsafe(method_family = none)]
65 pub unsafe fn file(&self) -> Retained<WCSessionFile>;
66
67 #[unsafe(method(progress))]
68 #[unsafe(method_family = none)]
69 pub unsafe fn progress(&self) -> Retained<NSProgress>;
70
71 #[unsafe(method(isTransferring))]
72 #[unsafe(method_family = none)]
73 pub unsafe fn isTransferring(&self) -> bool;
74
75 #[unsafe(method(cancel))]
76 #[unsafe(method_family = none)]
77 pub unsafe fn cancel(&self);
78 );
79}
80
81impl WCSessionFileTransfer {
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}