objc2_user_notifications/generated/
UNNotificationAttachment.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(NSObject))]
12 #[derive(Debug, PartialEq, Eq, Hash)]
13 pub struct UNNotificationAttachment;
14);
15
16unsafe impl NSCoding for UNNotificationAttachment {}
17
18unsafe impl NSCopying for UNNotificationAttachment {}
19
20unsafe impl CopyingHelper for UNNotificationAttachment {
21 type Result = Self;
22}
23
24unsafe impl NSObjectProtocol for UNNotificationAttachment {}
25
26unsafe impl NSSecureCoding for UNNotificationAttachment {}
27
28impl UNNotificationAttachment {
29 extern_methods!(
30 #[unsafe(method(identifier))]
31 #[unsafe(method_family = none)]
32 pub unsafe fn identifier(&self) -> Retained<NSString>;
33
34 #[unsafe(method(URL))]
35 #[unsafe(method_family = none)]
36 pub unsafe fn URL(&self) -> Retained<NSURL>;
37
38 #[unsafe(method(type))]
39 #[unsafe(method_family = none)]
40 pub unsafe fn r#type(&self) -> Retained<NSString>;
41
42 #[unsafe(method(attachmentWithIdentifier:URL:options:error:_))]
43 #[unsafe(method_family = none)]
44 pub unsafe fn attachmentWithIdentifier_URL_options_error(
45 identifier: &NSString,
46 url: &NSURL,
47 options: Option<&NSDictionary>,
48 ) -> Result<Retained<Self>, Retained<NSError>>;
49
50 #[unsafe(method(init))]
51 #[unsafe(method_family = init)]
52 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
53 );
54}
55
56impl UNNotificationAttachment {
58 extern_methods!(
59 #[unsafe(method(new))]
60 #[unsafe(method_family = new)]
61 pub unsafe fn new() -> Retained<Self>;
62 );
63}
64
65extern "C" {
66 pub static UNNotificationAttachmentOptionsTypeHintKey: &'static NSString;
68}
69
70extern "C" {
71 pub static UNNotificationAttachmentOptionsThumbnailHiddenKey: &'static NSString;
73}
74
75extern "C" {
76 pub static UNNotificationAttachmentOptionsThumbnailClippingRectKey: &'static NSString;
78}
79
80extern "C" {
81 pub static UNNotificationAttachmentOptionsThumbnailTimeKey: &'static NSString;
83}