wined3d: Rename WINED3D_MAX_TEXTURES to WINED3D_MAX_FFP_TEXTURES.
[wine.git] / include / dplobby8.h
blob9adabebeba7ee10ab25ac7362702d602600941fe
1 /*
2 * Copyright (C) 2003-2005 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __WINE_DPLOBBY8_H
20 #define __WINE_DPLOBBY8_H
22 #include <ole2.h>
24 #ifdef __cplusplus
25 extern "C" {
26 #endif /* defined(__cplusplus) */
28 /*****************************************************************************
29 * DirectPlay8Lobby defines
31 #define DPL_MSGID_LOBBY 0x8000
32 #define DPL_MSGID_RECEIVE (0x0001 | DPL_MSGID_LOBBY)
33 #define DPL_MSGID_CONNECT (0x0002 | DPL_MSGID_LOBBY)
34 #define DPL_MSGID_DISCONNECT (0x0003 | DPL_MSGID_LOBBY)
35 #define DPL_MSGID_SESSION_STATUS (0x0004 | DPL_MSGID_LOBBY)
36 #define DPL_MSGID_CONNECTION_SETTINGS (0x0005 | DPL_MSGID_LOBBY)
37 #define DPLHANDLE_ALLCONNECTIONS 0xFFFFFFFF
38 #define DPLSESSION_CONNECTED 0x0001
39 #define DPLSESSION_COULDNOTCONNECT 0x0002
40 #define DPLSESSION_DISCONNECTED 0x0003
41 #define DPLSESSION_TERMINATED 0x0004
42 #define DPLSESSION_HOSTMIGRATED 0x0005
43 #define DPLSESSION_HOSTMIGRATEDHERE 0x0006
44 #define DPLAVAILABLE_ALLOWMULTIPLECONNECT 0x0001
45 #define DPLCONNECT_LAUNCHNEW 0x0001
46 #define DPLCONNECT_LAUNCHNOTFOUND 0x0002
47 #define DPLCONNECTSETTINGS_HOST 0x0001
48 #define DPLINITIALIZE_DISABLEPARAMVAL 0x0001
50 /*****************************************************************************
51 * DirectPlay8Lobby structures Typedefs
53 typedef struct _DPL_APPLICATION_INFO {
54 GUID guidApplication;
55 PWSTR pwszApplicationName;
56 DWORD dwNumRunning;
57 DWORD dwNumWaiting;
58 DWORD dwFlags;
59 } DPL_APPLICATION_INFO, *PDPL_APPLICATION_INFO;
61 typedef struct _DPL_CONNECTION_SETTINGS {
62 DWORD dwSize;
63 DWORD dwFlags;
64 DPN_APPLICATION_DESC dpnAppDesc;
65 IDirectPlay8Address* pdp8HostAddress;
66 IDirectPlay8Address** ppdp8DeviceAddresses;
67 DWORD cNumDeviceAddresses;
68 PWSTR pwszPlayerName;
69 } DPL_CONNECTION_SETTINGS, *PDPL_CONNECTION_SETTINGS;
71 typedef struct _DPL_CONNECT_INFO {
72 DWORD dwSize;
73 DWORD dwFlags;
74 GUID guidApplication;
75 PDPL_CONNECTION_SETTINGS pdplConnectionSettings;
76 PVOID pvLobbyConnectData;
77 DWORD dwLobbyConnectDataSize;
78 } DPL_CONNECT_INFO, *PDPL_CONNECT_INFO;
80 typedef struct _DPL_PROGRAM_DESC {
81 DWORD dwSize;
82 DWORD dwFlags;
83 GUID guidApplication;
84 PWSTR pwszApplicationName;
85 PWSTR pwszCommandLine;
86 PWSTR pwszCurrentDirectory;
87 PWSTR pwszDescription;
88 PWSTR pwszExecutableFilename;
89 PWSTR pwszExecutablePath;
90 PWSTR pwszLauncherFilename;
91 PWSTR pwszLauncherPath;
92 } DPL_PROGRAM_DESC, *PDPL_PROGRAM_DESC;
94 typedef struct _DPL_MESSAGE_CONNECT {
95 DWORD dwSize;
96 DPNHANDLE hConnectId;
97 PDPL_CONNECTION_SETTINGS pdplConnectionSettings;
98 PVOID pvLobbyConnectData;
99 DWORD dwLobbyConnectDataSize;
100 PVOID pvConnectionContext;
101 } DPL_MESSAGE_CONNECT, *PDPL_MESSAGE_CONNECT;
103 typedef struct _DPL_MESSAGE_CONNECTION_SETTINGS {
104 DWORD dwSize;
105 DPNHANDLE hSender;
106 PDPL_CONNECTION_SETTINGS pdplConnectionSettings;
107 PVOID pvConnectionContext;
108 } DPL_MESSAGE_CONNECTION_SETTINGS, *PDPL_MESSAGE_CONNECTION_SETTINGS;
110 typedef struct _DPL_MESSAGE_DISCONNECT {
111 DWORD dwSize;
112 DPNHANDLE hDisconnectId;
113 HRESULT hrReason;
114 PVOID pvConnectionContext;
115 } DPL_MESSAGE_DISCONNECT, *PDPL_MESSAGE_DISCONNECT;
117 typedef struct _DPL_MESSAGE_RECEIVE {
118 DWORD dwSize;
119 DPNHANDLE hSender;
120 BYTE* pBuffer;
121 DWORD dwBufferSize;
122 PVOID pvConnectionContext;
123 } DPL_MESSAGE_RECEIVE, *PDPL_MESSAGE_RECEIVE;
125 typedef struct _DPL_MESSAGE_SESSION_STATUS {
126 DWORD dwSize;
127 DPNHANDLE hSender;
128 DWORD dwStatus;
129 PVOID pvConnectionContext;
130 } DPL_MESSAGE_SESSION_STATUS, *PDPL_MESSAGE_SESSION_STATUS;
132 /*****************************************************************************
133 * Predeclare the interfaces
135 DEFINE_GUID(CLSID_DirectPlay8LobbiedApplication, 0x667955ad,0x6b3b,0x43ca,0xb9,0x49,0xbc,0x69,0xb5,0xba,0xff,0x7f);
136 DEFINE_GUID(CLSID_DirectPlay8LobbyClient, 0x3b2b6775,0x70b6,0x45af,0x8d,0xea,0xa2,0x09,0xc6,0x95,0x59,0xf3);
138 DEFINE_GUID(IID_IDirectPlay8LobbiedApplication, 0x819074a3,0x16c,0x11d3,0xae,0x14,0x00,0x60,0x97,0xb0,0x14,0x11);
139 typedef struct IDirectPlay8LobbiedApplication *PDIRECTPLAY8LOBBIEDAPPLICATION;
140 DEFINE_GUID(IID_IDirectPlay8LobbyClient, 0x819074a2,0x16c,0x11d3,0xae,0x14,0x00,0x60,0x97,0xb0,0x14,0x11);
141 typedef struct IDirectPlay8LobbyClient *PDIRECTPLAY8LOBBYCLIENT;
143 /*****************************************************************************
144 * IDirectPlay8LobbiedApplication interface
146 #define INTERFACE IDirectPlay8LobbiedApplication
147 DECLARE_INTERFACE_(IDirectPlay8LobbiedApplication,IUnknown)
149 /*** IUnknown methods ***/
150 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
151 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
152 STDMETHOD_(ULONG,Release)(THIS) PURE;
153 /*** IDirectPlay8LobbiedApplication methods ***/
154 STDMETHOD(Initialize)(THIS_ PVOID pvUserContext, PFNDPNMESSAGEHANDLER pfn, DPNHANDLE* pdpnhConnection, DWORD dwFlags) PURE;
155 STDMETHOD(RegisterProgram)(THIS_ PDPL_PROGRAM_DESC pdplProgramDesc, DWORD dwFlags) PURE;
156 STDMETHOD(UnRegisterProgram)(THIS_ GUID* pguidApplication, DWORD dwFlags) PURE;
157 STDMETHOD(Send)(THIS_ DPNHANDLE hConnection, BYTE* pBuffer, DWORD pBufferSize, DWORD dwFlags) PURE;
158 STDMETHOD(SetAppAvailable)(THIS_ BOOL fAvailable, DWORD dwFlags) PURE;
159 STDMETHOD(UpdateStatus)(THIS_ DPNHANDLE hConnection, DWORD dwStatus, DWORD dwFlags) PURE;
160 STDMETHOD(Close)(THIS_ DWORD dwFlags) PURE;
161 STDMETHOD(GetConnectionSettings)(THIS_ DPNHANDLE hConnection, DPL_CONNECTION_SETTINGS* pdplSessionInfo, DWORD* pdwInfoSize, DWORD dwFlags) PURE;
162 STDMETHOD(SetConnectionSettings)(THIS_ DPNHANDLE hConnection, const DPL_CONNECTION_SETTINGS* pdplSessionInfo, DWORD dwFlags) PURE;
164 #undef INTERFACE
166 #if !defined(__cplusplus) || defined(CINTERFACE)
167 /*** IUnknown methods ***/
168 #define IDirectPlay8LobbiedApplication_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
169 #define IDirectPlay8LobbiedApplication_AddRef(p) (p)->lpVtbl->AddRef(p)
170 #define IDirectPlay8LobbiedApplication_Release(p) (p)->lpVtbl->Release(p)
171 /*** IDirectPlay8LobbiedApplication methods ***/
172 #define IDirectPlay8LobbiedApplication_Initialize(p,a,b,c,d) (p)->lpVtbl->Initialize(p,a,b,c,d)
173 #define IDirectPlay8LobbiedApplication_RegisterProgram(p,a,b) (p)->lpVtbl->RegisterProgram(p,a,b)
174 #define IDirectPlay8LobbiedApplication_UnRegisterProgram(p,a,b) (p)->lpVtbl->UnRegisterProgram(p,a,b)
175 #define IDirectPlay8LobbiedApplication_Send(p,a,b,c,d) (p)->lpVtbl->Send(p,a,b,c,d)
176 #define IDirectPlay8LobbiedApplication_SetAppAvailable(p,a,b) (p)->lpVtbl->SetAppAvailable(p,a,b)
177 #define IDirectPlay8LobbiedApplication_UpdateStatus(p,a,b,c) (p)->lpVtbl->UpdateStatus(p,a,b,c)
178 #define IDirectPlay8LobbiedApplication_Close(p,a) (p)->lpVtbl->Close(p,a)
179 #define IDirectPlay8LobbiedApplication_GetConnectionSettings(p,a,b,c,d) (p)->lpVtbl->GetConnectionSettings(p,a,b,c,d)
180 #define IDirectPlay8LobbiedApplication_SetConnectionSettings(p,a,b,c) (p)->lpVtbl->SetConnectionSettings(p,a,b,c)
181 #else
182 /*** IUnknown methods ***/
183 #define IDirectPlay8LobbiedApplication_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
184 #define IDirectPlay8LobbiedApplication_AddRef(p) (p)->AddRef()
185 #define IDirectPlay8LobbiedApplication_Release(p) (p)->Release()
186 /*** IDirectPlay8LobbiedApplication methods ***/
187 #define IDirectPlay8LobbiedApplication_Initialize(p,a,b,c,d) (p)->Initialize(a,b,c,d)
188 #define IDirectPlay8LobbiedApplication_RegisterProgram(p,a,b) (p)->RegisterProgram(a,b)
189 #define IDirectPlay8LobbiedApplication_UnRegisterProgram(p,a,b) (p)->UnRegisterProgram(a,b)
190 #define IDirectPlay8LobbiedApplication_Send(p,a,b,c,d) (p)->Send(a,b,c,d)
191 #define IDirectPlay8LobbiedApplication_SetAppAvailable(p,a,b) (p)->SetAppAvailable(a,b)
192 #define IDirectPlay8LobbiedApplication_UpdateStatus(p,a,b,c) (p)->UpdateStatus(a,b,c)
193 #define IDirectPlay8LobbiedApplication_Close(p,a) (p)->Close(a)
194 #define IDirectPlay8LobbiedApplication_GetConnectionSettings(p,a,b,c,d) (p)->GetConnectionSettings(a,b,c,d)
195 #define IDirectPlay8LobbiedApplication_SetConnectionSettings(p,a,b,c) (p)->SetConnectionSettings(a,b,c)
196 #endif
198 /*****************************************************************************
199 * IDirectPlay8LobbyClient interface
201 #define INTERFACE IDirectPlay8LobbyClient
202 DECLARE_INTERFACE_(IDirectPlay8LobbyClient,IUnknown)
204 /*** IUnknown methods ***/
205 STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
206 STDMETHOD_(ULONG,AddRef)(THIS) PURE;
207 STDMETHOD_(ULONG,Release)(THIS) PURE;
208 /*** IDirectPlay8LobbyClient methods ***/
209 STDMETHOD(Initialize)(THIS_ PVOID pvUserContext, PFNDPNMESSAGEHANDLER pfn, DWORD dwFlags) PURE;
210 STDMETHOD(EnumLocalPrograms)(THIS_ GUID* pGuidApplication, BYTE* pEnumData, DWORD* pdwEnumData, DWORD* pdwItems, DWORD dwFlags) PURE;
211 STDMETHOD(ConnectApplication)(THIS_ DPL_CONNECT_INFO* pdplConnectionInfo, PVOID pvConnectionContext, DPNHANDLE* hApplication, DWORD dwTimeOut, DWORD dwFlags) PURE;
212 STDMETHOD(Send)(THIS_ DPNHANDLE hConnection, BYTE* pBuffer, DWORD pBufferSize, DWORD dwFlags) PURE;
213 STDMETHOD(ReleaseApplication)(THIS_ DPNHANDLE hConnection, DWORD dwFlags) PURE;
214 STDMETHOD(Close)(THIS_ DWORD dwFlags) PURE;
215 STDMETHOD(GetConnectionSettings)(THIS_ DPNHANDLE hConnection, DPL_CONNECTION_SETTINGS* pdplSessionInfo, DWORD* pdwInfoSize, DWORD dwFlags) PURE;
216 STDMETHOD(SetConnectionSettings)(THIS_ DPNHANDLE hConnection, const DPL_CONNECTION_SETTINGS* pdplSessionInfo, DWORD dwFlags) PURE;
218 #undef INTERFACE
220 #if !defined(__cplusplus) || defined(CINTERFACE)
221 /*** IUnknown methods ***/
222 #define IDirectPlay8LobbyClient_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
223 #define IDirectPlay8LobbyClient_AddRef(p) (p)->lpVtbl->AddRef(p)
224 #define IDirectPlay8LobbyClient_Release(p) (p)->lpVtbl->Release(p)
225 /*** IDirectPlay8LobbyClient methods ***/
226 #define IDirectPlay8LobbyClient_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c)
227 #define IDirectPlay8LobbyClient_EnumLocalPrograms(p,a,b,c,d,e) (p)->lpVtbl->EnumLocalPrograms(p,a,b,c,d,e)
228 #define IDirectPlay8LobbyClient_ConnectApplication(p,a,b,c,d,e) (p)->lpVtbl->ConnectApplication(p,a,b,c,d,e)
229 #define IDirectPlay8LobbyClient_Send(p,a,b,c,d) (p)->lpVtbl->Send(p,a,b,c,d)
230 #define IDirectPlay8LobbyClient_ReleaseApplication(p,a,b) (p)->lpVtbl->ReleaseApplication(p,a,b)
231 #define IDirectPlay8LobbyClient_Close(p,a) (p)->lpVtbl->Close(p,a)
232 #define IDirectPlay8LobbyClient_GetConnectionSettings(p,a,b,c,d) (p)->lpVtbl->GetConnectionSettings(p,a,b,c,d)
233 #define IDirectPlay8LobbyClient_SetConnectionSettings(p,a,b,c) (p)->lpVtbl->SetConnectionSettings(p,a,b,c)
234 #else
235 /*** IUnknown methods ***/
236 #define IDirectPlay8LobbyClient_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
237 #define IDirectPlay8LobbyClient_AddRef(p) (p)->AddRef()
238 #define IDirectPlay8LobbyClient_Release(p) (p)->Release()
239 /*** IDirectPlay8LobbyClient methods ***/
240 #define IDirectPlay8LobbyClient_Initialize(p,a,b,c) (p)->Initialize(a,b,c)
241 #define IDirectPlay8LobbyClient_EnumLocalPrograms(p,a,b,c,d,e) (p)->EnumLocalPrograms(a,b,c,d,e)
242 #define IDirectPlay8LobbyClient_ConnectApplication(p,a,b,c,d,e) (p)->ConnectApplication(a,b,c,d,e)
243 #define IDirectPlay8LobbyClient_Send(p,a,b,c,d) (p)->Send(a,b,c,d)
244 #define IDirectPlay8LobbyClient_ReleaseApplication(p,a,b) (p)->ReleaseApplication(a,b)
245 #define IDirectPlay8LobbyClient_Close(p,a) (p)->Close(a)
246 #define IDirectPlay8LobbyClient_GetConnectionSettings(p,a,b,c,d) (p)->GetConnectionSettings(a,b,c,d)
247 #define IDirectPlay8LobbyClient_SetConnectionSettings(p,a,b,c) (p)->SetConnectionSettings(a,b,c)
248 #endif
251 /* Export functions */
253 HRESULT WINAPI DirectPlay8LobbyCreate(const GUID* pcIID, LPVOID* ppvInterface, IUnknown* pUnknown);
255 #ifdef __cplusplus
257 #endif
259 #endif