1/*
2 * Copyright (C) 2017 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 Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 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 WebKitWebsiteData_h
25#define WebKitWebsiteData_h
26
27#include <glib-object.h>
28#include <webkit2/WebKitDefines.h>
29
30G_BEGIN_DECLS
31
32#define WEBKIT_TYPE_WEBSITE_DATA (webkit_website_data_get_type())
33
34typedef struct _WebKitWebsiteData WebKitWebsiteData;
35
36/**
37 * WebKitWebsiteDataTypes:
38 * @WEBKIT_WEBSITE_DATA_MEMORY_CACHE: Memory cache.
39 * @WEBKIT_WEBSITE_DATA_DISK_CACHE: HTTP disk cache.
40 * @WEBKIT_WEBSITE_DATA_OFFLINE_APPLICATION_CACHE: Offline web application cache.
41 * @WEBKIT_WEBSITE_DATA_SESSION_STORAGE: Session storage data.
42 * @WEBKIT_WEBSITE_DATA_LOCAL_STORAGE: Local storage data.
43 * @WEBKIT_WEBSITE_DATA_WEBSQL_DATABASES: WebSQL databases. Deprecated 2.24
44 * @WEBKIT_WEBSITE_DATA_INDEXEDDB_DATABASES: IndexedDB databases.
45 * @WEBKIT_WEBSITE_DATA_PLUGIN_DATA: Plugins data.
46 * @WEBKIT_WEBSITE_DATA_COOKIES: Cookies.
47 * @WEBKIT_WEBSITE_DATA_DEVICE_ID_HASH_SALT: Hash salt used to generate the device ids used by webpages. Since 2.24
48 * @WEBKIT_WEBSITE_DATA_ALL: All types.
49 *
50 * Enum values with flags representing types of Website data.
51 *
52 * Since: 2.16
53 */
54typedef enum {
55 WEBKIT_WEBSITE_DATA_MEMORY_CACHE = 1 << 0,
56 WEBKIT_WEBSITE_DATA_DISK_CACHE = 1 << 1,
57 WEBKIT_WEBSITE_DATA_OFFLINE_APPLICATION_CACHE = 1 << 2,
58 WEBKIT_WEBSITE_DATA_SESSION_STORAGE = 1 << 3,
59 WEBKIT_WEBSITE_DATA_LOCAL_STORAGE = 1 << 4,
60 WEBKIT_WEBSITE_DATA_WEBSQL_DATABASES = 1 << 5,
61 WEBKIT_WEBSITE_DATA_INDEXEDDB_DATABASES = 1 << 6,
62 WEBKIT_WEBSITE_DATA_PLUGIN_DATA = 1 << 7,
63 WEBKIT_WEBSITE_DATA_COOKIES = 1 << 8,
64 WEBKIT_WEBSITE_DATA_DEVICE_ID_HASH_SALT = 1 << 9,
65 WEBKIT_WEBSITE_DATA_ALL = (1 << 10) - 1
66} WebKitWebsiteDataTypes;
67
68WEBKIT_API GType
69webkit_website_data_get_type (void);
70
71WEBKIT_API WebKitWebsiteData *
72webkit_website_data_ref (WebKitWebsiteData *website_data);
73
74WEBKIT_API void
75webkit_website_data_unref (WebKitWebsiteData *website_data);
76
77WEBKIT_API const char *
78webkit_website_data_get_name (WebKitWebsiteData *website_data);
79
80WEBKIT_API WebKitWebsiteDataTypes
81webkit_website_data_get_types (WebKitWebsiteData *website_data);
82
83WEBKIT_API guint64
84webkit_website_data_get_size (WebKitWebsiteData *website_data,
85 WebKitWebsiteDataTypes types);
86
87G_END_DECLS
88
89#endif /* WebKitWebsiteData_h */
90