Constructor

WebKitNetworkSessionnew

since: 2.40

Declaration [src]

WebKitNetworkSession*
webkit_network_session_new (
  const char* data_directory,
  const char* cache_directory
)

Description [src]

Creates a new WebKitNetworkSession with a persistent WebKitWebsiteDataManager. The parameters data_directory and cache_directory will be used as construct properties of the WebKitWebsiteDataManager of the network session. Note that if NULL is passed, the default directory will be passed to WebKitWebsiteDataManager so that webkit_website_data_manager_get_base_data_directory() and webkit_website_data_manager_get_base_cache_directory() always return a value for non-ephemeral sessions.

It can be passed as the WebKitWebView:network-session construct parameter of a WebKitWebView. A web view created without a network session uses the one of its related view, if any, or the default one returned by webkit_network_session_get_default().

Available since: 2.40

Parameters

data_directory

Type: const char*

A base directory for data, or NULL.

The argument can be NULL.
The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
cache_directory

Type: const char*

A base directory for caches, or NULL.

The argument can be NULL.
The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.

Return value

Type: WebKitNetworkSession

The newly created WebKitNetworkSession.

The caller of the function takes ownership of the data, and is responsible for freeing it.