use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct INSearchForMediaIntentResponseCode(pub NSInteger);
impl INSearchForMediaIntentResponseCode {
#[doc(alias = "INSearchForMediaIntentResponseCodeUnspecified")]
pub const Unspecified: Self = Self(0);
#[doc(alias = "INSearchForMediaIntentResponseCodeReady")]
pub const Ready: Self = Self(1);
#[doc(alias = "INSearchForMediaIntentResponseCodeContinueInApp")]
pub const ContinueInApp: Self = Self(2);
#[doc(alias = "INSearchForMediaIntentResponseCodeInProgress")]
pub const InProgress: Self = Self(3);
#[doc(alias = "INSearchForMediaIntentResponseCodeSuccess")]
pub const Success: Self = Self(4);
#[doc(alias = "INSearchForMediaIntentResponseCodeFailure")]
pub const Failure: Self = Self(5);
#[doc(alias = "INSearchForMediaIntentResponseCodeFailureRequiringAppLaunch")]
pub const FailureRequiringAppLaunch: Self = Self(6);
}
unsafe impl Encode for INSearchForMediaIntentResponseCode {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for INSearchForMediaIntentResponseCode {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(INIntentResponse, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "INIntentResponse")]
pub struct INSearchForMediaIntentResponse;
);
#[cfg(feature = "INIntentResponse")]
extern_conformance!(
unsafe impl NSCoding for INSearchForMediaIntentResponse {}
);
#[cfg(feature = "INIntentResponse")]
extern_conformance!(
unsafe impl NSCopying for INSearchForMediaIntentResponse {}
);
#[cfg(feature = "INIntentResponse")]
unsafe impl CopyingHelper for INSearchForMediaIntentResponse {
type Result = Self;
}
#[cfg(feature = "INIntentResponse")]
extern_conformance!(
unsafe impl NSObjectProtocol for INSearchForMediaIntentResponse {}
);
#[cfg(feature = "INIntentResponse")]
extern_conformance!(
unsafe impl NSSecureCoding for INSearchForMediaIntentResponse {}
);
#[cfg(feature = "INIntentResponse")]
impl INSearchForMediaIntentResponse {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(initWithCode:userActivity:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCode_userActivity(
this: Allocated<Self>,
code: INSearchForMediaIntentResponseCode,
user_activity: Option<&NSUserActivity>,
) -> Retained<Self>;
#[unsafe(method(code))]
#[unsafe(method_family = none)]
pub unsafe fn code(&self) -> INSearchForMediaIntentResponseCode;
#[cfg(feature = "INMediaItem")]
#[unsafe(method(mediaItems))]
#[unsafe(method_family = none)]
pub unsafe fn mediaItems(&self) -> Option<Retained<NSArray<INMediaItem>>>;
#[cfg(feature = "INMediaItem")]
#[unsafe(method(setMediaItems:))]
#[unsafe(method_family = none)]
pub unsafe fn setMediaItems(&self, media_items: Option<&NSArray<INMediaItem>>);
);
}
#[cfg(feature = "INIntentResponse")]
impl INSearchForMediaIntentResponse {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}