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
86
87
88
89
90
91
92
93
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_protocol!(
/// The MPPlayableContentDelegate is a protocol that allows for external media
/// players to send playback commands to an application. For instance,
/// the user could browse the application's media content (provided by the
/// MPPlayableContentDataSource) and selects a content item to play. If the media
/// player decides that it wants to play the item, it will ask the application's
/// content delegate to initiate playback.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/mediaplayer/mpplayablecontentdelegate?language=objc)
#[deprecated = "Use CarPlay framework"]
pub unsafe trait MPPlayableContentDelegate: NSObjectProtocol {
#[cfg(all(feature = "MPPlayableContentManager", feature = "block2"))]
/// This method is called when a media player interface wants to play a requested
/// content item. The application should call the completion handler with an
/// appropriate error if there was an error beginning playback for the item.
#[deprecated = "Use CarPlay framework"]
#[optional]
#[unsafe(method(playableContentManager:initiatePlaybackOfContentItemAtIndexPath:completionHandler:))]
#[unsafe(method_family = none)]
unsafe fn playableContentManager_initiatePlaybackOfContentItemAtIndexPath_completionHandler(
&self,
content_manager: &MPPlayableContentManager,
index_path: &NSIndexPath,
completion_handler: &block2::DynBlock<dyn Fn(*mut NSError)>,
);
#[cfg(all(feature = "MPPlayableContentManager", feature = "block2"))]
/// This method is called when a media player interface wants the now playing
/// app to setup a playback queue for later playback. The application should
/// load content into its play queue but not start playback until a Play command is
/// received or if the playable content manager requests to play something else.
/// The app should call the provided completion handler once it is ready to play
/// something.
#[deprecated = "Use Intents framework for initiating playback queues."]
#[optional]
#[unsafe(method(playableContentManager:initializePlaybackQueueWithCompletionHandler:))]
#[unsafe(method_family = none)]
unsafe fn playableContentManager_initializePlaybackQueueWithCompletionHandler(
&self,
content_manager: &MPPlayableContentManager,
completion_handler: &block2::DynBlock<dyn Fn(*mut NSError)>,
);
#[cfg(all(feature = "MPPlayableContentManager", feature = "block2"))]
/// This method is called when a media player interface wants the now playing
/// app to setup a playback queue for later playback. The application should
/// load content into its play queue based on the provided content items and
/// prepare it for playback, but not start playback until a Play command is
/// received or if the playable content manager requests to play something else.
/// A nil contentItems array means that the app should prepare its queue with
/// anything it deems appropriate.
/// The app should call the provided completion handler once it is ready to play
/// something.
///
/// # Safety
///
/// `content_items` generic should be of the correct type.
#[deprecated = "Use Intents framework for initiating playback queues."]
#[optional]
#[unsafe(method(playableContentManager:initializePlaybackQueueWithContentItems:completionHandler:))]
#[unsafe(method_family = none)]
unsafe fn playableContentManager_initializePlaybackQueueWithContentItems_completionHandler(
&self,
content_manager: &MPPlayableContentManager,
content_items: Option<&NSArray>,
completion_handler: &block2::DynBlock<dyn Fn(*mut NSError)>,
);
#[cfg(all(
feature = "MPPlayableContentManager",
feature = "MPPlayableContentManagerContext"
))]
/// This method is called when the content server notifies the manager that the current context has changed.
#[deprecated = "Use CarPlay framework"]
#[optional]
#[unsafe(method(playableContentManager:didUpdateContext:))]
#[unsafe(method_family = none)]
unsafe fn playableContentManager_didUpdateContext(
&self,
content_manager: &MPPlayableContentManager,
context: &MPPlayableContentManagerContext,
);
}
);