PageRenderTime 91ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/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
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  4. <head>
  5. <title>WebDownloadCurl.cpp</title>
  6. <style type="text/css">
  7. .enscript-comment { font-style: italic; color: rgb(178,34,34); }
  8. .enscript-function-name { font-weight: bold; color: rgb(0,0,255); }
  9. .enscript-variable-name { font-weight: bold; color: rgb(184,134,11); }
  10. .enscript-keyword { font-weight: bold; color: rgb(160,32,240); }
  11. .enscript-reference { font-weight: bold; color: rgb(95,158,160); }
  12. .enscript-string { font-weight: bold; color: rgb(188,143,143); }
  13. .enscript-builtin { font-weight: bold; color: rgb(218,112,214); }
  14. .enscript-type { font-weight: bold; color: rgb(34,139,34); }
  15. .enscript-highlight { text-decoration: underline; color: 0; }
  16. </style>
  17. </head>
  18. <body id="top">
  19. <h1 style="margin:8px;" id="f1">WebDownloadCurl.cpp&nbsp;&nbsp;&nbsp;<span style="font-weight: normal; font-size: 0.5em;">[<a href="?txt">plain text</a>]</span></h1>
  20. <hr/>
  21. <div></div>
  22. <pre>
  23. <span class="enscript-comment">/*
  24. * Copyright (C) 2008 Brent Fulgham &lt;<a href="mailto:bfulgham@gmail.com">bfulgham@gmail.com</a>&gt;. All Rights Reserved.
  25. *
  26. * Redistribution and use in source and binary forms, with or without
  27. * modification, are permitted provided that the following conditions
  28. * are met:
  29. * 1. Redistributions of source code must retain the above copyright
  30. * notice, this list of conditions and the following disclaimer.
  31. * 2. Redistributions in binary form must reproduce the above copyright
  32. * notice, this list of conditions and the following disclaimer in the
  33. * documentation and/or other materials provided with the distribution.
  34. *
  35. * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
  36. * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  37. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  38. * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
  39. * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  40. * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  41. * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  42. * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
  43. * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  44. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  45. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  46. */</span>
  47. #<span class="enscript-reference">include</span> <span class="enscript-string">&quot;config.h&quot;</span>
  48. #<span class="enscript-reference">include</span> <span class="enscript-string">&quot;WebKitDLL.h&quot;</span>
  49. #<span class="enscript-reference">include</span> <span class="enscript-string">&quot;WebDownload.h&quot;</span>
  50. #<span class="enscript-reference">include</span> <span class="enscript-string">&quot;DefaultDownloadDelegate.h&quot;</span>
  51. #<span class="enscript-reference">include</span> <span class="enscript-string">&quot;MarshallingHelpers.h&quot;</span>
  52. #<span class="enscript-reference">include</span> <span class="enscript-string">&quot;WebError.h&quot;</span>
  53. #<span class="enscript-reference">include</span> <span class="enscript-string">&quot;WebKit.h&quot;</span>
  54. #<span class="enscript-reference">include</span> <span class="enscript-string">&quot;WebKitLogging.h&quot;</span>
  55. #<span class="enscript-reference">include</span> <span class="enscript-string">&quot;WebMutableURLRequest.h&quot;</span>
  56. #<span class="enscript-reference">include</span> <span class="enscript-string">&quot;WebURLAuthenticationChallenge.h&quot;</span>
  57. #<span class="enscript-reference">include</span> <span class="enscript-string">&quot;WebURLCredential.h&quot;</span>
  58. #<span class="enscript-reference">include</span> <span class="enscript-string">&quot;WebURLResponse.h&quot;</span>
  59. #<span class="enscript-reference">include</span> <span class="enscript-string">&lt;wtf/platform.h&gt;</span>
  60. #<span class="enscript-reference">include</span> <span class="enscript-string">&lt;wtf/text/CString.h&gt;</span>
  61. #<span class="enscript-reference">include</span> <span class="enscript-string">&lt;io.h&gt;</span>
  62. #<span class="enscript-reference">include</span> <span class="enscript-string">&lt;sys/stat.h&gt;</span>
  63. #<span class="enscript-reference">include</span> <span class="enscript-string">&lt;sys/types.h&gt;</span>
  64. #<span class="enscript-reference">pragma</span> <span class="enscript-variable-name">warning</span>(<span class="enscript-variable-name">push</span>, 0)
  65. #<span class="enscript-reference">include</span> <span class="enscript-string">&lt;WebCore/BString.h&gt;</span>
  66. #<span class="enscript-reference">include</span> <span class="enscript-string">&lt;WebCore/NotImplemented.h&gt;</span>
  67. #<span class="enscript-reference">include</span> <span class="enscript-string">&lt;WebCore/ResourceError.h&gt;</span>
  68. #<span class="enscript-reference">include</span> <span class="enscript-string">&lt;WebCore/ResourceHandle.h&gt;</span>
  69. #<span class="enscript-reference">include</span> <span class="enscript-string">&lt;WebCore/ResourceRequest.h&gt;</span>
  70. #<span class="enscript-reference">include</span> <span class="enscript-string">&lt;WebCore/ResourceResponse.h&gt;</span>
  71. #<span class="enscript-reference">include</span> <span class="enscript-string">&lt;WebCore/SystemTime.h&gt;</span>
  72. #<span class="enscript-reference">pragma</span> <span class="enscript-variable-name">warning</span>(<span class="enscript-variable-name">pop</span>)
  73. using namespace WebCore;
  74. <span class="enscript-comment">// WebDownload ----------------------------------------------------------------
  75. </span>
  76. <span class="enscript-type">void</span> <span class="enscript-function-name">WebDownload::init</span>(ResourceHandle* handle, <span class="enscript-type">const</span> ResourceRequest&amp; request, <span class="enscript-type">const</span> ResourceResponse&amp; response, IWebDownloadDelegate* delegate)
  77. {
  78. notImplemented();
  79. }
  80. <span class="enscript-type">void</span> <span class="enscript-function-name">WebDownload::init</span>(<span class="enscript-type">const</span> KURL&amp; url, IWebDownloadDelegate* delegate)
  81. {
  82. notImplemented();
  83. }
  84. <span class="enscript-comment">// IWebDownload -------------------------------------------------------------------
  85. </span>
  86. HRESULT STDMETHODCALLTYPE <span class="enscript-function-name">WebDownload::initWithRequest</span>(
  87. <span class="enscript-comment">/* [in] */</span> IWebURLRequest* request,
  88. <span class="enscript-comment">/* [in] */</span> IWebDownloadDelegate* delegate)
  89. {
  90. notImplemented();
  91. <span class="enscript-keyword">return</span> E_FAIL;
  92. }
  93. HRESULT STDMETHODCALLTYPE <span class="enscript-function-name">WebDownload::initToResumeWithBundle</span>(
  94. <span class="enscript-comment">/* [in] */</span> BSTR bundlePath,
  95. <span class="enscript-comment">/* [in] */</span> IWebDownloadDelegate* delegate)
  96. {
  97. notImplemented();
  98. <span class="enscript-keyword">return</span> E_FAIL;
  99. }
  100. HRESULT STDMETHODCALLTYPE <span class="enscript-function-name">WebDownload::start</span>()
  101. {
  102. notImplemented();
  103. <span class="enscript-keyword">return</span> E_FAIL;
  104. }
  105. HRESULT STDMETHODCALLTYPE <span class="enscript-function-name">WebDownload::cancel</span>()
  106. {
  107. notImplemented();
  108. <span class="enscript-keyword">return</span> E_FAIL;
  109. }
  110. HRESULT STDMETHODCALLTYPE <span class="enscript-function-name">WebDownload::cancelForResume</span>()
  111. {
  112. notImplemented();
  113. <span class="enscript-keyword">return</span> E_FAIL;
  114. }
  115. HRESULT STDMETHODCALLTYPE <span class="enscript-function-name">WebDownload::deletesFileUponFailure</span>(
  116. <span class="enscript-comment">/* [out, retval] */</span> BOOL* result)
  117. {
  118. notImplemented();
  119. <span class="enscript-keyword">return</span> E_FAIL;
  120. }
  121. HRESULT STDMETHODCALLTYPE <span class="enscript-function-name">WebDownload::setDeletesFileUponFailure</span>(
  122. <span class="enscript-comment">/* [in] */</span> BOOL deletesFileUponFailure)
  123. {
  124. notImplemented();
  125. <span class="enscript-keyword">return</span> E_FAIL;
  126. }
  127. HRESULT STDMETHODCALLTYPE <span class="enscript-function-name">WebDownload::setDestination</span>(
  128. <span class="enscript-comment">/* [in] */</span> BSTR path,
  129. <span class="enscript-comment">/* [in] */</span> BOOL allowOverwrite)
  130. {
  131. notImplemented();
  132. <span class="enscript-keyword">return</span> E_FAIL;
  133. }
  134. <span class="enscript-comment">// IWebURLAuthenticationChallengeSender -------------------------------------------------------------------
  135. </span>
  136. HRESULT STDMETHODCALLTYPE <span class="enscript-function-name">WebDownload::cancelAuthenticationChallenge</span>(
  137. <span class="enscript-comment">/* [in] */</span> IWebURLAuthenticationChallenge*)
  138. {
  139. notImplemented();
  140. <span class="enscript-keyword">return</span> E_FAIL;
  141. }
  142. HRESULT STDMETHODCALLTYPE <span class="enscript-function-name">WebDownload::continueWithoutCredentialForAuthenticationChallenge</span>(
  143. <span class="enscript-comment">/* [in] */</span> IWebURLAuthenticationChallenge* challenge)
  144. {
  145. notImplemented();
  146. <span class="enscript-keyword">return</span> E_FAIL;
  147. }
  148. HRESULT STDMETHODCALLTYPE <span class="enscript-function-name">WebDownload::useCredential</span>(
  149. <span class="enscript-comment">/* [in] */</span> IWebURLCredential* credential,
  150. <span class="enscript-comment">/* [in] */</span> IWebURLAuthenticationChallenge* challenge)
  151. {
  152. notImplemented();
  153. <span class="enscript-keyword">return</span> E_FAIL;
  154. }
  155. </pre>
  156. <hr />
  157. </body></html>