objc2_av_foundation/generated/
AVMediaSelectionGroup.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// AVMediaSelectionGroup provides a collection of mutually exclusive options for the presentation of media within an asset.
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmediaselectiongroup?language=objc)
13    #[unsafe(super(NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    pub struct AVMediaSelectionGroup;
16);
17
18extern_conformance!(
19    unsafe impl NSCopying for AVMediaSelectionGroup {}
20);
21
22unsafe impl CopyingHelper for AVMediaSelectionGroup {
23    type Result = Self;
24}
25
26extern_conformance!(
27    unsafe impl NSObjectProtocol for AVMediaSelectionGroup {}
28);
29
30impl AVMediaSelectionGroup {
31    extern_methods!(
32        /// A collection of mutually exclusive media selection options.
33        ///
34        /// An NSArray of AVMediaSelectionOption*.
35        #[unsafe(method(options))]
36        #[unsafe(method_family = none)]
37        pub unsafe fn options(&self) -> Retained<NSArray<AVMediaSelectionOption>>;
38
39        /// Indicates the default option in the group, i.e. the option that's intended for use in the absence of a specific end-user selection or preference.
40        ///
41        /// Can be nil, indicating that without a specific end-user selection or preference, no option in the group is intended to be selected.
42        #[unsafe(method(defaultOption))]
43        #[unsafe(method_family = none)]
44        pub unsafe fn defaultOption(&self) -> Option<Retained<AVMediaSelectionOption>>;
45
46        /// Indicates whether it's possible to present none of the options in the group when an associated AVPlayerItem is played.
47        ///
48        /// If allowsEmptySelection is YES, all of the available media options in the group can be deselected by passing nil
49        /// as the specified AVMediaSelectionOption to -[AVPlayerItem selectMediaOption:inMediaSelectionGroup:].
50        #[unsafe(method(allowsEmptySelection))]
51        #[unsafe(method_family = none)]
52        pub unsafe fn allowsEmptySelection(&self) -> bool;
53
54        /// Returns the instance of AVMediaSelectionOption with properties that match the specified property list.
55        ///
56        /// - Parameter plist: A property list previously obtained from an option in the group via -[AVMediaSelectionOption propertyList].
57        ///
58        /// - Returns: If the specified properties match those of an option in the group, an instance of AVMediaSelectionOption. Otherwise nil.
59        ///
60        /// # Safety
61        ///
62        /// `plist` should be of the correct type.
63        #[unsafe(method(mediaSelectionOptionWithPropertyList:))]
64        #[unsafe(method_family = none)]
65        pub unsafe fn mediaSelectionOptionWithPropertyList(
66            &self,
67            plist: &AnyObject,
68        ) -> Option<Retained<AVMediaSelectionOption>>;
69    );
70}
71
72/// Methods declared on superclass `NSObject`.
73impl AVMediaSelectionGroup {
74    extern_methods!(
75        #[unsafe(method(init))]
76        #[unsafe(method_family = init)]
77        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
78
79        #[unsafe(method(new))]
80        #[unsafe(method_family = new)]
81        pub unsafe fn new() -> Retained<Self>;
82    );
83}
84
85/// AVMediaSelectionOptionFiltering.
86///
87/// Filtering of media selection options.
88///
89/// The AVMediaSelectionOptionFiltering category is provided for convenience in filtering the media selection options in a group
90/// according to playability, locale, and media characteristics.
91/// Note that it's possible to implement additional filtering behaviors by using -[NSArray indexesOfObjectsPassingTest:].
92impl AVMediaSelectionGroup {
93    extern_methods!(
94        /// Filters an array of AVMediaSelectionOptions according to whether they are playable.
95        ///
96        /// - Parameter mediaSelectionOptions: An array of AVMediaSelectionOption to be filtered according to whether they are playable.
97        ///
98        /// - Returns: An instance of NSArray containing the media selection options of the specified NSArray that are playable.
99        #[unsafe(method(playableMediaSelectionOptionsFromArray:))]
100        #[unsafe(method_family = none)]
101        pub unsafe fn playableMediaSelectionOptionsFromArray(
102            media_selection_options: &NSArray<AVMediaSelectionOption>,
103        ) -> Retained<NSArray<AVMediaSelectionOption>>;
104
105        /// Filters an array of AVMediaSelectionOptions 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.
106        ///
107        /// - Parameter mediaSelectionOptions: An array of AVMediaSelectionOptions to be filtered and sorted.
108        /// - 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.
109        ///
110        /// - Returns: An instance of NSArray containing media selection options of the specified NSArray that match a preferred language, sorted according to the order of preference of the language each matches.
111        #[unsafe(method(mediaSelectionOptionsFromArray:filteredAndSortedAccordingToPreferredLanguages:))]
112        #[unsafe(method_family = none)]
113        pub unsafe fn mediaSelectionOptionsFromArray_filteredAndSortedAccordingToPreferredLanguages(
114            media_selection_options: &NSArray<AVMediaSelectionOption>,
115            preferred_languages: &NSArray<NSString>,
116        ) -> Retained<NSArray<AVMediaSelectionOption>>;
117
118        /// Filters an array of AVMediaSelectionOptions according to locale.
119        ///
120        /// - Parameter mediaSelectionOptions: An array of AVMediaSelectionOption to be filtered by locale.
121        /// - Parameter locale: The NSLocale that must be matched for a media selection option to be copied to the output array.
122        ///
123        /// - Returns: An instance of NSArray containing the media selection options of the specified NSArray that match the specified locale.
124        #[unsafe(method(mediaSelectionOptionsFromArray:withLocale:))]
125        #[unsafe(method_family = none)]
126        pub unsafe fn mediaSelectionOptionsFromArray_withLocale(
127            media_selection_options: &NSArray<AVMediaSelectionOption>,
128            locale: &NSLocale,
129        ) -> Retained<NSArray<AVMediaSelectionOption>>;
130
131        #[cfg(feature = "AVMediaFormat")]
132        /// Filters an array of AVMediaSelectionOptions according to one or more media characteristics.
133        ///
134        /// - Parameter mediaSelectionOptions: An array of AVMediaSelectionOptions to be filtered by media characteristic.
135        /// - Parameter mediaCharacteristics: The media characteristics that must be matched for a media selection option to be copied to the output array.
136        ///
137        /// - Returns: An instance of NSArray containing the media selection options of the specified NSArray that match the specified
138        /// media characteristics.
139        #[unsafe(method(mediaSelectionOptionsFromArray:withMediaCharacteristics:))]
140        #[unsafe(method_family = none)]
141        pub unsafe fn mediaSelectionOptionsFromArray_withMediaCharacteristics(
142            media_selection_options: &NSArray<AVMediaSelectionOption>,
143            media_characteristics: &NSArray<AVMediaCharacteristic>,
144        ) -> Retained<NSArray<AVMediaSelectionOption>>;
145
146        #[cfg(feature = "AVMediaFormat")]
147        /// Filters an array of AVMediaSelectionOptions according to whether they lack one or more media characteristics.
148        ///
149        /// - Parameter mediaSelectionOptions: An array of AVMediaSelectionOptions to be filtered by media characteristic.
150        /// - Parameter mediaCharacteristics: The media characteristics that must not be present for a media selection option to be copied to the output array.
151        ///
152        /// - Returns: An instance of NSArray containing the media selection options of the specified NSArray that lack the specified
153        /// media characteristics.
154        #[unsafe(method(mediaSelectionOptionsFromArray:withoutMediaCharacteristics:))]
155        #[unsafe(method_family = none)]
156        pub unsafe fn mediaSelectionOptionsFromArray_withoutMediaCharacteristics(
157            media_selection_options: &NSArray<AVMediaSelectionOption>,
158            media_characteristics: &NSArray<AVMediaCharacteristic>,
159        ) -> Retained<NSArray<AVMediaSelectionOption>>;
160    );
161}
162
163extern_class!(
164    /// AVMediaSelectionOption represents a specific option for the presentation of media within a group of options.
165    ///
166    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmediaselectionoption?language=objc)
167    #[unsafe(super(NSObject))]
168    #[derive(Debug, PartialEq, Eq, Hash)]
169    pub struct AVMediaSelectionOption;
170);
171
172extern_conformance!(
173    unsafe impl NSCopying for AVMediaSelectionOption {}
174);
175
176unsafe impl CopyingHelper for AVMediaSelectionOption {
177    type Result = Self;
178}
179
180extern_conformance!(
181    unsafe impl NSObjectProtocol for AVMediaSelectionOption {}
182);
183
184impl AVMediaSelectionOption {
185    extern_methods!(
186        #[cfg(feature = "AVMediaFormat")]
187        /// The media type of the media data, e.g. AVMediaTypeAudio, AVMediaTypeSubtitle, etc.
188        #[unsafe(method(mediaType))]
189        #[unsafe(method_family = none)]
190        pub unsafe fn mediaType(&self) -> Retained<AVMediaType>;
191
192        /// The mediaSubTypes of the media data associated with the option.
193        ///
194        /// An NSArray of NSNumbers carrying four character codes (of type FourCharCode) as defined in CoreAudioTypes.h for audio media and in CMFormatDescription.h for video media.
195        /// Also see CMFormatDescriptionGetMediaSubType in CMFormatDescription.h for more information about media subtypes.
196        ///
197        /// Note that if no information is available about the encoding of the media presented when a media option is selected, the value of mediaSubTypes will be an empty array. This can occur, for example, with streaming media. In these cases the value of mediaSubTypes should simply not be used as a criteria for selection.
198        #[unsafe(method(mediaSubTypes))]
199        #[unsafe(method_family = none)]
200        pub unsafe fn mediaSubTypes(&self) -> Retained<NSArray<NSNumber>>;
201
202        #[cfg(feature = "AVMediaFormat")]
203        /// Reports whether the media selection option includes media with the specified media characteristic.
204        ///
205        /// - Parameter mediaCharacteristic: The media characteristic of interest, e.g. AVMediaCharacteristicVisual, AVMediaCharacteristicAudible, AVMediaCharacteristicLegible, etc.
206        ///
207        /// - Returns: YES if the media selection option includes media with the specified characteristic, otherwise NO.
208        #[unsafe(method(hasMediaCharacteristic:))]
209        #[unsafe(method_family = none)]
210        pub unsafe fn hasMediaCharacteristic(
211            &self,
212            media_characteristic: &AVMediaCharacteristic,
213        ) -> bool;
214
215        /// Indicates whether a media selection option is playable.
216        ///
217        /// If the media data associated with the option cannot be decoded or otherwise rendered, playable is NO.
218        #[unsafe(method(isPlayable))]
219        #[unsafe(method_family = none)]
220        pub unsafe fn isPlayable(&self) -> bool;
221
222        /// Indicates the RFC 4646 language tag associated with the option. May be nil.
223        #[unsafe(method(extendedLanguageTag))]
224        #[unsafe(method_family = none)]
225        pub unsafe fn extendedLanguageTag(&self) -> Option<Retained<NSString>>;
226
227        /// Indicates the locale for which the media option was authored.
228        ///
229        /// Use -[NSLocale objectForKey:NSLocaleLanguageCode] to obtain the language code of the locale. See NSLocale.h for additional information.
230        #[unsafe(method(locale))]
231        #[unsafe(method_family = none)]
232        pub unsafe fn locale(&self) -> Option<Retained<NSLocale>>;
233
234        #[cfg(feature = "AVMetadataItem")]
235        /// Provides an array of AVMetadataItems for each common metadata key for which a value is available.
236        ///
237        /// The array of AVMetadataItems can be filtered according to language via +[AVMetadataItem metadataItemsFromArray:filteredAndSortedAccordingToPreferredLanguages:], according to locale via +[AVMetadataItem metadataItemsFromArray:withLocale:],
238        /// or according to key via +[AVMetadataItem metadataItemsFromArray:withKey:keySpace:].
239        /// Example: to obtain the name (or title) of a media selection option in any of the user's preferred languages.
240        /// ```objc
241        /// NSString *title = nil;
242        /// NSArray *titles = [AVMetadataItem metadataItemsFromArray:[mediaSelectionOption commonMetadata] withKey:AVMetadataCommonKeyTitle keySpace:AVMetadataKeySpaceCommon];
243        /// if ([titles count] > 0)
244        /// {
245        /// // Try to get a title that matches one of the user's preferred languages.
246        /// NSArray *titlesForPreferredLanguages = [AVMetadataItem metadataItemsFromArray:titles filteredAndSortedAccordingToPreferredLanguages:[NSLocale preferredLanguages]];
247        /// if ([titlesForPreferredLanguages count] > 0)
248        /// {
249        /// title = [[titlesForPreferredLanguages objectAtIndex:0] stringValue];
250        /// }
251        ///
252        /// // No matches in any of the preferred languages. Just use the primary title metadata we find.
253        /// if (title == nil)
254        /// {
255        /// title = [[titles objectAtIndex:0] stringValue];
256        /// }
257        /// }
258        /// ```
259        #[unsafe(method(commonMetadata))]
260        #[unsafe(method_family = none)]
261        pub unsafe fn commonMetadata(&self) -> Retained<NSArray<AVMetadataItem>>;
262
263        /// Provides an NSArray of NSStrings, each representing a metadata format that contains metadata associated with the option (e.g. ID3, iTunes metadata, etc.).
264        ///
265        /// Metadata formats are defined in AVMetadataFormat.h.
266        #[unsafe(method(availableMetadataFormats))]
267        #[unsafe(method_family = none)]
268        pub unsafe fn availableMetadataFormats(&self) -> Retained<NSArray<NSString>>;
269
270        #[cfg(feature = "AVMetadataItem")]
271        /// Provides an NSArray of AVMetadataItems, one for each metadata item in the container of the specified format.
272        ///
273        /// - Parameter format: The metadata format for which items are requested.
274        ///
275        /// - Returns: An NSArray containing AVMetadataItems.
276        #[unsafe(method(metadataForFormat:))]
277        #[unsafe(method_family = none)]
278        pub unsafe fn metadataForFormat(
279            &self,
280            format: &NSString,
281        ) -> Retained<NSArray<AVMetadataItem>>;
282
283        /// If a media selection option in another group is associated with the specified option, returns a reference to the associated option.
284        ///
285        /// Audible media selection options often have associated legible media selection options; in particular, audible options are typically associated with forced-only subtitle options with the same locale. See AVMediaCharacteristicContainsOnlyForcedSubtitles in AVMediaFormat.h for a discussion of forced-only subtitles.
286        ///
287        /// - Parameter mediaSelectionGroup: A media selection group in which an associated option is to be sought.
288        ///
289        /// - Returns: An instance of AVMediaSelectionOption.
290        #[unsafe(method(associatedMediaSelectionOptionInMediaSelectionGroup:))]
291        #[unsafe(method_family = none)]
292        pub unsafe fn associatedMediaSelectionOptionInMediaSelectionGroup(
293            &self,
294            media_selection_group: &AVMediaSelectionGroup,
295        ) -> Option<Retained<AVMediaSelectionOption>>;
296
297        /// Returns a serializable property list that can be used to obtain an instance of AVMediaSelectionOption representing the same option as the receiver via -[AVMediaSelectionGroup mediaSelectionOptionWithPropertyList:].
298        ///
299        /// - Returns: A serializable property list that's sufficient to identify the option within its group. For serialization utilities, see NSPropertyList.h.
300        #[unsafe(method(propertyList))]
301        #[unsafe(method_family = none)]
302        pub unsafe fn propertyList(&self) -> Retained<AnyObject>;
303
304        /// Provides an NSString suitable for display.
305        ///
306        /// May use this option's common metadata, media characteristics and locale properties in addition to the provided locale to formulate an NSString intended for display. Will only consider common metadata with the specified locale.
307        ///
308        /// - Parameter locale: Localize manufactured portions of the string using the specificed locale.
309        #[unsafe(method(displayNameWithLocale:))]
310        #[unsafe(method_family = none)]
311        pub unsafe fn displayNameWithLocale(&self, locale: &NSLocale) -> Retained<NSString>;
312
313        /// Provides an NSString suitable for display using the current system locale.
314        ///
315        /// May use this option's common metadata, media characteristics and locale properties in addition to the current system locale to formulate an NSString intended for display.
316        /// In the event that common metadata is not available in the specified locale, displayName will fall back to considering locales with the multilingual ("mul") then undetermined ("und") locale identifiers.
317        /// For a display name strictly with the specified locale use displayNameWithLocale: instead.
318        #[unsafe(method(displayName))]
319        #[unsafe(method_family = none)]
320        pub unsafe fn displayName(&self) -> Retained<NSString>;
321    );
322}
323
324/// Methods declared on superclass `NSObject`.
325impl AVMediaSelectionOption {
326    extern_methods!(
327        #[unsafe(method(init))]
328        #[unsafe(method_family = init)]
329        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
330
331        #[unsafe(method(new))]
332        #[unsafe(method_family = new)]
333        pub unsafe fn new() -> Retained<Self>;
334    );
335}
336
337/// AVMediaSelectionGroupCustomMediaSelectionScheme.
338impl AVMediaSelectionGroup {
339    extern_methods!(
340        /// For content that has been authored with the express intent of offering an alternative selection interface for AVMediaSelectionOptions, AVCustomMediaSelectionScheme provides a collection of custom settings for controlling the presentation of the media.
341        #[unsafe(method(customMediaSelectionScheme))]
342        #[unsafe(method_family = none)]
343        pub unsafe fn customMediaSelectionScheme(
344            &self,
345        ) -> Option<Retained<AVCustomMediaSelectionScheme>>;
346    );
347}
348
349extern_class!(
350    /// For content that has been authored with the express intent of offering an alternative selection interface for AVMediaSelectionOptions, AVCustomMediaSelectionScheme provides a collection of custom settings for controlling the presentation of the media.
351    ///
352    /// Each selectable setting is associated with a media characteristic that one or more of the AVMediaSelectionOptions in the AVMediaSelectionGroup possesses. By selecting a setting in a user interface based on an AVCustomMediaSelectionScheme, users are essentially indicating a preference for the media characteristic of the selected setting. Selection of a specific AVMediaSelectionOption in the AVMediaSelectionGroup is then derived from the user's indicated preferences. Subclasses of this type that are used from Swift must fulfill the requirements of a Sendable type.
353    ///
354    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avcustommediaselectionscheme?language=objc)
355    #[unsafe(super(NSObject))]
356    #[derive(Debug, PartialEq, Eq, Hash)]
357    pub struct AVCustomMediaSelectionScheme;
358);
359
360unsafe impl Send for AVCustomMediaSelectionScheme {}
361
362unsafe impl Sync for AVCustomMediaSelectionScheme {}
363
364extern_conformance!(
365    unsafe impl NSCopying for AVCustomMediaSelectionScheme {}
366);
367
368unsafe impl CopyingHelper for AVCustomMediaSelectionScheme {
369    type Result = Self;
370}
371
372extern_conformance!(
373    unsafe impl NSObjectProtocol for AVCustomMediaSelectionScheme {}
374);
375
376impl AVCustomMediaSelectionScheme {
377    extern_methods!(
378        /// Indicates whether an alternative selection interface should provide a menu of language choices.
379        #[unsafe(method(shouldOfferLanguageSelection))]
380        #[unsafe(method_family = none)]
381        pub unsafe fn shouldOfferLanguageSelection(&self) -> bool;
382
383        /// Provides available language choices.
384        ///
385        /// Each string in the array is intended to be interpreted as a BCP 47 language tag.
386        #[unsafe(method(availableLanguages))]
387        #[unsafe(method_family = none)]
388        pub unsafe fn availableLanguages(&self) -> Retained<NSArray<NSString>>;
389
390        /// Provides custom settings.
391        #[unsafe(method(selectors))]
392        #[unsafe(method_family = none)]
393        pub unsafe fn selectors(&self) -> Retained<NSArray<AVMediaPresentationSelector>>;
394
395        /// Provides an array of media presentation settings that can be effective at the same time as the specified language and settings for other selectors of the receiver.
396        ///
397        /// If the content is authored to provide a collection of AVMediaSelectionOptions that include one or more with all of the combinations of media characteristics of the specified AVMediaPresentationSettings together with all of the settings of the specified AVMediaPresentationSelector, this method will return all of the settings for that selector. However, if one or more of the available combinations are not possessed by any of the AVMediaSelectionOptions, it will return fewer.
398        ///
399        /// - Parameter selector: The AVMediaPresentationSelector for which complementary settings are requested.
400        /// - Parameter language: A BCP 47 language tag chosen among the availableLanguages of the receiver. If no language setting pertains, can be nil.
401        /// - Parameter settings: A collection of AVMediaPresentationSettings provided by selectors of the receiver other than the specified selector. Because no two AVMediaPresentationSettings of the same AVMediaPresentationSelector are complementary, an empty array will be returned if you specify more than one setting for any selector.
402        #[unsafe(method(mediaPresentationSettingsForSelector:complementaryToLanguage:settings:))]
403        #[unsafe(method_family = none)]
404        pub unsafe fn mediaPresentationSettingsForSelector_complementaryToLanguage_settings(
405            &self,
406            selector: &AVMediaPresentationSelector,
407            language: Option<&NSString>,
408            settings: &NSArray<AVMediaPresentationSetting>,
409        ) -> Retained<NSArray<AVMediaPresentationSetting>>;
410    );
411}
412
413/// Methods declared on superclass `NSObject`.
414impl AVCustomMediaSelectionScheme {
415    extern_methods!(
416        #[unsafe(method(init))]
417        #[unsafe(method_family = init)]
418        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
419
420        #[unsafe(method(new))]
421        #[unsafe(method_family = new)]
422        pub unsafe fn new() -> Retained<Self>;
423    );
424}
425
426extern_class!(
427    /// For content that has been authored with the express intent of offering an alternative selection interface for AVMediaSelectionOptions, AVMediaPresentationSelector represents a collection of mutually exclusive settings.
428    ///
429    /// Subclasses of this type that are used from Swift must fulfill the requirements of a Sendable type.
430    ///
431    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmediapresentationselector?language=objc)
432    #[unsafe(super(NSObject))]
433    #[derive(Debug, PartialEq, Eq, Hash)]
434    pub struct AVMediaPresentationSelector;
435);
436
437unsafe impl Send for AVMediaPresentationSelector {}
438
439unsafe impl Sync for AVMediaPresentationSelector {}
440
441extern_conformance!(
442    unsafe impl NSCopying for AVMediaPresentationSelector {}
443);
444
445unsafe impl CopyingHelper for AVMediaPresentationSelector {
446    type Result = Self;
447}
448
449extern_conformance!(
450    unsafe impl NSObjectProtocol for AVMediaPresentationSelector {}
451);
452
453impl AVMediaPresentationSelector {
454    extern_methods!(
455        /// Provides the authored identifier for the selector.
456        #[unsafe(method(identifier))]
457        #[unsafe(method_family = none)]
458        pub unsafe fn identifier(&self) -> Retained<NSString>;
459
460        /// Returns the display name for the selector that best matches the specified locale identifier.
461        #[unsafe(method(displayNameForLocaleIdentifier:))]
462        #[unsafe(method_family = none)]
463        pub unsafe fn displayNameForLocaleIdentifier(
464            &self,
465            locale_identifier: &NSString,
466        ) -> Retained<NSString>;
467
468        /// Provides selectable mutually exclusive settings for the selector.
469        #[unsafe(method(settings))]
470        #[unsafe(method_family = none)]
471        pub unsafe fn settings(&self) -> Retained<NSArray<AVMediaPresentationSetting>>;
472    );
473}
474
475/// Methods declared on superclass `NSObject`.
476impl AVMediaPresentationSelector {
477    extern_methods!(
478        #[unsafe(method(init))]
479        #[unsafe(method_family = init)]
480        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
481
482        #[unsafe(method(new))]
483        #[unsafe(method_family = new)]
484        pub unsafe fn new() -> Retained<Self>;
485    );
486}
487
488extern_class!(
489    /// For content that has been authored with the express intent of offering an alternative selection interface for AVMediaSelectionOptions, AVMediaPresentationSetting represents a selectable setting for controlling the presentation of the media.
490    ///
491    /// Each selectable setting is associated with a media characteristic that one or more of the AVMediaSelectionOptions in the AVMediaSelectionGroup possesses. By selecting a setting in a user interface that offers AVMediaPresentationSettings, users are essentially indicating a preference for the media characteristic of the selected setting. Subclasses of this type that are used from Swift must fulfill the requirements of a Sendable type.
492    ///
493    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avmediapresentationsetting?language=objc)
494    #[unsafe(super(NSObject))]
495    #[derive(Debug, PartialEq, Eq, Hash)]
496    pub struct AVMediaPresentationSetting;
497);
498
499unsafe impl Send for AVMediaPresentationSetting {}
500
501unsafe impl Sync for AVMediaPresentationSetting {}
502
503extern_conformance!(
504    unsafe impl NSCopying for AVMediaPresentationSetting {}
505);
506
507unsafe impl CopyingHelper for AVMediaPresentationSetting {
508    type Result = Self;
509}
510
511extern_conformance!(
512    unsafe impl NSObjectProtocol for AVMediaPresentationSetting {}
513);
514
515impl AVMediaPresentationSetting {
516    extern_methods!(
517        #[cfg(feature = "AVMediaFormat")]
518        /// Provides the media characteristic that corresponds to the selectable setting.
519        #[unsafe(method(mediaCharacteristic))]
520        #[unsafe(method_family = none)]
521        pub unsafe fn mediaCharacteristic(&self) -> Retained<AVMediaCharacteristic>;
522
523        /// Returns the display name for the selectable setting that best matches the specified locale identifier.
524        #[unsafe(method(displayNameForLocaleIdentifier:))]
525        #[unsafe(method_family = none)]
526        pub unsafe fn displayNameForLocaleIdentifier(
527            &self,
528            locale_identifier: &NSString,
529        ) -> Retained<NSString>;
530    );
531}
532
533/// Methods declared on superclass `NSObject`.
534impl AVMediaPresentationSetting {
535    extern_methods!(
536        #[unsafe(method(init))]
537        #[unsafe(method_family = init)]
538        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
539
540        #[unsafe(method(new))]
541        #[unsafe(method_family = new)]
542        pub unsafe fn new() -> Retained<Self>;
543    );
544}