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!(
    /// [Apple's documentation](https://developer.apple.com/documentation/intents/ingetrestaurantguestintent?language=objc)
    #[unsafe(super(INIntent, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "INIntent")]
    pub struct INGetRestaurantGuestIntent;
);

#[cfg(feature = "INIntent")]
extern_conformance!(
    unsafe impl NSCoding for INGetRestaurantGuestIntent {}
);

#[cfg(feature = "INIntent")]
extern_conformance!(
    unsafe impl NSCopying for INGetRestaurantGuestIntent {}
);

#[cfg(feature = "INIntent")]
unsafe impl CopyingHelper for INGetRestaurantGuestIntent {
    type Result = Self;
}

#[cfg(feature = "INIntent")]
extern_conformance!(
    unsafe impl NSObjectProtocol for INGetRestaurantGuestIntent {}
);

#[cfg(feature = "INIntent")]
extern_conformance!(
    unsafe impl NSSecureCoding for INGetRestaurantGuestIntent {}
);

#[cfg(feature = "INIntent")]
impl INGetRestaurantGuestIntent {
    extern_methods!();
}

/// Methods declared on superclass `NSObject`.
#[cfg(feature = "INIntent")]
impl INGetRestaurantGuestIntent {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}

extern_protocol!(
    /// [Apple's documentation](https://developer.apple.com/documentation/intents/ingetrestaurantguestintenthandling?language=objc)
    pub unsafe trait INGetRestaurantGuestIntentHandling: NSObjectProtocol {
        #[cfg(all(
            feature = "INGetRestaurantGuestIntentResponse",
            feature = "INIntent",
            feature = "INIntentResponse",
            feature = "block2"
        ))]
        /// Handling method - Execute the task represented by the INGetRestaurantGuestIntent that's passed in
        ///
        /// This method is called to actually execute the intent, the app must return a response for this intent and an NSUserActivity capturing the state that the app must be restored to at the end of handling this intent
        ///
        ///
        /// Parameter `intent`: The input intent
        ///
        /// Parameter `completion`: The response handling block to invoke with the response to handling the intent.
        ///
        ///
        /// See: INGetRestaurantGuestIntentResponse
        #[unsafe(method(handleGetRestaurantGuest:completion:))]
        #[unsafe(method_family = none)]
        unsafe fn handleGetRestaurantGuest_completion(
            &self,
            intent: &INGetRestaurantGuestIntent,
            completion: &block2::DynBlock<dyn Fn(NonNull<INGetRestaurantGuestIntentResponse>)>,
        );

        #[cfg(all(
            feature = "INGetRestaurantGuestIntentResponse",
            feature = "INIntent",
            feature = "INIntentResponse",
            feature = "block2"
        ))]
        /// Confirmation method - Validate that this intent is ready for the next step (i.e. handling)
        ///
        /// These methods are called prior to asking the app to handle the intent. The app should return a response object that contains additional information about the intent, which may be relevant for the system to show the user prior to handling. If unimplemented, the system will assume the intent is valid following resolution, and will assume there is no additional information relevant to this intent.
        ///
        ///
        /// Parameter `guestIntent`: The input intent
        ///
        /// Parameter `completion`: The response block contains an INGetRestaurantGuestIntentResponse containing additional details about the intent that may be relevant for the system to show the user prior to handling.
        ///
        ///
        /// See: INGetRestaurantGuestIntentResponse
        #[optional]
        #[unsafe(method(confirmGetRestaurantGuest:completion:))]
        #[unsafe(method_family = none)]
        unsafe fn confirmGetRestaurantGuest_completion(
            &self,
            guest_intent: &INGetRestaurantGuestIntent,
            completion: &block2::DynBlock<dyn Fn(NonNull<INGetRestaurantGuestIntentResponse>)>,
        );
    }
);