source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/dpaddr.h@ 1186

Last change on this file since 1186 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 17.5 KB
Line 
1#undef INTERFACE
2/*
3 * Copyright (C) 2003-2005 Raphael Junqueira
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18 */
19
20#ifndef __WINE_DPLAY8_DPADDR_H
21#define __WINE_DPLAY8_DPADDR_H
22
23#include <ole2.h>
24#include <dplay8.h>
25
26#ifdef __cplusplus
27extern "C" {
28#endif /* defined(__cplusplus) */
29
30typedef REFIID DPNAREFIID;
31#ifndef _WINSOCK2API_
32typedef struct sockaddr SOCKADDR;
33#endif
34
35/*****************************************************************************
36 * DirectPlay8Addr defines
37 */
38#define DPNA_DATATYPE_STRING 0x00000001
39#define DPNA_DATATYPE_DWORD 0x00000002
40#define DPNA_DATATYPE_GUID 0x00000003
41#define DPNA_DATATYPE_BINARY 0x00000004
42#define DPNA_DATATYPE_STRING_ANSI 0x00000005
43#define DPNA_DPNSVR_PORT 6073
44#define DPNA_INDEX_INVALID 0xFFFFFFFF
45
46#define DPNA_SEPARATOR_KEYVALUE L'='
47#define DPNA_SEPARATOR_KEYVALUE_A '='
48#define DPNA_SEPARATOR_USERDATA L'#'
49#define DPNA_SEPARATOR_USERDATA_A '#'
50#define DPNA_SEPARATOR_COMPONENT L';'
51#define DPNA_SEPARATOR_COMPONENT_A ';'
52#define DPNA_ESCAPECHAR L'%'
53#define DPNA_ESCAPECHAR_A '%'
54
55#define DPNA_HEADER_A "x-directplay:/"
56#define DPNA_KEY_APPLICATION_INSTANCE_A "applicationinstance"
57#define DPNA_KEY_BAUD_A "baud"
58#define DPNA_KEY_DEVICE_A "device"
59#define DPNA_KEY_FLOWCONTROL_A "flowcontrol"
60#define DPNA_KEY_HOSTNAME_A "hostname"
61#define DPNA_KEY_NAMEINFO_A "nameinfo"
62#define DPNA_KEY_PARITY_A "parity"
63#define DPNA_KEY_PHONENUMBER_A "phonenumber"
64#define DPNA_KEY_PORT_A "port"
65#define DPNA_KEY_PROCESSOR_A "processor"
66#define DPNA_KEY_PROGRAM_A "program"
67#define DPNA_KEY_PROVIDER_A "provider"
68#define DPNA_KEY_SCOPE_A "scope"
69#define DPNA_KEY_STOPBITS_A "stopbits"
70#define DPNA_KEY_TRAVERSALMODE_A "traversalmode"
71
72#define DPNA_STOP_BITS_ONE_A "1"
73#define DPNA_STOP_BITS_ONE_FIVE_A "1.5"
74#define DPNA_STOP_BITS_TWO_A "2"
75#define DPNA_PARITY_NONE_A "NONE"
76#define DPNA_PARITY_EVEN_A "EVEN"
77#define DPNA_PARITY_ODD_A "ODD"
78#define DPNA_PARITY_MARK_A "MARK"
79#define DPNA_PARITY_SPACE_A "SPACE"
80#define DPNA_FLOW_CONTROL_NONE_A "NONE"
81#define DPNA_FLOW_CONTROL_XONXOFF_A "XONXOFF"
82#define DPNA_FLOW_CONTROL_RTS_A "RTS"
83#define DPNA_FLOW_CONTROL_DTR_A "DTR"
84#define DPNA_FLOW_CONTROL_RTSDTR_A "RTSDTR"
85#define DPNA_VALUE_TCPIPPROVIDER_A "IP"
86#define DPNA_VALUE_IPXPROVIDER_A "IPX"
87#define DPNA_VALUE_MODEMPROVIDER_A "MODEM"
88#define DPNA_VALUE_SERIALPROVIDER_A "SERIAL"
89
90/* And now the same thing but as Unicode strings */
91#if defined(_MSC_VER) || defined(__MINGW32__)
92
93# define DPNA_HEADER L"x-directplay:/"
94# define DPNA_KEY_APPLICATION_INSTANCE L"applicationinstance"
95# define DPNA_KEY_BAUD L"baud"
96# define DPNA_KEY_DEVICE L"device"
97# define DPNA_KEY_FLOWCONTROL L"flowcontrol"
98# define DPNA_KEY_HOSTNAME L"hostname"
99# define DPNA_KEY_NAMEINFO L"nameinfo"
100# define DPNA_KEY_PARITY L"parity"
101# define DPNA_KEY_PHONENUMBER L"phonenumber"
102# define DPNA_KEY_PORT L"port"
103# define DPNA_KEY_PROCESSOR L"processor"
104# define DPNA_KEY_PROGRAM L"program"
105# define DPNA_KEY_PROVIDER L"provider"
106# define DPNA_KEY_SCOPE L"scope"
107# define DPNA_KEY_STOPBITS L"stopbits"
108# define DPNA_KEY_TRAVERSALMODE L"traversalmode"
109# define DPNA_STOP_BITS_ONE L"1"
110# define DPNA_STOP_BITS_ONE_FIVE L"1.5"
111# define DPNA_STOP_BITS_TWO L"2"
112# define DPNA_PARITY_NONE L"NONE"
113# define DPNA_PARITY_EVEN L"EVEN"
114# define DPNA_PARITY_ODD L"ODD"
115# define DPNA_PARITY_MARK L"MARK"
116# define DPNA_PARITY_SPACE L"SPACE"
117# define DPNA_FLOW_CONTROL_NONE L"NONE"
118# define DPNA_FLOW_CONTROL_XONXOFF L"XONXOFF"
119# define DPNA_FLOW_CONTROL_RTS L"RTS"
120# define DPNA_FLOW_CONTROL_DTR L"DTR"
121# define DPNA_FLOW_CONTROL_RTSDTR L"RTSDTR"
122# define DPNA_VALUE_TCPIPPROVIDER L"IP"
123# define DPNA_VALUE_IPXPROVIDER L"IPX"
124# define DPNA_VALUE_MODEMPROVIDER L"MODEM"
125# define DPNA_VALUE_SERIALPROVIDER L"SERIAL"
126
127#else
128
129static const WCHAR DPNA_HEADER[] = { 'x','-','d','i','r','e','c','t','p','l','a','y',':','/',0 };
130static const WCHAR DPNA_KEY_APPLICATION_INSTANCE[] = { 'a','p','p','l','i','c','a','t','i','o','n','i','n','s','t','a','n','c','e',0 };
131static const WCHAR DPNA_KEY_BAUD[] = { 'b','a','u','d',0 };
132static const WCHAR DPNA_KEY_DEVICE[] = { 'd','e','v','i','c','e',0 };
133static const WCHAR DPNA_KEY_FLOWCONTROL[] = { 'f','l','o','w','c','o','n','t','r','o','l',0 };
134static const WCHAR DPNA_KEY_HOSTNAME[] = { 'h','o','s','t','n','a','m','e',0 };
135static const WCHAR DPNA_KEY_NAMEINFO[] = { 'n','a','m','e','i','n','f','o',0 };
136static const WCHAR DPNA_KEY_PARITY[] = { 'p','a','r','i','t','y',0 };
137static const WCHAR DPNA_KEY_PHONENUMBER[] = { 'p','h','o','n','e','n','u','m','b','e','r',0 };
138static const WCHAR DPNA_KEY_PORT[] = { 'p','o','r','t',0 };
139static const WCHAR DPNA_KEY_PROCESSOR[] = { 'p','r','o','c','e','s','s','o','r',0 };
140static const WCHAR DPNA_KEY_PROGRAM[] = { 'p','r','o','g','r','a','m',0 };
141static const WCHAR DPNA_KEY_PROVIDER[] = { 'p','r','o','v','i','d','e','r',0 };
142static const WCHAR DPNA_KEY_SCOPE[] = { 's','c','o','p','e',0 };
143static const WCHAR DPNA_KEY_STOPBITS[] = { 's','t','o','p','b','i','t','s',0 };
144static const WCHAR DPNA_KEY_TRAVERSALMODE[] = { 't','r','a','v','e','r','s','a','l','m','o','d','e',0 };
145static const WCHAR DPNA_STOP_BITS_ONE[] = { '1',0 };
146static const WCHAR DPNA_STOP_BITS_ONE_FIVE[] = { '1','.','5',0 };
147static const WCHAR DPNA_STOP_BITS_TWO[] = { '2',0 };
148static const WCHAR DPNA_PARITY_NONE[] = { 'N','O','N','E',0 };
149static const WCHAR DPNA_PARITY_EVEN[] = { 'E','V','E','N',0 };
150static const WCHAR DPNA_PARITY_ODD[] = { 'O','D','D',0 };
151static const WCHAR DPNA_PARITY_MARK[] = { 'M','A','R','K',0 };
152static const WCHAR DPNA_PARITY_SPACE[] = { 'S','P','A','C','E',0 };
153static const WCHAR DPNA_FLOW_CONTROL_NONE[] = { 'N','O','N','E',0 };
154static const WCHAR DPNA_FLOW_CONTROL_XONXOFF[] = { 'X','O','N','X','O','F','F',0 };
155static const WCHAR DPNA_FLOW_CONTROL_RTS[] = { 'R','T','S',0 };
156static const WCHAR DPNA_FLOW_CONTROL_DTR[] = { 'D','T','R',0 };
157static const WCHAR DPNA_FLOW_CONTROL_RTSDTR[] = { 'R','T','S','D','T','R',0 };
158static const WCHAR DPNA_VALUE_TCPIPPROVIDER[] = { 'I','P',0 };
159static const WCHAR DPNA_VALUE_IPXPROVIDER[] = { 'I','P','X',0 };
160static const WCHAR DPNA_VALUE_MODEMPROVIDER[] = { 'M','O','D','E','M',0 };
161static const WCHAR DPNA_VALUE_SERIALPROVIDER[] = { 'S','E','R','I','A','L',0 };
162
163
164#endif
165
166#define DPNA_BAUD_RATE_9600 9600
167#define DPNA_BAUD_RATE_14400 14400
168#define DPNA_BAUD_RATE_19200 19200
169#define DPNA_BAUD_RATE_38400 38400
170#define DPNA_BAUD_RATE_56000 56000
171#define DPNA_BAUD_RATE_57600 57600
172#define DPNA_BAUD_RATE_115200 115200
173
174/*****************************************************************************
175 * Predeclare the interfaces
176 */
177DEFINE_GUID(CLSID_DirectPlay8Address, 0x934a9523, 0xa3ca, 0x4bc5, 0xad, 0xa0, 0xd6, 0xd9, 0x5d, 0x97, 0x94, 0x21);
178
179DEFINE_GUID(IID_IDirectPlay8Address, 0x83783300, 0x4063, 0x4c8a, 0x9d, 0xb3, 0x82, 0x83, 0xa, 0x7f, 0xeb, 0x31);
180typedef struct IDirectPlay8Address *PDIRECTPLAY8ADDRESS, *LPDIRECTPLAY8ADDRESS;
181DEFINE_GUID(IID_IDirectPlay8AddressIP, 0xe5a0e990, 0x2bad, 0x430b, 0x87, 0xda, 0xa1, 0x42, 0xcf, 0x75, 0xde, 0x58);
182typedef struct IDirectPlay8AddressIP *PDIRECTPLAY8ADDRESSIP, *LPDIRECTPLAY8ADDRESSIP;
183
184
185/*****************************************************************************
186 * IDirectPlay8Address interface
187 */
188#define INTERFACE IDirectPlay8Address
189DECLARE_INTERFACE_(IDirectPlay8Address,IUnknown)
190{
191 /*** IUnknown methods ***/
192 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
193 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
194 STDMETHOD_(ULONG,Release)(THIS) PURE;
195 /*** IDirectPlay8Address methods ***/
196 STDMETHOD(BuildFromURLW)(THIS_ WCHAR* pwszSourceURL) PURE;
197 STDMETHOD(BuildFromURLA)(THIS_ CHAR* pszSourceURL) PURE;
198 STDMETHOD(Duplicate)(THIS_ PDIRECTPLAY8ADDRESS* ppdpaNewAddress) PURE;
199 STDMETHOD(SetEqual)(THIS_ PDIRECTPLAY8ADDRESS pdpaAddress) PURE;
200 STDMETHOD(IsEqual)(THIS_ PDIRECTPLAY8ADDRESS pdpaAddress) PURE;
201 STDMETHOD(Clear)(THIS) PURE;
202 STDMETHOD(GetURLW)(THIS_ WCHAR* pwszURL, PDWORD pdwNumChars) PURE;
203 STDMETHOD(GetURLA)(THIS_ CHAR* pszURL, PDWORD pdwNumChars) PURE;
204 STDMETHOD(GetSP)(THIS_ GUID* pguidSP) PURE;
205 STDMETHOD(GetUserData)(THIS_ LPVOID pvUserData, PDWORD pdwBufferSize) PURE;
206 STDMETHOD(SetSP)(THIS_ const GUID* pguidSP) PURE;
207 STDMETHOD(SetUserData)(THIS_ const void* pvUserData, DWORD dwDataSize) PURE;
208 STDMETHOD(GetNumComponents)(THIS_ PDWORD pdwNumComponents) PURE;
209 STDMETHOD(GetComponentByName)(THIS_ const WCHAR* pwszName, LPVOID pvBuffer, PDWORD pdwBufferSize, PDWORD pdwDataType) PURE;
210 STDMETHOD(GetComponentByIndex)(THIS_ DWORD dwComponentID, WCHAR* pwszName, PDWORD pdwNameLen, void* pvBuffer, PDWORD pdwBufferSize, PDWORD pdwDataType) PURE;
211 STDMETHOD(AddComponent)(THIS_ const WCHAR* pwszName, const void* lpvData, DWORD dwDataSize, DWORD dwDataType) PURE;
212 STDMETHOD(GetDevice)(THIS_ GUID* pDevGuid) PURE;
213 STDMETHOD(SetDevice)(THIS_ const GUID* devGuid) PURE;
214 STDMETHOD(BuildFromDirectPlay4Address)(THIS_ LPVOID pvAddress, DWORD dwDataSize) PURE;
215};
216#undef INTERFACE
217
218
219#if !defined(__cplusplus) || defined(CINTERFACE)
220/*** IUnknown methods ***/
221#define IDirectPlay8Address_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
222#define IDirectPlay8Address_AddRef(p) (p)->lpVtbl->AddRef(p)
223#define IDirectPlay8Address_Release(p) (p)->lpVtbl->Release(p)
224/*** IDirectPlay8Address methods ***/
225#define IDirectPlay8Address_BuildFromURLW(p,a) (p)->lpVtbl->BuildFromURLW(p,a)
226#define IDirectPlay8Address_BuildFromURLA(p,a) (p)->lpVtbl->BuildFromURLA(p,a)
227#define IDirectPlay8Address_Duplicate(p,a) (p)->lpVtbl->Duplicate(p,a)
228#define IDirectPlay8Address_SetEqual(p,a) (p)->lpVtbl->SetEqual(p,a)
229#define IDirectPlay8Address_IsEqual(p,a) (p)->lpVtbl->IsEqual(p,a)
230#define IDirectPlay8Address_Clear(p) (p)->lpVtbl->Clear(p)
231#define IDirectPlay8Address_GetURLW(p,a,b) (p)->lpVtbl->GetURLW(p,a,b)
232#define IDirectPlay8Address_GetURLA(p,a,b) (p)->lpVtbl->GetURLA(p,a,b)
233#define IDirectPlay8Address_GetSP(p,a) (p)->lpVtbl->GetSP(p,a)
234#define IDirectPlay8Address_GetUserData(p,a,b) (p)->lpVtbl->GetUserData(p,a,b)
235#define IDirectPlay8Address_SetSP(p,a) (p)->lpVtbl->SetSP(p,a)
236#define IDirectPlay8Address_SetUserData(p,a,b) (p)->lpVtbl->SetUserData(p,a,b)
237#define IDirectPlay8Address_GetNumComponents(p,a) (p)->lpVtbl->GetNumComponents(p,a)
238#define IDirectPlay8Address_GetComponentByName(p,a,b,c,d) (p)->lpVtbl->GetComponentByName(p,a,b,c,d)
239#define IDirectPlay8Address_GetComponentByIndex(p,a,b,c,d,e,f) (p)->lpVtbl->GetComponentByIndex(p,a,b,c,d,e,f)
240#define IDirectPlay8Address_AddComponent(p,a,b,c,d) (p)->lpVtbl->AddComponent(p,a,b,c,d)
241#define IDirectPlay8Address_SetDevice(p,a) (p)->lpVtbl->SetDevice(p,a)
242#define IDirectPlay8Address_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
243#define IDirectPlay8Address_BuildFromDirectPlay4Address(p,a,b) (p)->lpVtbl->BuildFromDirectPlay4Address(p,a,b)
244#else
245/*** IUnknown methods ***/
246#define IDirectPlay8Address_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
247#define IDirectPlay8Address_AddRef(p) (p)->AddRef()
248#define IDirectPlay8Address_Release(p) (p)->Release()
249/*** IDirectPlay8Address methods ***/
250#define IDirectPlay8Address_BuildFromURLW(p,a) (p)->BuildFromURLW(a)
251#define IDirectPlay8Address_BuildFromURLA(p,a) (p)->BuildFromURLA(a)
252#define IDirectPlay8Address_Duplicate(p,a) (p)->Duplicate(a)
253#define IDirectPlay8Address_SetEqual(p,a) (p)->SetEqual(a)
254#define IDirectPlay8Address_IsEqual(p,a) (p)->IsEqual(a)
255#define IDirectPlay8Address_Clear(p) (p)->Clear()
256#define IDirectPlay8Address_GetURLW(p,a,b) (p)->GetURLW(a,b)
257#define IDirectPlay8Address_GetURLA(p,a,b) (p)->GetURLA(a,b)
258#define IDirectPlay8Address_GetSP(p,a) (p)->GetSP(a)
259#define IDirectPlay8Address_GetUserData(p,a,b) (p)->GetUserData(a,b)
260#define IDirectPlay8Address_SetSP(p,a) (p)->SetSP(a)
261#define IDirectPlay8Address_SetUserData(p,a,b) (p)->SetUserData(a,b)
262#define IDirectPlay8Address_GetNumComponents(p,a) (p)->GetNumComponents(a)
263#define IDirectPlay8Address_GetComponentByName(p,a,b,c,d) (p)->GetComponentByName(a,b,c,d)
264#define IDirectPlay8Address_GetComponentByIndex(p,a,b,c,d,e,f) (p)->GetComponentByIndex(a,b,c,d,e,f)
265#define IDirectPlay8Address_AddComponent(p,a,b,c,d) (p)->AddComponent(a,b,c,d)
266#define IDirectPlay8Address_SetDevice(p,a) (p)->SetDevice(a)
267#define IDirectPlay8Address_GetDevice(p,a) (p)->GetDevice(a)
268#define IDirectPlay8Address_BuildFromDirectPlay4Address(p,a,b) (p)->BuildFromDirectPlay4Address(a,b)
269#endif
270
271/*****************************************************************************
272 * IDirectPlay8AddressIP interface
273 */
274#define INTERFACE IDirectPlay8AddressIP
275DECLARE_INTERFACE_(IDirectPlay8AddressIP,IUnknown)
276{
277 /*** IUnknown methods ***/
278 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
279 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
280 STDMETHOD_(ULONG,Release)(THIS) PURE;
281 /*** IDirectPlay8AddressIP methods ***/
282 STDMETHOD(BuildFromSockAddr)(THIS_ const SOCKADDR* pSockAddr) PURE;
283 STDMETHOD(BuildAddress)(THIS_ const WCHAR* wszAddress, USHORT usPort) PURE;
284 STDMETHOD(BuildLocalAddress)(THIS_ const GUID* pguidAdapter, USHORT usPort) PURE;
285 STDMETHOD(GetSockAddress)(THIS_ SOCKADDR* pSockAddr, PDWORD) PURE;
286 STDMETHOD(GetLocalAddress)(THIS_ GUID* pguidAdapter, USHORT* pusPort) PURE;
287 STDMETHOD(GetAddress)(THIS_ WCHAR* wszAddress, PDWORD pdwAddressLength, USHORT* psPort) PURE;
288};
289#undef INTERFACE
290
291#if !defined(__cplusplus) || defined(CINTERFACE)
292/*** IUnknown methods ***/
293#define IDirectPlay8AddressIP_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(a,b)
294#define IDirectPlay8AddressIP_AddRef(p) (p)->lpVtbl->AddRef()
295#define IDirectPlay8AddressIP_Release(p) (p)->lpVtbl->Release()
296/*** IDirectPlay8AddressIP methods ***/
297#define IDirectPlay8AddressIP_BuildFromSockAddr(p,a) (p)->lpVtbl->BuildFromSockAddr(a)
298#define IDirectPlay8AddressIP_BuildAddress(p,a,b) (p)->lpVtbl->BuildAddress(a,b)
299#define IDirectPlay8AddressIP_BuildLocalAddress(p,a,b) (p)->lpVtbl->BuildLocalAddress(a,b)
300#define IDirectPlay8AddressIP_GetSockAddress(p,a,b) (p)->lpVtbl->GetSockAddress(a,b)
301#define IDirectPlay8AddressIP_GetLocalAddress(p,a,b) (p)->lpVtbl->GetLocalAddress(a,b)
302#define IDirectPlay8AddressIP_GetAddress(p,a,b,c) (p)->lpVtbl->GetAddress(a,b,c)
303#else
304/*** IUnknown methods ***/
305#define IDirectPlay8AddressIP_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
306#define IDirectPlay8AddressIP_AddRef(p) (p)->AddRef()
307#define IDirectPlay8AddressIP_Release(p) (p)->Release()
308/*** IDirectPlay8AddressIP methods ***/
309#define IDirectPlay8AddressIP_BuildFromSockAddr(p,a) (p)->BuildFromSockAddr(a)
310#define IDirectPlay8AddressIP_BuildAddress(p,a,b) (p)->BuildAddress(a,b)
311#define IDirectPlay8AddressIP_BuildLocalAddress(p,a,b) (p)->BuildLocalAddress(a,b)
312#define IDirectPlay8AddressIP_GetSockAddress(p,a,b) (p)->GetSockAddress(a,b)
313#define IDirectPlay8AddressIP_GetLocalAddress(p,a,b) (p)->GetLocalAddress(a,b)
314#define IDirectPlay8AddressIP_GetAddress(p,a,b,c) (p)->GetAddress(a,b,c)
315#endif
316
317/* Export functions */
318
319HRESULT WINAPI DirectPlay8AddressCreate(const GUID* pcIID, LPVOID* ppvInterface, IUnknown* pUnknown);
320
321#ifdef __cplusplus
322}
323#endif
324
325#endif
Note: See TracBrowser for help on using the repository browser.