UserContentFilterStore.save

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 webkit_user_content_filter_store_remove() and webkit_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 webkit_user_content_filter_store_save_finish() to obtain the resulting filter.

class UserContentFilterStore
void
save
(
string identifier
,
Bytes source
,
Cancellable cancellable
,
GAsyncReadyCallback callback
,
void* userData
)

Parameters

identifier string

a string used to identify the saved filter

source Bytes

#GBytes containing the rule set in JSON format

cancellable Cancellable

a #GCancellable or %NULL to ignore

callback GAsyncReadyCallback

a #GAsyncReadyCallback to call when saving is completed

userData void*

the data to pass to the callback function

Meta

Since

2.24