UserContentFilterStore

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_add_filter().

JSON rule sets are imported using webkit_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 webkit_user_content_filter_store_fetch_identifiers(), webkit_user_content_filter_store_load() can be used to retrieve a previously saved filter, and removed from the store with webkit_user_content_filter_store_remove().

Constructors

this
this(WebKitUserContentFilterStore* webKitUserContentFilterStore, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this(string storagePath)

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.

Members

Functions

fetchIdentifiers
void fetchIdentifiers(Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Asynchronously retrieve a list of the identifiers for all the stored filters.

fetchIdentifiersFinish
string[] fetchIdentifiersFinish(AsyncResultIF result)

Finishes an asynchronous fetch of the list of identifiers for the stored filters previously started with webkit_user_content_filter_store_fetch_identifiers().

getPath
string getPath()
getStruct
void* getStruct()

the main Gtk struct as a void*

getUserContentFilterStoreStruct
WebKitUserContentFilterStore* getUserContentFilterStoreStruct(bool transferOwnership)

Get the main Gtk struct

load
void load(string identifier, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Asynchronously load a content filter given its @identifier. The filter must have been previously stored using webkit_user_content_filter_store_save().

loadFinish
UserContentFilter loadFinish(AsyncResultIF result)

Finishes an asynchronous filter load previously started with webkit_user_content_filter_store_load().

remove
void remove(string identifier, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Asynchronously remove a content filter given its @identifier.

removeFinish
bool removeFinish(AsyncResultIF result)

Finishes an asynchronous filter removal previously started with webkit_user_content_filter_store_remove().

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

Asynchronously save a content filter from a source rule set in the WebKit content extesions JSON format.

saveFinish
UserContentFilter saveFinish(AsyncResultIF result)

Finishes an asynchronous filter save previously started with webkit_user_content_filter_store_save().

saveFromFile
void saveFromFile(string identifier, FileIF file, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Asynchronously save a content filter from the contents of a file, which must be native to the platform, as checked by g_file_is_native(). See webkit_user_content_filter_store_save() for more details.

saveFromFileFinish
UserContentFilter saveFromFileFinish(AsyncResultIF result)

Finishes and asynchronous filter save previously started with webkit_user_content_filter_store_save_from_file().

Static functions

getType
GType getType()

Variables

webKitUserContentFilterStore
WebKitUserContentFilterStore* webKitUserContentFilterStore;

the main Gtk struct

Meta

Since

2.24