objc2_av_foundation/generated/
AVMetadataItem.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::*;
6#[cfg(feature = "objc2-core-media")]
7use objc2_core_media::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_class!(
13    /// [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadataitem?language=objc)
14    #[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 /* NSObjectProtocol+ NSCopying */>>;
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
87/// Methods declared on superclass `NSObject`.
88impl 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
100/// AVMetadataItemDateRepresentation.
101impl 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
109/// AVMetadataItemTypeCoercion.
110impl 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
130/// AVAsynchronousKeyValueLoading.
131impl AVMetadataItem {
132    extern_methods!(
133        #[cfg(feature = "block2")]
134        /// # Safety
135        ///
136        /// `handler` block must be sendable.
137        #[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
147/// AVMetadataItemArrayFiltering.
148impl AVMetadataItem {
149    extern_methods!(
150        /// Filters an array of AVMetadataItems according to whether their locales match any language identifier in the specified array of preferred languages. The returned array is sorted according to the order of preference of the language each matches.
151        ///
152        /// Parameter `metadataItems`: An array of AVMetadataItems to be filtered and sorted.
153        ///
154        /// Parameter `preferredLanguages`: An array of language identifiers in order of preference, each of which is an IETF BCP 47 (RFC 4646) language identifier. If your goal is to provide the best match for the end user's preferred languages without consideration of your app's available localizations, pass [NSLocale preferredLanguages] as the value of preferredLanguages. However, if you want to filter the available choices in order to obtain the best match among the localizations that are available for your app, pass [NSBundle preferredLocalizationsFromArray:[[NSBundle mainBundle] localizations] forPreferences:[NSLocale preferredLanguages]] instead. The latter choice is normally more appropriate for strings intended for display as part of the app's UI.
155        ///
156        /// Returns: An instance of NSArray containing metadata items of the specified NSArray that match a preferred language, sorted according to the order of preference of the language each matches.
157        #[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        /// Filters an array of AVMetadataItems according to identifier.
166        ///
167        /// Parameter `metadataItems`: An array of AVMetadataItems to be filtered by identifier.
168        ///
169        /// Parameter `identifier`: The identifier that must be matched for a metadata item to be copied to the output array. Items are considered a match not only when their identifiers are equal to the specified identifier, and also when their identifiers conform to the specified identifier.
170        ///
171        /// Returns: An instance of NSArray containing the metadata items of the target NSArray that match the specified identifier.
172        #[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        /// Filters an array of AVMetadataItems using the supplied AVMetadataItemFilter.
180        ///
181        /// Parameter `metadataItems`: An array of AVMetadataItems to be filtered.
182        ///
183        /// Parameter `metadataItemFilter`: The AVMetadataItemFilter object for filtering the metadataItems.
184        ///
185        /// Returns: An instance of NSArray containing the metadata items of the target NSArray that have not been removed by metadataItemFilter.
186        #[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
195/// AVMetadataItemKeyAndKeyspace.
196impl AVMetadataItem {
197    extern_methods!(
198        #[cfg(all(feature = "AVMetadataFormat", feature = "AVMetadataIdentifiers"))]
199        /// Provides the metadata identifier that's equivalent to a key and keySpace.
200        ///
201        /// Parameter `key`: The metadata key.
202        ///
203        /// Parameter `keySpace`: The metadata keySpace.
204        ///
205        /// Returns: A metadata identifier equivalent to the given key and keySpace, or nil if no identifier can be constructed from the given key and keySpace.
206        ///
207        /// Metadata keys that are not instances of NSString, NSNumber, or NSData cannot be converted to metadata identifiers; they also cannot be written to media resources via AVAssetExportSession or AVAssetWriter.  Metadata item keySpaces must be a string of one to four printable ASCII characters.
208        ///
209        /// For custom identifiers, the keySpace AVMetadataKeySpaceQuickTimeMetadata is recommended.  This keySpace defines its key values to be expressed as reverse-DNS strings, which allows third parties to define their own keys in a well established way that avoids collisions.
210        ///
211        /// # Safety
212        ///
213        /// `key` should be of the correct type.
214        #[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 /* NSObjectProtocol+ NSCopying */>>;
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    /// [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmutablemetadataitem?language=objc)
253    #[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        /// Setter for [`identifier`][Self::identifier].
292        ///
293        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
294        #[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        /// Setter for [`extendedLanguageTag`][Self::extendedLanguageTag].
303        ///
304        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
305        #[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        /// Setter for [`locale`][Self::locale].
314        ///
315        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
316        #[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        /// Setter for [`time`][Self::time].
327        #[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        /// Setter for [`duration`][Self::duration].
338        #[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        /// Setter for [`dataType`][Self::dataType].
347        ///
348        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
349        #[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 /* NSObjectProtocol+ NSCopying */>>;
357
358        /// Setter for [`value`][Self::value].
359        ///
360        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
361        ///
362        /// # Safety
363        ///
364        /// `value` should be of the correct type.
365        #[unsafe(method(setValue:))]
366        #[unsafe(method_family = none)]
367        pub unsafe fn setValue(&self, value: Option<&AnyObject /* NSObjectProtocol+ NSCopying */>);
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        /// Setter for [`extraAttributes`][Self::extraAttributes].
378        ///
379        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
380        ///
381        /// # Safety
382        ///
383        /// `extra_attributes` generic should be of the correct type.
384        #[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        /// Returns an instance of AVMutableMetadataItem.
392        #[unsafe(method(metadataItem))]
393        #[unsafe(method_family = none)]
394        pub unsafe fn metadataItem() -> Retained<AVMutableMetadataItem>;
395    );
396}
397
398/// Methods declared on superclass `NSObject`.
399impl 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
411/// AVMutableMetadataItemDateRepresentation.
412impl AVMutableMetadataItem {
413    extern_methods!(
414        #[unsafe(method(startDate))]
415        #[unsafe(method_family = none)]
416        pub unsafe fn startDate(&self) -> Option<Retained<NSDate>>;
417
418        /// Setter for [`startDate`][Self::startDate].
419        ///
420        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
421        #[unsafe(method(setStartDate:))]
422        #[unsafe(method_family = none)]
423        pub unsafe fn setStartDate(&self, start_date: Option<&NSDate>);
424    );
425}
426
427/// AVMutableMetadataItemKeyAndKeyspace.
428impl 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        /// Setter for [`keySpace`][Self::keySpace].
437        ///
438        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
439        #[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 /* NSObjectProtocol+ NSCopying */>>;
446
447        /// Setter for [`key`][Self::key].
448        ///
449        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
450        ///
451        /// # Safety
452        ///
453        /// `key` should be of the correct type.
454        #[unsafe(method(setKey:))]
455        #[unsafe(method_family = none)]
456        pub unsafe fn setKey(&self, key: Option<&AnyObject /* NSObjectProtocol+ NSCopying */>);
457    );
458}
459
460/// AVMetadataItemLazyValueLoading.
461impl AVMetadataItem {
462    extern_methods!(
463        #[cfg(feature = "block2")]
464        /// Creates an instance of AVMutableMetadataItem with a value that you do not wish to load unless required, e.g. a large image value that needn't be loaded into memory until another module wants to display it.
465        ///
466        /// Parameter `metadataItem`: An instance of AVMetadataItem with the identifier, extendedLanguageTag, and other property values that you want the newly created instance of AVMetadataItem to share. The value of metadataItem is ignored.
467        ///
468        /// Parameter `handler`: A block that loads the value of the metadata item.
469        ///
470        /// Returns: An instance of AVMetadataItem.
471        ///
472        /// This method is intended for the creation of metadata items for optional display purposes, when there is no immediate need to load specific metadata values. For example, see the interface for navigation markers as consumed by AVPlayerViewController. It's not intended for the creation of metadata items with values that are required immediately, such as metadata items that are provided for impending serialization operations (e.g. via -[AVAssetExportSession setMetadata:] and other similar methods defined on AVAssetWriter and AVAssetWriterInput).
473        /// When -loadValuesAsynchronouslyForKeys:completionHandler: is invoked on an AVMetadataItem created via +metadataItemWithPropertiesOfMetadataItem:valueLoadingHandler: and
474        /// "
475        /// value" is among the keys for which loading is requested, the block you provide as the value loading handler will be executed on an arbitrary dispatch queue, off the main thread. The handler can perform I/O and other necessary operations to obtain the value. If loading of the value succeeds, provide the value by invoking -[AVMetadataItemValueRequest respondWithValue:]. If loading of the value fails, provide an instance of NSError that describes the failure by invoking -[AVMetadataItemValueRequest respondWithError:].
476        ///
477        /// # Safety
478        ///
479        /// `handler` block must be sendable.
480        #[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    /// [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadataitemvaluerequest?language=objc)
491    #[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        /// Allows you to respond to an AVMetadataItemValueRequest by providing a value.
507        ///
508        /// Parameter `value`: The value of the AVMetadataItem.
509        ///
510        /// # Safety
511        ///
512        /// `value` should be of the correct type.
513        #[unsafe(method(respondWithValue:))]
514        #[unsafe(method_family = none)]
515        pub unsafe fn respondWithValue(
516            &self,
517            value: &AnyObject, /* NSObjectProtocol+ NSCopying */
518        );
519
520        /// Allows you to respond to an AVMetadataItemValueRequest in the case of failure.
521        ///
522        /// Parameter `error`: An instance of NSError that describes a failure encountered while loading the value of an AVMetadataItem.
523        #[unsafe(method(respondWithError:))]
524        #[unsafe(method_family = none)]
525        pub unsafe fn respondWithError(&self, error: &NSError);
526    );
527}
528
529/// Methods declared on superclass `NSObject`.
530impl 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    /// Filters selected information from a metadata item.
544    ///
545    /// Subclasses of this type that are used from Swift must fulfill the requirements of a Sendable type.
546    ///
547    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmetadataitemfilter?language=objc)
548    #[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
569/// Methods declared on superclass `NSObject`.
570impl 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
582/// AVMetadataItemArrayFilteringDeprecable.
583impl AVMetadataItem {
584    extern_methods!(
585        /// Instead, use metadataItemsFromArray:filteredAndSortedAccordingToPreferredLanguages:.
586        #[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        /// Instead, use metadataItemsFromArray:filteredByIdentifier:.
595        ///
596        /// # Safety
597        ///
598        /// `key` should be of the correct type.
599        #[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
609/// SynchronousMetadataItemInterface.
610///
611/// Redeclarations of async-only AVMetadataItem interfaces to allow synchronous usage in the mutable subclass.
612///
613/// See AVMetadataItem's interface for more information about these interfaces.
614impl AVMutableMetadataItem {
615    extern_methods!();
616}