Class WebsiteData
- All Implemented Interfaces:
Proxy
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.
- Since:
- 2.16
-
Constructor Summary
ConstructorsConstructorDescriptionWebsiteData(MemorySegment address) Create a WebsiteData proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptiongetName()Gets the name ofWebKitWebsiteData.longgetSize(Set<WebsiteDataTypes> types) Gets the size of the data of typestypesin aWebKitWebsiteData.longgetSize(WebsiteDataTypes... types) Gets the size of the data of typestypesin aWebKitWebsiteData.static @Nullable TypegetType()Get the GType of the WebsiteData classgetTypes()Gets the types of data stored in the client for aWebKitWebsiteData.ref()Atomically increments the reference count of this WebsiteData by one.voidunref()Atomically decrements the reference count of this WebsiteData by one.Methods inherited from class org.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
WebsiteData
Create a WebsiteData proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
-
Method Details
-
getType
-
getName
Gets the name ofWebKitWebsiteData.This is the website name, normally represented by a domain or host name. All local documents are grouped in the same
WebKitWebsiteDatausing the name "Local files".- Returns:
- the website name of
websiteData. - Since:
- 2.16
-
getSize
Gets the size of the data of typestypesin aWebKitWebsiteData.Note that currently the data size is only known for
WebsiteDataTypes.DISK_CACHEdata type so for all other types 0 will be returned.- Parameters:
types- a bitmask ofWebKitWebsiteDataTypes- Returns:
- the size of this WebsiteData for the given
types. - Since:
- 2.16
-
getSize
Gets the size of the data of typestypesin aWebKitWebsiteData.Note that currently the data size is only known for
WebsiteDataTypes.DISK_CACHEdata type so for all other types 0 will be returned.- Parameters:
types- a bitmask ofWebKitWebsiteDataTypes- Returns:
- the size of this WebsiteData for the given
types. - Since:
- 2.16
-
getTypes
Gets the types of data stored in the client for aWebKitWebsiteData.These are the types actually present, not the types queried with webkit_website_data_manager_fetch().
- Returns:
- a bitmask of
WebKitWebsiteDataTypesin this WebsiteData - Since:
- 2.16
-
ref
Atomically increments the reference count of this WebsiteData by one.This function is MT-safe and may be called from any thread.
- Returns:
- The passed
WebKitWebsiteData - Since:
- 2.16
-
unref
public void unref()Atomically decrements the reference count of this WebsiteData by one.If the reference count drops to 0, all memory allocated by
WebKitWebsiteDatais released. This function is MT-safe and may be called from any thread.- Since:
- 2.16
-