use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(INIntent, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "INIntent")]
pub struct INStartCallIntent;
);
#[cfg(feature = "INIntent")]
extern_conformance!(
unsafe impl NSCoding for INStartCallIntent {}
);
#[cfg(feature = "INIntent")]
extern_conformance!(
unsafe impl NSCopying for INStartCallIntent {}
);
#[cfg(feature = "INIntent")]
unsafe impl CopyingHelper for INStartCallIntent {
type Result = Self;
}
#[cfg(feature = "INIntent")]
extern_conformance!(
unsafe impl NSObjectProtocol for INStartCallIntent {}
);
#[cfg(feature = "INIntent")]
extern_conformance!(
unsafe impl NSSecureCoding for INStartCallIntent {}
);
#[cfg(feature = "INIntent")]
impl INStartCallIntent {
extern_methods!(
#[cfg(all(
feature = "INCallAudioRoute",
feature = "INCallCapability",
feature = "INCallDestinationType",
feature = "INCallRecord",
feature = "INCallRecordFilter",
feature = "INPerson"
))]
#[unsafe(method(initWithCallRecordFilter:callRecordToCallBack:audioRoute:destinationType:contacts:callCapability:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCallRecordFilter_callRecordToCallBack_audioRoute_destinationType_contacts_callCapability(
this: Allocated<Self>,
call_record_filter: Option<&INCallRecordFilter>,
call_record_to_call_back: Option<&INCallRecord>,
audio_route: INCallAudioRoute,
destination_type: INCallDestinationType,
contacts: Option<&NSArray<INPerson>>,
call_capability: INCallCapability,
) -> Retained<Self>;
#[cfg(feature = "INCallRecordFilter")]
#[unsafe(method(callRecordFilter))]
#[unsafe(method_family = none)]
pub unsafe fn callRecordFilter(&self) -> Option<Retained<INCallRecordFilter>>;
#[cfg(feature = "INCallRecord")]
#[unsafe(method(callRecordToCallBack))]
#[unsafe(method_family = none)]
pub unsafe fn callRecordToCallBack(&self) -> Option<Retained<INCallRecord>>;
#[cfg(feature = "INCallAudioRoute")]
#[unsafe(method(audioRoute))]
#[unsafe(method_family = none)]
pub unsafe fn audioRoute(&self) -> INCallAudioRoute;
#[cfg(feature = "INCallDestinationType")]
#[unsafe(method(destinationType))]
#[unsafe(method_family = none)]
pub unsafe fn destinationType(&self) -> INCallDestinationType;
#[cfg(feature = "INPerson")]
#[unsafe(method(contacts))]
#[unsafe(method_family = none)]
pub unsafe fn contacts(&self) -> Option<Retained<NSArray<INPerson>>>;
#[cfg(feature = "INCallCapability")]
#[unsafe(method(callCapability))]
#[unsafe(method_family = none)]
pub unsafe fn callCapability(&self) -> INCallCapability;
);
}
#[cfg(feature = "INIntent")]
impl INStartCallIntent {
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!(
pub unsafe trait INStartCallIntentHandling: NSObjectProtocol {
#[cfg(all(
feature = "INIntent",
feature = "INIntentResponse",
feature = "INStartCallIntentResponse",
feature = "block2"
))]
#[unsafe(method(handleStartCall:completion:))]
#[unsafe(method_family = none)]
unsafe fn handleStartCall_completion(
&self,
intent: &INStartCallIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INStartCallIntentResponse>)>,
);
#[cfg(all(
feature = "INIntent",
feature = "INIntentResponse",
feature = "INStartCallIntentResponse",
feature = "block2"
))]
#[optional]
#[unsafe(method(confirmStartCall:completion:))]
#[unsafe(method_family = none)]
unsafe fn confirmStartCall_completion(
&self,
intent: &INStartCallIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INStartCallIntentResponse>)>,
);
#[cfg(all(
feature = "INCallRecordResolutionResult",
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "block2"
))]
#[optional]
#[unsafe(method(resolveCallRecordToCallBackForStartCall:withCompletion:))]
#[unsafe(method_family = none)]
unsafe fn resolveCallRecordToCallBackForStartCall_withCompletion(
&self,
intent: &INStartCallIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INCallRecordResolutionResult>)>,
);
#[cfg(all(
feature = "INCallDestinationTypeResolutionResult",
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "block2"
))]
#[optional]
#[unsafe(method(resolveDestinationTypeForStartCall:withCompletion:))]
#[unsafe(method_family = none)]
unsafe fn resolveDestinationTypeForStartCall_withCompletion(
&self,
intent: &INStartCallIntent,
completion: &block2::DynBlock<dyn Fn(NonNull<INCallDestinationTypeResolutionResult>)>,
);
#[cfg(all(
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "INPersonResolutionResult",
feature = "INStartCallContactResolutionResult",
feature = "block2"
))]
#[optional]
#[unsafe(method(resolveContactsForStartCall:withCompletion:))]
#[unsafe(method_family = none)]
unsafe fn resolveContactsForStartCall_withCompletion(
&self,
intent: &INStartCallIntent,
completion: &block2::DynBlock<
dyn Fn(NonNull<NSArray<INStartCallContactResolutionResult>>),
>,
);
#[cfg(all(
feature = "INCallCapabilityResolutionResult",
feature = "INIntent",
feature = "INIntentResolutionResult",
feature = "INStartCallCallCapabilityResolutionResult",
feature = "block2"
))]
#[optional]
#[unsafe(method(resolveCallCapabilityForStartCall:withCompletion:))]
#[unsafe(method_family = none)]
unsafe fn resolveCallCapabilityForStartCall_withCompletion(
&self,
intent: &INStartCallIntent,
completion: &block2::DynBlock<
dyn Fn(NonNull<INStartCallCallCapabilityResolutionResult>),
>,
);
}
);