1 | /* |
2 | * Copyright (C) 2015 Igalia S.L. |
3 | * |
4 | * This library is free software; you can redistribute it and/or |
5 | * modify it under the terms of the GNU Lesser General Public |
6 | * License as published by the Free Software Foundation; either |
7 | * version 2,1 of the License, or (at your option) any later version. |
8 | * |
9 | * This library is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 | * Library General Public License for more details. |
13 | * |
14 | * You should have received a copy of the GNU Library General Public License |
15 | * along with this library; see the file COPYING.LIB. If not, write to |
16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
17 | * Boston, MA 02110-1301, USA. |
18 | */ |
19 | |
20 | #if !defined(__WEBKIT2_H_INSIDE__) && !defined(WEBKIT2_COMPILATION) |
21 | #error "Only <webkit2/webkit2.h> can be included directly." |
22 | #endif |
23 | |
24 | #ifndef WebKitWebsiteDataManager_h |
25 | #define WebKitWebsiteDataManager_h |
26 | |
27 | #include <gio/gio.h> |
28 | #include <webkit2/WebKitCookieManager.h> |
29 | #include <webkit2/WebKitDefines.h> |
30 | #include <webkit2/WebKitWebsiteData.h> |
31 | |
32 | G_BEGIN_DECLS |
33 | |
34 | #define WEBKIT_TYPE_WEBSITE_DATA_MANAGER (webkit_website_data_manager_get_type()) |
35 | #define WEBKIT_WEBSITE_DATA_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_WEBSITE_DATA_MANAGER, WebKitWebsiteDataManager)) |
36 | #define WEBKIT_IS_WEBSITE_DATA_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_WEBSITE_DATA_MANAGER)) |
37 | #define WEBKIT_WEBSITE_DATA_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), WEBKIT_TYPE_WEBSITE_DATA_MANAGER, WebKitWebsiteDataManagerClass)) |
38 | #define WEBKIT_IS_WEBSITE_DATA_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), WEBKIT_TYPE_WEBSITE_DATA_MANAGER)) |
39 | #define WEBKIT_WEBSITE_DATA_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), WEBKIT_TYPE_WEBSITE_DATA_MANAGER, WebKitWebsiteDataManagerClass)) |
40 | |
41 | typedef struct _WebKitWebsiteDataManager WebKitWebsiteDataManager; |
42 | typedef struct _WebKitWebsiteDataManagerClass WebKitWebsiteDataManagerClass; |
43 | typedef struct _WebKitWebsiteDataManagerPrivate WebKitWebsiteDataManagerPrivate; |
44 | |
45 | struct _WebKitWebsiteDataManager { |
46 | GObject parent; |
47 | |
48 | WebKitWebsiteDataManagerPrivate *priv; |
49 | }; |
50 | |
51 | struct _WebKitWebsiteDataManagerClass { |
52 | GObjectClass parent_class; |
53 | |
54 | void (*_webkit_reserved0) (void); |
55 | void (*_webkit_reserved1) (void); |
56 | void (*_webkit_reserved2) (void); |
57 | void (*_webkit_reserved3) (void); |
58 | }; |
59 | |
60 | WEBKIT_API GType |
61 | webkit_website_data_manager_get_type (void); |
62 | |
63 | WEBKIT_API WebKitWebsiteDataManager * |
64 | webkit_website_data_manager_new (const gchar *first_option_name, |
65 | ...); |
66 | WEBKIT_API WebKitWebsiteDataManager * |
67 | webkit_website_data_manager_new_ephemeral (void); |
68 | |
69 | WEBKIT_API gboolean |
70 | webkit_website_data_manager_is_ephemeral (WebKitWebsiteDataManager* manager); |
71 | |
72 | WEBKIT_API const gchar * |
73 | webkit_website_data_manager_get_base_data_directory (WebKitWebsiteDataManager *manager); |
74 | |
75 | WEBKIT_API const gchar * |
76 | webkit_website_data_manager_get_base_cache_directory (WebKitWebsiteDataManager *manager); |
77 | |
78 | WEBKIT_API const gchar * |
79 | webkit_website_data_manager_get_local_storage_directory (WebKitWebsiteDataManager *manager); |
80 | |
81 | WEBKIT_API const gchar * |
82 | webkit_website_data_manager_get_disk_cache_directory (WebKitWebsiteDataManager *manager); |
83 | |
84 | WEBKIT_API const gchar * |
85 | webkit_website_data_manager_get_offline_application_cache_directory (WebKitWebsiteDataManager *manager); |
86 | |
87 | WEBKIT_API const gchar * |
88 | webkit_website_data_manager_get_indexeddb_directory (WebKitWebsiteDataManager *manager); |
89 | |
90 | WEBKIT_DEPRECATED const gchar * |
91 | webkit_website_data_manager_get_websql_directory (WebKitWebsiteDataManager *manager); |
92 | |
93 | WEBKIT_API WebKitCookieManager * |
94 | webkit_website_data_manager_get_cookie_manager (WebKitWebsiteDataManager *manager); |
95 | |
96 | WEBKIT_API void |
97 | webkit_website_data_manager_fetch (WebKitWebsiteDataManager *manager, |
98 | WebKitWebsiteDataTypes types, |
99 | GCancellable *cancellable, |
100 | GAsyncReadyCallback callback, |
101 | gpointer user_data); |
102 | |
103 | WEBKIT_API GList * |
104 | webkit_website_data_manager_fetch_finish (WebKitWebsiteDataManager *manager, |
105 | GAsyncResult *result, |
106 | GError **error); |
107 | WEBKIT_API void |
108 | webkit_website_data_manager_remove (WebKitWebsiteDataManager *manager, |
109 | WebKitWebsiteDataTypes types, |
110 | GList *website_data, |
111 | GCancellable *cancellable, |
112 | GAsyncReadyCallback callback, |
113 | gpointer user_data); |
114 | WEBKIT_API gboolean |
115 | webkit_website_data_manager_remove_finish (WebKitWebsiteDataManager *manager, |
116 | GAsyncResult *result, |
117 | GError **error); |
118 | |
119 | WEBKIT_API void |
120 | webkit_website_data_manager_clear (WebKitWebsiteDataManager *manager, |
121 | WebKitWebsiteDataTypes types, |
122 | GTimeSpan timespan, |
123 | GCancellable *cancellable, |
124 | GAsyncReadyCallback callback, |
125 | gpointer user_data); |
126 | |
127 | WEBKIT_API gboolean |
128 | webkit_website_data_manager_clear_finish (WebKitWebsiteDataManager *manager, |
129 | GAsyncResult *result, |
130 | GError **error); |
131 | |
132 | G_END_DECLS |
133 | |
134 | #endif |
135 | |