Class WebsiteDataManager
- All Implemented Interfaces:
Proxy
Manages data stored locally by web sites.
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.
- Since:
- 2.10
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classInner class implementing a builder pattern to construct a GObject with properties.static classNested classes/interfaces inherited from class GObject
GObject.NotifyCallback, GObject.ObjectClass -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new WebsiteDataManager.WebsiteDataManager(MemorySegment address) Create a WebsiteDataManager instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected WebsiteDataManagerasParent()Return this instance as if it were its parent type.static WebsiteDataManager.Builder<? extends WebsiteDataManager.Builder> builder()AWebsiteDataManager.Builderobject constructs aWebsiteDataManagerwith the specified properties.voidclear(Set<WebsiteDataTypes> types, TimeSpan timespan, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Asynchronously clear the website data of the giventypesmodified in the pasttimespan.voidclear(WebsiteDataTypes types, TimeSpan timespan, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Asynchronously clear the website data of the giventypesmodified in the pasttimespan.booleanclearFinish(AsyncResult result) Finish an asynchronous operation started with webkit_website_data_manager_clear()voidfetch(Set<WebsiteDataTypes> types, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Asynchronously get the list ofWebKitWebsiteDatafor the giventypes.voidfetch(WebsiteDataTypes types, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Asynchronously get the list ofWebKitWebsiteDatafor the giventypes.fetchFinish(AsyncResult result) Finish an asynchronous operation started with webkit_website_data_manager_fetch().@Nullable StringGet theWebKitWebsiteDataManager:base-cache-directory property.@Nullable StringGet theWebKitWebsiteDataManager:base-data-directory property.@Nullable FaviconDatabaseGet theWebKitFaviconDatabaseofmanager.booleanGet whether website icons are enabled.voidgetItpSummary(@Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Asynchronously get the list ofWebKitITPThirdPartyseen formanager.getItpSummaryFinish(AsyncResult result) Finish an asynchronous operation started with webkit_website_data_manager_get_itp_summary().static MemoryLayoutThe memory layout of the native struct.static @Nullable TypegetType()Get the GType of the WebsiteDataManager class.booleanGet whether aWebKitWebsiteDataManageris ephemeral.voidremove(Set<WebsiteDataTypes> types, List<WebsiteData> websiteData, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Asynchronously removes the website data in the givenwebsiteDatalist.voidremove(WebsiteDataTypes types, List<WebsiteData> websiteData, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Asynchronously removes the website data in the givenwebsiteDatalist.booleanremoveFinish(AsyncResult result) Finish an asynchronous operation started with webkit_website_data_manager_remove().voidsetFaviconsEnabled(boolean enabled) Set whether website icons are enabled.Methods inherited from class 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, getProperty, getProperty, getProperty, getQdata, getv, interfaceFindProperty, interfaceInstallProperty, interfaceListProperties, isFloating, 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, withPropertiesMethods inherited from class TypeInstance
callParent, callParent, cast, getPrivate, readGClass, writeGClassMethods inherited from class ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
WebsiteDataManager
Create a WebsiteDataManager instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
WebsiteDataManager
public WebsiteDataManager()Create a new WebsiteDataManager.
-
-
Method Details
-
getType
Get the GType of the WebsiteDataManager class.- Returns:
- the GType
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
asParent
Return this instance as if it were its parent type. Comparable to the Javasuperkeyword, but ensures the parent typeclass is also used in native code. -
clear
public void clear(Set<WebsiteDataTypes> types, TimeSpan timespan, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Asynchronously clear the website data of the given
typesmodified in the pasttimespan.If
timespanis 0, all website data will be removed.When the operation is finished,
callbackwill 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
timespanis nonzero. This behavior may change in the future.- Parameters:
types-WebKitWebsiteDataTypestimespan- aGTimeSpancancellable- aGCancellableornullto ignorecallback- aGAsyncReadyCallbackto call when the request is satisfied- Since:
- 2.16
-
clear
public void clear(WebsiteDataTypes types, TimeSpan timespan, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Asynchronously clear the website data of the given
typesmodified in the pasttimespan.If
timespanis 0, all website data will be removed.When the operation is finished,
callbackwill 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
timespanis nonzero. This behavior may change in the future.- Parameters:
types-WebKitWebsiteDataTypestimespan- aGTimeSpancancellable- aGCancellableornullto ignorecallback- aGAsyncReadyCallbackto call when the request is satisfied- Since:
- 2.16
-
clearFinish
Finish an asynchronous operation started with webkit_website_data_manager_clear()- Parameters:
result- aGAsyncResult- Returns:
trueif website data was successfully cleared, orfalseotherwise.- Throws:
GErrorException- seeGError- Since:
- 2.16
-
fetch
public void fetch(Set<WebsiteDataTypes> types, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Asynchronously get the list of
WebKitWebsiteDatafor the giventypes.When the operation is finished,
callbackwill be called. You can then call webkit_website_data_manager_fetch_finish() to get the result of the operation.- Parameters:
types-WebKitWebsiteDataTypescancellable- aGCancellableornullto ignorecallback- aGAsyncReadyCallbackto call when the request is satisfied- Since:
- 2.16
-
fetch
public void fetch(WebsiteDataTypes types, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Asynchronously get the list of
WebKitWebsiteDatafor the giventypes.When the operation is finished,
callbackwill be called. You can then call webkit_website_data_manager_fetch_finish() to get the result of the operation.- Parameters:
types-WebKitWebsiteDataTypescancellable- aGCancellableornullto ignorecallback- aGAsyncReadyCallbackto call when the request is satisfied- Since:
- 2.16
-
fetchFinish
Finish an asynchronous operation started with webkit_website_data_manager_fetch().- Parameters:
result- aGAsyncResult- Returns:
- a
GListofWebKitWebsiteData. You must free theGListwith g_list_free() and unref theWebKitWebsiteDatas with webkit_website_data_unref() when you're done with them. - Throws:
GErrorException- seeGError- Since:
- 2.16
-
getBaseCacheDirectory
Get theWebKitWebsiteDataManager:base-cache-directory property.- Returns:
- the base directory for caches, or
nullifWebKitWebsiteDataManager:base-cache-directory was not provided or this WebsiteDataManager is ephemeral. - Since:
- 2.10
-
getBaseDataDirectory
Get theWebKitWebsiteDataManager:base-data-directory property.- Returns:
- the base directory for website data, or
nullifWebKitWebsiteDataManager:base-data-directory was not provided or this WebsiteDataManager is ephemeral. - Since:
- 2.10
-
getFaviconDatabase
Get theWebKitFaviconDatabaseofmanager.- Returns:
- a
WebKitFaviconDatabase, ornullif website icons are disabled - Since:
- 2.40
-
getFaviconsEnabled
public boolean getFaviconsEnabled()Get whether website icons are enabled.- Returns:
trueif website icons are enabled, orfalseotherwise.- Since:
- 2.40
-
getItpSummary
Asynchronously get the list of
WebKitITPThirdPartyseen formanager.Every
WebKitITPThirdPartycontains the list ofWebKitITPFirstPartyunder which it has been seen.When the operation is finished,
callbackwill be called. You can then call webkit_website_data_manager_get_itp_summary_finish() to get the result of the operation.- Parameters:
cancellable- aGCancellableornullto ignorecallback- aGAsyncReadyCallbackto call when the request is satisfied- Since:
- 2.30
-
getItpSummaryFinish
Finish an asynchronous operation started with webkit_website_data_manager_get_itp_summary().- Parameters:
result- aGAsyncResult- Returns:
- a
GListofWebKitITPThirdParty. You must free theGListwith g_list_free() and unref theWebKitITPThirdPartys with webkit_itp_third_party_unref() when you're done with them. - Throws:
GErrorException- seeGError- Since:
- 2.30
-
isEphemeral
public boolean isEphemeral()Get whether a
WebKitWebsiteDataManageris ephemeral.See
WebKitWebsiteDataManager:is-ephemeral for more details.- Returns:
trueif this WebsiteDataManager is ephemeral orfalseotherwise.- Since:
- 2.16
-
remove
public void remove(Set<WebsiteDataTypes> types, List<WebsiteData> websiteData, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Asynchronously removes the website data in the given
websiteDatalist.Asynchronously removes the website data of the given
typesfor websites in the givenwebsiteDatalist. Use webkit_website_data_manager_clear() if you want to remove the website data for all sites.When the operation is finished,
callbackwill be called. You can then call webkit_website_data_manager_remove_finish() to get the result of the operation.- Parameters:
types-WebKitWebsiteDataTypeswebsiteData- aGListofWebKitWebsiteDatacancellable- aGCancellableornullto ignorecallback- aGAsyncReadyCallbackto call when the request is satisfied- Since:
- 2.16
-
remove
public void remove(WebsiteDataTypes types, List<WebsiteData> websiteData, @Nullable Cancellable cancellable, @Nullable AsyncReadyCallback callback) Asynchronously removes the website data in the given
websiteDatalist.Asynchronously removes the website data of the given
typesfor websites in the givenwebsiteDatalist. Use webkit_website_data_manager_clear() if you want to remove the website data for all sites.When the operation is finished,
callbackwill be called. You can then call webkit_website_data_manager_remove_finish() to get the result of the operation.- Parameters:
types-WebKitWebsiteDataTypeswebsiteData- aGListofWebKitWebsiteDatacancellable- aGCancellableornullto ignorecallback- aGAsyncReadyCallbackto call when the request is satisfied- Since:
- 2.16
-
removeFinish
Finish an asynchronous operation started with webkit_website_data_manager_remove().- Parameters:
result- aGAsyncResult- Returns:
trueif website data resources were successfully removed, orfalseotherwise.- Throws:
GErrorException- seeGError- Since:
- 2.16
-
setFaviconsEnabled
public void setFaviconsEnabled(boolean enabled) Set whether website icons are enabled. Website icons are disabled by default. When website icons are disabled, theWebKitFaviconDatabaseof 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 newWebKitFaviconDatabasewill be created.- Parameters:
enabled- value to set- Since:
- 2.40
-
builder
AWebsiteDataManager.Builderobject constructs aWebsiteDataManagerwith the specified properties. Use the variousset...()methods to set properties, and finish construction withWebsiteDataManager.Builder.build().- Returns:
- the builder object
-