1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct WKWebsiteDataStore;

    unsafe impl ClassType for WKWebsiteDataStore {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

unsafe impl NSCoding for WKWebsiteDataStore {}

unsafe impl NSObjectProtocol for WKWebsiteDataStore {}

unsafe impl NSSecureCoding for WKWebsiteDataStore {}

extern_methods!(
    unsafe impl WKWebsiteDataStore {
        #[method_id(@__retain_semantics Other defaultDataStore)]
        pub unsafe fn defaultDataStore() -> Retained<WKWebsiteDataStore>;

        #[method_id(@__retain_semantics Other nonPersistentDataStore)]
        pub unsafe fn nonPersistentDataStore() -> Retained<WKWebsiteDataStore>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new(&self) -> Retained<Self>;

        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method(isPersistent)]
        pub unsafe fn isPersistent(&self) -> bool;

        #[method_id(@__retain_semantics Other allWebsiteDataTypes)]
        pub unsafe fn allWebsiteDataTypes() -> Retained<NSSet<NSString>>;

        #[cfg(all(feature = "WKWebsiteDataRecord", feature = "block2"))]
        #[method(fetchDataRecordsOfTypes:completionHandler:)]
        pub unsafe fn fetchDataRecordsOfTypes_completionHandler(
            &self,
            data_types: &NSSet<NSString>,
            completion_handler: &block2::Block<dyn Fn(NonNull<NSArray<WKWebsiteDataRecord>>)>,
        );

        #[cfg(all(feature = "WKWebsiteDataRecord", feature = "block2"))]
        #[method(removeDataOfTypes:forDataRecords:completionHandler:)]
        pub unsafe fn removeDataOfTypes_forDataRecords_completionHandler(
            &self,
            data_types: &NSSet<NSString>,
            data_records: &NSArray<WKWebsiteDataRecord>,
            completion_handler: &block2::Block<dyn Fn()>,
        );

        #[cfg(feature = "block2")]
        #[method(removeDataOfTypes:modifiedSince:completionHandler:)]
        pub unsafe fn removeDataOfTypes_modifiedSince_completionHandler(
            &self,
            data_types: &NSSet<NSString>,
            date: &NSDate,
            completion_handler: &block2::Block<dyn Fn()>,
        );

        #[cfg(feature = "WKHTTPCookieStore")]
        #[method_id(@__retain_semantics Other httpCookieStore)]
        pub unsafe fn httpCookieStore(&self) -> Retained<WKHTTPCookieStore>;

        #[method_id(@__retain_semantics Other identifier)]
        pub unsafe fn identifier(&self) -> Option<Retained<NSUUID>>;

        #[method_id(@__retain_semantics Other dataStoreForIdentifier:)]
        pub unsafe fn dataStoreForIdentifier(identifier: &NSUUID) -> Retained<WKWebsiteDataStore>;

        #[cfg(feature = "block2")]
        #[method(removeDataStoreForIdentifier:completionHandler:)]
        pub unsafe fn removeDataStoreForIdentifier_completionHandler(
            identifier: &NSUUID,
            completion_handler: &block2::Block<dyn Fn(*mut NSError)>,
        );

        #[cfg(feature = "block2")]
        #[method(fetchAllDataStoreIdentifiers:)]
        pub unsafe fn fetchAllDataStoreIdentifiers(
            completion_handler: &block2::Block<dyn Fn(NonNull<NSArray<NSUUID>>)>,
        );
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    unsafe impl WKWebsiteDataStore {
        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new_class() -> Retained<Self>;
    }
);