1 /*
2 * Copyright (C) 2008 Brent Fulgham <bfulgham@gmail.com>. All Rights Reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26 #include "config.h"
27 #include "WebKitDLL.h"
28 #include "WebDownload.h"
29
30 #include "CString.h"
31 #include "DefaultDownloadDelegate.h"
32 #include "MarshallingHelpers.h"
33 #include "WebError.h"
34 #include "WebKit.h"
35 #include "WebKitLogging.h"
36 #include "WebMutableURLRequest.h"
37 #include "WebURLAuthenticationChallenge.h"
38 #include "WebURLCredential.h"
39 #include "WebURLResponse.h"
40
41 #include <wtf/platform.h>
42
43 #include <io.h>
44 #include <sys/stat.h>
45 #include <sys/types.h>
46
47 #pragma warning(push, 0)
48 #include <WebCore/BString.h>
49 #include <WebCore/NotImplemented.h>
50 #include <WebCore/ResourceError.h>
51 #include <WebCore/ResourceHandle.h>
52 #include <WebCore/ResourceRequest.h>
53 #include <WebCore/ResourceResponse.h>
54 #include <WebCore/SystemTime.h>
55 #pragma warning(pop)
56
57 using namespace WebCore;
58
59 // WebDownload ----------------------------------------------------------------
60
init(ResourceHandle * handle,const ResourceRequest & request,const ResourceResponse & response,IWebDownloadDelegate * delegate)61 void WebDownload::init(ResourceHandle* handle, const ResourceRequest& request, const ResourceResponse& response, IWebDownloadDelegate* delegate)
62 {
63 notImplemented();
64 }
65
init(const KURL & url,IWebDownloadDelegate * delegate)66 void WebDownload::init(const KURL& url, IWebDownloadDelegate* delegate)
67 {
68 notImplemented();
69 }
70
71 // IWebDownload -------------------------------------------------------------------
72
initWithRequest(IWebURLRequest * request,IWebDownloadDelegate * delegate)73 HRESULT STDMETHODCALLTYPE WebDownload::initWithRequest(
74 /* [in] */ IWebURLRequest* request,
75 /* [in] */ IWebDownloadDelegate* delegate)
76 {
77 notImplemented();
78 return E_FAIL;
79 }
80
initToResumeWithBundle(BSTR bundlePath,IWebDownloadDelegate * delegate)81 HRESULT STDMETHODCALLTYPE WebDownload::initToResumeWithBundle(
82 /* [in] */ BSTR bundlePath,
83 /* [in] */ IWebDownloadDelegate* delegate)
84 {
85 notImplemented();
86 return E_FAIL;
87 }
88
start()89 HRESULT STDMETHODCALLTYPE WebDownload::start()
90 {
91 notImplemented();
92 return E_FAIL;
93 }
94
cancel()95 HRESULT STDMETHODCALLTYPE WebDownload::cancel()
96 {
97 notImplemented();
98 return E_FAIL;
99 }
100
cancelForResume()101 HRESULT STDMETHODCALLTYPE WebDownload::cancelForResume()
102 {
103 notImplemented();
104 return E_FAIL;
105 }
106
deletesFileUponFailure(BOOL * result)107 HRESULT STDMETHODCALLTYPE WebDownload::deletesFileUponFailure(
108 /* [out, retval] */ BOOL* result)
109 {
110 notImplemented();
111 return E_FAIL;
112 }
113
setDeletesFileUponFailure(BOOL deletesFileUponFailure)114 HRESULT STDMETHODCALLTYPE WebDownload::setDeletesFileUponFailure(
115 /* [in] */ BOOL deletesFileUponFailure)
116 {
117 notImplemented();
118 return E_FAIL;
119 }
120
setDestination(BSTR path,BOOL allowOverwrite)121 HRESULT STDMETHODCALLTYPE WebDownload::setDestination(
122 /* [in] */ BSTR path,
123 /* [in] */ BOOL allowOverwrite)
124 {
125 notImplemented();
126 return E_FAIL;
127 }
128
129 // IWebURLAuthenticationChallengeSender -------------------------------------------------------------------
130
cancelAuthenticationChallenge(IWebURLAuthenticationChallenge *)131 HRESULT STDMETHODCALLTYPE WebDownload::cancelAuthenticationChallenge(
132 /* [in] */ IWebURLAuthenticationChallenge*)
133 {
134 notImplemented();
135 return E_FAIL;
136 }
137
continueWithoutCredentialForAuthenticationChallenge(IWebURLAuthenticationChallenge * challenge)138 HRESULT STDMETHODCALLTYPE WebDownload::continueWithoutCredentialForAuthenticationChallenge(
139 /* [in] */ IWebURLAuthenticationChallenge* challenge)
140 {
141 notImplemented();
142 return E_FAIL;
143 }
144
useCredential(IWebURLCredential * credential,IWebURLAuthenticationChallenge * challenge)145 HRESULT STDMETHODCALLTYPE WebDownload::useCredential(
146 /* [in] */ IWebURLCredential* credential,
147 /* [in] */ IWebURLAuthenticationChallenge* challenge)
148 {
149 notImplemented();
150 return E_FAIL;
151 }
152