Class WebsiteDataManager
- All Implemented Interfaces:
Proxy
You can use WebKitWebsiteDataManager to configure the local directories
where website data will be stored. Use WebKitWebsiteDataManager
:base-data-directory
and WebKitWebsiteDataManager
:base-cache-directory set a common base directory for all
website data and caches.
A WebKitWebsiteDataManager can be ephemeral, in which case all the directory configuration is not needed because website data will never persist. You can create an ephemeral WebKitWebsiteDataManager with webkit_website_data_manager_new_ephemeral().
WebKitWebsiteDataManager can also be used to fetch website data, remove data stored by particular websites, or clear data for all websites modified since a given period of time.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Inner class implementing a builder pattern to construct a GObject with properties.static class
Nested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback, GObject.ObjectClass
-
Constructor Summary
ConstructorDescriptionWebsiteDataManager
(MemorySegment address) Create a WebsiteDataManager proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected WebsiteDataManager
asParent()
Returns this instance as if it were its parent type.static WebsiteDataManager.Builder
<? extends WebsiteDataManager.Builder> builder()
AWebsiteDataManager.Builder
object constructs aWebsiteDataManager
with the specified properties.void
clear
(Set<WebsiteDataTypes> types, TimeSpan timespan, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Asynchronously clear the website data of the giventypes
modified in the pasttimespan
.void
clear
(WebsiteDataTypes types, TimeSpan timespan, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Asynchronously clear the website data of the giventypes
modified in the pasttimespan
.boolean
clearFinish
(AsyncResult result) Finish an asynchronous operation started with webkit_website_data_manager_clear()void
fetch
(Set<WebsiteDataTypes> types, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Asynchronously get the list ofWebKitWebsiteData
for the giventypes
.void
fetch
(WebsiteDataTypes types, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Asynchronously get the list ofWebKitWebsiteData
for the giventypes
.fetchFinish
(AsyncResult result) Finish an asynchronous operation started with webkit_website_data_manager_fetch().Get theWebKitWebsiteDataManager
:base-cache-directory property.Get theWebKitWebsiteDataManager
:base-data-directory property.Get theWebKitFaviconDatabase
of this WebsiteDataManager.boolean
Get whether website icons are enabled.void
getItpSummary
(@Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Asynchronously get the list ofWebKitITPThirdParty
seen for this WebsiteDataManager.getItpSummaryFinish
(AsyncResult result) Finish an asynchronous operation started with webkit_website_data_manager_get_itp_summary().static Type
getType()
Get the GType of the WebsiteDataManager classboolean
Get whether aWebKitWebsiteDataManager
is ephemeral.void
remove
(Set<WebsiteDataTypes> types, List<WebsiteData> websiteData, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Asynchronously removes the website data in the givenwebsiteData
list.void
remove
(WebsiteDataTypes types, List<WebsiteData> websiteData, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Asynchronously removes the website data in the givenwebsiteData
list.boolean
removeFinish
(AsyncResult result) Finish an asynchronous operation started with webkit_website_data_manager_remove().void
setFaviconsEnabled
(boolean enabled) Set whether website icons are enabled.Methods inherited from class org.gnome.gobject.GObject
addToggleRef, addWeakPointer, bindProperty, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, connect, constructed, disconnect, dispatchPropertiesChanged, dispose, dupData, dupQdata, emit, emitNotify, finalize_, forceFloating, freezeNotify, get, getData, getMemoryLayout, getProperty, getProperty, getProperty, getQdata, getv, interfaceFindProperty, interfaceInstallProperty, interfaceListProperties, isFloating, newInstance, newInstance, newInstance, newInstance, newv, notify_, notify_, notifyByPspec, onNotify, ref, refSink, removeToggleRef, removeWeakPointer, replaceData, replaceQdata, runDispose, set, setData, setDataFull, setProperty, setProperty, setProperty, setQdata, setQdataFull, setv, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref, withProperties
Methods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, getPrivate, readGClass, writeGClass
Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
WebsiteDataManager
Create a WebsiteDataManager proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
-
Method Details
-
getType
-
asParent
Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuper
keyword, but will set the native typeclass function pointers to the parent type. When overriding a native virtual method in Java, "chaining up" withsuper.methodName()
doesn't work, because it invokes the overridden function pointer again. To chain up, callasParent().methodName()
. This will call the native function pointer of this virtual method in the typeclass of the parent type. -
clear
public void clear(Set<WebsiteDataTypes> types, TimeSpan timespan, @Nullable @Nullable Cancellable cancellable, @Nullable @Nullable AsyncReadyCallback callback) Asynchronously clear the website data of the giventypes
modified in the pasttimespan
.If
timespan
is 0, all website data will be removed.When the operation is finished,
callback
will be called. You can then call webkit_website_data_manager_clear_finish() to get the result of the operation.Due to implementation limitations, this function does not currently delete any stored cookies if
timespan
is nonzero. This behavior may change in the future.- Parameters:
types
-WebKitWebsiteDataTypes
timespan
- aGTimeSpan
cancellable
- aGCancellable
ornull
to ignorecallback
- aGAsyncReadyCallback
to call when the request is satisfied
-
clear
public void clear(WebsiteDataTypes types, TimeSpan timespan, @Nullable @Nullable Cancellable cancellable, @Nullable @Nullable AsyncReadyCallback callback) Asynchronously clear the website data of the giventypes
modified in the pasttimespan
.If
timespan
is 0, all website data will be removed.When the operation is finished,
callback
will be called. You can then call webkit_website_data_manager_clear_finish() to get the result of the operation.Due to implementation limitations, this function does not currently delete any stored cookies if
timespan
is nonzero. This behavior may change in the future.- Parameters:
types
-WebKitWebsiteDataTypes
timespan
- aGTimeSpan
cancellable
- aGCancellable
ornull
to ignorecallback
- aGAsyncReadyCallback
to call when the request is satisfied
-
clearFinish
Finish an asynchronous operation started with webkit_website_data_manager_clear()- Parameters:
result
- aGAsyncResult
- Returns:
true
if website data was successfully cleared, orfalse
otherwise.- Throws:
GErrorException
- seeGError
-
fetch
public void fetch(Set<WebsiteDataTypes> types, @Nullable @Nullable Cancellable cancellable, @Nullable @Nullable AsyncReadyCallback callback) Asynchronously get the list ofWebKitWebsiteData
for the giventypes
.When the operation is finished,
callback
will be called. You can then call webkit_website_data_manager_fetch_finish() to get the result of the operation.- Parameters:
types
-WebKitWebsiteDataTypes
cancellable
- aGCancellable
ornull
to ignorecallback
- aGAsyncReadyCallback
to call when the request is satisfied
-
fetch
public void fetch(WebsiteDataTypes types, @Nullable @Nullable Cancellable cancellable, @Nullable @Nullable AsyncReadyCallback callback) Asynchronously get the list ofWebKitWebsiteData
for the giventypes
.When the operation is finished,
callback
will be called. You can then call webkit_website_data_manager_fetch_finish() to get the result of the operation.- Parameters:
types
-WebKitWebsiteDataTypes
cancellable
- aGCancellable
ornull
to ignorecallback
- aGAsyncReadyCallback
to call when the request is satisfied
-
fetchFinish
Finish an asynchronous operation started with webkit_website_data_manager_fetch().- Parameters:
result
- aGAsyncResult
- Returns:
- a
GList
ofWebKitWebsiteData
. You must free theGList
with g_list_free() and unref theWebKitWebsiteData
<!-- -->s with webkit_website_data_unref() when you're done with them. - Throws:
GErrorException
- seeGError
-
getBaseCacheDirectory
Get theWebKitWebsiteDataManager
:base-cache-directory property.- Returns:
- the base directory for caches, or
null
ifWebKitWebsiteDataManager
:base-cache-directory was not provided or this WebsiteDataManager is ephemeral.
-
getBaseDataDirectory
Get theWebKitWebsiteDataManager
:base-data-directory property.- Returns:
- the base directory for website data, or
null
ifWebKitWebsiteDataManager
:base-data-directory was not provided or this WebsiteDataManager is ephemeral.
-
getFaviconDatabase
Get theWebKitFaviconDatabase
of this WebsiteDataManager.- Returns:
- a
WebKitFaviconDatabase
, ornull
if website icons are disabled
-
getFaviconsEnabled
public boolean getFaviconsEnabled()Get whether website icons are enabled.- Returns:
true
if website icons are enabled, orfalse
otherwise.
-
getItpSummary
public void getItpSummary(@Nullable @Nullable Cancellable cancellable, @Nullable @Nullable AsyncReadyCallback callback) Asynchronously get the list ofWebKitITPThirdParty
seen for this WebsiteDataManager.Every
WebKitITPThirdParty
contains the list ofWebKitITPFirstParty
under which it has been seen.When the operation is finished,
callback
will be called. You can then call webkit_website_data_manager_get_itp_summary_finish() to get the result of the operation.- Parameters:
cancellable
- aGCancellable
ornull
to ignorecallback
- aGAsyncReadyCallback
to call when the request is satisfied
-
getItpSummaryFinish
Finish an asynchronous operation started with webkit_website_data_manager_get_itp_summary().- Parameters:
result
- aGAsyncResult
- Returns:
- a
GList
ofWebKitITPThirdParty
. You must free theGList
with g_list_free() and unref theWebKitITPThirdParty
<!-- -->s with webkit_itp_third_party_unref() when you're done with them. - Throws:
GErrorException
- seeGError
-
isEphemeral
public boolean isEphemeral()Get whether aWebKitWebsiteDataManager
is ephemeral.See
WebKitWebsiteDataManager
:is-ephemeral for more details.- Returns:
true
if this WebsiteDataManager is ephemeral orfalse
otherwise.
-
remove
public void remove(Set<WebsiteDataTypes> types, List<WebsiteData> websiteData, @Nullable @Nullable Cancellable cancellable, @Nullable @Nullable AsyncReadyCallback callback) Asynchronously removes the website data in the givenwebsiteData
list.Asynchronously removes the website data of the given
types
for websites in the givenwebsiteData
list. Use webkit_website_data_manager_clear() if you want to remove the website data for all sites.When the operation is finished,
callback
will be called. You can then call webkit_website_data_manager_remove_finish() to get the result of the operation.- Parameters:
types
-WebKitWebsiteDataTypes
websiteData
- aGList
ofWebKitWebsiteData
cancellable
- aGCancellable
ornull
to ignorecallback
- aGAsyncReadyCallback
to call when the request is satisfied
-
remove
public void remove(WebsiteDataTypes types, List<WebsiteData> websiteData, @Nullable @Nullable Cancellable cancellable, @Nullable @Nullable AsyncReadyCallback callback) Asynchronously removes the website data in the givenwebsiteData
list.Asynchronously removes the website data of the given
types
for websites in the givenwebsiteData
list. Use webkit_website_data_manager_clear() if you want to remove the website data for all sites.When the operation is finished,
callback
will be called. You can then call webkit_website_data_manager_remove_finish() to get the result of the operation.- Parameters:
types
-WebKitWebsiteDataTypes
websiteData
- aGList
ofWebKitWebsiteData
cancellable
- aGCancellable
ornull
to ignorecallback
- aGAsyncReadyCallback
to call when the request is satisfied
-
removeFinish
Finish an asynchronous operation started with webkit_website_data_manager_remove().- Parameters:
result
- aGAsyncResult
- Returns:
true
if website data resources were successfully removed, orfalse
otherwise.- Throws:
GErrorException
- seeGError
-
setFaviconsEnabled
public void setFaviconsEnabled(boolean enabled) Set whether website icons are enabled. Website icons are disabled by default. When website icons are disabled, theWebKitFaviconDatabase
of this WebsiteDataManager is closed and its reference removed, so webkit_website_data_manager_get_favicon_database() will returnnull
. If website icons are enabled again, a newWebKitFaviconDatabase
will be created.- Parameters:
enabled
- value to set
-
builder
AWebsiteDataManager.Builder
object constructs aWebsiteDataManager
with the specified properties. Use the variousset...()
methods to set properties, and finish construction withWebsiteDataManager.Builder.build()
.
-