use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
pub type MPMediaEntityPersistentID = u64;
extern "C" {
pub static MPMediaEntityPropertyPersistentID: &'static NSString;
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MPMediaEntity;
);
extern_conformance!(
unsafe impl NSCoding for MPMediaEntity {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for MPMediaEntity {}
);
extern_conformance!(
unsafe impl NSSecureCoding for MPMediaEntity {}
);
impl MPMediaEntity {
extern_methods!(
#[unsafe(method(canFilterByProperty:))]
#[unsafe(method_family = none)]
pub unsafe fn canFilterByProperty(property: &NSString) -> bool;
#[cfg(feature = "block2")]
#[unsafe(method(enumerateValuesForProperties:usingBlock:))]
#[unsafe(method_family = none)]
pub unsafe fn enumerateValuesForProperties_usingBlock(
&self,
properties: &NSSet<NSString>,
block: &block2::DynBlock<dyn Fn(NonNull<NSString>, NonNull<AnyObject>, NonNull<Bool>)>,
);
#[unsafe(method(objectForKeyedSubscript:))]
#[unsafe(method_family = none)]
pub unsafe fn objectForKeyedSubscript(
&self,
key: &AnyObject,
) -> Option<Retained<AnyObject>>;
#[unsafe(method(valueForProperty:))]
#[unsafe(method_family = none)]
pub unsafe fn valueForProperty(&self, property: &NSString) -> Option<Retained<AnyObject>>;
#[unsafe(method(persistentID))]
#[unsafe(method_family = none)]
pub unsafe fn persistentID(&self) -> MPMediaEntityPersistentID;
);
}
impl MPMediaEntity {
extern_methods!(
#[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>;
);
}