icrate/generated/UserNotifications/
UNNotificationServiceExtension.rs1use crate::common::*;
4use crate::CoreLocation::*;
5use crate::Foundation::*;
6use crate::UserNotifications::*;
7
8extern_class!(
9 #[derive(Debug, PartialEq, Eq, Hash)]
10 #[cfg(feature = "UserNotifications_UNNotificationServiceExtension")]
11 pub struct UNNotificationServiceExtension;
12
13 #[cfg(feature = "UserNotifications_UNNotificationServiceExtension")]
14 unsafe impl ClassType for UNNotificationServiceExtension {
15 type Super = NSObject;
16 type Mutability = InteriorMutable;
17 }
18);
19
20#[cfg(feature = "UserNotifications_UNNotificationServiceExtension")]
21unsafe impl NSObjectProtocol for UNNotificationServiceExtension {}
22
23extern_methods!(
24 #[cfg(feature = "UserNotifications_UNNotificationServiceExtension")]
25 unsafe impl UNNotificationServiceExtension {
26 #[cfg(all(
27 feature = "UserNotifications_UNNotificationContent",
28 feature = "UserNotifications_UNNotificationRequest"
29 ))]
30 #[method(didReceiveNotificationRequest:withContentHandler:)]
31 pub unsafe fn didReceiveNotificationRequest_withContentHandler(
32 &self,
33 request: &UNNotificationRequest,
34 content_handler: &Block<(NonNull<UNNotificationContent>,), ()>,
35 );
36
37 #[method(serviceExtensionTimeWillExpire)]
38 pub unsafe fn serviceExtensionTimeWillExpire(&self);
39 }
40);
41
42extern_methods!(
43 #[cfg(feature = "UserNotifications_UNNotificationServiceExtension")]
45 unsafe impl UNNotificationServiceExtension {
46 #[method_id(@__retain_semantics Init init)]
47 pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
48
49 #[method_id(@__retain_semantics New new)]
50 pub unsafe fn new() -> Id<Self>;
51 }
52);