objc2_safari_services/generated/
SFContentBlockerManager.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/safariservices/sfcontentblockermanager?language=objc)
12    #[unsafe(super(NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    pub struct SFContentBlockerManager;
15);
16
17extern_conformance!(
18    unsafe impl NSObjectProtocol for SFContentBlockerManager {}
19);
20
21impl SFContentBlockerManager {
22    extern_methods!(
23        #[cfg(feature = "block2")]
24        #[unsafe(method(reloadContentBlockerWithIdentifier:completionHandler:))]
25        #[unsafe(method_family = none)]
26        pub unsafe fn reloadContentBlockerWithIdentifier_completionHandler(
27            identifier: &NSString,
28            completion_handler: Option<&block2::DynBlock<dyn Fn(*mut NSError)>>,
29        );
30
31        #[cfg(all(feature = "SFContentBlockerState", feature = "block2"))]
32        #[unsafe(method(getStateOfContentBlockerWithIdentifier:completionHandler:))]
33        #[unsafe(method_family = none)]
34        pub unsafe fn getStateOfContentBlockerWithIdentifier_completionHandler(
35            identifier: &NSString,
36            completion_handler: &block2::DynBlock<dyn Fn(*mut SFContentBlockerState, *mut NSError)>,
37        );
38    );
39}
40
41/// Methods declared on superclass `NSObject`.
42impl SFContentBlockerManager {
43    extern_methods!(
44        #[unsafe(method(init))]
45        #[unsafe(method_family = init)]
46        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
47
48        #[unsafe(method(new))]
49        #[unsafe(method_family = new)]
50        pub unsafe fn new() -> Retained<Self>;
51    );
52}