1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
/// AVAssetCache is a class vended by an AVAsset used for the inspection of locally available media data.
///
/// AVAssetCaches are vended by AVURLAsset's assetCache property.
///
/// Subclasses of this type that are used from Swift must fulfill the requirements of a Sendable type.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avassetcache?language=objc)
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct AVAssetCache;
);
unsafe impl Send for AVAssetCache {}
unsafe impl Sync for AVAssetCache {}
extern_conformance!(
unsafe impl NSObjectProtocol for AVAssetCache {}
);
impl AVAssetCache {
extern_methods!(
/// Returns YES if a complete rendition of an AVAsset is available to be played without a network connection.
///
/// An answer of YES does not indicate that any given media selection is available for offline playback. To determine if a specific media selection is available offline, see mediaSelectionOptionsInMediaSelectionGroup:.
///
/// This property is not atomic.
///
/// # Safety
///
/// This might not be thread-safe.
#[unsafe(method(isPlayableOffline))]
#[unsafe(method_family = none)]
pub unsafe fn isPlayableOffline(&self) -> bool;
#[cfg(feature = "AVMediaSelectionGroup")]
/// Returns an array of AVMediaSelectionOptions in an AVMediaSelectionGroup that are available for offline operations, e.g. playback.
#[unsafe(method(mediaSelectionOptionsInMediaSelectionGroup:))]
#[unsafe(method_family = none)]
pub unsafe fn mediaSelectionOptionsInMediaSelectionGroup(
&self,
media_selection_group: &AVMediaSelectionGroup,
) -> Retained<NSArray<AVMediaSelectionOption>>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
/// AVAssetCacheCustomMediaSelectionScheme.
impl AVAssetCache {
extern_methods!(
#[cfg(feature = "AVMediaSelectionGroup")]
/// For each AVMediaPresentationSelector defined by the AVCustomMediaSelectionScheme of an AVMediaSelectionGroup, returns the AVMediaPresentationSettings that can be satisfied for offline operations, e.g. playback.
#[unsafe(method(mediaPresentationSettingsForMediaSelectionGroup:))]
#[unsafe(method_family = none)]
pub unsafe fn mediaPresentationSettingsForMediaSelectionGroup(
&self,
media_selection_group: &AVMediaSelectionGroup,
) -> Retained<NSDictionary<AVMediaPresentationSelector, NSArray<AVMediaPresentationSetting>>>;
#[cfg(feature = "AVMediaSelectionGroup")]
/// Returns an array of extended language tags for languages that can be selected for offline operations via use of the AVMediaSelectionGroup's AVCustomMediaSelectionScheme.
#[unsafe(method(mediaPresentationLanguagesForMediaSelectionGroup:))]
#[unsafe(method_family = none)]
pub unsafe fn mediaPresentationLanguagesForMediaSelectionGroup(
&self,
media_selection_group: &AVMediaSelectionGroup,
) -> Retained<NSArray<NSString>>;
);
}