AppleOpenSource/WebKit2-7609.3.5.1.3/UIProcess/API/glib/WebKitDownload.cpp
/**
 * webkit_download_set_destination:
 * @download: a #WebKitDownload
 * @uri: the destination URI
 *
 * Sets the URI 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 URI 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 URI 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.
 */
@download: a #WebKitDownload
@uri: the destination URI

Sets the URI 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 URI 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 URI 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.
@download : a #WebKitDownload @uri : the destination URI Sets the URI 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 URI 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 URI 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 .
void webkit_download_set_destination(WebKitDownload* download, const gchar* uri)
{
    g_return_if_fail(WEBKIT_IS_DOWNLOAD(download));
    g_return_if_fail(uri);
    WebKitDownloadPrivate* priv = download->priv;
    if (priv->destinationURI == uri)
        return;
    priv->destinationURI = uri;
    g_object_notify(G_OBJECT(download), "destination");
}
void webkit_download_set_destination ( WebKitDownload * download , const gchar * uri ) { g_return_if_fail ( WEBKIT_IS_DOWNLOAD ( download ) ) ; g_return_if_fail ( uri ) ; WebKitDownloadPrivate * priv = download -> priv ; if ( priv -> destinationURI == uri ) return ; priv -> destinationURI = uri ; g_object_notify ( G_OBJECT ( download ) , " " ) ; }
webkit_download_set_destination:
 @download: a #WebKitDownload
 @uri: the destination URI
webkit_download_set_destination : @download : a #WebKitDownload @uri : the destination URI