blob: 3f67b9c2c95fcc53763ed5af3c5ebd11a9924615 [file] [log] [blame]
Raphael Junqueirab351e882003-06-30 18:26:13 +00001/*
Raphael Junqueiradb50e2d2005-12-08 12:00:14 +01002 * Copyright (C) 2003-2005 Raphael Junqueira
Raphael Junqueirab351e882003-06-30 18:26:13 +00003 *
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.
8 *
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.
13 *
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
Jonathan Ernst360a3f92006-05-18 14:49:52 +020016 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
Raphael Junqueirab351e882003-06-30 18:26:13 +000017 */
18
19#ifndef __WINE_DPLAY8_DPADDR_H
20#define __WINE_DPLAY8_DPADDR_H
21
22#include <ole2.h>
Dimitrie O. Paun53f9c212003-08-28 21:43:34 +000023#include <dplay8.h>
Raphael Junqueirab351e882003-06-30 18:26:13 +000024
25#ifdef __cplusplus
26extern "C" {
27#endif /* defined(__cplusplus) */
28
Raphael Junqueiradb50e2d2005-12-08 12:00:14 +010029typedef REFIID DPNAREFIID;
Raphael Junqueirab351e882003-06-30 18:26:13 +000030typedef struct sockaddr SOCKADDR;
31
32/*****************************************************************************
33 * DirectPlay8Addr defines
34 */
35#define DPNA_DATATYPE_STRING 0x00000001
36#define DPNA_DATATYPE_DWORD 0x00000002
37#define DPNA_DATATYPE_GUID 0x00000003
38#define DPNA_DATATYPE_BINARY 0x00000004
39#define DPNA_DATATYPE_STRING_ANSI 0x00000005
40#define DPNA_DPNSVR_PORT 6073
41#define DPNA_INDEX_INVALID 0xFFFFFFFF
42
43#define DPNA_SEPARATOR_KEYVALUE L'='
44#define DPNA_SEPARATOR_KEYVALUE_A '='
45#define DPNA_SEPARATOR_USERDATA L'#'
46#define DPNA_SEPARATOR_USERDATA_A '#'
47#define DPNA_SEPARATOR_COMPONENT L';'
48#define DPNA_SEPARATOR_COMPONENT_A ';'
49#define DPNA_ESCAPECHAR L'%'
50#define DPNA_ESCAPECHAR_A '%'
Francois Gouget299a13822004-06-15 20:24:47 +000051
Raphael Junqueirab351e882003-06-30 18:26:13 +000052#define DPNA_HEADER_A "x-directplay:/"
Raphael Junqueirab351e882003-06-30 18:26:13 +000053#define DPNA_KEY_APPLICATION_INSTANCE_A "applicationinstance"
Raphael Junqueirab351e882003-06-30 18:26:13 +000054#define DPNA_KEY_BAUD_A "baud"
Raphael Junqueirab351e882003-06-30 18:26:13 +000055#define DPNA_KEY_DEVICE_A "device"
Raphael Junqueirab351e882003-06-30 18:26:13 +000056#define DPNA_KEY_FLOWCONTROL_A "flowcontrol"
Raphael Junqueirab351e882003-06-30 18:26:13 +000057#define DPNA_KEY_HOSTNAME_A "hostname"
Raphael Junqueiradb50e2d2005-12-08 12:00:14 +010058#define DPNA_KEY_NAMEINFO_A "nameinfo"
Raphael Junqueirab351e882003-06-30 18:26:13 +000059#define DPNA_KEY_PARITY_A "parity"
Raphael Junqueirab351e882003-06-30 18:26:13 +000060#define DPNA_KEY_PHONENUMBER_A "phonenumber"
Raphael Junqueirab351e882003-06-30 18:26:13 +000061#define DPNA_KEY_PORT_A "port"
Raphael Junqueiradb50e2d2005-12-08 12:00:14 +010062#define DPNA_KEY_PROCESSOR_A "processor"
Raphael Junqueirab351e882003-06-30 18:26:13 +000063#define DPNA_KEY_PROGRAM_A "program"
Raphael Junqueirab351e882003-06-30 18:26:13 +000064#define DPNA_KEY_PROVIDER_A "provider"
Raphael Junqueiradb50e2d2005-12-08 12:00:14 +010065#define DPNA_KEY_SCOPE_A "scope"
Raphael Junqueirab351e882003-06-30 18:26:13 +000066#define DPNA_KEY_STOPBITS_A "stopbits"
Raphael Junqueiradb50e2d2005-12-08 12:00:14 +010067#define DPNA_KEY_TRAVERSALMODE_A "traversalmode"
68
Raphael Junqueirab351e882003-06-30 18:26:13 +000069#define DPNA_STOP_BITS_ONE_A "1"
Raphael Junqueirab351e882003-06-30 18:26:13 +000070#define DPNA_STOP_BITS_ONE_FIVE_A "1.5"
Raphael Junqueirab351e882003-06-30 18:26:13 +000071#define DPNA_STOP_BITS_TWO_A "2"
Raphael Junqueirab351e882003-06-30 18:26:13 +000072#define DPNA_PARITY_NONE_A "NONE"
Raphael Junqueirab351e882003-06-30 18:26:13 +000073#define DPNA_PARITY_EVEN_A "EVEN"
Raphael Junqueirab351e882003-06-30 18:26:13 +000074#define DPNA_PARITY_ODD_A "ODD"
Raphael Junqueirab351e882003-06-30 18:26:13 +000075#define DPNA_PARITY_MARK_A "MARK"
Raphael Junqueirab351e882003-06-30 18:26:13 +000076#define DPNA_PARITY_SPACE_A "SPACE"
Raphael Junqueirab351e882003-06-30 18:26:13 +000077#define DPNA_FLOW_CONTROL_NONE_A "NONE"
Raphael Junqueirab351e882003-06-30 18:26:13 +000078#define DPNA_FLOW_CONTROL_XONXOFF_A "XONXOFF"
Raphael Junqueirab351e882003-06-30 18:26:13 +000079#define DPNA_FLOW_CONTROL_RTS_A "RTS"
Raphael Junqueirab351e882003-06-30 18:26:13 +000080#define DPNA_FLOW_CONTROL_DTR_A "DTR"
Raphael Junqueirab351e882003-06-30 18:26:13 +000081#define DPNA_FLOW_CONTROL_RTSDTR_A "RTSDTR"
Raphael Junqueirab351e882003-06-30 18:26:13 +000082#define DPNA_VALUE_TCPIPPROVIDER_A "IP"
Raphael Junqueirab351e882003-06-30 18:26:13 +000083#define DPNA_VALUE_IPXPROVIDER_A "IPX"
Raphael Junqueirab351e882003-06-30 18:26:13 +000084#define DPNA_VALUE_MODEMPROVIDER_A "MODEM"
Raphael Junqueirab351e882003-06-30 18:26:13 +000085#define DPNA_VALUE_SERIALPROVIDER_A "SERIAL"
86
Francois Gouget299a13822004-06-15 20:24:47 +000087/* And now the same thing but as Unicode strings */
88#if defined(__GNUC__)
89
90# define DPNA_HEADER (const WCHAR []){ 'x','-','d','i','r','e','c','t','p','l','a','y',':','/',0 }
91# define DPNA_KEY_APPLICATION_INSTANCE (const WCHAR []){ 'a','p','p','l','i','c','a','t','i','o','n','i','n','s','t','a','n','c','e',0 }
92# define DPNA_KEY_BAUD (const WCHAR []){ 'b','a','u','d',0 }
93# define DPNA_KEY_DEVICE (const WCHAR []){ 'd','e','v','i','c','e',0 }
94# define DPNA_KEY_FLOWCONTROL (const WCHAR []){ 'f','l','o','w','c','o','n','t','r','o','l',0 }
95# define DPNA_KEY_HOSTNAME (const WCHAR []){ 'h','o','s','t','n','a','m','e',0 }
Raphael Junqueiradb50e2d2005-12-08 12:00:14 +010096# define DPNA_KEY_NAMEINFO (const WCHAR []){ 'n','a','m','e','i','n','f','o',0 }
Francois Gouget299a13822004-06-15 20:24:47 +000097# define DPNA_KEY_PARITY (const WCHAR []){ 'p','a','r','i','t','y',0 }
98# define DPNA_KEY_PHONENUMBER (const WCHAR []){ 'p','h','o','n','e','n','u','m','b','e','r',0 }
99# define DPNA_KEY_PORT (const WCHAR []){ 'p','o','r','t',0 }
Raphael Junqueiradb50e2d2005-12-08 12:00:14 +0100100# define DPNA_KEY_PROCESSOR (const WCHAR []){ 'p','r','o','c','e','s','s','o','r',0 }
Francois Gouget299a13822004-06-15 20:24:47 +0000101# define DPNA_KEY_PROGRAM (const WCHAR []){ 'p','r','o','g','r','a','m',0 }
102# define DPNA_KEY_PROVIDER (const WCHAR []){ 'p','r','o','v','i','d','e','r',0 }
Raphael Junqueiradb50e2d2005-12-08 12:00:14 +0100103# define DPNA_KEY_SCOPE (const WCHAR []){ 's','c','o','p','e',0 }
Francois Gouget299a13822004-06-15 20:24:47 +0000104# define DPNA_KEY_STOPBITS (const WCHAR []){ 's','t','o','p','b','i','t','s',0 }
Raphael Junqueiradb50e2d2005-12-08 12:00:14 +0100105# define DPNA_KEY_TRAVERSALMODE (const WCHAR []){ 't','r','a','v','e','r','s','a','l','m','o','d','e',0 }
Francois Gouget299a13822004-06-15 20:24:47 +0000106# define DPNA_STOP_BITS_ONE (const WCHAR []){ '1',0 }
107# define DPNA_STOP_BITS_ONE_FIVE (const WCHAR []){ '1','.','5',0 }
108# define DPNA_STOP_BITS_TWO (const WCHAR []){ '2',0 }
109# define DPNA_PARITY_NONE (const WCHAR []){ 'N','O','N','E',0 }
110# define DPNA_PARITY_EVEN (const WCHAR []){ 'E','V','E','N',0 }
111# define DPNA_PARITY_ODD (const WCHAR []){ 'O','D','D',0 }
112# define DPNA_PARITY_MARK (const WCHAR []){ 'M','A','R','K',0 }
113# define DPNA_PARITY_SPACE (const WCHAR []){ 'S','P','A','C','E',0 }
114# define DPNA_FLOW_CONTROL_NONE (const WCHAR []){ 'N','O','N','E',0 }
115# define DPNA_FLOW_CONTROL_XONXOFF (const WCHAR []){ 'X','O','N','X','O','F','F',0 }
116# define DPNA_FLOW_CONTROL_RTS (const WCHAR []){ 'R','T','S',0 }
117# define DPNA_FLOW_CONTROL_DTR (const WCHAR []){ 'D','T','R',0 }
118# define DPNA_FLOW_CONTROL_RTSDTR (const WCHAR []){ 'R','T','S','D','T','R',0 }
119# define DPNA_VALUE_TCPIPPROVIDER (const WCHAR []){ 'I','P',0 }
120# define DPNA_VALUE_IPXPROVIDER (const WCHAR []){ 'I','P','X',0 }
121# define DPNA_VALUE_MODEMPROVIDER (const WCHAR []){ 'M','O','D','E','M',0 }
122# define DPNA_VALUE_SERIALPROVIDER (const WCHAR []){ 'S','E','R','I','A','L',0 }
123
124#elif defined(_MSC_VER)
125
126# define DPNA_HEADER L"x-directplay:/"
127# define DPNA_KEY_APPLICATION_INSTANCE L"applicationinstance"
128# define DPNA_KEY_BAUD L"baud"
129# define DPNA_KEY_DEVICE L"device"
130# define DPNA_KEY_FLOWCONTROL L"flowcontrol"
131# define DPNA_KEY_HOSTNAME L"hostname"
Rob Shearman9f3c91e2008-02-13 13:19:23 +0000132# define DPNA_KEY_NAMEINFO L"nameinfo"
Francois Gouget299a13822004-06-15 20:24:47 +0000133# define DPNA_KEY_PARITY L"parity"
134# define DPNA_KEY_PHONENUMBER L"phonenumber"
135# define DPNA_KEY_PORT L"port"
Rob Shearman9f3c91e2008-02-13 13:19:23 +0000136# define DPNA_KEY_PROCESSOR L"processor"
Francois Gouget299a13822004-06-15 20:24:47 +0000137# define DPNA_KEY_PROGRAM L"program"
138# define DPNA_KEY_PROVIDER L"provider"
Rob Shearman9f3c91e2008-02-13 13:19:23 +0000139# define DPNA_KEY_SCOPE L"scope"
Francois Gouget299a13822004-06-15 20:24:47 +0000140# define DPNA_KEY_STOPBITS L"stopbits"
Rob Shearman9f3c91e2008-02-13 13:19:23 +0000141# define DPNA_KEY_TRAVERSALMODE L"traversalmode"
Francois Gouget299a13822004-06-15 20:24:47 +0000142# define DPNA_STOP_BITS_ONE L"1"
143# define DPNA_STOP_BITS_ONE_FIVE L"1.5"
144# define DPNA_STOP_BITS_TWO L"2"
145# define DPNA_PARITY_NONE L"NONE"
146# define DPNA_PARITY_EVEN L"EVEN"
147# define DPNA_PARITY_ODD L"ODD"
148# define DPNA_PARITY_MARK L"MARK"
149# define DPNA_PARITY_SPACE L"SPACE"
150# define DPNA_FLOW_CONTROL_NONE L"NONE"
151# define DPNA_FLOW_CONTROL_XONXOFF L"XONXOFF"
152# define DPNA_FLOW_CONTROL_RTS L"RTS"
153# define DPNA_FLOW_CONTROL_DTR L"DTR"
154# define DPNA_FLOW_CONTROL_RTSDTR L"RTSDTR"
155# define DPNA_VALUE_TCPIPPROVIDER L"IP"
156# define DPNA_VALUE_IPXPROVIDER L"IPX"
157# define DPNA_VALUE_MODEMPROVIDER L"MODEM"
158# define DPNA_VALUE_SERIALPROVIDER L"SERIAL"
159
160#else
161
162static const WCHAR DPNA_HEADER[] = { 'x','-','d','i','r','e','c','t','p','l','a','y',':','/',0 };
163static 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 };
164static const WCHAR DPNA_KEY_BAUD[] = { 'b','a','u','d',0 };
165static const WCHAR DPNA_KEY_DEVICE[] = { 'd','e','v','i','c','e',0 };
166static const WCHAR DPNA_KEY_FLOWCONTROL[] = { 'f','l','o','w','c','o','n','t','r','o','l',0 };
167static const WCHAR DPNA_KEY_HOSTNAME[] = { 'h','o','s','t','n','a','m','e',0 };
Raphael Junqueiradb50e2d2005-12-08 12:00:14 +0100168static const WCHAR DPNA_KEY_NAMEINFO[] = { 'n','a','m','e','i','n','f','o',0 };
Francois Gouget299a13822004-06-15 20:24:47 +0000169static const WCHAR DPNA_KEY_PARITY[] = { 'p','a','r','i','t','y',0 };
170static const WCHAR DPNA_KEY_PHONENUMBER[] = { 'p','h','o','n','e','n','u','m','b','e','r',0 };
171static const WCHAR DPNA_KEY_PORT[] = { 'p','o','r','t',0 };
Raphael Junqueiradb50e2d2005-12-08 12:00:14 +0100172static const WCHAR DPNA_KEY_PROCESSOR[] = { 'p','r','o','c','e','s','s','o','r',0 };
Francois Gouget299a13822004-06-15 20:24:47 +0000173static const WCHAR DPNA_KEY_PROGRAM[] = { 'p','r','o','g','r','a','m',0 };
174static const WCHAR DPNA_KEY_PROVIDER[] = { 'p','r','o','v','i','d','e','r',0 };
Raphael Junqueiradb50e2d2005-12-08 12:00:14 +0100175static const WCHAR DPNA_KEY_SCOPE[] = { 's','c','o','p','e',0 };
Francois Gouget299a13822004-06-15 20:24:47 +0000176static const WCHAR DPNA_KEY_STOPBITS[] = { 's','t','o','p','b','i','t','s',0 };
Raphael Junqueiradb50e2d2005-12-08 12:00:14 +0100177static const WCHAR DPNA_KEY_TRAVERSALMODE[] = { 't','r','a','v','e','r','s','a','l','m','o','d','e',0 };
Francois Gouget299a13822004-06-15 20:24:47 +0000178static const WCHAR DPNA_STOP_BITS_ONE[] = { '1',0 };
179static const WCHAR DPNA_STOP_BITS_ONE_FIVE[] = { '1','.','5',0 };
180static const WCHAR DPNA_STOP_BITS_TWO[] = { '2',0 };
181static const WCHAR DPNA_PARITY_NONE[] = { 'N','O','N','E',0 };
182static const WCHAR DPNA_PARITY_EVEN[] = { 'E','V','E','N',0 };
183static const WCHAR DPNA_PARITY_ODD[] = { 'O','D','D',0 };
184static const WCHAR DPNA_PARITY_MARK[] = { 'M','A','R','K',0 };
185static const WCHAR DPNA_PARITY_SPACE[] = { 'S','P','A','C','E',0 };
186static const WCHAR DPNA_FLOW_CONTROL_NONE[] = { 'N','O','N','E',0 };
187static const WCHAR DPNA_FLOW_CONTROL_XONXOFF[] = { 'X','O','N','X','O','F','F',0 };
188static const WCHAR DPNA_FLOW_CONTROL_RTS[] = { 'R','T','S',0 };
189static const WCHAR DPNA_FLOW_CONTROL_DTR[] = { 'D','T','R',0 };
190static const WCHAR DPNA_FLOW_CONTROL_RTSDTR[] = { 'R','T','S','D','T','R',0 };
191static const WCHAR DPNA_VALUE_TCPIPPROVIDER[] = { 'I','P',0 };
192static const WCHAR DPNA_VALUE_IPXPROVIDER[] = { 'I','P','X',0 };
193static const WCHAR DPNA_VALUE_MODEMPROVIDER[] = { 'M','O','D','E','M',0 };
194static const WCHAR DPNA_VALUE_SERIALPROVIDER[] = { 'S','E','R','I','A','L',0 };
195
196
197#endif
198
Raphael Junqueirab351e882003-06-30 18:26:13 +0000199#define DPNA_BAUD_RATE_9600 9600
200#define DPNA_BAUD_RATE_14400 14400
201#define DPNA_BAUD_RATE_19200 19200
202#define DPNA_BAUD_RATE_38400 38400
203#define DPNA_BAUD_RATE_56000 56000
204#define DPNA_BAUD_RATE_57600 57600
205#define DPNA_BAUD_RATE_115200 115200
206
207/*****************************************************************************
208 * Predeclare the interfaces
209 */
210DEFINE_GUID(CLSID_DirectPlay8Address, 0x934a9523, 0xa3ca, 0x4bc5, 0xad, 0xa0, 0xd6, 0xd9, 0x5d, 0x97, 0x94, 0x21);
211
212DEFINE_GUID(IID_IDirectPlay8Address, 0x83783300, 0x4063, 0x4c8a, 0x9d, 0xb3, 0x82, 0x83, 0xa, 0x7f, 0xeb, 0x31);
Alexandre Julliardb8d30752005-07-26 18:32:53 +0000213typedef struct IDirectPlay8Address *PDIRECTPLAY8ADDRESS, *LPDIRECTPLAY8ADDRESS;
Raphael Junqueirab351e882003-06-30 18:26:13 +0000214DEFINE_GUID(IID_IDirectPlay8AddressIP, 0xe5a0e990, 0x2bad, 0x430b, 0x87, 0xda, 0xa1, 0x42, 0xcf, 0x75, 0xde, 0x58);
Alexandre Julliardb8d30752005-07-26 18:32:53 +0000215typedef struct IDirectPlay8AddressIP *PDIRECTPLAY8ADDRESSIP, *LPDIRECTPLAY8ADDRESSIP;
Raphael Junqueirab351e882003-06-30 18:26:13 +0000216
217
218/*****************************************************************************
219 * IDirectPlay8Address interface
220 */
221#define INTERFACE IDirectPlay8Address
Alexandre Julliard5d0160e2004-10-05 04:38:15 +0000222DECLARE_INTERFACE_(IDirectPlay8Address,IUnknown)
223{
224 /*** IUnknown methods ***/
225 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
226 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
227 STDMETHOD_(ULONG,Release)(THIS) PURE;
228 /*** IDirectPlay8Address methods ***/
229 STDMETHOD(BuildFromURLW)(THIS_ WCHAR* pwszSourceURL) PURE;
230 STDMETHOD(BuildFromURLA)(THIS_ CHAR* pszSourceURL) PURE;
231 STDMETHOD(Duplicate)(THIS_ PDIRECTPLAY8ADDRESS* ppdpaNewAddress) PURE;
232 STDMETHOD(SetEqual)(THIS_ PDIRECTPLAY8ADDRESS pdpaAddress) PURE;
233 STDMETHOD(IsEqual)(THIS_ PDIRECTPLAY8ADDRESS pdpaAddress) PURE;
234 STDMETHOD(Clear)(THIS) PURE;
235 STDMETHOD(GetURLW)(THIS_ WCHAR* pwszURL, PDWORD pdwNumChars) PURE;
236 STDMETHOD(GetURLA)(THIS_ CHAR* pszURL, PDWORD pdwNumChars) PURE;
237 STDMETHOD(GetSP)(THIS_ GUID* pguidSP) PURE;
238 STDMETHOD(GetUserData)(THIS_ LPVOID pvUserData, PDWORD pdwBufferSize) PURE;
239 STDMETHOD(SetSP)(THIS_ CONST GUID* CONST pguidSP) PURE;
240 STDMETHOD(SetUserData)(THIS_ CONST void* CONST pvUserData, CONST DWORD dwDataSize) PURE;
241 STDMETHOD(GetNumComponents)(THIS_ PDWORD pdwNumComponents) PURE;
242 STDMETHOD(GetComponentByName)(THIS_ CONST WCHAR* CONST pwszName, LPVOID pvBuffer, PDWORD pdwBufferSize, PDWORD pdwDataType) PURE;
243 STDMETHOD(GetComponentByIndex)(THIS_ CONST DWORD dwComponentID, WCHAR* pwszName, PDWORD pdwNameLen, void* pvBuffer, PDWORD pdwBufferSize, PDWORD pdwDataType) PURE;
244 STDMETHOD(AddComponent)(THIS_ CONST WCHAR* CONST pwszName, CONST void* CONST lpvData, CONST DWORD dwDataSize, CONST DWORD dwDataType) PURE;
245 STDMETHOD(GetDevice)(THIS_ GUID* pDevGuid) PURE;
246 STDMETHOD(SetDevice)(THIS_ CONST GUID* CONST devGuid) PURE;
247 STDMETHOD(BuildFromDirectPlay4Address)(THIS_ LPVOID pvAddress, DWORD dwDataSize) PURE;
248};
Raphael Junqueirab351e882003-06-30 18:26:13 +0000249#undef INTERFACE
250
Raphael Junqueira58912492004-04-07 18:59:53 +0000251
Francois Gouget179dc252004-10-04 19:39:32 +0000252#if !defined(__cplusplus) || defined(CINTERFACE)
Raphael Junqueirab351e882003-06-30 18:26:13 +0000253/*** IUnknown methods ***/
254#define IDirectPlay8Address_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
255#define IDirectPlay8Address_AddRef(p) (p)->lpVtbl->AddRef(p)
256#define IDirectPlay8Address_Release(p) (p)->lpVtbl->Release(p)
257/*** IDirectPlay8Address methods ***/
258#define IDirectPlay8Address_BuildFromURLW(p,a) (p)->lpVtbl->BuildFromURLW(p,a)
259#define IDirectPlay8Address_BuildFromURLA(p,a) (p)->lpVtbl->BuildFromURLA(p,a)
260#define IDirectPlay8Address_Duplicate(p,a) (p)->lpVtbl->Duplicate(p,a)
261#define IDirectPlay8Address_SetEqual(p,a) (p)->lpVtbl->SetEqual(p,a)
262#define IDirectPlay8Address_IsEqual(p,a) (p)->lpVtbl->IsEqual(p,a)
263#define IDirectPlay8Address_Clear(p) (p)->lpVtbl->Clear(p)
264#define IDirectPlay8Address_GetURLW(p,a,b) (p)->lpVtbl->GetURLW(p,a,b)
265#define IDirectPlay8Address_GetURLA(p,a,b) (p)->lpVtbl->GetURLA(p,a,b)
266#define IDirectPlay8Address_GetSP(p,a) (p)->lpVtbl->GetSP(p,a)
267#define IDirectPlay8Address_GetUserData(p,a,b) (p)->lpVtbl->GetUserData(p,a,b)
268#define IDirectPlay8Address_SetSP(p,a) (p)->lpVtbl->SetSP(p,a)
269#define IDirectPlay8Address_SetUserData(p,a,b) (p)->lpVtbl->SetUserData(p,a,b)
270#define IDirectPlay8Address_GetNumComponents(p,a) (p)->lpVtbl->GetNumComponents(p,a)
271#define IDirectPlay8Address_GetComponentByName(p,a,b,c,d) (p)->lpVtbl->GetComponentByName(p,a,b,c,d)
272#define IDirectPlay8Address_GetComponentByIndex(p,a,b,c,d,e,f) (p)->lpVtbl->GetComponentByIndex(p,a,b,c,d,e,f)
273#define IDirectPlay8Address_AddComponent(p,a,b,c,d) (p)->lpVtbl->AddComponent(p,a,b,c,d)
274#define IDirectPlay8Address_SetDevice(p,a) (p)->lpVtbl->SetDevice(p,a)
275#define IDirectPlay8Address_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
276#define IDirectPlay8Address_BuildFromDirectPlay4Address(p,a,b) (p)->lpVtbl->BuildFromDirectPlay4Address(p,a,b)
Francois Gouget179dc252004-10-04 19:39:32 +0000277#else
278/*** IUnknown methods ***/
279#define IDirectPlay8Address_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
280#define IDirectPlay8Address_AddRef(p) (p)->AddRef()
281#define IDirectPlay8Address_Release(p) (p)->Release()
282/*** IDirectPlay8Address methods ***/
283#define IDirectPlay8Address_BuildFromURLW(p,a) (p)->BuildFromURLW(a)
284#define IDirectPlay8Address_BuildFromURLA(p,a) (p)->BuildFromURLA(a)
285#define IDirectPlay8Address_Duplicate(p,a) (p)->Duplicate(a)
286#define IDirectPlay8Address_SetEqual(p,a) (p)->SetEqual(a)
287#define IDirectPlay8Address_IsEqual(p,a) (p)->IsEqual(a)
288#define IDirectPlay8Address_Clear(p) (p)->Clear()
289#define IDirectPlay8Address_GetURLW(p,a,b) (p)->GetURLW(a,b)
290#define IDirectPlay8Address_GetURLA(p,a,b) (p)->GetURLA(a,b)
291#define IDirectPlay8Address_GetSP(p,a) (p)->GetSP(a)
292#define IDirectPlay8Address_GetUserData(p,a,b) (p)->GetUserData(a,b)
293#define IDirectPlay8Address_SetSP(p,a) (p)->SetSP(a)
294#define IDirectPlay8Address_SetUserData(p,a,b) (p)->SetUserData(a,b)
295#define IDirectPlay8Address_GetNumComponents(p,a) (p)->GetNumComponents(a)
296#define IDirectPlay8Address_GetComponentByName(p,a,b,c,d) (p)->GetComponentByName(a,b,c,d)
297#define IDirectPlay8Address_GetComponentByIndex(p,a,b,c,d,e,f) (p)->GetComponentByIndex(a,b,c,d,e,f)
298#define IDirectPlay8Address_AddComponent(p,a,b,c,d) (p)->AddComponent(a,b,c,d)
299#define IDirectPlay8Address_SetDevice(p,a) (p)->SetDevice(a)
300#define IDirectPlay8Address_GetDevice(p,a) (p)->GetDevice(a)
301#define IDirectPlay8Address_BuildFromDirectPlay4Address(p,a,b) (p)->BuildFromDirectPlay4Address(a,b)
Raphael Junqueirab351e882003-06-30 18:26:13 +0000302#endif
303
304/*****************************************************************************
305 * IDirectPlay8AddressIP interface
306 */
307#define INTERFACE IDirectPlay8AddressIP
Alexandre Julliard5d0160e2004-10-05 04:38:15 +0000308DECLARE_INTERFACE_(IDirectPlay8AddressIP,IUnknown)
309{
310 /*** IUnknown methods ***/
311 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
312 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
313 STDMETHOD_(ULONG,Release)(THIS) PURE;
314 /*** IDirectPlay8AddressIP methods ***/
315 STDMETHOD(BuildFromSockAddr)(THIS_ CONST SOCKADDR* CONST pSockAddr) PURE;
316 STDMETHOD(BuildAddress)(THIS_ CONST WCHAR* CONST wszAddress, CONST USHORT usPort) PURE;
317 STDMETHOD(BuildLocalAddress)(THIS_ CONST GUID* CONST pguidAdapter, CONST USHORT usPort) PURE;
318 STDMETHOD(GetSockAddress)(THIS_ SOCKADDR* pSockAddr, PDWORD) PURE;
319 STDMETHOD(GetLocalAddress)(THIS_ GUID* pguidAdapter, USHORT* pusPort) PURE;
320 STDMETHOD(GetAddress)(THIS_ WCHAR* wszAddress, PDWORD pdwAddressLength, USHORT* psPort) PURE;
321};
Raphael Junqueirab351e882003-06-30 18:26:13 +0000322#undef INTERFACE
323
Francois Gouget179dc252004-10-04 19:39:32 +0000324#if !defined(__cplusplus) || defined(CINTERFACE)
325/*** IUnknown methods ***/
326#define IDirectPlay8AddressIP_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(a,b)
327#define IDirectPlay8AddressIP_AddRef(p) (p)->lpVtbl->AddRef()
328#define IDirectPlay8AddressIP_Release(p) (p)->lpVtbl->Release()
329/*** IDirectPlay8AddressIP methods ***/
330#define IDirectPlay8AddressIP_BuildFromSockAddr(p,a) (p)->lpVtbl->BuildFromSockAddr(a)
331#define IDirectPlay8AddressIP_BuildAddress(p,a,b) (p)->lpVtbl->BuildAddress(a,b)
332#define IDirectPlay8AddressIP_BuildLocalAddress(p,a,b) (p)->lpVtbl->BuildLocalAddress(a,b)
333#define IDirectPlay8AddressIP_GetSockAddress(p,a,b) (p)->lpVtbl->GetSockAddress(a,b)
334#define IDirectPlay8AddressIP_GetLocalAddress(p,a,b) (p)->lpVtbl->GetLocalAddress(a,b)
335#define IDirectPlay8AddressIP_GetAddress(p,a,b,c) (p)->lpVtbl->GetAddress(a,b,c)
336#else
Raphael Junqueirab351e882003-06-30 18:26:13 +0000337/*** IUnknown methods ***/
338#define IDirectPlay8AddressIP_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
339#define IDirectPlay8AddressIP_AddRef(p) (p)->AddRef()
340#define IDirectPlay8AddressIP_Release(p) (p)->Release()
341/*** IDirectPlay8AddressIP methods ***/
342#define IDirectPlay8AddressIP_BuildFromSockAddr(p,a) (p)->BuildFromSockAddr(a)
343#define IDirectPlay8AddressIP_BuildAddress(p,a,b) (p)->BuildAddress(a,b)
344#define IDirectPlay8AddressIP_BuildLocalAddress(p,a,b) (p)->BuildLocalAddress(a,b)
345#define IDirectPlay8AddressIP_GetSockAddress(p,a,b) (p)->GetSockAddress(a,b)
346#define IDirectPlay8AddressIP_GetLocalAddress(p,a,b) (p)->GetLocalAddress(a,b)
347#define IDirectPlay8AddressIP_GetAddress(p,a,b,c) (p)->GetAddress(a,b,c)
348#endif
349
Raphael Junqueiradb50e2d2005-12-08 12:00:14 +0100350/* Export functions */
351
352HRESULT WINAPI DirectPlay8AddressCreate(CONST GUID* pcIID, LPVOID* ppvInterface, IUnknown* pUnknown);
353
Raphael Junqueirab351e882003-06-30 18:26:13 +0000354#ifdef __cplusplus
355}
356#endif
357
358#endif