WKContextDownloadClient.h [plain text]
#ifndef WKContextDownloadClient_h
#define WKContextDownloadClient_h
#include <WebKit/WKBase.h>
typedef void (*WKContextDownloadDidStartCallback)(WKContextRef context, WKDownloadRef download, const void *clientInfo);
typedef void (*WKContextDownloadDidReceiveAuthenticationChallengeCallback)(WKContextRef context, WKDownloadRef download, WKAuthenticationChallengeRef authenticationChallenge, const void *clientInfo);
typedef void (*WKContextDownloadDidReceiveResponseCallback)(WKContextRef context, WKDownloadRef download, WKURLResponseRef response, const void *clientInfo);
typedef void (*WKContextDownloadDidReceiveDataCallback)(WKContextRef context, WKDownloadRef download, uint64_t length, const void *clientInfo);
typedef bool (*WKContextDownloadShouldDecodeSourceDataOfMIMETypeCallback)(WKContextRef context, WKDownloadRef download, WKStringRef mimeType, const void *clientInfo);
typedef WKStringRef (*WKContextDownloadDecideDestinationWithSuggestedFilenameCallback)(WKContextRef context, WKDownloadRef download, WKStringRef filename, bool* allowOverwrite, const void *clientInfo);
typedef void (*WKContextDownloadDidCreateDestinationCallback)(WKContextRef context, WKDownloadRef download, WKStringRef path, const void *clientInfo);
typedef void (*WKContextDownloadDidFinishCallback)(WKContextRef context, WKDownloadRef download, const void *clientInfo);
typedef void (*WKContextDownloadDidFailCallback)(WKContextRef context, WKDownloadRef download, WKErrorRef error, const void *clientInfo);
typedef void (*WKContextDownloadDidCancel)(WKContextRef context, WKDownloadRef download, const void *clientInfo);
typedef void (*WKContextDownloadProcessDidCrashCallback)(WKContextRef context, WKDownloadRef download, const void *clientInfo);
typedef void (*WKContextDownloadDidReceiveServerRedirect)(WKContextRef context, WKDownloadRef download, WKURLRef url, const void *clientInfo);
typedef struct WKContextDownloadClientBase {
int version;
const void * clientInfo;
} WKContextDownloadClientBase;
typedef struct WKContextDownloadClientV0 {
WKContextDownloadClientBase base;
WKContextDownloadDidStartCallback didStart;
WKContextDownloadDidReceiveAuthenticationChallengeCallback didReceiveAuthenticationChallenge;
WKContextDownloadDidReceiveResponseCallback didReceiveResponse;
WKContextDownloadDidReceiveDataCallback didReceiveData;
WKContextDownloadShouldDecodeSourceDataOfMIMETypeCallback shouldDecodeSourceDataOfMIMEType;
WKContextDownloadDecideDestinationWithSuggestedFilenameCallback decideDestinationWithSuggestedFilename;
WKContextDownloadDidCreateDestinationCallback didCreateDestination;
WKContextDownloadDidFinishCallback didFinish;
WKContextDownloadDidFailCallback didFail;
WKContextDownloadDidCancel didCancel;
WKContextDownloadProcessDidCrashCallback processDidCrash;
} WKContextDownloadClientV0;
typedef struct WKContextDownloadClientV1 {
WKContextDownloadClientBase base;
WKContextDownloadDidStartCallback didStart;
WKContextDownloadDidReceiveAuthenticationChallengeCallback didReceiveAuthenticationChallenge;
WKContextDownloadDidReceiveResponseCallback didReceiveResponse;
WKContextDownloadDidReceiveDataCallback didReceiveData;
WKContextDownloadShouldDecodeSourceDataOfMIMETypeCallback shouldDecodeSourceDataOfMIMEType;
WKContextDownloadDecideDestinationWithSuggestedFilenameCallback decideDestinationWithSuggestedFilename;
WKContextDownloadDidCreateDestinationCallback didCreateDestination;
WKContextDownloadDidFinishCallback didFinish;
WKContextDownloadDidFailCallback didFail;
WKContextDownloadDidCancel didCancel;
WKContextDownloadProcessDidCrashCallback processDidCrash;
WKContextDownloadDidReceiveServerRedirect didReceiveServerRedirect;
} WKContextDownloadClientV1;
#endif // WKContextDownloadClient_h