use crate::common::*;
use crate::AppKit::*;
use crate::Foundation::*;
use crate::LinkPresentation::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "LinkPresentation_LPMetadataProvider")]
pub struct LPMetadataProvider;
#[cfg(feature = "LinkPresentation_LPMetadataProvider")]
unsafe impl ClassType for LPMetadataProvider {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "LinkPresentation_LPMetadataProvider")]
unsafe impl NSObjectProtocol for LPMetadataProvider {}
extern_methods!(
#[cfg(feature = "LinkPresentation_LPMetadataProvider")]
unsafe impl LPMetadataProvider {
#[cfg(all(
feature = "Foundation_NSError",
feature = "Foundation_NSURL",
feature = "LinkPresentation_LPLinkMetadata"
))]
#[method(startFetchingMetadataForURL:completionHandler:)]
pub unsafe fn startFetchingMetadataForURL_completionHandler(
&self,
url: &NSURL,
completion_handler: &Block<(*mut LPLinkMetadata, *mut NSError), ()>,
);
#[cfg(all(
feature = "Foundation_NSError",
feature = "Foundation_NSURLRequest",
feature = "LinkPresentation_LPLinkMetadata"
))]
#[method(startFetchingMetadataForRequest:completionHandler:)]
pub unsafe fn startFetchingMetadataForRequest_completionHandler(
&self,
request: &NSURLRequest,
completion_handler: &Block<(*mut LPLinkMetadata, *mut NSError), ()>,
);
#[method(cancel)]
pub unsafe fn cancel(&self);
#[method(shouldFetchSubresources)]
pub unsafe fn shouldFetchSubresources(&self) -> bool;
#[method(setShouldFetchSubresources:)]
pub unsafe fn setShouldFetchSubresources(&self, should_fetch_subresources: bool);
#[method(timeout)]
pub unsafe fn timeout(&self) -> NSTimeInterval;
#[method(setTimeout:)]
pub unsafe fn setTimeout(&self, timeout: NSTimeInterval);
}
);
extern_methods!(
#[cfg(feature = "LinkPresentation_LPMetadataProvider")]
unsafe impl LPMetadataProvider {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Id<Self>;
}
);