/opensource.apple.com/source/WebKit/WebKit-7533.16/win/WebDownloadCurl.cpp
C++ | 176 lines | 135 code | 19 blank | 22 comment | 0 complexity | 0b73d0ec587be0c2283d1864f167e38a MD5 | raw file
Possible License(s): MPL-2.0-no-copyleft-exception, GPL-2.0, BSD-3-Clause, GPL-3.0, MPL-2.0, LGPL-2.0, LGPL-2.1, CC-BY-SA-3.0, IPL-1.0, ISC, AGPL-1.0, AGPL-3.0, JSON, Apache-2.0, 0BSD
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <title>WebDownloadCurl.cpp</title>
- <style type="text/css">
- .enscript-comment { font-style: italic; color: rgb(178,34,34); }
- .enscript-function-name { font-weight: bold; color: rgb(0,0,255); }
- .enscript-variable-name { font-weight: bold; color: rgb(184,134,11); }
- .enscript-keyword { font-weight: bold; color: rgb(160,32,240); }
- .enscript-reference { font-weight: bold; color: rgb(95,158,160); }
- .enscript-string { font-weight: bold; color: rgb(188,143,143); }
- .enscript-builtin { font-weight: bold; color: rgb(218,112,214); }
- .enscript-type { font-weight: bold; color: rgb(34,139,34); }
- .enscript-highlight { text-decoration: underline; color: 0; }
- </style>
- </head>
- <body id="top">
- <h1 style="margin:8px;" id="f1">WebDownloadCurl.cpp <span style="font-weight: normal; font-size: 0.5em;">[<a href="?txt">plain text</a>]</span></h1>
- <hr/>
- <div></div>
- <pre>
- <span class="enscript-comment">/*
- * Copyright (C) 2008 Brent Fulgham <<a href="mailto:bfulgham@gmail.com">bfulgham@gmail.com</a>>. All Rights Reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */</span>
- #<span class="enscript-reference">include</span> <span class="enscript-string">"config.h"</span>
- #<span class="enscript-reference">include</span> <span class="enscript-string">"WebKitDLL.h"</span>
- #<span class="enscript-reference">include</span> <span class="enscript-string">"WebDownload.h"</span>
- #<span class="enscript-reference">include</span> <span class="enscript-string">"DefaultDownloadDelegate.h"</span>
- #<span class="enscript-reference">include</span> <span class="enscript-string">"MarshallingHelpers.h"</span>
- #<span class="enscript-reference">include</span> <span class="enscript-string">"WebError.h"</span>
- #<span class="enscript-reference">include</span> <span class="enscript-string">"WebKit.h"</span>
- #<span class="enscript-reference">include</span> <span class="enscript-string">"WebKitLogging.h"</span>
- #<span class="enscript-reference">include</span> <span class="enscript-string">"WebMutableURLRequest.h"</span>
- #<span class="enscript-reference">include</span> <span class="enscript-string">"WebURLAuthenticationChallenge.h"</span>
- #<span class="enscript-reference">include</span> <span class="enscript-string">"WebURLCredential.h"</span>
- #<span class="enscript-reference">include</span> <span class="enscript-string">"WebURLResponse.h"</span>
- #<span class="enscript-reference">include</span> <span class="enscript-string"><wtf/platform.h></span>
- #<span class="enscript-reference">include</span> <span class="enscript-string"><wtf/text/CString.h></span>
- #<span class="enscript-reference">include</span> <span class="enscript-string"><io.h></span>
- #<span class="enscript-reference">include</span> <span class="enscript-string"><sys/stat.h></span>
- #<span class="enscript-reference">include</span> <span class="enscript-string"><sys/types.h></span>
- #<span class="enscript-reference">pragma</span> <span class="enscript-variable-name">warning</span>(<span class="enscript-variable-name">push</span>, 0)
- #<span class="enscript-reference">include</span> <span class="enscript-string"><WebCore/BString.h></span>
- #<span class="enscript-reference">include</span> <span class="enscript-string"><WebCore/NotImplemented.h></span>
- #<span class="enscript-reference">include</span> <span class="enscript-string"><WebCore/ResourceError.h></span>
- #<span class="enscript-reference">include</span> <span class="enscript-string"><WebCore/ResourceHandle.h></span>
- #<span class="enscript-reference">include</span> <span class="enscript-string"><WebCore/ResourceRequest.h></span>
- #<span class="enscript-reference">include</span> <span class="enscript-string"><WebCore/ResourceResponse.h></span>
- #<span class="enscript-reference">include</span> <span class="enscript-string"><WebCore/SystemTime.h></span>
- #<span class="enscript-reference">pragma</span> <span class="enscript-variable-name">warning</span>(<span class="enscript-variable-name">pop</span>)
- using namespace WebCore;
- <span class="enscript-comment">// WebDownload ----------------------------------------------------------------
- </span>
- <span class="enscript-type">void</span> <span class="enscript-function-name">WebDownload::init</span>(ResourceHandle* handle, <span class="enscript-type">const</span> ResourceRequest& request, <span class="enscript-type">const</span> ResourceResponse& response, IWebDownloadDelegate* delegate)
- {
- notImplemented();
- }
- <span class="enscript-type">void</span> <span class="enscript-function-name">WebDownload::init</span>(<span class="enscript-type">const</span> KURL& url, IWebDownloadDelegate* delegate)
- {
- notImplemented();
- }
- <span class="enscript-comment">// IWebDownload -------------------------------------------------------------------
- </span>
- HRESULT STDMETHODCALLTYPE <span class="enscript-function-name">WebDownload::initWithRequest</span>(
- <span class="enscript-comment">/* [in] */</span> IWebURLRequest* request,
- <span class="enscript-comment">/* [in] */</span> IWebDownloadDelegate* delegate)
- {
- notImplemented();
- <span class="enscript-keyword">return</span> E_FAIL;
- }
- HRESULT STDMETHODCALLTYPE <span class="enscript-function-name">WebDownload::initToResumeWithBundle</span>(
- <span class="enscript-comment">/* [in] */</span> BSTR bundlePath,
- <span class="enscript-comment">/* [in] */</span> IWebDownloadDelegate* delegate)
- {
- notImplemented();
- <span class="enscript-keyword">return</span> E_FAIL;
- }
- HRESULT STDMETHODCALLTYPE <span class="enscript-function-name">WebDownload::start</span>()
- {
- notImplemented();
- <span class="enscript-keyword">return</span> E_FAIL;
- }
- HRESULT STDMETHODCALLTYPE <span class="enscript-function-name">WebDownload::cancel</span>()
- {
- notImplemented();
- <span class="enscript-keyword">return</span> E_FAIL;
- }
- HRESULT STDMETHODCALLTYPE <span class="enscript-function-name">WebDownload::cancelForResume</span>()
- {
- notImplemented();
- <span class="enscript-keyword">return</span> E_FAIL;
- }
- HRESULT STDMETHODCALLTYPE <span class="enscript-function-name">WebDownload::deletesFileUponFailure</span>(
- <span class="enscript-comment">/* [out, retval] */</span> BOOL* result)
- {
- notImplemented();
- <span class="enscript-keyword">return</span> E_FAIL;
- }
- HRESULT STDMETHODCALLTYPE <span class="enscript-function-name">WebDownload::setDeletesFileUponFailure</span>(
- <span class="enscript-comment">/* [in] */</span> BOOL deletesFileUponFailure)
- {
- notImplemented();
- <span class="enscript-keyword">return</span> E_FAIL;
- }
- HRESULT STDMETHODCALLTYPE <span class="enscript-function-name">WebDownload::setDestination</span>(
- <span class="enscript-comment">/* [in] */</span> BSTR path,
- <span class="enscript-comment">/* [in] */</span> BOOL allowOverwrite)
- {
- notImplemented();
- <span class="enscript-keyword">return</span> E_FAIL;
- }
- <span class="enscript-comment">// IWebURLAuthenticationChallengeSender -------------------------------------------------------------------
- </span>
- HRESULT STDMETHODCALLTYPE <span class="enscript-function-name">WebDownload::cancelAuthenticationChallenge</span>(
- <span class="enscript-comment">/* [in] */</span> IWebURLAuthenticationChallenge*)
- {
- notImplemented();
- <span class="enscript-keyword">return</span> E_FAIL;
- }
- HRESULT STDMETHODCALLTYPE <span class="enscript-function-name">WebDownload::continueWithoutCredentialForAuthenticationChallenge</span>(
- <span class="enscript-comment">/* [in] */</span> IWebURLAuthenticationChallenge* challenge)
- {
- notImplemented();
- <span class="enscript-keyword">return</span> E_FAIL;
- }
- HRESULT STDMETHODCALLTYPE <span class="enscript-function-name">WebDownload::useCredential</span>(
- <span class="enscript-comment">/* [in] */</span> IWebURLCredential* credential,
- <span class="enscript-comment">/* [in] */</span> IWebURLAuthenticationChallenge* challenge)
- {
- notImplemented();
- <span class="enscript-keyword">return</span> E_FAIL;
- }
- </pre>
- <hr />
- </body></html>