|
|
//+------------------------------------------------------------------------- // // Microsoft Windows // Copyright (C) Microsoft Corporation, 2000. // // File: httprequest.idl // //--------------------------------------------------------------------------
cpp_quote("//+-------------------------------------------------------------------------") cpp_quote("//") cpp_quote("// Microsoft Windows") cpp_quote("// Copyright (C) Microsoft Corporation, 2000.") cpp_quote("//") cpp_quote("//--------------------------------------------------------------------------")
#include "httprequestid.h"
[ uuid(c92a03cf-b92b-404f-9ac5-58664a592e4c), helpstring("Microsoft WinHttpRequest component, version 5.0"), lcid(0x0000), version(5.0)
] library WinHttp { importlib ("stdole32.tlb"); importlib ("stdole2.tlb");
typedef [public] long HTTPREQUEST_PROXY_SETTING; const HTTPREQUEST_PROXY_SETTING HTTPREQUEST_PROXYSETTING_DEFAULT = 0x00000000; const HTTPREQUEST_PROXY_SETTING HTTPREQUEST_PROXYSETTING_PRECONFIG = 0x00000000; const HTTPREQUEST_PROXY_SETTING HTTPREQUEST_PROXYSETTING_DIRECT = 0x00000001; const HTTPREQUEST_PROXY_SETTING HTTPREQUEST_PROXYSETTING_PROXY = 0x00000002;
typedef [public] long HTTPREQUEST_SETCREDENTIALS_FLAGS; const HTTPREQUEST_SETCREDENTIALS_FLAGS HTTPREQUEST_SETCREDENTIALS_FOR_SERVER = 0x00000000; const HTTPREQUEST_SETCREDENTIALS_FLAGS HTTPREQUEST_SETCREDENTIALS_FOR_PROXY = 0x00000001;
typedef [uuid(12782009-FE90-4877-9730-E5E183669B19), helpstring("WinHttpRequest Options")] enum WinHttpRequestOption { WinHttpRequestOption_UserAgentString, WinHttpRequestOption_URL, WinHttpRequestOption_URLCodePage, WinHttpRequestOption_EscapePercentInURL, WinHttpRequestOption_SslErrorIgnoreFlags, WinHttpRequestOption_SelectCertificate, WinHttpRequestOption_EnableRedirects } WinHttpRequestOption;
[ object, uuid(06f29373-5c5a-4b54-b025-6ef1bf8abf0e), odl, dual, oleautomation, nonextensible, helpstring("IWinHttpRequest Interface"), pointer_default(unique) ] interface IWinHttpRequest : IDispatch { [id(DISPID_HTTPREQUEST_SETPROXY), helpstring("Specify proxy configuration")] HRESULT SetProxy([in] HTTPREQUEST_PROXY_SETTING ProxySetting, [in, optional] VARIANT varProxyServer, [in, optional] VARIANT varBypassList);
[id(DISPID_HTTPREQUEST_SETCREDENTIALS), helpstring("Specify authentication credentials")] HRESULT SetCredentials([in] BSTR bstrUserName, [in] BSTR bstrPassword, [in] HTTPREQUEST_SETCREDENTIALS_FLAGS Flags);
[id(DISPID_HTTPREQUEST_OPEN), helpstring("Open HTTP connection")] HRESULT Open([in] BSTR bstrMethod, [in] BSTR bstrUrl, [in, optional] VARIANT varAsync); [id(DISPID_HTTPREQUEST_SETREQUESTHEADER), helpstring("Add HTTP request header")] HRESULT SetRequestHeader([in] BSTR bstrHeader, [in] BSTR bstrValue); [id(DISPID_HTTPREQUEST_GETRESPONSEHEADER), helpstring("Get HTTP response header")] HRESULT GetResponseHeader([in] BSTR bstrHeader, [out, retval] BSTR * pbstrValue); [id(DISPID_HTTPREQUEST_GETALLRESPONSEHEADERS), helpstring("Get all HTTP response headers")] HRESULT GetAllResponseHeaders([out, retval] BSTR * pbstrHeaders); [id(DISPID_HTTPREQUEST_SEND), helpstring("Send HTTP request")] HRESULT Send([in, optional] VARIANT varBody);
[propget, id(DISPID_HTTPREQUEST_STATUS), helpstring("Get HTTP status code")] HRESULT Status([out, retval] long * plStatus);
[propget, id(DISPID_HTTPREQUEST_STATUSTEXT), helpstring("Get HTTP status text")] HRESULT StatusText([out, retval] BSTR * pbstrStatus);
[propget, id(DISPID_HTTPREQUEST_RESPONSETEXT), helpstring("Get response body as a string")] HRESULT ResponseText([out, retval] BSTR * pbstrBody);
[propget, id(DISPID_HTTPREQUEST_RESPONSEBODY), helpstring("Get response body as a safearray of UI1")] HRESULT ResponseBody([out, retval] VARIANT * pvarBody);
[propget, id(DISPID_HTTPREQUEST_RESPONSESTREAM), helpstring("Get response body as a stream")] HRESULT ResponseStream([out, retval] VARIANT * pvarBody);
[propget, id(DISPID_HTTPREQUEST_OPTION)] HRESULT Option([in] WinHttpRequestOption Option, [out, retval] VARIANT * Value);
[propput, id(DISPID_HTTPREQUEST_OPTION)] HRESULT Option([in] WinHttpRequestOption Option, [in] VARIANT Value);
[id(DISPID_HTTPREQUEST_WAITFORRESPONSE), helpstring("Wait for asynchronous send to complete, with optional timeout (in seconds)")] HRESULT WaitForResponse([in, optional] VARIANT Timeout, [out, retval] VARIANT_BOOL * Succeeded);
[id(DISPID_HTTPREQUEST_ABORT), helpstring("Abort an asynchronous operation in progress")] HRESULT Abort();
[id(DISPID_HTTPREQUEST_SETTIMEOUTS), helpstring("Specify timeout settings (in milliseconds)")] HRESULT SetTimeouts([in] long ResolveTimeout, [in] long ConnectTimeout, [in] long SendTimeout, [in] long ReceiveTimeout); };
[ object, uuid(cff7bd4c-6689-4bbe-91c2-0f559e8b88a7), odl, oleautomation, nonextensible, helpstring("IWinHttpRequestEvents Interface"), pointer_default(unique) ] interface IWinHttpRequestEvents : IUnknown { void OnResponseStart([in] long Status, [in] BSTR ContentType);
void OnResponseDataAvailable([in] SAFEARRAY(unsigned char) * Data);
void OnResponseFinished(); };
// WinHttpRequest Class [ uuid(91e2ead3-ab7e-4d5c-88de-f7fa382172bc), helpstring("WinHttpRequest class.") ] coclass WinHttpRequest { [default] interface IWinHttpRequest; [default, source] interface IWinHttpRequestEvents; }; }
|