1 | /**
|
---|
2 | * This file is part of the mingw-w64 runtime package.
|
---|
3 | * No warranty is given; refer to the file DISCLAIMER within this package.
|
---|
4 | */
|
---|
5 | cpp_quote("#include <winapifamily.h>")
|
---|
6 | cpp_quote("")
|
---|
7 | cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)")
|
---|
8 |
|
---|
9 | import "objidl.idl";
|
---|
10 | import "wincrypt.idl";
|
---|
11 |
|
---|
12 | cpp_quote("")
|
---|
13 | interface IWSDAddress;
|
---|
14 | interface IWSDMessageParameters;
|
---|
15 | interface IWSDUdpAddress;
|
---|
16 | interface IWSDUdpMessageParameters;
|
---|
17 | interface IWSDHttpAddress;
|
---|
18 | interface IWSDHttpMessageParameters;
|
---|
19 |
|
---|
20 | cpp_quote("")
|
---|
21 | cpp_quote("#if WINVER >= 0x601")
|
---|
22 | typedef enum {
|
---|
23 | WSD_CONFIG_MAX_INBOUND_MESSAGE_SIZE = 1,
|
---|
24 | WSD_CONFIG_MAX_OUTBOUND_MESSAGE_SIZE = 2,
|
---|
25 | WSD_SECURITY_SSL_CERT_FOR_CLIENT_AUTH = 3,
|
---|
26 | WSD_SECURITY_SSL_SERVER_CERT_VALIDATION = 4,
|
---|
27 | WSD_SECURITY_SSL_CLIENT_CERT_VALIDATION = 5,
|
---|
28 | WSD_SECURITY_SSL_NEGOTIATE_CLIENT_CERT = 6,
|
---|
29 | WSD_SECURITY_COMPACTSIG_SIGNING_CERT = 7,
|
---|
30 | WSD_SECURITY_COMPACTSIG_VALIDATION = 8,
|
---|
31 | WSD_CONFIG_HOSTING_ADDRESSES = 9,
|
---|
32 | WSD_CONFIG_DEVICE_ADDRESSES = 10,
|
---|
33 | WSD_SECURITY_REQUIRE_HTTP_CLIENT_AUTH = 11,
|
---|
34 | WSD_SECURITY_REQUIRE_CLIENT_CERT_OR_HTTP_CLIENT_AUTH = 12,
|
---|
35 | WSD_SECURITY_USE_HTTP_CLIENT_AUTH = 13
|
---|
36 | } WSD_CONFIG_PARAM_TYPE;
|
---|
37 |
|
---|
38 | typedef struct _WSD_CONFIG_PARAM {
|
---|
39 | WSD_CONFIG_PARAM_TYPE configParamType;
|
---|
40 | PVOID pConfigData;
|
---|
41 | DWORD dwConfigDataSize;
|
---|
42 | } WSD_CONFIG_PARAM,*PWSD_CONFIG_PARAM;
|
---|
43 |
|
---|
44 | typedef struct _WSD_SECURITY_CERT_VALIDATION_V1 {
|
---|
45 | PCCERT_CONTEXT *certMatchArray;
|
---|
46 | DWORD dwCertMatchArrayCount;
|
---|
47 | HCERTSTORE hCertMatchStore;
|
---|
48 | HCERTSTORE hCertIssuerStore;
|
---|
49 | DWORD dwCertCheckOptions;
|
---|
50 | } WSD_SECURITY_CERT_VALIDATION_V1;
|
---|
51 |
|
---|
52 | cpp_quote("#if _WIN32_WINNT >= 0x602")
|
---|
53 | typedef struct _WSD_SECURITY_CERT_VALIDATION {
|
---|
54 | PCCERT_CONTEXT *certMatchArray;
|
---|
55 | DWORD dwCertMatchArrayCount;
|
---|
56 | HCERTSTORE hCertMatchStore;
|
---|
57 | HCERTSTORE hCertIssuerStore;
|
---|
58 | DWORD dwCertCheckOptions;
|
---|
59 | LPCWSTR pszCNGHashAlgId;
|
---|
60 | BYTE *pbCertHash;
|
---|
61 | DWORD dwCertHashSize;
|
---|
62 | } WSD_SECURITY_CERT_VALIDATION;
|
---|
63 | cpp_quote("#else")
|
---|
64 | cpp_quote("typedef WSD_SECURITY_CERT_VALIDATION_V1 WSD_SECURITY_CERT_VALIDATION;")
|
---|
65 | cpp_quote("#endif")
|
---|
66 |
|
---|
67 | cpp_quote("")
|
---|
68 | typedef WSD_SECURITY_CERT_VALIDATION *PWSD_SECURITY_CERT_VALIDATION;
|
---|
69 |
|
---|
70 | typedef struct _WSD_SECURITY_SIGNATURE_VALIDATION {
|
---|
71 | PCCERT_CONTEXT *signingCertArray;
|
---|
72 | DWORD dwSigningCertArrayCount;
|
---|
73 | HCERTSTORE hSigningCertStore;
|
---|
74 | DWORD dwFlags;
|
---|
75 | } WSD_SECURITY_SIGNATURE_VALIDATION,*PWSD_SECURITY_SIGNATURE_VALIDATION;
|
---|
76 |
|
---|
77 | typedef DWORD WSD_SECURITY_HTTP_AUTH_SCHEMES,*PWSD_SECURITY_HTTP_AUTH_SCHEMES;
|
---|
78 |
|
---|
79 | cpp_quote("")
|
---|
80 | cpp_quote("#define WSDAPI_SSL_CERT_APPLY_DEFAULT_CHECKS 0x0")
|
---|
81 | cpp_quote("#define WSDAPI_SSL_CERT_IGNORE_REVOCATION 0x1")
|
---|
82 | cpp_quote("#define WSDAPI_SSL_CERT_IGNORE_EXPIRY 0x2")
|
---|
83 | cpp_quote("#define WSDAPI_SSL_CERT_IGNORE_WRONG_USAGE 0x4")
|
---|
84 | cpp_quote("#define WSDAPI_SSL_CERT_IGNORE_UNKNOWN_CA 0x8")
|
---|
85 | cpp_quote("#define WSDAPI_SSL_CERT_IGNORE_INVALID_CN 0x10")
|
---|
86 | cpp_quote("")
|
---|
87 | cpp_quote("#define WSDAPI_COMPACTSIG_ACCEPT_ALL_MESSAGES 0x1")
|
---|
88 | cpp_quote("")
|
---|
89 | cpp_quote("#define WSD_SECURITY_HTTP_AUTH_SCHEME_NEGOTIATE 0x1")
|
---|
90 | cpp_quote("#define WSD_SECURITY_HTTP_AUTH_SCHEME_NTLM 0x2")
|
---|
91 | cpp_quote("")
|
---|
92 |
|
---|
93 | typedef struct _WSD_CONFIG_ADDRESSES {
|
---|
94 | IWSDAddress **addresses;
|
---|
95 | DWORD dwAddressCount;
|
---|
96 | } WSD_CONFIG_ADDRESSES,*PWSD_CONFIG_ADDRESSES;
|
---|
97 | cpp_quote("#endif")
|
---|
98 |
|
---|
99 | cpp_quote("#define WSDAPI_ADDRESSFAMILY_IPV4 1")
|
---|
100 | cpp_quote("#define WSDAPI_ADDRESSFAMILY_IPV6 2")
|
---|
101 |
|
---|
102 | [object, uuid (b9574c6c-12a6-4f74-93a1-3318ff605759), local]
|
---|
103 | interface IWSDAddress : IUnknown {
|
---|
104 | HRESULT Serialize ([out, size_is (cchLength)] LPWSTR pszBuffer,[in] DWORD cchLength,[in] BOOL fSafe);
|
---|
105 | HRESULT Deserialize ([in] LPCWSTR pszBuffer);
|
---|
106 | }
|
---|
107 |
|
---|
108 | [object, uuid (70d23498-4ee6-4340-a3df-d845d2235467), local]
|
---|
109 | interface IWSDTransportAddress : IWSDAddress {
|
---|
110 | HRESULT GetPort ([out] WORD *pwPort);
|
---|
111 | HRESULT SetPort ([in] WORD wPort);
|
---|
112 | HRESULT GetTransportAddress ([out] LPCWSTR *ppszAddress);
|
---|
113 | HRESULT GetTransportAddressEx ([in] BOOL fSafe,[out] LPCWSTR *ppszAddress);
|
---|
114 | HRESULT SetTransportAddress ([in] LPCWSTR pszAddress);
|
---|
115 | }
|
---|
116 |
|
---|
117 | [object, uuid (1fafe8a2-e6fc-4b80-b6cf-b7d45c416d7c)]
|
---|
118 | interface IWSDMessageParameters : IUnknown {
|
---|
119 | HRESULT GetLocalAddress ([out] IWSDAddress **ppAddress);
|
---|
120 | HRESULT SetLocalAddress ([in] IWSDAddress *pAddress);
|
---|
121 | HRESULT GetRemoteAddress ([out] IWSDAddress **ppAddress);
|
---|
122 | HRESULT SetRemoteAddress ([in] IWSDAddress *pAddress);
|
---|
123 | HRESULT GetLowerParameters ([out] IWSDMessageParameters **ppTxParams);
|
---|
124 | }
|
---|
125 |
|
---|
126 | cpp_quote("HRESULT WINAPI")
|
---|
127 | cpp_quote("WSDCreateUdpMessageParameters(")
|
---|
128 | cpp_quote("IWSDUdpMessageParameters** ppTxParams);")
|
---|
129 |
|
---|
130 | typedef struct _WSDUdpRetransmitParams {
|
---|
131 | ULONG ulSendDelay;
|
---|
132 | ULONG ulRepeat;
|
---|
133 | ULONG ulRepeatMinDelay;
|
---|
134 | ULONG ulRepeatMaxDelay;
|
---|
135 | ULONG ulRepeatUpperDelay;
|
---|
136 | } WSDUdpRetransmitParams;
|
---|
137 |
|
---|
138 | [object, uuid (9934149f-8f0c-447b-aa0b-73124b0ca7f0)]
|
---|
139 | interface IWSDUdpMessageParameters : IWSDMessageParameters {
|
---|
140 | HRESULT SetRetransmitParams ([in] const WSDUdpRetransmitParams *pParams);
|
---|
141 | HRESULT GetRetransmitParams ([out] WSDUdpRetransmitParams *pParams);
|
---|
142 | }
|
---|
143 |
|
---|
144 | cpp_quote("HRESULT WINAPI")
|
---|
145 | cpp_quote("WSDCreateUdpAddress(")
|
---|
146 | cpp_quote(" IWSDUdpAddress** ppAddress);")
|
---|
147 |
|
---|
148 | #ifndef SOCKADDR_STORAGE
|
---|
149 | cpp_quote("#if 1")
|
---|
150 | cpp_quote("")
|
---|
151 | cpp_quote("#ifndef __CSADDR_DEFINED__")
|
---|
152 | cpp_quote("struct SOCKADDR_STORAGE;")
|
---|
153 | cpp_quote("#endif")
|
---|
154 | cpp_quote("#else")
|
---|
155 | typedef void SOCKADDR_STORAGE;
|
---|
156 | cpp_quote("#endif")
|
---|
157 | #endif
|
---|
158 |
|
---|
159 | typedef enum _WSDUdpMessageType {
|
---|
160 | ONE_WAY,
|
---|
161 | TWO_WAY
|
---|
162 | } WSDUdpMessageType;
|
---|
163 |
|
---|
164 | [object, local, uuid (74d6124a-a441-4f78-a1eb-97a8d1996893)]
|
---|
165 | interface IWSDUdpAddress : IWSDTransportAddress {
|
---|
166 | HRESULT SetSockaddr ([in] const SOCKADDR_STORAGE *pSockAddr);
|
---|
167 | HRESULT GetSockaddr ([out] SOCKADDR_STORAGE *pSockAddr);
|
---|
168 | HRESULT SetExclusive ([in] BOOL fExclusive);
|
---|
169 | HRESULT GetExclusive ();
|
---|
170 | HRESULT SetMessageType ([in] WSDUdpMessageType messageType);
|
---|
171 | HRESULT GetMessageType ([out] WSDUdpMessageType *pMessageType);
|
---|
172 | HRESULT SetTTL ([in] DWORD dwTTL);
|
---|
173 | HRESULT GetTTL ([out] DWORD *pdwTTL);
|
---|
174 | HRESULT SetAlias ([in] const GUID *pAlias);
|
---|
175 | HRESULT GetAlias ([out] GUID *pAlias);
|
---|
176 | }
|
---|
177 |
|
---|
178 | [object, local, uuid (540bd122-5c83-4dec-b396-ea62a2697fdf)]
|
---|
179 | interface IWSDHttpMessageParameters : IWSDMessageParameters {
|
---|
180 | HRESULT SetInboundHttpHeaders ([in] LPCWSTR pszHeaders);
|
---|
181 | HRESULT GetInboundHttpHeaders ([out] LPCWSTR *ppszHeaders);
|
---|
182 | HRESULT SetOutboundHttpHeaders ([in] LPCWSTR pszHeaders);
|
---|
183 | HRESULT GetOutboundHttpHeaders ([out] LPCWSTR *ppszHeaders);
|
---|
184 | HRESULT SetID ([in] LPCWSTR pszId);
|
---|
185 | HRESULT GetID ([out] LPCWSTR *ppszId);
|
---|
186 | HRESULT SetContext ([in] IUnknown *pContext);
|
---|
187 | HRESULT GetContext ([out] IUnknown **ppContext);
|
---|
188 | HRESULT Clear ();
|
---|
189 | }
|
---|
190 |
|
---|
191 | [object, local, uuid (d09ac7bd-2a3e-4b85-8605-2737ff3e4ea0)]
|
---|
192 | interface IWSDHttpAddress : IWSDTransportAddress {
|
---|
193 | HRESULT GetSecure ();
|
---|
194 | HRESULT SetSecure ([in] BOOL fSecure);
|
---|
195 | HRESULT GetPath ([out] LPCWSTR *ppszPath);
|
---|
196 | HRESULT SetPath ([in] LPCWSTR pszPath);
|
---|
197 | }
|
---|
198 |
|
---|
199 | cpp_quote("#if WINVER >= 0x601")
|
---|
200 | [object, local, uuid (de105e87-a0da-418e-98ad-27b9eed87bdc)]
|
---|
201 | interface IWSDSSLClientCertificate : IUnknown {
|
---|
202 | HRESULT GetClientCertificate ([in, out] PCCERT_CONTEXT *ppCertContext);
|
---|
203 | HRESULT GetMappedAccessToken ([in, out] HANDLE *phToken);
|
---|
204 | }
|
---|
205 |
|
---|
206 | [object, local, uuid (0b476df0-8dac-480d-b05c-99781a5884aa)]
|
---|
207 | interface IWSDHttpAuthParameters: IUnknown {
|
---|
208 | HRESULT GetClientAccessToken ([out] HANDLE *phToken);
|
---|
209 | HRESULT GetAuthType ([out] PWSD_SECURITY_HTTP_AUTH_SCHEMES pAuthType);
|
---|
210 | }
|
---|
211 |
|
---|
212 | [object, local, uuid (03ce20aa-71c4-45e2-b32e-3766c61c790f), pointer_default (unique), restricted]
|
---|
213 | interface IWSDSignatureProperty : IUnknown {
|
---|
214 | HRESULT IsMessageSigned ([out] BOOL *pbSigned);
|
---|
215 | HRESULT IsMessageSignatureTrusted ([out] BOOL *pbSignatureTrusted);
|
---|
216 | HRESULT GetKeyInfo ([out, size_is (*pdwKeyInfoSize)] BYTE *pbKeyInfo,[in, out] DWORD *pdwKeyInfoSize);
|
---|
217 | HRESULT GetSignature ([out, size_is (*pdwSignatureSize)] BYTE *pbSignature,[in, out] DWORD *pdwSignatureSize);
|
---|
218 | HRESULT GetSignedInfoHash ([out, size_is (*pdwHashSize)] BYTE *pbSignedInfoHash,[in, out] DWORD *pdwHashSize);
|
---|
219 | }
|
---|
220 | cpp_quote("#endif")
|
---|
221 |
|
---|
222 | cpp_quote("HRESULT WINAPI WSDCreateHttpAddress(IWSDHttpAddress **ppAdress);")
|
---|
223 | cpp_quote("HRESULT WINAPI WSDCreateHttpMessageParameters(IWSDHttpMessageParameters **ppTxParams);")
|
---|
224 |
|
---|
225 | cpp_quote("#endif")
|
---|