webkit.user_content_filter_store

Module for [UserContentFilterStore] class

Types 3

Handles storage of user content filters on disk.

The WebKitUserContentFilterStore provides the means to import and save

JSON rule sets,

which can be loaded later in an efficient manner. Once filters are stored, the #WebKitUserContentFilter objects which represent them can be added to a #WebKitUserContentManager with [webkit.user_content_manager.UserContentManager.addFilter].

JSON rule sets are imported using [webkit.user_content_filter_store.UserContentFilterStore.save] and stored on disk in an implementation defined format. The contents of a filter store must be managed using the #WebKitUserContentFilterStore: a list of all the stored filters can be obtained with [webkit.user_content_filter_store.UserContentFilterStore.fetchIdentifiers], [webkit.user_content_filter_store.UserContentFilterStore.load] can be used to retrieve a previously saved filter, and removed from the store with [webkit.user_content_filter_store.UserContentFilterStore.remove].

Methods
GType _gType() @property
UserContentFilterStore self()Returns `this`, for use in `with` statements.
UserContentFilterStoreGidBuilder builder()Get builder for [webkit.usercontentfilter_store.UserContentFilterStore] Returns: New builder object
string path() @propertyGet `path` property. Returns: The directory used for filter storage. This path is used as the base directory where user content filters are stored on disk.
void fetchIdentifiers(gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null)Asynchronously retrieve a list of the identifiers for all the stored filters.
string[] fetchIdentifiersFinish(gio.async_result.AsyncResult result)Finishes an asynchronous fetch of the list of stored filters.
string getPath()Gets the storage path for user content filters. Returns: path, as a string.
void load(string identifier, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null)Asynchronously load a content filter given its identifier.
webkit.user_content_filter.UserContentFilter loadFinish(gio.async_result.AsyncResult result)Finishes an asynchronous filter load previously started with [webkit.usercontentfilter_store.UserContentFilterStore.load].
void remove(string identifier, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null)Asynchronously remove a content filter given its identifier.
bool removeFinish(gio.async_result.AsyncResult result)Finishes an asynchronous filter removal previously started with [webkit.usercontentfilter_store.UserContentFilterStore.remove].
void save(string identifier, glib.bytes.Bytes source, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null)Asynchronously save a content filter from a set source rule.
webkit.user_content_filter.UserContentFilter saveFinish(gio.async_result.AsyncResult result)Finishes an asynchronous filter save previously started with [webkit.usercontentfilter_store.UserContentFilterStore.save].
void saveFromFile(string identifier, gio.file.File file, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null)Asynchronously save a content filter from the contents of a file.
webkit.user_content_filter.UserContentFilter saveFromFileFinish(gio.async_result.AsyncResult result)Finishes and asynchronous filter save previously started with [webkit.usercontentfilter_store.UserContentFilterStore.saveFromFile].
Constructors
this(void * ptr, Flag!"Take" take)
this(string storagePath)Create a new #WebKitUserContentFilterStore to manipulate filters stored at storage_path.
Methods
T path(string propval)Set `path` property. Params: propval = The directory used for filter storage. This path is used as the base directory where user content filters are stored on disk. Returns: Builder instance for fl...

Fluent builder for [webkit.user_content_filter_store.UserContentFilterStore]