Method

WebKit2UserContentFilterStoresave_from_file

since: 2.24

Declaration [src]

void
webkit_user_content_filter_store_save_from_file (
  WebKitUserContentFilterStore* store,
  const gchar* identifier,
  GFile* file,
  GCancellable* cancellable,
  GAsyncReadyCallback callback,
  gpointer user_data
)

Description [src]

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 g_file_is_native(). See webkit_user_content_filter_store_save() for more details.

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.

Available since: 2.24

Parameters

identifier

Type: const gchar*

A string used to identify the saved filter.

The data is owned by the caller of the method.
The value is a NUL terminated UTF-8 string.
file

Type: GFile

A GFile containing the rule set in JSON format.

The data is owned by the caller of the method.
cancellable

Type: GCancellable

A GCancellable or NULL to ignore.

The argument can be NULL.
The data is owned by the caller of the method.
callback

Type: GAsyncReadyCallback

A GAsyncReadyCallback to call when saving is completed.

The argument can be NULL.
user_data

Type: gpointer

The data to pass to the callback function.

The argument can be NULL.
The data is owned by the caller of the method.