1 /** 2 * This file has no copyright assigned and is placed in the Public Domain. 3 * This file is part of the mingw-w64 runtime package. 4 * No warranty is given; refer to the file DISCLAIMER.PD within this package. 5 */ 6 #ifndef _INC_WSDTYPES 7 #define _INC_WSDTYPES 8 9 #ifndef _INC_WSDAPI 10 #error Please include wsdapi.h instead of this header. This header cannot be used directly. 11 #endif 12 13 #if (_WIN32_WINNT >= 0x0600) 14 15 #ifdef __cplusplus 16 extern "C" { 17 #endif 18 19 typedef enum _WSD_PROTOCOL_TYPE { 20 WSD_PT_NONE = 0x00, 21 WSD_PT_UDP = 0x01, 22 WSD_PT_HTTP = 0x02, 23 WSD_PT_HTTPS = 0x04, 24 WSD_PT_ALL = 0xff 25 } WSD_PROTOCOL_TYPE; 26 27 typedef enum _WSDEventType { 28 WSDET_NONE = 0, 29 WSDET_INCOMING_MESSAGE = 1, 30 WSDET_INCOMING_FAULT = 2, 31 WSDET_TRANSMISSION_FAILURE = 3, 32 WSDET_RESPONSE_TIMEOUT = 4 33 } WSDEventType; 34 35 typedef HRESULT ( *PWSD_SOAP_MESSAGE_HANDLER )( 36 IUnknown *thisUnknown, 37 WSD_EVENT *event 38 ); 39 40 typedef HRESULT ( *WSD_STUB_FUNCTION )( 41 IUnknown *server, 42 IWSDServiceMessaging *session, 43 WSD_EVENT *event 44 ); 45 46 typedef struct _WSD_HANDLER_CONTEXT { 47 PWSD_SOAP_MESSAGE_HANDLER Handler; 48 void *PVoid; 49 IUnknown *Unknown; 50 } WSD_HANDLER_CONTEXT; 51 52 typedef struct _WSD_REFERENCE_PROPERTIES { 53 WSDXML_ELEMENT *Any; 54 } WSD_REFERENCE_PROPERTIES; 55 56 typedef struct _WSD_REFERENCE_PARAMETERS { 57 WSDXML_ELEMENT *Any; 58 } WSD_REFERENCE_PARAMETERS; 59 60 typedef struct _WSD_ENDPOINT_REFERENCE { 61 const WCHAR *Address; 62 WSD_REFERENCE_PROPERTIES ReferenceProperties; 63 WSD_REFERENCE_PARAMETERS ReferenceParameters; 64 WSDXML_NAME *PortType; 65 WSDXML_NAME *ServiceName; 66 WSDXML_ELEMENT *Any; 67 } WSD_ENDPOINT_REFERENCE; 68 69 typedef struct _WSD_APP_SEQUENCE { 70 ULONGLONG InstanceId; 71 const WCHAR *SequenceId; 72 ULONGLONG MessageNumber; 73 } WSD_APP_SEQUENCE; 74 75 typedef struct _WSD_HEADER_RELATESTO { 76 WSDXML_NAME *RelationshipType; 77 const WCHAR *MessageID; 78 } WSD_HEADER_RELATESTO; 79 80 typedef struct _WSD_SOAP_HEADER { 81 const WCHAR *To; 82 const WCHAR *Action; 83 const WCHAR *MessageID; 84 WSD_HEADER_RELATESTO RelatesTo; 85 WSD_ENDPOINT_REFERENCE *ReplyTo; 86 WSD_ENDPOINT_REFERENCE *From; 87 WSD_ENDPOINT_REFERENCE *FaultTo; 88 WSD_APP_SEQUENCE *AppSequence; 89 WSDXML_ELEMENT *AnyHeaders; 90 } WSD_SOAP_HEADER; 91 92 typedef struct _WSD_SOAP_MESSAGE { 93 WSD_SOAP_HEADER Header; 94 void *Body; 95 WSDXML_TYPE *BodyType; 96 } WSD_SOAP_MESSAGE; 97 98 typedef struct _WSD_OPERATION { 99 WSDXML_TYPE *RequestType; 100 WSDXML_TYPE *ResponseType; 101 WSD_STUB_FUNCTION RequestStubFunction; 102 } WSD_OPERATION; 103 104 typedef struct _WSD_EVENT { 105 HRESULT Hr; 106 DWORD EventType; 107 WCHAR *DispatchTag; 108 WSD_HANDLER_CONTEXT HandlerContext; 109 WSD_SOAP_MESSAGE *Soap; 110 WSD_OPERATION *Operation; 111 IWSDMessageParameters *MessageParameters; 112 } WSD_EVENT; 113 114 typedef struct _WSD_SOAP_FAULT_SUBCODE { 115 WSDXML_NAME *Value; 116 WSD_SOAP_FAULT_SUBCODE *Subcode; 117 } WSD_SOAP_FAULT_SUBCODE; 118 119 typedef struct _WSD_SOAP_FAULT_CODE { 120 WSDXML_NAME *Value; 121 WSD_SOAP_FAULT_SUBCODE *Subcode; 122 } WSD_SOAP_FAULT_CODE; 123 124 typedef struct _WSD_LOCALIZED_STRING { 125 const WCHAR *lang; 126 const WCHAR *String; 127 } WSD_LOCALIZED_STRING; 128 129 typedef struct _WSD_LOCALIZED_STRING_LIST { 130 WSD_LOCALIZED_STRING_LIST *Next; 131 WSD_LOCALIZED_STRING *Element; 132 } WSD_LOCALIZED_STRING_LIST; 133 134 typedef struct _WSD_SOAP_FAULT_REASON { 135 WSD_LOCALIZED_STRING_LIST *Text; 136 } WSD_SOAP_FAULT_REASON; 137 138 typedef struct _WSD_SOAP_FAULT { 139 WSD_SOAP_FAULT_CODE *Code; 140 WSD_SOAP_FAULT_REASON *Reason; 141 const WCHAR *Node; 142 const WCHAR *Role; 143 WSDXML_ELEMENT *Detail; 144 } WSD_SOAP_FAULT; 145 146 typedef struct _REQUESTBODY_GetStatus { 147 WSDXML_ELEMENT *Any; 148 } REQUESTBODY_GetStatus; 149 150 typedef struct _WSD_DURATION { 151 WINBOOL isPositive; 152 ULONG year; 153 ULONG month; 154 ULONG day; 155 ULONG hour; 156 ULONG minute; 157 ULONG second; 158 ULONG millisecond; 159 } WSD_DURATION; 160 161 typedef struct _WSD_DATETIME { 162 WINBOOL isPositive; 163 ULONG year; 164 UCHAR month; 165 UCHAR day; 166 UCHAR hour; 167 UCHAR minute; 168 UCHAR second; 169 UINT millisecond; 170 WINBOOL TZIsLocal; 171 WINBOOL TZIsPositive; 172 UCHAR TZHour; 173 UCHAR TZMinute; 174 } WSD_DATETIME; 175 176 typedef struct _WSD_EVENTING_EXPIRES { 177 WSD_DURATION *Duration; 178 WSD_DATETIME *DateTime; 179 } WSD_EVENTING_EXPIRES; 180 181 typedef struct _REQUESTBODY_Renew { 182 WSD_EVENTING_EXPIRES *Expires; 183 WSDXML_ELEMENT *Any; 184 } REQUESTBODY_Renew; 185 186 typedef struct _WSD_EVENTING_DELIVERY_MODE { 187 const WCHAR *Mode; 188 void *Data; 189 } WSD_EVENTING_DELIVERY_MODE; 190 191 typedef struct _WSD_EVENTING_FILTER { 192 const WCHAR *Dialect; 193 void *Data; 194 } WSD_EVENTING_FILTER; 195 196 typedef struct _REQUESTBODY_Subscribe { 197 WSD_ENDPOINT_REFERENCE *EndTo; 198 WSD_EVENTING_DELIVERY_MODE *Delivery; 199 WSD_EVENTING_EXPIRES *Expires; 200 WSD_EVENTING_FILTER *Filter; 201 WSDXML_ELEMENT *Any; 202 } REQUESTBODY_Subscribe; 203 204 typedef struct _REQUESTBODY_Unsubscribe { 205 WSDXML_ELEMENT *any; 206 } REQUESTBODY_Unsubscribe; 207 208 typedef struct _WSD_METADATA_SECTION_LIST { 209 WSD_METADATA_SECTION_LIST *Next; 210 WSD_METADATA_SECTION *Element; 211 } WSD_METADATA_SECTION_LIST; 212 213 typedef struct _RESPONSEBODY_GetMetadata { 214 WSD_METADATA_SECTION_LIST *Metadata; 215 } RESPONSEBODY_GetMetadata; 216 217 typedef struct _RESPONSEBODY_GetStatus { 218 WSD_EVENTING_EXPIRES *expires; 219 WSDXML_ELEMENT *any; 220 } RESPONSEBODY_GetStatus; 221 222 typedef struct _RESPONSEBODY_Renew { 223 WSD_EVENTING_EXPIRES *expires; 224 WSDXML_ELEMENT *Any; 225 } RESPONSEBODY_Renew; 226 227 typedef struct _RESPONSEBODY_Subscribe { 228 WSD_ENDPOINT_REFERENCE *SubscriptionManager; 229 WSD_EVENTING_EXPIRES *expires; 230 WSDXML_ELEMENT *Any; 231 } RESPONSEBODY_Subscribe; 232 233 typedef struct _RESPONSEBODY_SubscriptionEnd { 234 WSD_ENDPOINT_REFERENCE *SubscriptionManager; 235 const WCHAR *Status; 236 WSD_LOCALIZED_STRING *Reason; 237 WSDXML_ELEMENT *Any; 238 } RESPONSEBODY_SubscriptionEnd; 239 240 typedef struct _WSD_BYE { 241 WSD_ENDPOINT_REFERENCE *EndpointReference; 242 WSDXML_ELEMENT *Any; 243 } WSD_BYE; 244 245 typedef struct _WSD_ENDPOINT_REFERENCE_LIST { 246 WSD_ENDPOINT_REFERENCE_LIST *Next; 247 WSD_ENDPOINT_REFERENCE *Element; 248 } WSD_ENDPOINT_REFERENCE_LIST; 249 250 typedef struct _WSD_EVENTING_DELIVERY_MODE_PUSH { 251 WSD_ENDPOINT_REFERENCE *NotifyTo; 252 } WSD_EVENTING_DELIVERY_MODE_PUSH; 253 254 typedef struct _WSD_URI_LIST { 255 WSD_URI_LIST *Next; 256 const WCHAR *Element; 257 } WSD_URI_LIST; 258 259 typedef struct _WSD_EVENTING_FILTER_ACTION { 260 WSD_URI_LIST *Actions; 261 } WSD_EVENTING_FILTER_ACTION; 262 263 typedef struct _WSD_NAME_LIST { 264 WSD_NAME_LIST *Next; 265 WSDXML_NAME *Element; 266 } WSD_NAME_LIST; 267 268 typedef struct _WSD_SCOPES { 269 const WCHAR *MatchBy; 270 WSD_URI_LIST *Scopes; 271 } WSD_SCOPES; 272 273 typedef struct _WSD_HELLO { 274 WSD_ENDPOINT_REFERENCE *EndpointReference; 275 WSD_NAME_LIST *Types; 276 WSD_SCOPES *Scopes; 277 WSD_URI_LIST *XAddrs; 278 ULONGLONG MetadataVersion; 279 WSDXML_ELEMENT *Any; 280 } WSD_HELLO; 281 282 typedef struct _WSD_SERVICE_METADATA { 283 WSD_ENDPOINT_REFERENCE_LIST *EndpointReference; 284 WSD_NAME_LIST *Types; 285 const WCHAR *ServiceId; 286 WSDXML_ELEMENT *Any; 287 } WSD_SERVICE_METADATA; 288 289 typedef struct _WSD_SERVICE_METADATA_LIST { 290 WSD_SERVICE_METADATA_LIST *Next; 291 WSD_SERVICE_METADATA *Element; 292 } WSD_SERVICE_METADATA_LIST; 293 294 typedef struct _WSD_HOST_METADATA { 295 WSD_SERVICE_METADATA *Host; 296 WSD_SERVICE_METADATA_LIST *Hosted; 297 } WSD_HOST_METADATA; 298 299 typedef struct _WSD_METADATA_SECTION { 300 const WCHAR *Dialect; 301 const WCHAR *Identifier; 302 void *Data; 303 WSD_ENDPOINT_REFERENCE *MetadataReference; 304 const WCHAR *Location; 305 WSDXML_ELEMENT *Any; 306 } WSD_METADATA_SECTION; 307 308 typedef struct _WSD_PORT_TYPE { 309 DWORD EncodedName; 310 DWORD OperationCount; 311 WSD_OPERATION *Operations; 312 WSD_PROTOCOL_TYPE ProtocolType; 313 } WSD_PORT_TYPE; 314 315 typedef struct _WSD_PROBE { 316 WSD_NAME_LIST *Types; 317 WSD_SCOPES *Scopes; 318 WSDXML_ELEMENT *Any; 319 } WSD_PROBE; 320 321 typedef struct _WSD_PROBE_MATCH { 322 WSD_ENDPOINT_REFERENCE *EndpointReference; 323 WSD_NAME_LIST *Types; 324 WSD_SCOPES *Scopes; 325 WSD_URI_LIST *XAddrs; 326 ULONGLONG MetadataVersion; 327 WSDXML_ELEMENT *Any; 328 } WSD_PROBE_MATCH; 329 330 typedef struct _WSD_PROBE_MATCH_LIST { 331 WSD_PROBE_MATCH_LIST *Next; 332 WSD_PROBE_MATCH *Element; 333 } WSD_PROBE_MATCH_LIST; 334 335 typedef struct _WSD_PROBE_MATCHES { 336 WSD_PROBE_MATCH_LIST *ProbeMatch; 337 WSDXML_ELEMENT *Any; 338 } WSD_PROBE_MATCHES; 339 340 typedef struct _WSD_RELATIONSHIP_METADATA { 341 const WCHAR *Type; 342 WSD_HOST_METADATA *Data; 343 WSDXML_ELEMENT *Any; 344 } WSD_RELATIONSHIP_METADATA; 345 346 typedef struct _WSD_RESOLVE { 347 WSD_ENDPOINT_REFERENCE *EndpointReference; 348 WSDXML_ELEMENT *Any; 349 } WSD_RESOLVE; 350 351 typedef struct _WSD_RESOLVE_MATCH { 352 WSD_ENDPOINT_REFERENCE *EndpointReference; 353 WSD_NAME_LIST *Types; 354 WSD_SCOPES *Scopes; 355 WSD_URI_LIST *XAddrs; 356 ULONGLONG MetadataVersion; 357 WSDXML_ELEMENT *Any; 358 } WSD_RESOLVE_MATCH; 359 360 typedef struct _WSD_RESOLVE_MATCHES { 361 WSD_RESOLVE_MATCH *ResolveMatch; 362 WSDXML_ELEMENT *Any; 363 } WSD_RESOLVE_MATCHES; 364 365 typedef struct _WSD_SYNCHRONOUS_RESPONSE_CONTEXT { 366 HRESULT hr; 367 HANDLE eventHandle; 368 IWSDMessageParameters *messageParameters; 369 void *results; 370 } WSD_SYNCHRONOUS_RESPONSE_CONTEXT; 371 372 typedef struct _WSD_THIS_DEVICE_METADATA { 373 WSD_LOCALIZED_STRING_LIST *FriendlyName; 374 const WCHAR *FirmwareVersion; 375 const WCHAR *SerialNumber; 376 WSDXML_ELEMENT *Any; 377 } WSD_THIS_DEVICE_METADATA; 378 379 typedef struct _WSD_THIS_MODEL_METADATA { 380 WSD_LOCALIZED_STRING_LIST *Manufacturer; 381 const WCHAR *ManufacturerUrl; 382 WSD_LOCALIZED_STRING_LIST *ModelName; 383 const WCHAR *ModelNumber; 384 const WCHAR *ModelUrl; 385 const WCHAR *PresentationUrl; 386 WSDXML_ELEMENT *Any; 387 } WSD_THIS_MODEL_METADATA; 388 389 typedef struct _WSD_UNKNOWN_LOOKUP { 390 WSDXML_ELEMENT *Any; 391 } WSD_UNKNOWN_LOOKUP; 392 393 #ifdef __cplusplus 394 } 395 #endif 396 #endif /*(_WIN32_WINNT >= 0x0600)*/ 397 #endif /*_INC_WSDTYPES*/ 398