use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
#[cfg(all(feature = "MKDirectionsResponse", feature = "block2"))]
pub type MKDirectionsHandler =
*mut block2::DynBlock<dyn Fn(*mut MKDirectionsResponse, *mut NSError)>;
#[cfg(all(feature = "MKDirectionsResponse", feature = "block2"))]
pub type MKETAHandler = *mut block2::DynBlock<dyn Fn(*mut MKETAResponse, *mut NSError)>;
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct MKDirections;
);
extern_conformance!(
unsafe impl NSObjectProtocol for MKDirections {}
);
impl MKDirections {
extern_methods!(
#[cfg(feature = "MKDirectionsRequest")]
#[unsafe(method(initWithRequest:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithRequest(
this: Allocated<Self>,
request: &MKDirectionsRequest,
) -> Retained<Self>;
#[cfg(all(feature = "MKDirectionsResponse", feature = "block2"))]
#[unsafe(method(calculateDirectionsWithCompletionHandler:))]
#[unsafe(method_family = none)]
pub unsafe fn calculateDirectionsWithCompletionHandler(
&self,
completion_handler: MKDirectionsHandler,
);
#[cfg(all(feature = "MKDirectionsResponse", feature = "block2"))]
#[unsafe(method(calculateETAWithCompletionHandler:))]
#[unsafe(method_family = none)]
pub unsafe fn calculateETAWithCompletionHandler(&self, completion_handler: MKETAHandler);
#[unsafe(method(cancel))]
#[unsafe(method_family = none)]
pub unsafe fn cancel(&self);
#[unsafe(method(isCalculating))]
#[unsafe(method_family = none)]
pub unsafe fn isCalculating(&self) -> bool;
);
}
impl MKDirections {
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>;
);
}