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::*;

/// [Apple's documentation](https://developer.apple.com/documentation/intents/insearchcallhistoryintentresponsecode?language=objc)
// NS_ENUM
#[deprecated = "INSearchCallHistoryIntentResponseCode is deprecated. There is no replacement."]
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct INSearchCallHistoryIntentResponseCode(pub NSInteger);
impl INSearchCallHistoryIntentResponseCode {
    #[doc(alias = "INSearchCallHistoryIntentResponseCodeUnspecified")]
    #[deprecated = "INSearchCallHistoryIntentResponseCode is deprecated. There is no replacement."]
    pub const Unspecified: Self = Self(0);
    #[doc(alias = "INSearchCallHistoryIntentResponseCodeReady")]
    #[deprecated = "INSearchCallHistoryIntentResponseCode is deprecated. There is no replacement."]
    pub const Ready: Self = Self(1);
    #[doc(alias = "INSearchCallHistoryIntentResponseCodeContinueInApp")]
    #[deprecated = "INSearchCallHistoryIntentResponseCode is deprecated. There is no replacement."]
    pub const ContinueInApp: Self = Self(2);
    #[doc(alias = "INSearchCallHistoryIntentResponseCodeFailure")]
    #[deprecated = "INSearchCallHistoryIntentResponseCode is deprecated. There is no replacement."]
    pub const Failure: Self = Self(3);
    #[doc(alias = "INSearchCallHistoryIntentResponseCodeFailureRequiringAppLaunch")]
    #[deprecated = "INSearchCallHistoryIntentResponseCode is deprecated. There is no replacement."]
    pub const FailureRequiringAppLaunch: Self = Self(4);
    #[doc(alias = "INSearchCallHistoryIntentResponseCodeFailureAppConfigurationRequired")]
    #[deprecated = "INSearchCallHistoryIntentResponseCode is deprecated. There is no replacement."]
    pub const FailureAppConfigurationRequired: Self = Self(5);
    #[doc(alias = "INSearchCallHistoryIntentResponseCodeInProgress")]
    pub const InProgress: Self = Self(6);
    #[doc(alias = "INSearchCallHistoryIntentResponseCodeSuccess")]
    pub const Success: Self = Self(7);
}

unsafe impl Encode for INSearchCallHistoryIntentResponseCode {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for INSearchCallHistoryIntentResponseCode {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/intents/insearchcallhistoryintentresponse?language=objc)
    #[unsafe(super(INIntentResponse, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "INIntentResponse")]
    #[deprecated = "INSearchCallHistoryIntentResponse is deprecated. There is no replacement."]
    pub struct INSearchCallHistoryIntentResponse;
);

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

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

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

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

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

#[cfg(feature = "INIntentResponse")]
impl INSearchCallHistoryIntentResponse {
    extern_methods!(
        #[deprecated = "INSearchCallHistoryIntentResponse is deprecated. There is no replacement."]
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[deprecated = "INSearchCallHistoryIntentResponse is deprecated. There is no replacement."]
        #[unsafe(method(initWithCode:userActivity:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithCode_userActivity(
            this: Allocated<Self>,
            code: INSearchCallHistoryIntentResponseCode,
            user_activity: Option<&NSUserActivity>,
        ) -> Retained<Self>;

        #[deprecated = "INSearchCallHistoryIntentResponse is deprecated. There is no replacement."]
        #[unsafe(method(code))]
        #[unsafe(method_family = none)]
        pub unsafe fn code(&self) -> INSearchCallHistoryIntentResponseCode;

        #[cfg(feature = "INCallRecord")]
        #[unsafe(method(callRecords))]
        #[unsafe(method_family = none)]
        pub unsafe fn callRecords(&self) -> Option<Retained<NSArray<INCallRecord>>>;

        #[cfg(feature = "INCallRecord")]
        /// Setter for [`callRecords`][Self::callRecords].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setCallRecords:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setCallRecords(&self, call_records: Option<&NSArray<INCallRecord>>);
    );
}

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