:right-sidebar: True WebsiteDataManager =================================================================== .. currentmodule:: gi.repository.WebKit .. versionadded:: 2.10 .. class:: WebsiteDataManager(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.GObject.Object` :Constructors: :: WebsiteDataManager(**properties) Methods ------- .. rst-class:: interim-class .. class:: WebsiteDataManager :no-index: .. method:: clear(types: ~gi.repository.WebKit.WebsiteDataTypes, timespan: int, cancellable: ~gi.repository.Gio.Cancellable | None = None, callback: ~typing.Callable[[...], None] | None = None, *user_data: ~typing.Any) -> None 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 :func:`~gi.repository.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. .. versionadded:: 2.16 :param types: :obj:`~gi.repository.WebKit.WebsiteDataTypes` :param timespan: a :obj:`~gi.repository.GLib.TimeSpan` :param cancellable: a :obj:`~gi.repository.Gio.Cancellable` or :const:`None` to ignore :param callback: a :obj:`~gi.repository.Gio.AsyncReadyCallback` to call when the request is satisfied :param user_data: the data to pass to callback function .. method:: clear_finish(result: ~gi.repository.Gio.AsyncResult) -> bool Finish an asynchronous operation started with :func:`~gi.repository.WebKit.WebsiteDataManager.clear` .. versionadded:: 2.16 :param result: a :obj:`~gi.repository.Gio.AsyncResult` .. method:: fetch(types: ~gi.repository.WebKit.WebsiteDataTypes, cancellable: ~gi.repository.Gio.Cancellable | None = None, callback: ~typing.Callable[[...], None] | None = None, *user_data: ~typing.Any) -> None Asynchronously get the list of :obj:`~gi.repository.WebKit.WebsiteData` for the given ``types``. When the operation is finished, ``callback`` will be called. You can then call :func:`~gi.repository.WebKit.WebsiteDataManager.fetch_finish` to get the result of the operation. .. versionadded:: 2.16 :param types: :obj:`~gi.repository.WebKit.WebsiteDataTypes` :param cancellable: a :obj:`~gi.repository.Gio.Cancellable` or :const:`None` to ignore :param callback: a :obj:`~gi.repository.Gio.AsyncReadyCallback` to call when the request is satisfied :param user_data: the data to pass to callback function .. method:: fetch_finish(result: ~gi.repository.Gio.AsyncResult) -> list[~gi.repository.WebKit.WebsiteData] Finish an asynchronous operation started with :func:`~gi.repository.WebKit.WebsiteDataManager.fetch`. .. versionadded:: 2.16 :param result: a :obj:`~gi.repository.Gio.AsyncResult` .. method:: get_base_cache_directory() -> str | None Get the :obj:`~gi.repository.WebKit.WebsiteDataManager`:base-cache-directory property. .. versionadded:: 2.10 .. method:: get_base_data_directory() -> str | None Get the :obj:`~gi.repository.WebKit.WebsiteDataManager`:base-data-directory property. .. versionadded:: 2.10 .. method:: get_favicon_database() -> ~gi.repository.WebKit.FaviconDatabase | None Get the :obj:`~gi.repository.WebKit.FaviconDatabase` of ``manager``. .. versionadded:: 2.40 .. method:: get_favicons_enabled() -> bool Get whether website icons are enabled. .. versionadded:: 2.40 .. method:: get_itp_summary(cancellable: ~gi.repository.Gio.Cancellable | None = None, callback: ~typing.Callable[[...], None] | None = None, *user_data: ~typing.Any) -> None Asynchronously get the list of :obj:`~gi.repository.WebKit.ITPThirdParty` seen for ``manager``. Every :obj:`~gi.repository.WebKit.ITPThirdParty` contains the list of :obj:`~gi.repository.WebKit.ITPFirstParty` under which it has been seen. When the operation is finished, ``callback`` will be called. You can then call :func:`~gi.repository.WebKit.WebsiteDataManager.get_itp_summary_finish` to get the result of the operation. .. versionadded:: 2.30 :param cancellable: a :obj:`~gi.repository.Gio.Cancellable` or :const:`None` to ignore :param callback: a :obj:`~gi.repository.Gio.AsyncReadyCallback` to call when the request is satisfied :param user_data: the data to pass to callback function .. method:: get_itp_summary_finish(result: ~gi.repository.Gio.AsyncResult) -> list[~gi.repository.WebKit.ITPThirdParty] Finish an asynchronous operation started with :func:`~gi.repository.WebKit.WebsiteDataManager.get_itp_summary`. .. versionadded:: 2.30 :param result: a :obj:`~gi.repository.Gio.AsyncResult` .. method:: is_ephemeral() -> bool Get whether a :obj:`~gi.repository.WebKit.WebsiteDataManager` is ephemeral. See :obj:`~gi.repository.WebKit.WebsiteDataManager`:is-ephemeral for more details. .. versionadded:: 2.16 .. method:: remove(types: ~gi.repository.WebKit.WebsiteDataTypes, website_data: list[~gi.repository.WebKit.WebsiteData], cancellable: ~gi.repository.Gio.Cancellable | None = None, callback: ~typing.Callable[[...], None] | None = None, *user_data: ~typing.Any) -> None 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 :func:`~gi.repository.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 :func:`~gi.repository.WebKit.WebsiteDataManager.remove_finish` to get the result of the operation. .. versionadded:: 2.16 :param types: :obj:`~gi.repository.WebKit.WebsiteDataTypes` :param website_data: a :obj:`~gi.repository.GLib.List` of :obj:`~gi.repository.WebKit.WebsiteData` :param cancellable: a :obj:`~gi.repository.Gio.Cancellable` or :const:`None` to ignore :param callback: a :obj:`~gi.repository.Gio.AsyncReadyCallback` to call when the request is satisfied :param user_data: the data to pass to callback function .. method:: remove_finish(result: ~gi.repository.Gio.AsyncResult) -> bool Finish an asynchronous operation started with :func:`~gi.repository.WebKit.WebsiteDataManager.remove`. .. versionadded:: 2.16 :param result: a :obj:`~gi.repository.Gio.AsyncResult` .. method:: set_favicons_enabled(enabled: bool) -> None Set whether website icons are enabled. Website icons are disabled by default. When website icons are disabled, the :obj:`~gi.repository.WebKit.FaviconDatabase` of ``manager`` is closed and its reference removed, so :func:`~gi.repository.WebKit.WebsiteDataManager.get_favicon_database` will return :const:`None`. If website icons are enabled again, a new :obj:`~gi.repository.WebKit.FaviconDatabase` will be created. .. versionadded:: 2.40 :param enabled: value to set Properties ---------- .. rst-class:: interim-class .. class:: WebsiteDataManager :no-index: .. attribute:: props.base_cache_directory :type: str The base directory for caches. If :const:`None`, a default location will be used. .. versionadded:: 2.10 .. attribute:: props.base_data_directory :type: str The base directory for website data. If :const:`None`, a default location will be used. .. versionadded:: 2.10 .. attribute:: props.is_ephemeral :type: bool Whether the :obj:`~gi.repository.WebKit.WebsiteDataManager` is ephemeral. An ephemeral :obj:`~gi.repository.WebKit.WebsiteDataManager` handles all websites data as non-persistent, and nothing will be written to the client storage. Note that if you create an ephemeral :obj:`~gi.repository.WebKit.WebsiteDataManager` all other construction parameters to configure data directories will be ignored. .. versionadded:: 2.16 .. attribute:: props.origin_storage_ratio :type: float 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). .. versionadded:: 2.42 .. attribute:: props.total_storage_ratio :type: float 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. .. versionadded:: 2.42