objc2_browser_engine_kit/generated/
BEDownloads.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7#[cfg(feature = "objc2-uniform-type-identifiers")]
8use objc2_uniform_type_identifiers::*;
9
10use crate::*;
11
12extern_class!(
13    /// [Apple's documentation](https://developer.apple.com/documentation/browserenginekit/bedownloadmonitorlocation?language=objc)
14    #[unsafe(super(NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    pub struct BEDownloadMonitorLocation;
17);
18
19unsafe impl Send for BEDownloadMonitorLocation {}
20
21unsafe impl Sync for BEDownloadMonitorLocation {}
22
23extern_conformance!(
24    unsafe impl NSObjectProtocol for BEDownloadMonitorLocation {}
25);
26
27impl BEDownloadMonitorLocation {
28    extern_methods!(
29        #[unsafe(method(init))]
30        #[unsafe(method_family = init)]
31        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
32
33        #[unsafe(method(new))]
34        #[unsafe(method_family = new)]
35        pub unsafe fn new() -> Retained<Self>;
36
37        #[unsafe(method(url))]
38        #[unsafe(method_family = none)]
39        pub unsafe fn url(&self) -> Retained<NSURL>;
40
41        #[unsafe(method(bookmarkData))]
42        #[unsafe(method_family = none)]
43        pub unsafe fn bookmarkData(&self) -> Retained<NSData>;
44    );
45}
46
47extern_class!(
48    /// [Apple's documentation](https://developer.apple.com/documentation/browserenginekit/bedownloadmonitor?language=objc)
49    #[unsafe(super(NSObject))]
50    #[derive(Debug, PartialEq, Eq, Hash)]
51    pub struct BEDownloadMonitor;
52);
53
54unsafe impl Send for BEDownloadMonitor {}
55
56unsafe impl Sync for BEDownloadMonitor {}
57
58extern_conformance!(
59    unsafe impl NSObjectProtocol for BEDownloadMonitor {}
60);
61
62impl BEDownloadMonitor {
63    extern_methods!(
64        #[unsafe(method(init))]
65        #[unsafe(method_family = init)]
66        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
67
68        #[unsafe(method(new))]
69        #[unsafe(method_family = new)]
70        pub unsafe fn new() -> Retained<Self>;
71
72        #[unsafe(method(initWithSourceURL:destinationURL:observedProgress:liveActivityAccessToken:))]
73        #[unsafe(method_family = init)]
74        pub unsafe fn initWithSourceURL_destinationURL_observedProgress_liveActivityAccessToken(
75            this: Allocated<Self>,
76            source_url: &NSURL,
77            destination_url: &NSURL,
78            observed_progress: &NSProgress,
79            live_activity_access_token: &NSData,
80        ) -> Retained<Self>;
81
82        #[cfg(all(feature = "block2", feature = "objc2-uniform-type-identifiers"))]
83        #[unsafe(method(useDownloadsFolderWithPlaceholderType:finalFileCreatedHandler:))]
84        #[unsafe(method_family = none)]
85        pub unsafe fn useDownloadsFolderWithPlaceholderType_finalFileCreatedHandler(
86            &self,
87            r#type: Option<&UTType>,
88            final_file_created_handler: &block2::DynBlock<dyn Fn(*mut BEDownloadMonitorLocation)>,
89        );
90
91        #[cfg(feature = "block2")]
92        #[unsafe(method(beginMonitoring:))]
93        #[unsafe(method_family = none)]
94        pub unsafe fn beginMonitoring(
95            &self,
96            completion: &block2::DynBlock<dyn Fn(*mut BEDownloadMonitorLocation, *mut NSError)>,
97        );
98
99        #[cfg(feature = "block2")]
100        #[unsafe(method(resumeMonitoring:completionHandler:))]
101        #[unsafe(method_family = none)]
102        pub unsafe fn resumeMonitoring_completionHandler(
103            &self,
104            url: &NSURL,
105            completion_handler: &block2::DynBlock<dyn Fn(*mut NSError)>,
106        );
107
108        #[unsafe(method(identifier))]
109        #[unsafe(method_family = none)]
110        pub unsafe fn identifier(&self) -> Retained<NSUUID>;
111
112        #[unsafe(method(sourceURL))]
113        #[unsafe(method_family = none)]
114        pub unsafe fn sourceURL(&self) -> Retained<NSURL>;
115
116        #[unsafe(method(destinationURL))]
117        #[unsafe(method_family = none)]
118        pub unsafe fn destinationURL(&self) -> Retained<NSURL>;
119
120        #[unsafe(method(createAccessToken))]
121        #[unsafe(method_family = none)]
122        pub unsafe fn createAccessToken() -> Option<Retained<NSData>>;
123    );
124}