WebKitWebsiteData: WPE Reference Manual

## WebKitWebsiteData WebKitWebsiteData — Website data |

## Functions

WebKitWebsiteData * | webkit_website_data_ref ()
void | webkit_website_data_unref ()
const char * | webkit_website_data_get_name ()
WebKitWebsiteDataTypes | webkit_website_data_get_types ()
guint64 | webkit_website_data_get_size ()

## Types and Values

| WebKitWebsiteData
enum | WebKitWebsiteDataTypes

## Object Hierarchy

        GBoxed
        ╰── WebKitWebsiteData

## Description

WebKitWebsiteData represents data stored in the client by a particular website. A website is normally a set of URLs grouped by domain name. You can get the website name, which is usually the domain, with `webkit_website_data_get_name()`. Documents loaded from the file system, like file:// URIs, are all grouped in the same WebKitWebsiteData with the name "Local files".

A website can store different types of data in the client side. WebKitWebsiteDataTypes is an enum containing all the possible data types; use `webkit_website_data_get_types()` to get the bitmask of data types. It's also possible to know the size of the data stored for some of the WebKitWebsiteDataTypes by using `webkit_website_data_get_size()`.

A list of WebKitWebsiteData can be retrieved with `webkit_website_data_manager_fetch()`. See WebKitWebsiteDataManager for more information.

## Functions

### webkit_website_data_ref ()

    WebKitWebsiteData *
    webkit_website_data_ref (WebKitWebsiteData *website_data);

Atomically increments the reference count of `website_data` by one. This function is MT-safe and may be called from any thread.

#### Parameters

website_data | a WebKitWebsiteData |

#### Returns

The passed WebKitWebsiteData

Since: 2.16

### webkit_website_data_unref ()

    void
    webkit_website_data_unref (WebKitWebsiteData *website_data);

Atomically decrements the reference count of `website_data` by one. If the reference count drops to 0, all memory allocated by WebKitWebsiteData is released. This function is MT-safe and may be called from any thread.

#### Parameters

website_data | A WebKitWebsiteData |

Since: 2.16

### webkit_website_data_get_name ()

    const char *
    webkit_website_data_get_name (WebKitWebsiteData *website_data);

Gets the name of WebKitWebsiteData. This is the website name, normally represented by a domain or host name. All local documents are grouped in the same WebKitWebsiteData using the name "Local files".

#### Parameters

website_data | a WebKitWebsiteData |

#### Returns

the website name of `website_data` .

Since: 2.16

### webkit_website_data_get_types ()

    WebKitWebsiteDataTypes
    webkit_website_data_get_types (WebKitWebsiteData *website_data);

Gets the types of data stored in the client for a WebKitWebsiteData. These are the types actually present, not the types queried with `webkit_website_data_manager_fetch()`.

#### Parameters

website_data | a WebKitWebsiteData |

#### Returns

a bitmask of WebKitWebsiteDataTypes in `website_data`

Since: 2.16

### webkit_website_data_get_size ()

    guint64
    webkit_website_data_get_size (WebKitWebsiteData *website_data,
                                  WebKitWebsiteDataTypes types);

Gets the size of the data of types `types` in a WebKitWebsiteData. Note that currently the data size is only known for `WEBKIT_WEBSITE_DATA_DISK_CACHE` data type so for all other types 0 will be returned.

#### Parameters

website_data | a WebKitWebsiteData |
types | a bitmask of WebKitWebsiteDataTypes |

#### Returns

the size of `website_data` for the given `types` .

Since: 2.16

## Types and Values

### WebKitWebsiteData

    typedef struct _WebKitWebsiteData WebKitWebsiteData;

### enum WebKitWebsiteDataTypes

Enum values with flags representing types of Website data.

#### Members

WEBKIT_WEBSITE_DATA_MEMORY_CACHE | Memory cache. |
WEBKIT_WEBSITE_DATA_DISK_CACHE | HTTP disk cache. |
WEBKIT_WEBSITE_DATA_OFFLINE_APPLICATION_CACHE | Offline web application cache. |
WEBKIT_WEBSITE_DATA_SESSION_STORAGE | Session storage data. |
WEBKIT_WEBSITE_DATA_LOCAL_STORAGE | Local storage data. |
WEBKIT_WEBSITE_DATA_WEBSQL_DATABASES | WebSQL databases. Deprecated 2.24 |
WEBKIT_WEBSITE_DATA_INDEXEDDB_DATABASES | IndexedDB databases. |
WEBKIT_WEBSITE_DATA_PLUGIN_DATA | Plugins data. |
WEBKIT_WEBSITE_DATA_COOKIES | Cookies. |
WEBKIT_WEBSITE_DATA_DEVICE_ID_HASH_SALT | Hash salt used to generate the device ids used by webpages. Since 2.24 |
WEBKIT_WEBSITE_DATA_HSTS_CACHE | HSTS cache. Since 2.26 |
WEBKIT_WEBSITE_DATA_ITP | Intelligent Tracking Prevention data. Since 2.30. |
WEBKIT_WEBSITE_DATA_SERVICE_WORKER_REGISTRATIONS | Service worker registrations. Since 2.30 |
WEBKIT_WEBSITE_DATA_DOM_CACHE | DOM (CacheStorage) cache. Since 2.30 |
WEBKIT_WEBSITE_DATA_ALL | All types. |

Since: 2.16

## See Also

WebKitWebsiteDataManager