save


Description:

public async UserContentFilter save (string identifier, Bytes source, Cancellable? cancellable = null) throws Error

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 remove and 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 save.end to obtain the resulting filter.

Parameters:

this

a UserContentFilterStore

identifier

a string used to identify the saved filter

source

Bytes containing the rule set in JSON format

cancellable

a Cancellable or null to ignore

callback

a TaskReadyCallback to call when saving is completed

user_data

the data to pass to the callback function