use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
pub type STWebHistoryProfileIdentifier = NSString;
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct STWebHistory;
);
extern_conformance!(
unsafe impl NSObjectProtocol for STWebHistory {}
);
impl STWebHistory {
extern_methods!(
#[unsafe(method(initWithBundleIdentifier:profileIdentifier:error:_))]
#[unsafe(method_family = init)]
pub unsafe fn initWithBundleIdentifier_profileIdentifier_error(
this: Allocated<Self>,
bundle_identifier: &NSString,
profile_identifier: Option<&STWebHistoryProfileIdentifier>,
) -> Result<Retained<Self>, Retained<NSError>>;
#[unsafe(method(initWithProfileIdentifier:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithProfileIdentifier(
this: Allocated<Self>,
profile_identifier: Option<&STWebHistoryProfileIdentifier>,
) -> Retained<Self>;
#[unsafe(method(initWithBundleIdentifier:error:_))]
#[unsafe(method_family = init)]
pub unsafe fn initWithBundleIdentifier_error(
this: Allocated<Self>,
bundle_identifier: &NSString,
) -> Result<Retained<Self>, Retained<NSError>>;
#[cfg(feature = "block2")]
#[unsafe(method(fetchHistoryDuringInterval:completionHandler:))]
#[unsafe(method_family = none)]
pub unsafe fn fetchHistoryDuringInterval_completionHandler(
&self,
interval: &NSDateInterval,
completion_handler: &block2::DynBlock<dyn Fn(*mut NSSet<NSURL>, *mut NSError)>,
);
#[cfg(feature = "block2")]
#[unsafe(method(fetchAllHistoryWithCompletionHandler:))]
#[unsafe(method_family = none)]
pub unsafe fn fetchAllHistoryWithCompletionHandler(
&self,
completion_handler: &block2::DynBlock<dyn Fn(*mut NSSet<NSURL>, *mut NSError)>,
);
#[unsafe(method(deleteHistoryForURL:))]
#[unsafe(method_family = none)]
pub unsafe fn deleteHistoryForURL(&self, url: &NSURL);
#[unsafe(method(deleteHistoryDuringInterval:))]
#[unsafe(method_family = none)]
pub unsafe fn deleteHistoryDuringInterval(&self, interval: &NSDateInterval);
#[unsafe(method(deleteAllHistory))]
#[unsafe(method_family = none)]
pub unsafe fn deleteAllHistory(&self);
);
}
impl STWebHistory {
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>;
);
}