It derives from <GObject>.
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
user-content-manager:add-filter.
JSON rule sets are imported using user-content-filter-store: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 user-content-filter-store:fetch-identifiers,
user-content-filter-store:load
can be used to retrieve a previously saved filter, and removed from the
store with user-content-filter-store:remove.
The directory used for filter storage. This path is used as the base directory where user content filters are stored on disk.
Its value is a string, or #f.
It can only be set when the object is made, with #:path.
Asynchronously retrieve a list of the identifiers for all the stored filters.
When the operation is finished, callback will be invoked, which
then can use user-content-filter-store:fetch-identifiers-finish
to obtain the list of filter identifiers.
Passed: a
<WebKitUserContentFilterStore>.
Passed, or left out: a <GCancellable>, or
#f.
a <GCancellable> or #f to ignore
Passed, or left out: a procedure, or #f.
a GAsyncReadyCallback to call when
the removal is completed
See GAsyncReadyCallback for how it
is called.
Not passed: guile-gi supplies it.
the data to pass to the callback function
Finishes an asynchronous fetch of the list of stored filters.
Finishes an asynchronous fetch of the list of identifiers for the stored
filters previously started with user-content-filter-store:fetch-identifiers.
Passed: a
<WebKitUserContentFilterStore>.
Passed: a <GAsyncResult>.
Returned: a vector, each a string.
a #f-terminated list of filter identifiers.
Gets the storage path for user content filters.
Passed: a
<WebKitUserContentFilterStore>.
Returned: a string.
path, as a string.
Asynchronously load a content filter given its identifier.
The filter must have been previously stored using
user-content-filter-store:save.
When the operation is finished, callback will be invoked, which
then can use user-content-filter-store:load-finish to obtain the
resulting filter.
Passed: a
<WebKitUserContentFilterStore>.
Passed: a string.
a filter identifier
Passed, or left out: a <GCancellable>, or
#f.
a <GCancellable> or #f to ignore
Passed, or left out: a procedure, or #f.
a GAsyncReadyCallback to call when
the load is completed
See GAsyncReadyCallback for how it
is called.
Not passed: guile-gi supplies it.
the data to pass to the callback function
Finishes an asynchronous filter load previously started with
user-content-filter-store:load.
Passed: a
<WebKitUserContentFilterStore>.
Passed: a <GAsyncResult>.
Returned: a <WebKitUserContentFilter>.
a <WebKitUserContentFilter>, or
#f if the load failed
Create a new
<WebKitUserContentFilterStore> to
manipulate filters stored at storage-path.
The path must point to a local filesystem, and will be created if needed.
Passed: a string.
path where data for filters will be stored on disk
Returned: a
<WebKitUserContentFilterStore>.
a newly created
<WebKitUserContentFilterStore>
Asynchronously remove a content filter given its identifier.
When the operation is finished, callback will be invoked, which
then can use user-content-filter-store:remove-finish? to check
whether the removal was successful.
Passed: a
<WebKitUserContentFilterStore>.
Passed: a string.
a filter identifier
Passed, or left out: a <GCancellable>, or
#f.
a <GCancellable> or #f to ignore
Passed, or left out: a procedure, or #f.
a GAsyncReadyCallback to call when
the removal is completed
See GAsyncReadyCallback for how it
is called.
Not passed: guile-gi supplies it.
the data to pass to the callback function
Finishes an asynchronous filter removal previously started with
user-content-filter-store:remove.
Passed: a
<WebKitUserContentFilterStore>.
Passed: a <GAsyncResult>.
Returned: a boolean.
whether the removal was successful
Asynchronously save a content filter from a set source rule.
Asynchronously save a content filter from a source rule set in the WebKit content extesions JSON format.
The identifier can be used afterwards to refer to the filter when
using user-content-filter-store:remove and
user-content-filter-store:load. When the identifier has
been used in the past, the new filter source will replace the one saved
beforehand for the same identifier.
When the operation is finished, callback will be invoked, which
then can use user-content-filter-store:save-finish to obtain the
resulting filter.
Passed: a
<WebKitUserContentFilterStore>.
Passed: a string.
a string used to identify the saved filter
Passed: a <GBytes>.
<GBytes> containing the rule set in JSON format
Passed, or left out: a <GCancellable>, or
#f.
a <GCancellable> or #f to ignore
Passed, or left out: a procedure, or #f.
a GAsyncReadyCallback to call when
saving is completed
See GAsyncReadyCallback for how it
is called.
Not passed: guile-gi supplies it.
the data to pass to the callback function
Finishes an asynchronous filter save previously started with
user-content-filter-store:save.
Passed: a
<WebKitUserContentFilterStore>.
Passed: a <GAsyncResult>.
Returned: a <WebKitUserContentFilter>.
a <WebKitUserContentFilter>, or
#f if saving failed
Asynchronously save a content filter from the contents of a file.
Asynchronously save a content filter from the contents of a file, which
must be native to the platform, as checked by file:is-native?. See user-content-filter-store:save for more details.
When the operation is finished, callback will be invoked, which
then can use user-content-filter-store:save-finish to obtain the
resulting filter.
Passed: a
<WebKitUserContentFilterStore>.
Passed: a string.
a string used to identify the saved filter
Passed: a <GFile>.
a <GFile> containing the rule set in JSON format
Passed, or left out: a <GCancellable>, or
#f.
a <GCancellable> or #f to ignore
Passed, or left out: a procedure, or #f.
a GAsyncReadyCallback to call when
saving is completed
See GAsyncReadyCallback for how it
is called.
Not passed: guile-gi supplies it.
the data to pass to the callback function
Finishes and asynchronous filter save previously started with
user-content-filter-store:save-from-file.
Passed: a
<WebKitUserContentFilterStore>.
Passed: a <GAsyncResult>.
Returned: a <WebKitUserContentFilter>.
a <WebKitUserContentFilter>, or
#f if saving failed.