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;
17
18extern "C" {
19 pub static AVAssetDownloadedAssetEvictionPriorityImportant:
28 &'static AVAssetDownloadedAssetEvictionPriority;
29}
30
31extern "C" {
32 pub static AVAssetDownloadedAssetEvictionPriorityDefault:
34 &'static AVAssetDownloadedAssetEvictionPriority;
35}
36
37extern_class!(
38 #[unsafe(super(NSObject))]
40 #[derive(Debug, PartialEq, Eq, Hash)]
41 pub struct AVAssetDownloadStorageManager;
42);
43
44unsafe impl NSObjectProtocol for AVAssetDownloadStorageManager {}
45
46impl AVAssetDownloadStorageManager {
47 extern_methods!(
48 #[unsafe(method(sharedDownloadStorageManager))]
50 #[unsafe(method_family = none)]
51 pub unsafe fn sharedDownloadStorageManager() -> Retained<AVAssetDownloadStorageManager>;
52
53 #[unsafe(method(setStorageManagementPolicy:forURL:))]
57 #[unsafe(method_family = none)]
58 pub unsafe fn setStorageManagementPolicy_forURL(
59 &self,
60 storage_management_policy: &AVAssetDownloadStorageManagementPolicy,
61 download_storage_url: &NSURL,
62 );
63
64 #[unsafe(method(storageManagementPolicyForURL:))]
69 #[unsafe(method_family = none)]
70 pub unsafe fn storageManagementPolicyForURL(
71 &self,
72 download_storage_url: &NSURL,
73 ) -> Option<Retained<AVAssetDownloadStorageManagementPolicy>>;
74 );
75}
76
77impl AVAssetDownloadStorageManager {
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}
89
90extern_class!(
91 #[unsafe(super(NSObject))]
93 #[derive(Debug, PartialEq, Eq, Hash)]
94 pub struct AVAssetDownloadStorageManagementPolicy;
95);
96
97unsafe impl NSCopying for AVAssetDownloadStorageManagementPolicy {}
98
99unsafe impl CopyingHelper for AVAssetDownloadStorageManagementPolicy {
100 type Result = Self;
101}
102
103unsafe impl NSMutableCopying for AVAssetDownloadStorageManagementPolicy {}
104
105unsafe impl MutableCopyingHelper for AVAssetDownloadStorageManagementPolicy {
106 type Result = AVMutableAssetDownloadStorageManagementPolicy;
107}
108
109unsafe impl NSObjectProtocol for AVAssetDownloadStorageManagementPolicy {}
110
111impl AVAssetDownloadStorageManagementPolicy {
112 extern_methods!(
113 #[unsafe(method(priority))]
114 #[unsafe(method_family = none)]
115 pub unsafe fn priority(&self) -> Retained<AVAssetDownloadedAssetEvictionPriority>;
116
117 #[unsafe(method(expirationDate))]
118 #[unsafe(method_family = none)]
119 pub unsafe fn expirationDate(&self) -> Retained<NSDate>;
120 );
121}
122
123impl AVAssetDownloadStorageManagementPolicy {
125 extern_methods!(
126 #[unsafe(method(init))]
127 #[unsafe(method_family = init)]
128 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
129
130 #[unsafe(method(new))]
131 #[unsafe(method_family = new)]
132 pub unsafe fn new() -> Retained<Self>;
133 );
134}
135
136extern_class!(
137 #[unsafe(super(AVAssetDownloadStorageManagementPolicy, NSObject))]
144 #[derive(Debug, PartialEq, Eq, Hash)]
145 pub struct AVMutableAssetDownloadStorageManagementPolicy;
146);
147
148unsafe impl NSCopying for AVMutableAssetDownloadStorageManagementPolicy {}
149
150unsafe impl CopyingHelper for AVMutableAssetDownloadStorageManagementPolicy {
151 type Result = AVAssetDownloadStorageManagementPolicy;
152}
153
154unsafe impl NSMutableCopying for AVMutableAssetDownloadStorageManagementPolicy {}
155
156unsafe impl MutableCopyingHelper for AVMutableAssetDownloadStorageManagementPolicy {
157 type Result = Self;
158}
159
160unsafe impl NSObjectProtocol for AVMutableAssetDownloadStorageManagementPolicy {}
161
162impl AVMutableAssetDownloadStorageManagementPolicy {
163 extern_methods!(
164 #[unsafe(method(priority))]
165 #[unsafe(method_family = none)]
166 pub unsafe fn priority(&self) -> Retained<AVAssetDownloadedAssetEvictionPriority>;
167
168 #[unsafe(method(setPriority:))]
170 #[unsafe(method_family = none)]
171 pub unsafe fn setPriority(&self, priority: &AVAssetDownloadedAssetEvictionPriority);
172
173 #[unsafe(method(expirationDate))]
174 #[unsafe(method_family = none)]
175 pub unsafe fn expirationDate(&self) -> Retained<NSDate>;
176
177 #[unsafe(method(setExpirationDate:))]
179 #[unsafe(method_family = none)]
180 pub unsafe fn setExpirationDate(&self, expiration_date: &NSDate);
181 );
182}
183
184impl AVMutableAssetDownloadStorageManagementPolicy {
186 extern_methods!(
187 #[unsafe(method(init))]
188 #[unsafe(method_family = init)]
189 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
190
191 #[unsafe(method(new))]
192 #[unsafe(method_family = new)]
193 pub unsafe fn new() -> Retained<Self>;
194 );
195}