2 * Copyright 2017 Owen Rudge for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 cpp_quote
("#define WSDAPI_ADDRESSFAMILY_IPV4 1")
22 cpp_quote
("#define WSDAPI_ADDRESSFAMILY_IPV6 2")
24 interface IWSDAddress
;
25 interface IWSDUdpAddress
;
26 interface IWSDMessageParameters
;
28 cpp_quote
("HRESULT WINAPI WSDCreateUdpAddress(IWSDUdpAddress **ppAddress);")
30 #ifndef SOCKADDR_STORAGE
32 cpp_quote
("#ifndef __CSADDR_DEFINED__")
33 cpp_quote
("typedef struct SOCKADDR_STORAGE SOCKADDR_STORAGE;")
36 typedef void SOCKADDR_STORAGE
;
41 uuid(b9574c6c
-12a6
-4f74
-93a1
-3318ff605759
),
45 interface IWSDAddress
: IUnknown
47 HRESULT Serialize
([out, size_is(cchLength
)] LPWSTR pszBuffer
, [in] DWORD cchLength
, [in] BOOL fSafe
);
48 HRESULT Deserialize
([in] LPCWSTR pszBuffer
);
52 uuid(70d23498
-4ee6
-4340-a3df
-d845d2235467
),
56 interface IWSDTransportAddress
: IWSDAddress
58 HRESULT GetPort
([out] WORD
*pwPort
);
59 HRESULT SetPort
([in] WORD wPort
);
60 HRESULT GetTransportAddress
([out] LPCWSTR
*ppszAddress
);
61 HRESULT GetTransportAddressEx
([in] BOOL fSafe
, [out] LPCWSTR
*ppszAddress
);
62 HRESULT SetTransportAddress
([in] LPCWSTR pszAddress
);
65 typedef enum _WSDUdpMessageType
72 uuid(74d6124a
-a441
-4f78
-a1eb
-97a8d1996893
),
76 interface IWSDUdpAddress
: IWSDTransportAddress
78 HRESULT SetSockaddr
([in] const SOCKADDR_STORAGE
*pSockAddr
);
79 HRESULT GetSockaddr
([out] SOCKADDR_STORAGE
*pSockAddr
);
80 HRESULT SetExclusive
(BOOL fExclusive
);
81 HRESULT GetExclusive
();
82 HRESULT SetMessageType
([in] WSDUdpMessageType messageType
);
83 HRESULT GetMessageType
([out] WSDUdpMessageType
* pMessageType
);
84 HRESULT SetTTL
([in] DWORD dwTTL
);
85 HRESULT GetTTL
([out] DWORD
*pdwTTL
);
86 HRESULT SetAlias
([in] const GUID
* pAlias
);
87 HRESULT GetAlias
([out] GUID
*pAlias
);
91 uuid(1fafe8a2
-e6fc
-4b80
-b6cf
-b7d45c416d7c
),
94 interface IWSDMessageParameters
: IUnknown
96 HRESULT GetLocalAddress
([out] IWSDAddress
** ppAddress
);
97 HRESULT SetLocalAddress
([in] IWSDAddress
* pAddress
);
98 HRESULT GetRemoteAddress
([out] IWSDAddress
** ppAddress
);
99 HRESULT SetRemoteAddress
([in] IWSDAddress
* pAddress
);
100 HRESULT GetLowerParameters
([out] IWSDMessageParameters
** ppTxParams
);
103 cpp_quote
("HRESULT WINAPI WSDCreateUdpMessageParameters(IWSDUdpMessageParameters **ppTxParams);")
105 typedef struct _WSDUdpRetransmitParams
109 ULONG ulRepeatMinDelay
;
110 ULONG ulRepeatMaxDelay
;
111 ULONG ulRepeatUpperDelay
;
112 } WSDUdpRetransmitParams
;
115 uuid(9934149f
-8f0c
-447b
-aa0b
-73124b0ca7f0
),
118 interface IWSDUdpMessageParameters
: IWSDMessageParameters
120 HRESULT SetRetransmitParams
([in] const WSDUdpRetransmitParams
*pParams
);
121 HRESULT GetRetransmitParams
([out] WSDUdpRetransmitParams
*pParams
);