objc2_media_player/generated/
MPMediaEntity.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10pub type MPMediaEntityPersistentID = u64;
12
13extern "C" {
14 pub static MPMediaEntityPropertyPersistentID: &'static NSString;
16}
17
18extern_class!(
19 #[unsafe(super(NSObject))]
21 #[derive(Debug, PartialEq, Eq, Hash)]
22 pub struct MPMediaEntity;
23);
24
25unsafe impl NSCoding for MPMediaEntity {}
26
27unsafe impl NSObjectProtocol for MPMediaEntity {}
28
29unsafe impl NSSecureCoding for MPMediaEntity {}
30
31impl MPMediaEntity {
32 extern_methods!(
33 #[unsafe(method(canFilterByProperty:))]
34 #[unsafe(method_family = none)]
35 pub unsafe fn canFilterByProperty(property: &NSString) -> bool;
36
37 #[cfg(feature = "block2")]
38 #[unsafe(method(enumerateValuesForProperties:usingBlock:))]
39 #[unsafe(method_family = none)]
40 pub unsafe fn enumerateValuesForProperties_usingBlock(
41 &self,
42 properties: &NSSet<NSString>,
43 block: &block2::Block<dyn Fn(NonNull<NSString>, NonNull<AnyObject>, NonNull<Bool>)>,
44 );
45
46 #[unsafe(method(objectForKeyedSubscript:))]
47 #[unsafe(method_family = none)]
48 pub unsafe fn objectForKeyedSubscript(
49 &self,
50 key: &AnyObject,
51 ) -> Option<Retained<AnyObject>>;
52
53 #[unsafe(method(valueForProperty:))]
54 #[unsafe(method_family = none)]
55 pub unsafe fn valueForProperty(&self, property: &NSString) -> Option<Retained<AnyObject>>;
56
57 #[unsafe(method(persistentID))]
58 #[unsafe(method_family = none)]
59 pub unsafe fn persistentID(&self) -> MPMediaEntityPersistentID;
60 );
61}
62
63impl MPMediaEntity {
65 extern_methods!(
66 #[unsafe(method(init))]
67 #[unsafe(method_family = init)]
68 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
69
70 #[unsafe(method(new))]
71 #[unsafe(method_family = new)]
72 pub unsafe fn new() -> Retained<Self>;
73 );
74}