#ifndef DO_NO_IMPORTS
import "oaidl.idl";
import "ocidl.idl";
import "IWebError.idl";
import "IWebMutableURLRequest.idl";
import "IWebURLAuthenticationChallenge.idl";
import "IWebURLResponse.idl";
import "IWebURLRequest.idl";
#endif
interface IWebDownloadDelegate;
interface IWebError;
interface IWebMutableURLRequest;
interface IWebURLAuthenticationChallenge;
interface IWebURLRequest;
interface IWebURLResponse;
[
object,
oleautomation,
hidden,
uuid(65EFE83B-A9E4-4516-8F3B-BAA25DA90FFD),
pointer_default(unique)
]
interface IWebDownload : IUnknown
{
HRESULT canResumeDownloadDecodedWithEncodingMIMEType([in] BSTR mimeType, [out, retval] BOOL* result);
HRESULT cancel();
HRESULT cancelForResume();
HRESULT start();
HRESULT deletesFileUponFailure([out, retval] BOOL* result);
HRESULT initWithRequest([in] IWebURLRequest* request, [in] IWebDownloadDelegate* delegate);
HRESULT initToResumeWithBundle([in] BSTR bundlePath, [in] IWebDownloadDelegate* delegate);
HRESULT bundlePathForTargetPath([in] BSTR target, [out, retval] BSTR* bundle);
HRESULT request([out, retval] IWebURLRequest** request);
HRESULT setDeletesFileUponFailure([in] BOOL deletesFileUponFailure);
HRESULT setDestination([in] BSTR path, [in] BOOL allowOverwrite);
}
[
object,
oleautomation,
uuid(16A32AE6-C862-40cd-9225-2CAF823F40F9),
pointer_default(unique)
]
interface IWebDownloadDelegate : IUnknown
{
HRESULT decideDestinationWithSuggestedFilename([in] IWebDownload* download, [in] BSTR filename);
HRESULT didCancelAuthenticationChallenge([in] IWebDownload* download, [in] IWebURLAuthenticationChallenge* challenge);
HRESULT didCreateDestination([in] IWebDownload* download, [in] BSTR destination);
HRESULT didFailWithError([in] IWebDownload* download, [in] IWebError* error);
HRESULT didReceiveAuthenticationChallenge([in] IWebDownload* download, [in] IWebURLAuthenticationChallenge* challenge);
HRESULT didReceiveDataOfLength([in] IWebDownload* download, [in] unsigned length);
HRESULT didReceiveResponse([in] IWebDownload* download, [in] IWebURLResponse* response);
HRESULT shouldDecodeSourceDataOfMIMEType([in] IWebDownload* download, [in] BSTR encodingType, [out, retval] BOOL* shouldDecode);
HRESULT willResumeWithResponse([in] IWebDownload* download, [in] IWebURLResponse* response, [in] long long fromByte);
HRESULT willSendRequest([in] IWebDownload* download, [in] IWebMutableURLRequest* request, [in] IWebURLResponse* redirectResponse, [out] IWebMutableURLRequest** finalRequest);
HRESULT didBegin([in] IWebDownload* download);
HRESULT didFinish([in] IWebDownload* download);
}