icrate 0.1.2

Bindings to Apple's frameworks
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use crate::common::*;
use crate::CoreLocation::*;
use crate::Foundation::*;
use crate::UserNotifications::*;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "UserNotifications_UNNotificationServiceExtension")]
    pub struct UNNotificationServiceExtension;

    #[cfg(feature = "UserNotifications_UNNotificationServiceExtension")]
    unsafe impl ClassType for UNNotificationServiceExtension {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "UserNotifications_UNNotificationServiceExtension")]
unsafe impl NSObjectProtocol for UNNotificationServiceExtension {}

extern_methods!(
    #[cfg(feature = "UserNotifications_UNNotificationServiceExtension")]
    unsafe impl UNNotificationServiceExtension {
        #[cfg(all(
            feature = "UserNotifications_UNNotificationContent",
            feature = "UserNotifications_UNNotificationRequest"
        ))]
        #[method(didReceiveNotificationRequest:withContentHandler:)]
        pub unsafe fn didReceiveNotificationRequest_withContentHandler(
            &self,
            request: &UNNotificationRequest,
            content_handler: &Block<(NonNull<UNNotificationContent>,), ()>,
        );

        #[method(serviceExtensionTimeWillExpire)]
        pub unsafe fn serviceExtensionTimeWillExpire(&self);
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "UserNotifications_UNNotificationServiceExtension")]
    unsafe impl UNNotificationServiceExtension {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;
    }
);