WebKit.WebsiteDataManager¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
|||
r/w/co |
|||
r/w/co |
|||
w/co |
|||
w/co |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class WebKit.WebsiteDataManager(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Manages data stored locally by web sites.
You can use
WebKit.WebsiteDataManager
to configure the local directories where website data will be stored. UseWebKit.WebsiteDataManager
:base-data-directory
andWebKit.WebsiteDataManager
:base-cache-directory
set a common base directory for all website data and caches.A
WebKit.WebsiteDataManager
can be ephemeral, in which case all the directory configuration is not needed because website data will never persist. You can create an ephemeralWebKit.WebsiteDataManager
with webkit_website_data_manager_new_ephemeral().WebKit.WebsiteDataManager
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.New in version 2.10.
- clear(types, timespan, cancellable, callback, *user_data)¶
- Parameters:
timespan (
int
) – a #GTimeSpancancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
orNone
to ignorecallback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfieduser_data (
object
orNone
) – the data to pass to callback function
Asynchronously clear the website data of the given types modified in the past timespan.
If timespan is 0, all website data will be removed.
When the operation is finished, callback will be called. You can then call
WebKit.WebsiteDataManager.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.
New in version 2.16.
- clear_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
True
if website data was successfully cleared, orFalse
otherwise.- Return type:
Finish an asynchronous operation started with
WebKit.WebsiteDataManager.clear
()New in version 2.16.
- fetch(types, cancellable, callback, *user_data)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
orNone
to ignorecallback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfieduser_data (
object
orNone
) – the data to pass to callback function
Asynchronously get the list of
WebKit.WebsiteData
for the given types.When the operation is finished, callback will be called. You can then call
WebKit.WebsiteDataManager.fetch_finish
() to get the result of the operation.New in version 2.16.
- fetch_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
a
GLib.List
ofWebKit.WebsiteData
. You must free theGLib.List
with g_list_free() and unref theWebKit.WebsiteData
s withWebKit.WebsiteData.unref
() when you’re done with them.- Return type:
Finish an asynchronous operation started with
WebKit.WebsiteDataManager.fetch
().New in version 2.16.
- get_base_cache_directory()¶
- Returns:
the base directory for caches, or
None
ifWebKit.WebsiteDataManager
:base-cache-directory
was not provided or self is ephemeral.- Return type:
Get the
WebKit.WebsiteDataManager
:base-cache-directory
property.New in version 2.10.
- get_base_data_directory()¶
- Returns:
the base directory for website data, or
None
ifWebKit.WebsiteDataManager
:base-data-directory
was not provided or self is ephemeral.- Return type:
Get the
WebKit.WebsiteDataManager
:base-data-directory
property.New in version 2.10.
- get_favicon_database()¶
- Returns:
a
WebKit.FaviconDatabase
, orNone
if website icons are disabled- Return type:
Get the
WebKit.FaviconDatabase
of self.New in version 2.40.
- get_favicons_enabled()¶
-
Get whether website icons are enabled.
New in version 2.40.
- get_itp_summary(cancellable, callback, *user_data)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
orNone
to ignorecallback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfieduser_data (
object
orNone
) – the data to pass to callback function
Asynchronously get the list of
WebKit.ITPThirdParty
seen for self.Every
WebKit.ITPThirdParty
contains the list ofWebKit.ITPFirstParty
under which it has been seen.When the operation is finished, callback will be called. You can then call
WebKit.WebsiteDataManager.get_itp_summary_finish
() to get the result of the operation.New in version 2.30.
- get_itp_summary_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
a
GLib.List
ofWebKit.ITPThirdParty
. You must free theGLib.List
with g_list_free() and unref theWebKit.ITPThirdParty
s withWebKit.ITPThirdParty.unref
() when you’re done with them.- Return type:
Finish an asynchronous operation started with
WebKit.WebsiteDataManager.get_itp_summary
().New in version 2.30.
- is_ephemeral()¶
-
Get whether a
WebKit.WebsiteDataManager
is ephemeral.See
WebKit.WebsiteDataManager
:is-ephemeral
for more details.New in version 2.16.
- remove(types, website_data, cancellable, callback, *user_data)¶
- Parameters:
website_data ([
WebKit.WebsiteData
]) – aGLib.List
ofWebKit.WebsiteData
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
orNone
to ignorecallback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
to call when the request is satisfieduser_data (
object
orNone
) – the data to pass to callback function
Asynchronously removes the website data in the given website_data list.
Asynchronously removes the website data of the given types for websites in the given website_data list. Use
WebKit.WebsiteDataManager.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.WebsiteDataManager.remove_finish
() to get the result of the operation.New in version 2.16.
- remove_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
True
if website data resources were successfully removed, orFalse
otherwise.- Return type:
Finish an asynchronous operation started with
WebKit.WebsiteDataManager.remove
().New in version 2.16.
- set_favicons_enabled(enabled)¶
- Parameters:
enabled (
bool
) – value to set
Set whether website icons are enabled. Website icons are disabled by default. When website icons are disabled, the
WebKit.FaviconDatabase
of self is closed and its reference removed, soWebKit.WebsiteDataManager.get_favicon_database
() will returnNone
. If website icons are enabled again, a newWebKit.FaviconDatabase
will be created.New in version 2.40.
Property Details¶
- WebKit.WebsiteDataManager.props.base_cache_directory¶
- Name:
base-cache-directory
- Type:
- Default Value:
- Flags:
The base directory for caches. If
None
, a default location will be used.New in version 2.10.
- WebKit.WebsiteDataManager.props.base_data_directory¶
- Name:
base-data-directory
- Type:
- Default Value:
- Flags:
The base directory for website data. If
None
, a default location will be used.New in version 2.10.
- WebKit.WebsiteDataManager.props.is_ephemeral¶
- Name:
is-ephemeral
- Type:
- Default Value:
- Flags:
Whether the
WebKit.WebsiteDataManager
is ephemeral. An ephemeralWebKit.WebsiteDataManager
handles all websites data as non-persistent, and nothing will be written to the client storage. Note that if you create an ephemeralWebKit.WebsiteDataManager
all other construction parameters to configure data directories will be ignored.New in version 2.16.
- WebKit.WebsiteDataManager.props.origin_storage_ratio¶
- Name:
origin-storage-ratio
- Type:
- Default Value:
-1.0
- Flags:
The percentage of volume space that can be used for data storage for every domain. If the maximum storage is reached the storage request will fail with a QuotaExceededError exception. A value of 0.0 means that data storage is not allowed. A value of -1.0, which is the default, means WebKit will use the default quota (1 GiB).
New in version 2.42.
- WebKit.WebsiteDataManager.props.total_storage_ratio¶
- Name:
total-storage-ratio
- Type:
- Default Value:
-1.0
- Flags:
The percentage of volume space that can be used for data storage for all domains. If the maximum storage is reached the eviction will happen. A value of 0.0 means that data storage is not allowed. A value of -1.0, which is the default, means there’s no limit for the total storage.
New in version 2.42.