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
19unsafe impl NSObjectProtocol for WCSessionFile {}
20
21impl WCSessionFile {
22 extern_methods!(
23 #[unsafe(method(fileURL))]
24 #[unsafe(method_family = none)]
25 pub unsafe fn fileURL(&self) -> Retained<NSURL>;
26
27 #[unsafe(method(metadata))]
28 #[unsafe(method_family = none)]
29 pub unsafe fn metadata(&self) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;
30 );
31}
32
33impl WCSessionFile {
35 extern_methods!(
36 #[unsafe(method(init))]
37 #[unsafe(method_family = init)]
38 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
39
40 #[unsafe(method(new))]
41 #[unsafe(method_family = new)]
42 pub unsafe fn new() -> Retained<Self>;
43 );
44}
45
46extern_class!(
47 #[unsafe(super(NSObject))]
51 #[derive(Debug, PartialEq, Eq, Hash)]
52 pub struct WCSessionFileTransfer;
53);
54
55unsafe impl NSObjectProtocol for WCSessionFileTransfer {}
56
57impl WCSessionFileTransfer {
58 extern_methods!(
59 #[unsafe(method(file))]
60 #[unsafe(method_family = none)]
61 pub unsafe fn file(&self) -> Retained<WCSessionFile>;
62
63 #[unsafe(method(progress))]
64 #[unsafe(method_family = none)]
65 pub unsafe fn progress(&self) -> Retained<NSProgress>;
66
67 #[unsafe(method(isTransferring))]
68 #[unsafe(method_family = none)]
69 pub unsafe fn isTransferring(&self) -> bool;
70
71 #[unsafe(method(cancel))]
72 #[unsafe(method_family = none)]
73 pub unsafe fn cancel(&self);
74 );
75}
76
77impl WCSessionFileTransfer {
79 extern_methods!(
80 #[unsafe(method(init))]
81 #[unsafe(method_family = init)]
82 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
83
84 #[unsafe(method(new))]
85 #[unsafe(method_family = new)]
86 pub unsafe fn new() -> Retained<Self>;
87 );
88}