objc2_av_foundation/generated/
AVMetadataItem.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-media")]
7use objc2_core_media::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_class!(
13 #[unsafe(super(NSObject))]
15 #[derive(Debug, PartialEq, Eq, Hash)]
16 pub struct AVMetadataItem;
17);
18
19#[cfg(feature = "AVAsynchronousKeyValueLoading")]
20extern_conformance!(
21 unsafe impl AVAsynchronousKeyValueLoading for AVMetadataItem {}
22);
23
24extern_conformance!(
25 unsafe impl NSCopying for AVMetadataItem {}
26);
27
28unsafe impl CopyingHelper for AVMetadataItem {
29 type Result = Self;
30}
31
32extern_conformance!(
33 unsafe impl NSMutableCopying for AVMetadataItem {}
34);
35
36unsafe impl MutableCopyingHelper for AVMetadataItem {
37 type Result = AVMutableMetadataItem;
38}
39
40extern_conformance!(
41 unsafe impl NSObjectProtocol for AVMetadataItem {}
42);
43
44impl AVMetadataItem {
45 extern_methods!(
46 #[cfg(feature = "AVMetadataIdentifiers")]
47 #[unsafe(method(identifier))]
48 #[unsafe(method_family = none)]
49 pub unsafe fn identifier(&self) -> Option<Retained<AVMetadataIdentifier>>;
50
51 #[unsafe(method(extendedLanguageTag))]
52 #[unsafe(method_family = none)]
53 pub unsafe fn extendedLanguageTag(&self) -> Option<Retained<NSString>>;
54
55 #[unsafe(method(locale))]
56 #[unsafe(method_family = none)]
57 pub unsafe fn locale(&self) -> Option<Retained<NSLocale>>;
58
59 #[cfg(feature = "objc2-core-media")]
60 #[unsafe(method(time))]
61 #[unsafe(method_family = none)]
62 pub unsafe fn time(&self) -> CMTime;
63
64 #[cfg(feature = "objc2-core-media")]
65 #[unsafe(method(duration))]
66 #[unsafe(method_family = none)]
67 pub unsafe fn duration(&self) -> CMTime;
68
69 #[unsafe(method(dataType))]
70 #[unsafe(method_family = none)]
71 pub unsafe fn dataType(&self) -> Option<Retained<NSString>>;
72
73 #[unsafe(method(value))]
74 #[unsafe(method_family = none)]
75 pub unsafe fn value(&self)
76 -> Option<Retained<AnyObject >>;
77
78 #[cfg(feature = "AVMetadataFormat")]
79 #[unsafe(method(extraAttributes))]
80 #[unsafe(method_family = none)]
81 pub unsafe fn extraAttributes(
82 &self,
83 ) -> Option<Retained<NSDictionary<AVMetadataExtraAttributeKey, AnyObject>>>;
84 );
85}
86
87impl AVMetadataItem {
89 extern_methods!(
90 #[unsafe(method(init))]
91 #[unsafe(method_family = init)]
92 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
93
94 #[unsafe(method(new))]
95 #[unsafe(method_family = new)]
96 pub unsafe fn new() -> Retained<Self>;
97 );
98}
99
100impl AVMetadataItem {
102 extern_methods!(
103 #[unsafe(method(startDate))]
104 #[unsafe(method_family = none)]
105 pub unsafe fn startDate(&self) -> Option<Retained<NSDate>>;
106 );
107}
108
109impl AVMetadataItem {
111 extern_methods!(
112 #[unsafe(method(stringValue))]
113 #[unsafe(method_family = none)]
114 pub unsafe fn stringValue(&self) -> Option<Retained<NSString>>;
115
116 #[unsafe(method(numberValue))]
117 #[unsafe(method_family = none)]
118 pub unsafe fn numberValue(&self) -> Option<Retained<NSNumber>>;
119
120 #[unsafe(method(dateValue))]
121 #[unsafe(method_family = none)]
122 pub unsafe fn dateValue(&self) -> Option<Retained<NSDate>>;
123
124 #[unsafe(method(dataValue))]
125 #[unsafe(method_family = none)]
126 pub unsafe fn dataValue(&self) -> Option<Retained<NSData>>;
127 );
128}
129
130impl AVMetadataItem {
132 extern_methods!(
133 #[cfg(feature = "block2")]
134 #[unsafe(method(loadValuesAsynchronouslyForKeys:completionHandler:))]
135 #[unsafe(method_family = none)]
136 pub unsafe fn loadValuesAsynchronouslyForKeys_completionHandler(
137 &self,
138 keys: &NSArray<NSString>,
139 handler: Option<&block2::DynBlock<dyn Fn()>>,
140 );
141 );
142}
143
144impl AVMetadataItem {
146 extern_methods!(
147 #[unsafe(method(metadataItemsFromArray:filteredAndSortedAccordingToPreferredLanguages:))]
155 #[unsafe(method_family = none)]
156 pub unsafe fn metadataItemsFromArray_filteredAndSortedAccordingToPreferredLanguages(
157 metadata_items: &NSArray<AVMetadataItem>,
158 preferred_languages: &NSArray<NSString>,
159 ) -> Retained<NSArray<AVMetadataItem>>;
160
161 #[cfg(feature = "AVMetadataIdentifiers")]
162 #[unsafe(method(metadataItemsFromArray:filteredByIdentifier:))]
170 #[unsafe(method_family = none)]
171 pub unsafe fn metadataItemsFromArray_filteredByIdentifier(
172 metadata_items: &NSArray<AVMetadataItem>,
173 identifier: &AVMetadataIdentifier,
174 ) -> Retained<NSArray<AVMetadataItem>>;
175
176 #[unsafe(method(metadataItemsFromArray:filteredByMetadataItemFilter:))]
184 #[unsafe(method_family = none)]
185 pub unsafe fn metadataItemsFromArray_filteredByMetadataItemFilter(
186 metadata_items: &NSArray<AVMetadataItem>,
187 metadata_item_filter: &AVMetadataItemFilter,
188 ) -> Retained<NSArray<AVMetadataItem>>;
189 );
190}
191
192impl AVMetadataItem {
194 extern_methods!(
195 #[cfg(all(feature = "AVMetadataFormat", feature = "AVMetadataIdentifiers"))]
196 #[unsafe(method(identifierForKey:keySpace:))]
208 #[unsafe(method_family = none)]
209 pub unsafe fn identifierForKey_keySpace(
210 key: &AnyObject,
211 key_space: &AVMetadataKeySpace,
212 ) -> Option<Retained<AVMetadataIdentifier>>;
213
214 #[cfg(all(feature = "AVMetadataFormat", feature = "AVMetadataIdentifiers"))]
215 #[unsafe(method(keySpaceForIdentifier:))]
216 #[unsafe(method_family = none)]
217 pub unsafe fn keySpaceForIdentifier(
218 identifier: &AVMetadataIdentifier,
219 ) -> Option<Retained<AVMetadataKeySpace>>;
220
221 #[cfg(feature = "AVMetadataIdentifiers")]
222 #[unsafe(method(keyForIdentifier:))]
223 #[unsafe(method_family = none)]
224 pub unsafe fn keyForIdentifier(
225 identifier: &AVMetadataIdentifier,
226 ) -> Option<Retained<AnyObject>>;
227
228 #[unsafe(method(key))]
229 #[unsafe(method_family = none)]
230 pub unsafe fn key(&self) -> Option<Retained<AnyObject >>;
231
232 #[cfg(feature = "AVMetadataFormat")]
233 #[unsafe(method(commonKey))]
234 #[unsafe(method_family = none)]
235 pub unsafe fn commonKey(&self) -> Option<Retained<AVMetadataKey>>;
236
237 #[cfg(feature = "AVMetadataFormat")]
238 #[unsafe(method(keySpace))]
239 #[unsafe(method_family = none)]
240 pub unsafe fn keySpace(&self) -> Option<Retained<AVMetadataKeySpace>>;
241 );
242}
243
244extern_class!(
245 #[unsafe(super(AVMetadataItem, NSObject))]
247 #[derive(Debug, PartialEq, Eq, Hash)]
248 pub struct AVMutableMetadataItem;
249);
250
251#[cfg(feature = "AVAsynchronousKeyValueLoading")]
252extern_conformance!(
253 unsafe impl AVAsynchronousKeyValueLoading for AVMutableMetadataItem {}
254);
255
256extern_conformance!(
257 unsafe impl NSCopying for AVMutableMetadataItem {}
258);
259
260unsafe impl CopyingHelper for AVMutableMetadataItem {
261 type Result = AVMetadataItem;
262}
263
264extern_conformance!(
265 unsafe impl NSMutableCopying for AVMutableMetadataItem {}
266);
267
268unsafe impl MutableCopyingHelper for AVMutableMetadataItem {
269 type Result = Self;
270}
271
272extern_conformance!(
273 unsafe impl NSObjectProtocol for AVMutableMetadataItem {}
274);
275
276impl AVMutableMetadataItem {
277 extern_methods!(
278 #[cfg(feature = "AVMetadataIdentifiers")]
279 #[unsafe(method(identifier))]
280 #[unsafe(method_family = none)]
281 pub unsafe fn identifier(&self) -> Option<Retained<AVMetadataIdentifier>>;
282
283 #[cfg(feature = "AVMetadataIdentifiers")]
284 #[unsafe(method(setIdentifier:))]
286 #[unsafe(method_family = none)]
287 pub unsafe fn setIdentifier(&self, identifier: Option<&AVMetadataIdentifier>);
288
289 #[unsafe(method(extendedLanguageTag))]
290 #[unsafe(method_family = none)]
291 pub unsafe fn extendedLanguageTag(&self) -> Option<Retained<NSString>>;
292
293 #[unsafe(method(setExtendedLanguageTag:))]
295 #[unsafe(method_family = none)]
296 pub unsafe fn setExtendedLanguageTag(&self, extended_language_tag: Option<&NSString>);
297
298 #[unsafe(method(locale))]
299 #[unsafe(method_family = none)]
300 pub unsafe fn locale(&self) -> Option<Retained<NSLocale>>;
301
302 #[unsafe(method(setLocale:))]
304 #[unsafe(method_family = none)]
305 pub unsafe fn setLocale(&self, locale: Option<&NSLocale>);
306
307 #[cfg(feature = "objc2-core-media")]
308 #[unsafe(method(time))]
309 #[unsafe(method_family = none)]
310 pub unsafe fn time(&self) -> CMTime;
311
312 #[cfg(feature = "objc2-core-media")]
313 #[unsafe(method(setTime:))]
315 #[unsafe(method_family = none)]
316 pub unsafe fn setTime(&self, time: CMTime);
317
318 #[cfg(feature = "objc2-core-media")]
319 #[unsafe(method(duration))]
320 #[unsafe(method_family = none)]
321 pub unsafe fn duration(&self) -> CMTime;
322
323 #[cfg(feature = "objc2-core-media")]
324 #[unsafe(method(setDuration:))]
326 #[unsafe(method_family = none)]
327 pub unsafe fn setDuration(&self, duration: CMTime);
328
329 #[unsafe(method(dataType))]
330 #[unsafe(method_family = none)]
331 pub unsafe fn dataType(&self) -> Option<Retained<NSString>>;
332
333 #[unsafe(method(setDataType:))]
335 #[unsafe(method_family = none)]
336 pub unsafe fn setDataType(&self, data_type: Option<&NSString>);
337
338 #[unsafe(method(value))]
339 #[unsafe(method_family = none)]
340 pub unsafe fn value(&self)
341 -> Option<Retained<AnyObject >>;
342
343 #[unsafe(method(setValue:))]
345 #[unsafe(method_family = none)]
346 pub unsafe fn setValue(&self, value: Option<&AnyObject >);
347
348 #[cfg(feature = "AVMetadataFormat")]
349 #[unsafe(method(extraAttributes))]
350 #[unsafe(method_family = none)]
351 pub unsafe fn extraAttributes(
352 &self,
353 ) -> Option<Retained<NSDictionary<AVMetadataExtraAttributeKey, AnyObject>>>;
354
355 #[cfg(feature = "AVMetadataFormat")]
356 #[unsafe(method(setExtraAttributes:))]
358 #[unsafe(method_family = none)]
359 pub unsafe fn setExtraAttributes(
360 &self,
361 extra_attributes: Option<&NSDictionary<AVMetadataExtraAttributeKey, AnyObject>>,
362 );
363
364 #[unsafe(method(metadataItem))]
366 #[unsafe(method_family = none)]
367 pub unsafe fn metadataItem() -> Retained<AVMutableMetadataItem>;
368 );
369}
370
371impl AVMutableMetadataItem {
373 extern_methods!(
374 #[unsafe(method(init))]
375 #[unsafe(method_family = init)]
376 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
377
378 #[unsafe(method(new))]
379 #[unsafe(method_family = new)]
380 pub unsafe fn new() -> Retained<Self>;
381 );
382}
383
384impl AVMutableMetadataItem {
386 extern_methods!(
387 #[unsafe(method(startDate))]
388 #[unsafe(method_family = none)]
389 pub unsafe fn startDate(&self) -> Option<Retained<NSDate>>;
390
391 #[unsafe(method(setStartDate:))]
393 #[unsafe(method_family = none)]
394 pub unsafe fn setStartDate(&self, start_date: Option<&NSDate>);
395 );
396}
397
398impl AVMutableMetadataItem {
400 extern_methods!(
401 #[cfg(feature = "AVMetadataFormat")]
402 #[unsafe(method(keySpace))]
403 #[unsafe(method_family = none)]
404 pub unsafe fn keySpace(&self) -> Option<Retained<AVMetadataKeySpace>>;
405
406 #[cfg(feature = "AVMetadataFormat")]
407 #[unsafe(method(setKeySpace:))]
409 #[unsafe(method_family = none)]
410 pub unsafe fn setKeySpace(&self, key_space: Option<&AVMetadataKeySpace>);
411
412 #[unsafe(method(key))]
413 #[unsafe(method_family = none)]
414 pub unsafe fn key(&self) -> Option<Retained<AnyObject >>;
415
416 #[unsafe(method(setKey:))]
418 #[unsafe(method_family = none)]
419 pub unsafe fn setKey(&self, key: Option<&AnyObject >);
420 );
421}
422
423impl AVMetadataItem {
425 extern_methods!(
426 #[cfg(feature = "block2")]
427 #[unsafe(method(metadataItemWithPropertiesOfMetadataItem:valueLoadingHandler:))]
440 #[unsafe(method_family = none)]
441 pub unsafe fn metadataItemWithPropertiesOfMetadataItem_valueLoadingHandler(
442 metadata_item: &AVMetadataItem,
443 handler: &block2::DynBlock<dyn Fn(NonNull<AVMetadataItemValueRequest>)>,
444 ) -> Retained<AVMetadataItem>;
445 );
446}
447
448extern_class!(
449 #[unsafe(super(NSObject))]
451 #[derive(Debug, PartialEq, Eq, Hash)]
452 pub struct AVMetadataItemValueRequest;
453);
454
455extern_conformance!(
456 unsafe impl NSObjectProtocol for AVMetadataItemValueRequest {}
457);
458
459impl AVMetadataItemValueRequest {
460 extern_methods!(
461 #[unsafe(method(metadataItem))]
462 #[unsafe(method_family = none)]
463 pub unsafe fn metadataItem(&self) -> Option<Retained<AVMetadataItem>>;
464
465 #[unsafe(method(respondWithValue:))]
469 #[unsafe(method_family = none)]
470 pub unsafe fn respondWithValue(
471 &self,
472 value: &AnyObject, );
474
475 #[unsafe(method(respondWithError:))]
479 #[unsafe(method_family = none)]
480 pub unsafe fn respondWithError(&self, error: &NSError);
481 );
482}
483
484impl AVMetadataItemValueRequest {
486 extern_methods!(
487 #[unsafe(method(init))]
488 #[unsafe(method_family = init)]
489 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
490
491 #[unsafe(method(new))]
492 #[unsafe(method_family = new)]
493 pub unsafe fn new() -> Retained<Self>;
494 );
495}
496
497extern_class!(
498 #[unsafe(super(NSObject))]
504 #[derive(Debug, PartialEq, Eq, Hash)]
505 pub struct AVMetadataItemFilter;
506);
507
508unsafe impl Send for AVMetadataItemFilter {}
509
510unsafe impl Sync for AVMetadataItemFilter {}
511
512extern_conformance!(
513 unsafe impl NSObjectProtocol for AVMetadataItemFilter {}
514);
515
516impl AVMetadataItemFilter {
517 extern_methods!(
518 #[unsafe(method(metadataItemFilterForSharing))]
519 #[unsafe(method_family = none)]
520 pub unsafe fn metadataItemFilterForSharing() -> Retained<AVMetadataItemFilter>;
521 );
522}
523
524impl AVMetadataItemFilter {
526 extern_methods!(
527 #[unsafe(method(init))]
528 #[unsafe(method_family = init)]
529 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
530
531 #[unsafe(method(new))]
532 #[unsafe(method_family = new)]
533 pub unsafe fn new() -> Retained<Self>;
534 );
535}
536
537impl AVMetadataItem {
539 extern_methods!(
540 #[unsafe(method(metadataItemsFromArray:withLocale:))]
542 #[unsafe(method_family = none)]
543 pub unsafe fn metadataItemsFromArray_withLocale(
544 metadata_items: &NSArray<AVMetadataItem>,
545 locale: &NSLocale,
546 ) -> Retained<NSArray<AVMetadataItem>>;
547
548 #[cfg(feature = "AVMetadataFormat")]
549 #[unsafe(method(metadataItemsFromArray:withKey:keySpace:))]
551 #[unsafe(method_family = none)]
552 pub unsafe fn metadataItemsFromArray_withKey_keySpace(
553 metadata_items: &NSArray<AVMetadataItem>,
554 key: Option<&AnyObject>,
555 key_space: Option<&AVMetadataKeySpace>,
556 ) -> Retained<NSArray<AVMetadataItem>>;
557 );
558}
559
560impl AVMutableMetadataItem {
565 extern_methods!();
566}