MPPlayableContentDataSource

Trait MPPlayableContentDataSource 

Source
pub unsafe trait MPPlayableContentDataSource: NSObjectProtocol {
    // Provided methods
    unsafe fn beginLoadingChildItemsAtIndexPath_completionHandler(
        &self,
        index_path: &NSIndexPath,
        completion_handler: &DynBlock<dyn Fn(*mut NSError)>,
    )
       where Self: Sized + Message { ... }
    unsafe fn childItemsDisplayPlaybackProgressAtIndexPath(
        &self,
        index_path: &NSIndexPath,
    ) -> bool
       where Self: Sized + Message { ... }
    unsafe fn contentItemForIdentifier_completionHandler(
        &self,
        identifier: &NSString,
        completion_handler: &DynBlock<dyn Fn(*mut MPContentItem, *mut NSError)>,
    )
       where Self: Sized + Message { ... }
    unsafe fn numberOfChildItemsAtIndexPath(
        &self,
        index_path: &NSIndexPath,
    ) -> NSInteger
       where Self: Sized + Message { ... }
    unsafe fn contentItemAtIndexPath(
        &self,
        index_path: &NSIndexPath,
    ) -> Option<Retained<MPContentItem>>
       where Self: Sized + Message { ... }
}
👎Deprecated: Use CarPlay framework
Available on crate feature MPPlayableContentDataSource only.
Expand description

MPPlayableContentDataSource is a protocol that application objects conform to if they want to support external media players, such as vehicle head units. Data sources are responsible for providing metadata about your media to these systems in a meaningful way, so that features like user interfaces and play queues can be setup automatically.

See also Apple’s documentation

Provided Methods§

Source

unsafe fn beginLoadingChildItemsAtIndexPath_completionHandler( &self, index_path: &NSIndexPath, completion_handler: &DynBlock<dyn Fn(*mut NSError)>, )
where Self: Sized + Message,

👎Deprecated: Use CarPlay framework
Available on crate feature block2 only.

Tells the data source to begin loading content items that are children of the item specified by indexPath. This is provided so that applications can begin asynchronous batched loading of content before MediaPlayer begins asking for content items to display. Client applications should always call the completion handler after loading has finished, if this method is implemented.

Source

unsafe fn childItemsDisplayPlaybackProgressAtIndexPath( &self, index_path: &NSIndexPath, ) -> bool
where Self: Sized + Message,

👎Deprecated: Use CarPlay framework

Tells MediaPlayer whether the content provided by the data source supports playback progress as a property of its metadata. If this method is not implemented, MediaPlayer will assume that progress is not supported for any content items.

Source

unsafe fn contentItemForIdentifier_completionHandler( &self, identifier: &NSString, completion_handler: &DynBlock<dyn Fn(*mut MPContentItem, *mut NSError)>, )
where Self: Sized + Message,

👎Deprecated: Use CarPlay framework
Available on crate features MPContentItem and block2 only.

Provides a content item for the provided identifier. Provide nil if there is no content item corresponding to the identifier. Provide an error if there is an error that will not allow content items to be retrieved. Client applications should always call the completion handler after loading has finished, if this method is implemented.

Source

unsafe fn numberOfChildItemsAtIndexPath( &self, index_path: &NSIndexPath, ) -> NSInteger
where Self: Sized + Message,

👎Deprecated: Use CarPlay framework

Returns the number of child nodes at the specified index path. In a virtual filesystem, this would be the number of files in a specific folder. An empty index path represents the root node.

Source

unsafe fn contentItemAtIndexPath( &self, index_path: &NSIndexPath, ) -> Option<Retained<MPContentItem>>
where Self: Sized + Message,

👎Deprecated: Use CarPlay framework
Available on crate feature MPContentItem only.

Returns the content item at the specified index path. If the content item is mutated after returning, its updated contents will be sent to MediaPlayer.

Trait Implementations§

Source§

impl ProtocolType for dyn MPPlayableContentDataSource

Source§

const NAME: &'static str = "MPPlayableContentDataSource"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn MPPlayableContentDataSource

Implementations on Foreign Types§

Source§

impl<T> MPPlayableContentDataSource for ProtocolObject<T>

Implementors§