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:))]
138 #[unsafe(method_family = none)]
139 pub unsafe fn loadValuesAsynchronouslyForKeys_completionHandler(
140 &self,
141 keys: &NSArray<NSString>,
142 handler: Option<&block2::DynBlock<dyn Fn()>>,
143 );
144 );
145}
146
147impl AVMetadataItem {
149 extern_methods!(
150 #[unsafe(method(metadataItemsFromArray:filteredAndSortedAccordingToPreferredLanguages:))]
158 #[unsafe(method_family = none)]
159 pub unsafe fn metadataItemsFromArray_filteredAndSortedAccordingToPreferredLanguages(
160 metadata_items: &NSArray<AVMetadataItem>,
161 preferred_languages: &NSArray<NSString>,
162 ) -> Retained<NSArray<AVMetadataItem>>;
163
164 #[cfg(feature = "AVMetadataIdentifiers")]
165 #[unsafe(method(metadataItemsFromArray:filteredByIdentifier:))]
173 #[unsafe(method_family = none)]
174 pub unsafe fn metadataItemsFromArray_filteredByIdentifier(
175 metadata_items: &NSArray<AVMetadataItem>,
176 identifier: &AVMetadataIdentifier,
177 ) -> Retained<NSArray<AVMetadataItem>>;
178
179 #[unsafe(method(metadataItemsFromArray:filteredByMetadataItemFilter:))]
187 #[unsafe(method_family = none)]
188 pub unsafe fn metadataItemsFromArray_filteredByMetadataItemFilter(
189 metadata_items: &NSArray<AVMetadataItem>,
190 metadata_item_filter: &AVMetadataItemFilter,
191 ) -> Retained<NSArray<AVMetadataItem>>;
192 );
193}
194
195impl AVMetadataItem {
197 extern_methods!(
198 #[cfg(all(feature = "AVMetadataFormat", feature = "AVMetadataIdentifiers"))]
199 #[unsafe(method(identifierForKey:keySpace:))]
215 #[unsafe(method_family = none)]
216 pub unsafe fn identifierForKey_keySpace(
217 key: &AnyObject,
218 key_space: &AVMetadataKeySpace,
219 ) -> Option<Retained<AVMetadataIdentifier>>;
220
221 #[cfg(all(feature = "AVMetadataFormat", feature = "AVMetadataIdentifiers"))]
222 #[unsafe(method(keySpaceForIdentifier:))]
223 #[unsafe(method_family = none)]
224 pub unsafe fn keySpaceForIdentifier(
225 identifier: &AVMetadataIdentifier,
226 ) -> Option<Retained<AVMetadataKeySpace>>;
227
228 #[cfg(feature = "AVMetadataIdentifiers")]
229 #[unsafe(method(keyForIdentifier:))]
230 #[unsafe(method_family = none)]
231 pub unsafe fn keyForIdentifier(
232 identifier: &AVMetadataIdentifier,
233 ) -> Option<Retained<AnyObject>>;
234
235 #[unsafe(method(key))]
236 #[unsafe(method_family = none)]
237 pub unsafe fn key(&self) -> Option<Retained<AnyObject >>;
238
239 #[cfg(feature = "AVMetadataFormat")]
240 #[unsafe(method(commonKey))]
241 #[unsafe(method_family = none)]
242 pub unsafe fn commonKey(&self) -> Option<Retained<AVMetadataKey>>;
243
244 #[cfg(feature = "AVMetadataFormat")]
245 #[unsafe(method(keySpace))]
246 #[unsafe(method_family = none)]
247 pub unsafe fn keySpace(&self) -> Option<Retained<AVMetadataKeySpace>>;
248 );
249}
250
251extern_class!(
252 #[unsafe(super(AVMetadataItem, NSObject))]
254 #[derive(Debug, PartialEq, Eq, Hash)]
255 pub struct AVMutableMetadataItem;
256);
257
258#[cfg(feature = "AVAsynchronousKeyValueLoading")]
259extern_conformance!(
260 unsafe impl AVAsynchronousKeyValueLoading for AVMutableMetadataItem {}
261);
262
263extern_conformance!(
264 unsafe impl NSCopying for AVMutableMetadataItem {}
265);
266
267unsafe impl CopyingHelper for AVMutableMetadataItem {
268 type Result = AVMetadataItem;
269}
270
271extern_conformance!(
272 unsafe impl NSMutableCopying for AVMutableMetadataItem {}
273);
274
275unsafe impl MutableCopyingHelper for AVMutableMetadataItem {
276 type Result = Self;
277}
278
279extern_conformance!(
280 unsafe impl NSObjectProtocol for AVMutableMetadataItem {}
281);
282
283impl AVMutableMetadataItem {
284 extern_methods!(
285 #[cfg(feature = "AVMetadataIdentifiers")]
286 #[unsafe(method(identifier))]
287 #[unsafe(method_family = none)]
288 pub unsafe fn identifier(&self) -> Option<Retained<AVMetadataIdentifier>>;
289
290 #[cfg(feature = "AVMetadataIdentifiers")]
291 #[unsafe(method(setIdentifier:))]
295 #[unsafe(method_family = none)]
296 pub unsafe fn setIdentifier(&self, identifier: Option<&AVMetadataIdentifier>);
297
298 #[unsafe(method(extendedLanguageTag))]
299 #[unsafe(method_family = none)]
300 pub unsafe fn extendedLanguageTag(&self) -> Option<Retained<NSString>>;
301
302 #[unsafe(method(setExtendedLanguageTag:))]
306 #[unsafe(method_family = none)]
307 pub unsafe fn setExtendedLanguageTag(&self, extended_language_tag: Option<&NSString>);
308
309 #[unsafe(method(locale))]
310 #[unsafe(method_family = none)]
311 pub unsafe fn locale(&self) -> Option<Retained<NSLocale>>;
312
313 #[unsafe(method(setLocale:))]
317 #[unsafe(method_family = none)]
318 pub unsafe fn setLocale(&self, locale: Option<&NSLocale>);
319
320 #[cfg(feature = "objc2-core-media")]
321 #[unsafe(method(time))]
322 #[unsafe(method_family = none)]
323 pub unsafe fn time(&self) -> CMTime;
324
325 #[cfg(feature = "objc2-core-media")]
326 #[unsafe(method(setTime:))]
328 #[unsafe(method_family = none)]
329 pub unsafe fn setTime(&self, time: CMTime);
330
331 #[cfg(feature = "objc2-core-media")]
332 #[unsafe(method(duration))]
333 #[unsafe(method_family = none)]
334 pub unsafe fn duration(&self) -> CMTime;
335
336 #[cfg(feature = "objc2-core-media")]
337 #[unsafe(method(setDuration:))]
339 #[unsafe(method_family = none)]
340 pub unsafe fn setDuration(&self, duration: CMTime);
341
342 #[unsafe(method(dataType))]
343 #[unsafe(method_family = none)]
344 pub unsafe fn dataType(&self) -> Option<Retained<NSString>>;
345
346 #[unsafe(method(setDataType:))]
350 #[unsafe(method_family = none)]
351 pub unsafe fn setDataType(&self, data_type: Option<&NSString>);
352
353 #[unsafe(method(value))]
354 #[unsafe(method_family = none)]
355 pub unsafe fn value(&self)
356 -> Option<Retained<AnyObject >>;
357
358 #[unsafe(method(setValue:))]
366 #[unsafe(method_family = none)]
367 pub unsafe fn setValue(&self, value: Option<&AnyObject >);
368
369 #[cfg(feature = "AVMetadataFormat")]
370 #[unsafe(method(extraAttributes))]
371 #[unsafe(method_family = none)]
372 pub unsafe fn extraAttributes(
373 &self,
374 ) -> Option<Retained<NSDictionary<AVMetadataExtraAttributeKey, AnyObject>>>;
375
376 #[cfg(feature = "AVMetadataFormat")]
377 #[unsafe(method(setExtraAttributes:))]
385 #[unsafe(method_family = none)]
386 pub unsafe fn setExtraAttributes(
387 &self,
388 extra_attributes: Option<&NSDictionary<AVMetadataExtraAttributeKey, AnyObject>>,
389 );
390
391 #[unsafe(method(metadataItem))]
393 #[unsafe(method_family = none)]
394 pub unsafe fn metadataItem() -> Retained<AVMutableMetadataItem>;
395 );
396}
397
398impl AVMutableMetadataItem {
400 extern_methods!(
401 #[unsafe(method(init))]
402 #[unsafe(method_family = init)]
403 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
404
405 #[unsafe(method(new))]
406 #[unsafe(method_family = new)]
407 pub unsafe fn new() -> Retained<Self>;
408 );
409}
410
411impl AVMutableMetadataItem {
413 extern_methods!(
414 #[unsafe(method(startDate))]
415 #[unsafe(method_family = none)]
416 pub unsafe fn startDate(&self) -> Option<Retained<NSDate>>;
417
418 #[unsafe(method(setStartDate:))]
422 #[unsafe(method_family = none)]
423 pub unsafe fn setStartDate(&self, start_date: Option<&NSDate>);
424 );
425}
426
427impl AVMutableMetadataItem {
429 extern_methods!(
430 #[cfg(feature = "AVMetadataFormat")]
431 #[unsafe(method(keySpace))]
432 #[unsafe(method_family = none)]
433 pub unsafe fn keySpace(&self) -> Option<Retained<AVMetadataKeySpace>>;
434
435 #[cfg(feature = "AVMetadataFormat")]
436 #[unsafe(method(setKeySpace:))]
440 #[unsafe(method_family = none)]
441 pub unsafe fn setKeySpace(&self, key_space: Option<&AVMetadataKeySpace>);
442
443 #[unsafe(method(key))]
444 #[unsafe(method_family = none)]
445 pub unsafe fn key(&self) -> Option<Retained<AnyObject >>;
446
447 #[unsafe(method(setKey:))]
455 #[unsafe(method_family = none)]
456 pub unsafe fn setKey(&self, key: Option<&AnyObject >);
457 );
458}
459
460impl AVMetadataItem {
462 extern_methods!(
463 #[cfg(feature = "block2")]
464 #[unsafe(method(metadataItemWithPropertiesOfMetadataItem:valueLoadingHandler:))]
481 #[unsafe(method_family = none)]
482 pub unsafe fn metadataItemWithPropertiesOfMetadataItem_valueLoadingHandler(
483 metadata_item: &AVMetadataItem,
484 handler: &block2::DynBlock<dyn Fn(NonNull<AVMetadataItemValueRequest>)>,
485 ) -> Retained<AVMetadataItem>;
486 );
487}
488
489extern_class!(
490 #[unsafe(super(NSObject))]
492 #[derive(Debug, PartialEq, Eq, Hash)]
493 pub struct AVMetadataItemValueRequest;
494);
495
496extern_conformance!(
497 unsafe impl NSObjectProtocol for AVMetadataItemValueRequest {}
498);
499
500impl AVMetadataItemValueRequest {
501 extern_methods!(
502 #[unsafe(method(metadataItem))]
503 #[unsafe(method_family = none)]
504 pub unsafe fn metadataItem(&self) -> Option<Retained<AVMetadataItem>>;
505
506 #[unsafe(method(respondWithValue:))]
514 #[unsafe(method_family = none)]
515 pub unsafe fn respondWithValue(
516 &self,
517 value: &AnyObject, );
519
520 #[unsafe(method(respondWithError:))]
524 #[unsafe(method_family = none)]
525 pub unsafe fn respondWithError(&self, error: &NSError);
526 );
527}
528
529impl AVMetadataItemValueRequest {
531 extern_methods!(
532 #[unsafe(method(init))]
533 #[unsafe(method_family = init)]
534 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
535
536 #[unsafe(method(new))]
537 #[unsafe(method_family = new)]
538 pub unsafe fn new() -> Retained<Self>;
539 );
540}
541
542extern_class!(
543 #[unsafe(super(NSObject))]
549 #[derive(Debug, PartialEq, Eq, Hash)]
550 pub struct AVMetadataItemFilter;
551);
552
553unsafe impl Send for AVMetadataItemFilter {}
554
555unsafe impl Sync for AVMetadataItemFilter {}
556
557extern_conformance!(
558 unsafe impl NSObjectProtocol for AVMetadataItemFilter {}
559);
560
561impl AVMetadataItemFilter {
562 extern_methods!(
563 #[unsafe(method(metadataItemFilterForSharing))]
564 #[unsafe(method_family = none)]
565 pub unsafe fn metadataItemFilterForSharing() -> Retained<AVMetadataItemFilter>;
566 );
567}
568
569impl AVMetadataItemFilter {
571 extern_methods!(
572 #[unsafe(method(init))]
573 #[unsafe(method_family = init)]
574 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
575
576 #[unsafe(method(new))]
577 #[unsafe(method_family = new)]
578 pub unsafe fn new() -> Retained<Self>;
579 );
580}
581
582impl AVMetadataItem {
584 extern_methods!(
585 #[unsafe(method(metadataItemsFromArray:withLocale:))]
587 #[unsafe(method_family = none)]
588 pub unsafe fn metadataItemsFromArray_withLocale(
589 metadata_items: &NSArray<AVMetadataItem>,
590 locale: &NSLocale,
591 ) -> Retained<NSArray<AVMetadataItem>>;
592
593 #[cfg(feature = "AVMetadataFormat")]
594 #[unsafe(method(metadataItemsFromArray:withKey:keySpace:))]
600 #[unsafe(method_family = none)]
601 pub unsafe fn metadataItemsFromArray_withKey_keySpace(
602 metadata_items: &NSArray<AVMetadataItem>,
603 key: Option<&AnyObject>,
604 key_space: Option<&AVMetadataKeySpace>,
605 ) -> Retained<NSArray<AVMetadataItem>>;
606 );
607}
608
609impl AVMutableMetadataItem {
615 extern_methods!();
616}