objc2-intents 0.3.2

Bindings to the Intents framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// Where relevant shortcuts are provided to Siri.
    ///
    /// See also: INRelevantShortcut
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/intents/inrelevantshortcutstore?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct INRelevantShortcutStore;
);

extern_conformance!(
    unsafe impl NSObjectProtocol for INRelevantShortcutStore {}
);

impl INRelevantShortcutStore {
    extern_methods!(
        #[unsafe(method(defaultStore))]
        #[unsafe(method_family = none)]
        pub unsafe fn defaultStore() -> Retained<INRelevantShortcutStore>;

        #[cfg(all(feature = "INRelevantShortcut", feature = "block2"))]
        /// Provide a new set of relevant shortcuts that should be suggested by Siri.
        ///
        /// Note: Setting new relevant shortcuts will replace all relevant shortcuts that were previously provided.
        #[unsafe(method(setRelevantShortcuts:completionHandler:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setRelevantShortcuts_completionHandler(
            &self,
            shortcuts: &NSArray<INRelevantShortcut>,
            completion_handler: Option<&block2::DynBlock<dyn Fn(*mut NSError)>>,
        );

        /// Note: Use the
        /// `defaultStore`singleton.
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
    );
}

/// Methods declared on superclass `NSObject`.
impl INRelevantShortcutStore {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}