objc2_av_foundation/generated/
AVAssetDownloadStorageManager.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10pub type AVAssetDownloadedAssetEvictionPriority = NSString;
15
16extern "C" {
17 pub static AVAssetDownloadedAssetEvictionPriorityImportant:
21 &'static AVAssetDownloadedAssetEvictionPriority;
22}
23
24extern "C" {
25 pub static AVAssetDownloadedAssetEvictionPriorityDefault:
29 &'static AVAssetDownloadedAssetEvictionPriority;
30}
31
32extern_class!(
33 #[unsafe(super(NSObject))]
40 #[derive(Debug, PartialEq, Eq, Hash)]
41 pub struct AVAssetDownloadStorageManager;
42);
43
44extern_conformance!(
45 unsafe impl NSObjectProtocol for AVAssetDownloadStorageManager {}
46);
47
48impl AVAssetDownloadStorageManager {
49 extern_methods!(
50 #[unsafe(method(sharedDownloadStorageManager))]
52 #[unsafe(method_family = none)]
53 pub unsafe fn sharedDownloadStorageManager() -> Retained<AVAssetDownloadStorageManager>;
54
55 #[unsafe(method(setStorageManagementPolicy:forURL:))]
59 #[unsafe(method_family = none)]
60 pub unsafe fn setStorageManagementPolicy_forURL(
61 &self,
62 storage_management_policy: &AVAssetDownloadStorageManagementPolicy,
63 download_storage_url: &NSURL,
64 );
65
66 #[unsafe(method(storageManagementPolicyForURL:))]
70 #[unsafe(method_family = none)]
71 pub unsafe fn storageManagementPolicyForURL(
72 &self,
73 download_storage_url: &NSURL,
74 ) -> Option<Retained<AVAssetDownloadStorageManagementPolicy>>;
75 );
76}
77
78impl AVAssetDownloadStorageManager {
80 extern_methods!(
81 #[unsafe(method(init))]
82 #[unsafe(method_family = init)]
83 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
84
85 #[unsafe(method(new))]
86 #[unsafe(method_family = new)]
87 pub unsafe fn new() -> Retained<Self>;
88 );
89}
90
91extern_class!(
92 #[unsafe(super(NSObject))]
98 #[derive(Debug, PartialEq, Eq, Hash)]
99 pub struct AVAssetDownloadStorageManagementPolicy;
100);
101
102extern_conformance!(
103 unsafe impl NSCopying for AVAssetDownloadStorageManagementPolicy {}
104);
105
106unsafe impl CopyingHelper for AVAssetDownloadStorageManagementPolicy {
107 type Result = Self;
108}
109
110extern_conformance!(
111 unsafe impl NSMutableCopying for AVAssetDownloadStorageManagementPolicy {}
112);
113
114unsafe impl MutableCopyingHelper for AVAssetDownloadStorageManagementPolicy {
115 type Result = AVMutableAssetDownloadStorageManagementPolicy;
116}
117
118extern_conformance!(
119 unsafe impl NSObjectProtocol for AVAssetDownloadStorageManagementPolicy {}
120);
121
122impl AVAssetDownloadStorageManagementPolicy {
123 extern_methods!(
124 #[unsafe(method(priority))]
129 #[unsafe(method_family = none)]
130 pub unsafe fn priority(&self) -> Retained<AVAssetDownloadedAssetEvictionPriority>;
131
132 #[unsafe(method(expirationDate))]
134 #[unsafe(method_family = none)]
135 pub unsafe fn expirationDate(&self) -> Retained<NSDate>;
136 );
137}
138
139impl AVAssetDownloadStorageManagementPolicy {
141 extern_methods!(
142 #[unsafe(method(init))]
143 #[unsafe(method_family = init)]
144 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
145
146 #[unsafe(method(new))]
147 #[unsafe(method_family = new)]
148 pub unsafe fn new() -> Retained<Self>;
149 );
150}
151
152extern_class!(
153 #[unsafe(super(AVAssetDownloadStorageManagementPolicy, NSObject))]
159 #[derive(Debug, PartialEq, Eq, Hash)]
160 pub struct AVMutableAssetDownloadStorageManagementPolicy;
161);
162
163extern_conformance!(
164 unsafe impl NSCopying for AVMutableAssetDownloadStorageManagementPolicy {}
165);
166
167unsafe impl CopyingHelper for AVMutableAssetDownloadStorageManagementPolicy {
168 type Result = AVAssetDownloadStorageManagementPolicy;
169}
170
171extern_conformance!(
172 unsafe impl NSMutableCopying for AVMutableAssetDownloadStorageManagementPolicy {}
173);
174
175unsafe impl MutableCopyingHelper for AVMutableAssetDownloadStorageManagementPolicy {
176 type Result = Self;
177}
178
179extern_conformance!(
180 unsafe impl NSObjectProtocol for AVMutableAssetDownloadStorageManagementPolicy {}
181);
182
183impl AVMutableAssetDownloadStorageManagementPolicy {
184 extern_methods!(
185 #[unsafe(method(priority))]
190 #[unsafe(method_family = none)]
191 pub unsafe fn priority(&self) -> Retained<AVAssetDownloadedAssetEvictionPriority>;
192
193 #[unsafe(method(setPriority:))]
197 #[unsafe(method_family = none)]
198 pub unsafe fn setPriority(&self, priority: &AVAssetDownloadedAssetEvictionPriority);
199
200 #[unsafe(method(expirationDate))]
202 #[unsafe(method_family = none)]
203 pub unsafe fn expirationDate(&self) -> Retained<NSDate>;
204
205 #[unsafe(method(setExpirationDate:))]
209 #[unsafe(method_family = none)]
210 pub unsafe fn setExpirationDate(&self, expiration_date: &NSDate);
211 );
212}
213
214impl AVMutableAssetDownloadStorageManagementPolicy {
216 extern_methods!(
217 #[unsafe(method(init))]
218 #[unsafe(method_family = init)]
219 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
220
221 #[unsafe(method(new))]
222 #[unsafe(method_family = new)]
223 pub unsafe fn new() -> Retained<Self>;
224 );
225}