WebKit.WebsiteData

Fields

None

Methods

get_name ()

get_size (types)

get_types ()

ref ()

unref ()

Details

class WebKit.WebsiteData

Data stored locally by a web site.

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

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

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

New in version 2.16.

get_name()
Returns:

the website name of self.

Return type:

str

Gets the name of WebKit.WebsiteData.

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

New in version 2.16.

get_size(types)
Parameters:

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

Returns:

the size of self for the given types.

Return type:

int

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

Note that currently the data size is only known for WebKit.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 WebKit.WebsiteDataTypes in self

Return type:

WebKit.WebsiteDataTypes

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

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

New in version 2.16.

ref()
Returns:

The passed WebKit.WebsiteData

Return type:

WebKit.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 WebKit.WebsiteData is released. This function is MT-safe and may be called from any thread.

New in version 2.16.