WebKit2.WebsiteData

Fields

None

Methods

get_name ()

get_size (types)

get_types ()

ref ()

unref ()

Details

class WebKit2.WebsiteData

Data stored locally by a web site.

WebKit2.WebsiteData 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 WebKit2.WebsiteData.get_name(). Documents loaded from the file system, like file:// URIs, are all grouped in the same WebKit2.WebsiteData with the name “Local files”.

A website can store different types of data in the client side. WebKit2.WebsiteDataTypes is an enum containing all the possible data types; use WebKit2.WebsiteData.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 WebKit2.WebsiteDataTypes by using WebKit2.WebsiteData.get_size().

A list of WebKit2.WebsiteData can be retrieved with WebKit2.WebsiteDataManager.fetch(). See WebKit2.WebsiteDataManager for more information.

New in version 2.16.

get_name()
Returns:

the website name of self.

Return type:

str

Gets the name of WebKit2.WebsiteData.

This is the website name, normally represented by a domain or host name. All local documents are grouped in the same WebKit2.WebsiteData using the name “Local files”.

New in version 2.16.

get_size(types)
Parameters:

types (WebKit2.WebsiteDataTypes) – a bitmask of WebKit2.WebsiteDataTypes

Returns:

the size of self for the given types.

Return type:

int

Gets the size of the data of types types in a WebKit2.WebsiteData.

Note that currently the data size is only known for WebKit2.WebsiteDataTypes.DISK_CACHE data type so for all other types 0 will be returned.

New in version 2.16.

get_types()
Returns:

a bitmask of WebKit2.WebsiteDataTypes in self

Return type:

WebKit2.WebsiteDataTypes

Gets the types of data stored in the client for a WebKit2.WebsiteData.

These are the types actually present, not the types queried with WebKit2.WebsiteDataManager.fetch().

New in version 2.16.

ref()
Returns:

The passed WebKit2.WebsiteData

Return type:

WebKit2.WebsiteData

Atomically increments the reference count of self by one.

This function is MT-safe and may be called from any thread.

New in version 2.16.

unref()

Atomically decrements the reference count of self by one.

If the reference count drops to 0, all memory allocated by WebKit2.WebsiteData is released. This function is MT-safe and may be called from any thread.

New in version 2.16.