Source/WebKit/gtk/webkit/webkitdownload.cpp
void webkit_download_cancel(WebKitDownload* download)
{
    g_return_if_fail(WEBKIT_IS_DOWNLOAD(download));

    WebKitDownloadPrivate* priv = download->priv;

    // Cancel may be called even if start was not called, so we need
    // to make sure timer is non-NULL.
    if (priv->timer)
        g_timer_stop(priv->timer);

    if (priv->resourceHandle)
        priv->resourceHandle->cancel();

    webkit_download_set_status(download, WEBKIT_DOWNLOAD_STATUS_CANCELLED);

    gboolean handled;
    g_signal_emit_by_name(download, "error", 0, WEBKIT_DOWNLOAD_ERROR_CANCELLED_BY_USER, _("User cancelled the download"), &handled);
}
/**
 * webkit_download_cancel:
 * @download: the #WebKitDownload
 *
 * Cancels the download. Calling this will not free the
 * #WebKitDownload object, so you still need to call
 * g_object_unref() on it, if you are the owner of a reference. Notice
 * that cancelling the download provokes the emission of the
 * WebKitDownload::error signal, reporting that the download was
 * cancelled.
 *
 * Since: 1.1.2
 */


Cancels the download. Calling this will not free the
#WebKitDownload object, so you still need to call
g_object_unref() on it, if you are the owner of a reference. Notice
that cancelling the download provokes the emission of the
WebKitDownload::error signal, reporting that the download was
cancelled.


Cancels the download . Calling this will not free the #WebKitDownload object so you still need to call g_object_unref () on it if you are the owner of a reference . Notice that cancelling the download provokes the emission of the WebKitDownload :: error signal reporting that the download was cancelled .
void webkit_download_cancel(WebKitDownload* download)
{
    g_return_if_fail(WEBKIT_IS_DOWNLOAD(download));
    WebKitDownloadPrivate* priv = download->priv;
    if (priv->timer)
        g_timer_stop(priv->timer);
    if (priv->resourceHandle)
        priv->resourceHandle->cancel();
    webkit_download_set_status(download, WEBKIT_DOWNLOAD_STATUS_CANCELLED);
    gboolean handled;
    g_signal_emit_by_name(download, "error", 0, WEBKIT_DOWNLOAD_ERROR_CANCELLED_BY_USER, _("User cancelled the download"), &handled);
}
void webkit_download_cancel ( WebKitDownload * download ) { g_return_if_fail ( WEBKIT_IS_DOWNLOAD ( download ) ) ; WebKitDownloadPrivate * priv = download -> priv ; if ( priv -> timer ) g_timer_stop ( priv -> timer ) ; if ( priv -> resourceHandle ) priv -> resourceHandle -> cancel ( ) ; webkit_download_set_status ( download , WEBKIT_DOWNLOAD_STATUS_CANCELLED ) ; gboolean handled ; g_signal_emit_by_name ( download , " " , 0 , WEBKIT_DOWNLOAD_ERROR_CANCELLED_BY_USER , _ ( " " ) , & handled ) ; }
webkit_download_cancel:
 @download: the #WebKitDownload
webkit_download_cancel : @download : the #WebKitDownload
// Cancel may be called even if start was not called, so we need // to make sure timer is non-NULL.