use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern "C" {
#[deprecated = "Use AVFoundation's AVPlayer and AVQueuePlayer instead"]
pub static WKAudioFilePlayerItemTimeJumpedNotification: &'static NSString;
}
extern "C" {
#[deprecated = "Use AVFoundation's AVPlayer and AVQueuePlayer instead"]
pub static WKAudioFilePlayerItemDidPlayToEndTimeNotification: &'static NSString;
}
extern "C" {
#[deprecated = "Use AVFoundation's AVPlayer and AVQueuePlayer instead"]
pub static WKAudioFilePlayerItemFailedToPlayToEndTimeNotification: &'static NSString;
}
#[deprecated = "Use AVFoundation's AVPlayer and AVQueuePlayer instead"]
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct WKAudioFilePlayerItemStatus(pub NSInteger);
impl WKAudioFilePlayerItemStatus {
#[doc(alias = "WKAudioFilePlayerItemStatusUnknown")]
#[deprecated = "Use AVFoundation's AVPlayer and AVQueuePlayer instead"]
pub const Unknown: Self = Self(0);
#[doc(alias = "WKAudioFilePlayerItemStatusReadyToPlay")]
#[deprecated = "Use AVFoundation's AVPlayer and AVQueuePlayer instead"]
pub const ReadyToPlay: Self = Self(1);
#[doc(alias = "WKAudioFilePlayerItemStatusFailed")]
#[deprecated = "Use AVFoundation's AVPlayer and AVQueuePlayer instead"]
pub const Failed: Self = Self(2);
}
unsafe impl Encode for WKAudioFilePlayerItemStatus {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for WKAudioFilePlayerItemStatus {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[deprecated = "Use AVFoundation's AVPlayer and AVQueuePlayer instead"]
pub struct WKAudioFilePlayerItem;
);
extern_conformance!(
unsafe impl NSObjectProtocol for WKAudioFilePlayerItem {}
);
impl WKAudioFilePlayerItem {
extern_methods!(
#[deprecated = "Use AVFoundation's AVPlayer and AVQueuePlayer instead"]
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(feature = "WKAudioFileAsset")]
#[deprecated = "Use AVFoundation's AVPlayer and AVQueuePlayer instead"]
#[unsafe(method(playerItemWithAsset:))]
#[unsafe(method_family = none)]
pub unsafe fn playerItemWithAsset(
asset: &WKAudioFileAsset,
) -> Retained<WKAudioFilePlayerItem>;
#[cfg(feature = "WKAudioFileAsset")]
#[deprecated = "Use AVFoundation's AVPlayer and AVQueuePlayer instead"]
#[unsafe(method(asset))]
#[unsafe(method_family = none)]
pub unsafe fn asset(&self) -> Retained<WKAudioFileAsset>;
#[deprecated = "Use AVFoundation's AVPlayer and AVQueuePlayer instead"]
#[unsafe(method(status))]
#[unsafe(method_family = none)]
pub unsafe fn status(&self) -> WKAudioFilePlayerItemStatus;
#[deprecated = "Use AVFoundation's AVPlayer and AVQueuePlayer instead"]
#[unsafe(method(error))]
#[unsafe(method_family = none)]
pub unsafe fn error(&self) -> Option<Retained<NSError>>;
#[deprecated = "Use AVFoundation's AVPlayer and AVQueuePlayer instead"]
#[unsafe(method(currentTime))]
#[unsafe(method_family = none)]
pub unsafe fn currentTime(&self) -> NSTimeInterval;
#[deprecated = "Use AVFoundation's AVPlayer and AVQueuePlayer instead"]
#[unsafe(method(setCurrentTime:))]
#[unsafe(method_family = none)]
pub unsafe fn setCurrentTime(&self, current_time: NSTimeInterval);
);
}
impl WKAudioFilePlayerItem {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}