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_WSDHOST
7#define _INC_WSDHOST
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#undef  INTERFACE
16#define INTERFACE IWSDServiceMessaging
17#ifdef __GNUC__
18#warning COM interfaces layout in this header has not been verified.
19#warning COM interfaces with incorrect layout may not work at all.
20__MINGW_BROKEN_INTERFACE(INTERFACE)
21#endif
22DECLARE_INTERFACE_(IWSDServiceMessaging,IUnknown)
23{
24    BEGIN_INTERFACE
25
26    /* IUnknown methods */
27    STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
28    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
29    STDMETHOD_(ULONG, Release)(THIS) PURE;
30
31    /* IWSDServiceMessaging methods */
32    STDMETHOD_(HRESULT,FaultRequest)(THIS_ WSD_SOAP_HEADER *pRequestHeader,IWSDMessageParameters *pMessageParameters,WSD_SOAP_FAULT *pFault) PURE;
33    STDMETHOD_(HRESULT,SendResponse)(THIS_ void *pBody,WSD_OPERATION *pOperation,IWSDMessageParameters *pMessageParameters) PURE;
34
35    END_INTERFACE
36};
37#ifdef COBJMACROS
38#define IWSDServiceMessaging_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
39#define IWSDServiceMessaging_AddRef(This) (This)->lpVtbl->AddRef(This)
40#define IWSDServiceMessaging_Release(This) (This)->lpVtbl->Release(This)
41#define IWSDServiceMessaging_FaultRequest(This,pRequestHeader,pMessageParameters,pFault) (This)->lpVtbl->FaultRequest(This,pRequestHeader,pMessageParameters,pFault)
42#define IWSDServiceMessaging_SendResponse(This,pBody,pOperation,pMessageParameters) (This)->lpVtbl->SendResponse(This,pBody,pOperation,pMessageParameters)
43#endif /*COBJMACROS*/
44
45#undef  INTERFACE
46#define INTERFACE IWSDDeviceHostNotify
47#ifdef __GNUC__
48#warning COM interfaces layout in this header has not been verified.
49#warning COM interfaces with incorrect layout may not work at all.
50__MINGW_BROKEN_INTERFACE(INTERFACE)
51#endif
52DECLARE_INTERFACE_(IWSDDeviceHostNotify,IUnknown)
53{
54    BEGIN_INTERFACE
55
56    /* IUnknown methods */
57    STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
58    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
59    STDMETHOD_(ULONG, Release)(THIS) PURE;
60
61    /* IWSDDeviceHostNotify methods */
62    STDMETHOD_(HRESULT,GetService)(THIS_ LPCWSTR pszServiceId,IUnknown **ppService) PURE;
63
64    END_INTERFACE
65};
66#ifdef COBJMACROS
67#define IWSDDeviceHostNotify_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
68#define IWSDDeviceHostNotify_AddRef(This) (This)->lpVtbl->AddRef(This)
69#define IWSDDeviceHostNotify_Release(This) (This)->lpVtbl->Release(This)
70#define IWSDDeviceHostNotify_GetService(This,pszServiceId,ppService) (This)->lpVtbl->GetService(This,pszServiceId,ppService)
71#endif /*COBJMACROS*/
72
73#ifdef __GNUC__
74#warning COM interfaces layout in this header has not been verified.
75#warning COM interfaces with incorrect layout may not work at all.
76#warning IWSDDeviceHost is unverified.
77#endif
78
79#undef  INTERFACE
80#define INTERFACE IWSDDeviceHost
81#ifdef __GNUC__
82#warning COM interfaces layout in this header has not been verified.
83#warning COM interfaces with incorrect layout may not work at all.
84__MINGW_BROKEN_INTERFACE(INTERFACE)
85#endif
86DECLARE_INTERFACE_(IWSDDeviceHost,IUnknown)
87{
88    BEGIN_INTERFACE
89
90    /* IUnknown methods */
91    STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
92    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
93    STDMETHOD_(ULONG, Release)(THIS) PURE;
94
95    /* IWSDDeviceHost methods */
96    STDMETHOD_(HRESULT,Init)(THIS_ LPCWSTR pszLocalId,DWORD dwHostAddressCount) PURE;
97    STDMETHOD_(HRESULT,Start)(THIS_ ULONGLONG ullInstanceId,const WSD_URI_LIST *pScopeList,IWSDDeviceHostNotify *pNotificationSink) PURE;
98    STDMETHOD_(HRESULT,Stop)(THIS) PURE;
99    STDMETHOD_(HRESULT,Terminate)(THIS) PURE;
100    STDMETHOD_(HRESULT,RegisterPortType)(THIS_ const WSD_PORT_TYPE *pPortType) PURE;
101    STDMETHOD_(HRESULT,SetMetadata)(THIS_ const WSD_THIS_MODEL_METADATA *pThisModelMetadata,const WSD_THIS_DEVICE_METADATA *pThisDeviceMetadata,const WSD_METADATA_SECTION_LIST *pCustomMetadata) PURE;
102    STDMETHOD_(HRESULT,RegisterService)(THIS_ LPCWSTR pszServiceId,IUnknown *pService) PURE;
103    STDMETHOD_(HRESULT,RetireService)(THIS_ LPCWSTR pszServiceId) PURE;
104    STDMETHOD_(HRESULT,AddDynamicService)(THIS_ LPCWSTR pszServiceId,IUnknown *pService) PURE;
105    STDMETHOD_(HRESULT,RemoveDynamicService)(THIS_ LPCWSTR pszServiceId) PURE;
106    STDMETHOD_(HRESULT,SetServiceDiscoverable)(THIS_ const WCHAR *pszServiceId,WINBOOL fDiscoverable) PURE;
107    STDMETHOD_(HRESULT,SignalEvent)(THIS_ LPCWSTR pszServiceId,const void *pBody,const WSD_OPERATION *pOperation) PURE;
108
109    END_INTERFACE
110};
111#ifdef COBJMACROS
112#define IWSDDeviceHost_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
113#define IWSDDeviceHost_AddRef(This) (This)->lpVtbl->AddRef(This)
114#define IWSDDeviceHost_Release(This) (This)->lpVtbl->Release(This)
115#define IWSDDeviceHost_Init(This,pszLocalId,dwHostAddressCount) (This)->lpVtbl->Init(This,pszLocalId,dwHostAddressCount)
116#define IWSDDeviceHost_Start(This,ullInstanceId,pScopeList,pNotificationSink) (This)->lpVtbl->Start(This,ullInstanceId,pScopeList,pNotificationSink)
117#define IWSDDeviceHost_Stop() (This)->lpVtbl->Stop(This)
118#define IWSDDeviceHost_Terminate() (This)->lpVtbl->Terminate(This)
119#define IWSDDeviceHost_RegisterPortType(This,pPortType) (This)->lpVtbl->RegisterPortType(This,pPortType)
120#define IWSDDeviceHost_SetMetadata(This,pThisModelMetadata,pThisDeviceMetadata,pCustomMetadata) (This)->lpVtbl->SetMetadata(This,pThisModelMetadata,pThisDeviceMetadata,pCustomMetadata)
121#define IWSDDeviceHost_RegisterService(This,pszServiceId,pService) (This)->lpVtbl->RegisterService(This,pszServiceId,pService)
122#define IWSDDeviceHost_RetireService(This,pszServiceId) (This)->lpVtbl->RetireService(This,pszServiceId)
123#define IWSDDeviceHost_AddDynamicService(This,pszServiceId,pService) (This)->lpVtbl->AddDynamicService(This,pszServiceId,pService)
124#define IWSDDeviceHost_RemoveDynamicService(This,pszServiceId) (This)->lpVtbl->RemoveDynamicService(This,pszServiceId)
125#define IWSDDeviceHost_SetServiceDiscoverable(This,pszServiceId,fDiscoverable) (This)->lpVtbl->SetServiceDiscoverable(This,pszServiceId,fDiscoverable)
126#define IWSDDeviceHost_SignalEvent(This,pszServiceId,pBody,pOperation) (This)->lpVtbl->SignalEvent(This,pszServiceId,pBody,pOperation)
127#endif /*COBJMACROS*/
128
129#ifdef __cplusplus
130extern "C" {
131#endif
132
133HRESULT WINAPI WSDCreateDeviceHost(
134  const WCHAR *pszLocalId,
135  IWSDXMLContext *pContext,
136  IWSDDeviceHost **ppDeviceHost
137);
138
139HRESULT WSDCreateDeviceHostAdvanced(
140  const WCHAR *pszLocalId,
141  IWSDXMLContext *pContext,
142  IWSDAddress **ppHostAddresses,
143  DWORD dwHostAddressCount,
144  IWSDDeviceHost **ppDeviceHost
145);
146
147#ifdef __cplusplus
148}
149#endif
150
151#endif /*(_WIN32_WINNT >= 0x0600)*/
152#endif /*_INC_WSDHOST*/
153