2 * Copyright (C) 2003 Raphael Junqueira
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef __WINE_DPLAY8_DPADDR_H
20 #define __WINE_DPLAY8_DPADDR_H
27 #endif /* defined(__cplusplus) */
30 typedef struct sockaddr SOCKADDR
;
32 /*****************************************************************************
33 * DirectPlay8Addr defines
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
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 '%'
51 #define DPNA_HEADER L"x-directplay:/"
52 #define DPNA_HEADER_A "x-directplay:/"
53 #define DPNA_KEY_APPLICATION_INSTANCE L"applicationinstance"
54 #define DPNA_KEY_APPLICATION_INSTANCE_A "applicationinstance"
55 #define DPNA_KEY_BAUD L"baud"
56 #define DPNA_KEY_BAUD_A "baud"
57 #define DPNA_KEY_DEVICE L"device"
58 #define DPNA_KEY_DEVICE_A "device"
59 #define DPNA_KEY_FLOWCONTROL L"flowcontrol"
60 #define DPNA_KEY_FLOWCONTROL_A "flowcontrol"
61 #define DPNA_KEY_HOSTNAME L"hostname"
62 #define DPNA_KEY_HOSTNAME_A "hostname"
63 #define DPNA_KEY_PARITY L"parity"
64 #define DPNA_KEY_PARITY_A "parity"
65 #define DPNA_KEY_PHONENUMBER L"phonenumber"
66 #define DPNA_KEY_PHONENUMBER_A "phonenumber"
67 #define DPNA_KEY_PORT L"port"
68 #define DPNA_KEY_PORT_A "port"
69 #define DPNA_KEY_PROGRAM L"program"
70 #define DPNA_KEY_PROGRAM_A "program"
71 #define DPNA_KEY_PROVIDER L"provider"
72 #define DPNA_KEY_PROVIDER_A "provider"
73 #define DPNA_KEY_STOPBITS L"stopbits"
74 #define DPNA_KEY_STOPBITS_A "stopbits"
75 #define DPNA_STOP_BITS_ONE L"1"
76 #define DPNA_STOP_BITS_ONE_A "1"
77 #define DPNA_STOP_BITS_ONE_FIVE L"1.5"
78 #define DPNA_STOP_BITS_ONE_FIVE_A "1.5"
79 #define DPNA_STOP_BITS_TWO L"2"
80 #define DPNA_STOP_BITS_TWO_A "2"
81 #define DPNA_PARITY_NONE L"NONE"
82 #define DPNA_PARITY_NONE_A "NONE"
83 #define DPNA_PARITY_EVEN L"EVEN"
84 #define DPNA_PARITY_EVEN_A "EVEN"
85 #define DPNA_PARITY_ODD L"ODD"
86 #define DPNA_PARITY_ODD_A "ODD"
87 #define DPNA_PARITY_MARK L"MARK"
88 #define DPNA_PARITY_MARK_A "MARK"
89 #define DPNA_PARITY_SPACE L"SPACE"
90 #define DPNA_PARITY_SPACE_A "SPACE"
91 #define DPNA_FLOW_CONTROL_NONE L"NONE"
92 #define DPNA_FLOW_CONTROL_NONE_A "NONE"
93 #define DPNA_FLOW_CONTROL_XONXOFF L"XONXOFF"
94 #define DPNA_FLOW_CONTROL_XONXOFF_A "XONXOFF"
95 #define DPNA_FLOW_CONTROL_RTS L"RTS"
96 #define DPNA_FLOW_CONTROL_RTS_A "RTS"
97 #define DPNA_FLOW_CONTROL_DTR L"DTR"
98 #define DPNA_FLOW_CONTROL_DTR_A "DTR"
99 #define DPNA_FLOW_CONTROL_RTSDTR L"RTSDTR"
100 #define DPNA_FLOW_CONTROL_RTSDTR_A "RTSDTR"
101 #define DPNA_VALUE_TCPIPPROVIDER L"IP"
102 #define DPNA_VALUE_TCPIPPROVIDER_A "IP"
103 #define DPNA_VALUE_IPXPROVIDER L"IPX"
104 #define DPNA_VALUE_IPXPROVIDER_A "IPX"
105 #define DPNA_VALUE_MODEMPROVIDER L"MODEM"
106 #define DPNA_VALUE_MODEMPROVIDER_A "MODEM"
107 #define DPNA_VALUE_SERIALPROVIDER L"SERIAL"
108 #define DPNA_VALUE_SERIALPROVIDER_A "SERIAL"
110 #define DPNA_BAUD_RATE_9600 9600
111 #define DPNA_BAUD_RATE_14400 14400
112 #define DPNA_BAUD_RATE_19200 19200
113 #define DPNA_BAUD_RATE_38400 38400
114 #define DPNA_BAUD_RATE_56000 56000
115 #define DPNA_BAUD_RATE_57600 57600
116 #define DPNA_BAUD_RATE_115200 115200
118 /*****************************************************************************
119 * Predeclare the interfaces
121 DEFINE_GUID(CLSID_DirectPlay8Address
, 0x934a9523, 0xa3ca, 0x4bc5, 0xad, 0xa0, 0xd6, 0xd9, 0x5d, 0x97, 0x94, 0x21);
123 DEFINE_GUID(IID_IDirectPlay8Address
, 0x83783300, 0x4063, 0x4c8a, 0x9d, 0xb3, 0x82, 0x83, 0xa, 0x7f, 0xeb, 0x31);
124 typedef struct IDirectPlay8Address IDirectPlay8Address
, *PDIRECTPLAY8ADDRESS
, *LPDIRECTPLAY8ADDRESS
;
125 DEFINE_GUID(IID_IDirectPlay8AddressIP
, 0xe5a0e990, 0x2bad, 0x430b, 0x87, 0xda, 0xa1, 0x42, 0xcf, 0x75, 0xde, 0x58);
126 typedef struct IDirectPlay8AddressIP IDirectPlay8AddressIP
, *PDIRECTPLAY8ADDRESSIP
, *LPDIRECTPLAY8ADDRESSIP
;
129 /*****************************************************************************
130 * IDirectPlay8Address interface
132 #define INTERFACE IDirectPlay8Address
133 #define IDirectPlay8Address_METHODS \
135 STDMETHOD(BuildFromURLW)(THIS_ WCHAR* pwszSourceURL) PURE; \
136 STDMETHOD(BuildFromURLA)(THIS_ CHAR* pszSourceURL) PURE; \
137 STDMETHOD(Duplicate)(THIS_ PDIRECTPLAY8ADDRESS* ppdpaNewAddress) PURE; \
138 STDMETHOD(SetEqual)(THIS_ PDIRECTPLAY8ADDRESS pdpaAddress) PURE; \
139 STDMETHOD(IsEqual)(THIS_ PDIRECTPLAY8ADDRESS pdpaAddress) PURE; \
140 STDMETHOD(Clear)(THIS) PURE; \
141 STDMETHOD(GetURLW)(THIS_ WCHAR* pwszURL, PDWORD pdwNumChars) PURE; \
142 STDMETHOD(GetURLA)(THIS_ CHAR* pszURL, PDWORD pdwNumChars) PURE; \
143 STDMETHOD(GetSP)(THIS_ GUID* pguidSP) PURE; \
144 STDMETHOD(GetUserData)(THIS_ LPVOID pvUserData, PDWORD pdwBufferSize) PURE; \
145 STDMETHOD(SetSP)(THIS_ CONST GUID* CONST pguidSP) PURE; \
146 STDMETHOD(SetUserData)(THIS_ CONST void* CONST pvUserData, CONST DWORD dwDataSize) PURE; \
147 STDMETHOD(GetNumComponents)(THIS_ PDWORD pdwNumComponents) PURE; \
148 STDMETHOD(GetComponentByName)(THIS_ CONST WCHAR* CONST pwszName, LPVOID pvBuffer, PDWORD pdwBufferSize, PDWORD pdwDataType) PURE; \
149 STDMETHOD(GetComponentByIndex)(THIS_ CONST DWORD dwComponentID, WCHAR* pwszName, PDWORD pdwNameLen, void* pvBuffer, PDWORD pdwBufferSize, PDWORD pdwDataType) PURE; \
150 STDMETHOD(AddComponent)(THIS_ CONST WCHAR* CONST pwszName, CONST void* CONST lpvData, CONST DWORD dwDataSize, CONST DWORD dwDataType) PURE; \
151 STDMETHOD(GetDevice)(THIS_ GUID* pDevGuid) PURE; \
152 STDMETHOD(SetDevice)(THIS_ CONST GUID* CONST devGuid) PURE; \
153 STDMETHOD(BuildFromDirectPlay4Address)(THIS_ LPVOID pvAddress, DWORD dwDataSize) PURE;
154 ICOM_DEFINE(IDirectPlay8Address
,IUnknown
)
159 /*** IUnknown methods ***/
160 #define IDirectPlay8Address_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
161 #define IDirectPlay8Address_AddRef(p) (p)->lpVtbl->AddRef(p)
162 #define IDirectPlay8Address_Release(p) (p)->lpVtbl->Release(p)
163 /*** IDirectPlay8Address methods ***/
164 #define IDirectPlay8Address_BuildFromURLW(p,a) (p)->lpVtbl->BuildFromURLW(p,a)
165 #define IDirectPlay8Address_BuildFromURLA(p,a) (p)->lpVtbl->BuildFromURLA(p,a)
166 #define IDirectPlay8Address_Duplicate(p,a) (p)->lpVtbl->Duplicate(p,a)
167 #define IDirectPlay8Address_SetEqual(p,a) (p)->lpVtbl->SetEqual(p,a)
168 #define IDirectPlay8Address_IsEqual(p,a) (p)->lpVtbl->IsEqual(p,a)
169 #define IDirectPlay8Address_Clear(p) (p)->lpVtbl->Clear(p)
170 #define IDirectPlay8Address_GetURLW(p,a,b) (p)->lpVtbl->GetURLW(p,a,b)
171 #define IDirectPlay8Address_GetURLA(p,a,b) (p)->lpVtbl->GetURLA(p,a,b)
172 #define IDirectPlay8Address_GetSP(p,a) (p)->lpVtbl->GetSP(p,a)
173 #define IDirectPlay8Address_GetUserData(p,a,b) (p)->lpVtbl->GetUserData(p,a,b)
174 #define IDirectPlay8Address_SetSP(p,a) (p)->lpVtbl->SetSP(p,a)
175 #define IDirectPlay8Address_SetUserData(p,a,b) (p)->lpVtbl->SetUserData(p,a,b)
176 #define IDirectPlay8Address_GetNumComponents(p,a) (p)->lpVtbl->GetNumComponents(p,a)
177 #define IDirectPlay8Address_GetComponentByName(p,a,b,c,d) (p)->lpVtbl->GetComponentByName(p,a,b,c,d)
178 #define IDirectPlay8Address_GetComponentByIndex(p,a,b,c,d,e,f) (p)->lpVtbl->GetComponentByIndex(p,a,b,c,d,e,f)
179 #define IDirectPlay8Address_AddComponent(p,a,b,c,d) (p)->lpVtbl->AddComponent(p,a,b,c,d)
180 #define IDirectPlay8Address_SetDevice(p,a) (p)->lpVtbl->SetDevice(p,a)
181 #define IDirectPlay8Address_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a)
182 #define IDirectPlay8Address_BuildFromDirectPlay4Address(p,a,b) (p)->lpVtbl->BuildFromDirectPlay4Address(p,a,b)
185 /*****************************************************************************
186 * IDirectPlay8AddressIP interface
188 #define INTERFACE IDirectPlay8AddressIP
189 #define IDirectPlay8AddressIP_METHODS \
191 STDMETHOD(BuildFromSockAddr)(THIS_ CONST SOCKADDR* CONST pSockAddr) PURE; \
192 STDMETHOD(BuildAddress)(THIS_ CONST WCHAR* CONST wszAddress, CONST USHORT usPort) PURE; \
193 STDMETHOD(BuildLocalAddress)(THIS_ CONST GUID* CONST pguidAdapter, CONST USHORT usPort) PURE; \
194 STDMETHOD(GetSockAddress)(THIS_ SOCKADDR* pSockAddr, PDWORD) PURE; \
195 STDMETHOD(GetLocalAddress)(THIS_ GUID* pguidAdapter, USHORT* pusPort) PURE; \
196 STDMETHOD(GetAddress)(THIS_ WCHAR* wszAddress, PDWORD pdwAddressLength, USHORT* psPort) PURE;
197 ICOM_DEFINE(IDirectPlay8AddressIP
,IUnknown
)
201 /*** IUnknown methods ***/
202 #define IDirectPlay8AddressIP_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
203 #define IDirectPlay8AddressIP_AddRef(p) (p)->AddRef()
204 #define IDirectPlay8AddressIP_Release(p) (p)->Release()
205 /*** IDirectPlay8AddressIP methods ***/
206 #define IDirectPlay8AddressIP_BuildFromSockAddr(p,a) (p)->BuildFromSockAddr(a)
207 #define IDirectPlay8AddressIP_BuildAddress(p,a,b) (p)->BuildAddress(a,b)
208 #define IDirectPlay8AddressIP_BuildLocalAddress(p,a,b) (p)->BuildLocalAddress(a,b)
209 #define IDirectPlay8AddressIP_GetSockAddress(p,a,b) (p)->GetSockAddress(a,b)
210 #define IDirectPlay8AddressIP_GetLocalAddress(p,a,b) (p)->GetLocalAddress(a,b)
211 #define IDirectPlay8AddressIP_GetAddress(p,a,b,c) (p)->GetAddress(a,b,c)