Method

WebKit2Downloadset_destination

Declaration [src]

void
webkit_download_set_destination (
  WebKitDownload* download,
  const gchar* destination
)

Description [src]

Sets the destination to which the downloaded file will be written.

This method should be called before the download transfer starts or it will not have any effect on the ongoing download operation. To set the destination using the filename suggested by the server connect to WebKitDownload::decide-destination signal and call webkit_download_set_destination(). If you want to set a fixed destination that doesn’t depend on the suggested filename you can connect to notify::response signal and call webkit_download_set_destination().

If WebKitDownload::decide-destination signal is not handled and destination is not set when the download transfer starts, the file will be saved with the filename suggested by the server in G_USER_DIRECTORY_DOWNLOAD directory.

Parameters

destination

Type: const gchar*

The destination.

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