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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use crate::common::*;
use crate::AppKit::*;
use crate::Foundation::*;
use crate::WebKit::*;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "WebKit_WKWebsiteDataStore")]
    pub struct WKWebsiteDataStore;

    #[cfg(feature = "WebKit_WKWebsiteDataStore")]
    unsafe impl ClassType for WKWebsiteDataStore {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "WebKit_WKWebsiteDataStore")]
unsafe impl NSCoding for WKWebsiteDataStore {}

#[cfg(feature = "WebKit_WKWebsiteDataStore")]
unsafe impl NSObjectProtocol for WKWebsiteDataStore {}

#[cfg(feature = "WebKit_WKWebsiteDataStore")]
unsafe impl NSSecureCoding for WKWebsiteDataStore {}

extern_methods!(
    #[cfg(feature = "WebKit_WKWebsiteDataStore")]
    unsafe impl WKWebsiteDataStore {
        #[method_id(@__retain_semantics Other defaultDataStore)]
        pub unsafe fn defaultDataStore() -> Id<WKWebsiteDataStore>;

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

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

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

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

        #[cfg(all(feature = "Foundation_NSSet", feature = "Foundation_NSString"))]
        #[method_id(@__retain_semantics Other allWebsiteDataTypes)]
        pub unsafe fn allWebsiteDataTypes() -> Id<NSSet<NSString>>;

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

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

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

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

        #[cfg(feature = "Foundation_NSUUID")]
        #[method_id(@__retain_semantics Other identifier)]
        pub unsafe fn identifier(&self) -> Option<Id<NSUUID>>;

        #[cfg(feature = "Foundation_NSUUID")]
        #[method_id(@__retain_semantics Other dataStoreForIdentifier:)]
        pub unsafe fn dataStoreForIdentifier(identifier: &NSUUID) -> Id<WKWebsiteDataStore>;

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

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

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