setupapi: Implement SetupDiGetINFClassA on top of SetupDiGetINFClassW.
[wine] / include / dplobby8.h
1 /*
2  * Copyright (C) 2003-2005 Raphael Junqueira
3  *
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
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17  */
18
19 #ifndef __WINE_DPLOBBY8_H
20 #define __WINE_DPLOBBY8_H
21
22 #include <ole2.h>
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif /* defined(__cplusplus) */
27
28 /*****************************************************************************
29  * DirectPlay8Lobby defines
30  */
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
49
50 /*****************************************************************************
51  * DirectPlay8Lobby structures Typedefs
52  */
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;
60
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;
70
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;
79
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;
93
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;
102
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;
109
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;
116
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;
124
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;
131
132 /*****************************************************************************
133  * Predeclare the interfaces
134  */
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);
137
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;
142
143 /*****************************************************************************
144  * IDirectPlay8LobbiedApplication interface
145  */
146 #define INTERFACE IDirectPlay8LobbiedApplication
147 DECLARE_INTERFACE_(IDirectPlay8LobbiedApplication,IUnknown)
148 {
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_ CONST PVOID pvUserContext, CONST PFNDPNMESSAGEHANDLER pfn, DPNHANDLE* CONST pdpnhConnection, CONST DWORD dwFlags) PURE;
155     STDMETHOD(RegisterProgram)(THIS_ PDPL_PROGRAM_DESC pdplProgramDesc, CONST DWORD dwFlags) PURE;
156     STDMETHOD(UnRegisterProgram)(THIS_ GUID* pguidApplication, CONST DWORD dwFlags) PURE;
157     STDMETHOD(Send)(THIS_ CONST DPNHANDLE hConnection, BYTE* CONST pBuffer, CONST DWORD pBufferSize, CONST DWORD dwFlags) PURE;
158     STDMETHOD(SetAppAvailable)(THIS_ CONST BOOL fAvailable, CONST DWORD dwFlags) PURE;
159     STDMETHOD(UpdateStatus)(THIS_ CONST DPNHANDLE hConnection, CONST DWORD dwStatus, CONST DWORD dwFlags) PURE;
160     STDMETHOD(Close)(THIS_ CONST DWORD dwFlags) PURE;
161     STDMETHOD(GetConnectionSettings)(THIS_ CONST DPNHANDLE hConnection, DPL_CONNECTION_SETTINGS* CONST pdplSessionInfo, DWORD* pdwInfoSize, CONST DWORD dwFlags) PURE;
162     STDMETHOD(SetConnectionSettings)(THIS_ CONST DPNHANDLE hConnection, CONST DPL_CONNECTION_SETTINGS* CONST pdplSessionInfo, CONST DWORD dwFlags) PURE;
163 };
164 #undef INTERFACE
165
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
197
198 /*****************************************************************************
199  * IDirectPlay8LobbyClient interface
200  */
201 #define INTERFACE IDirectPlay8LobbyClient
202 DECLARE_INTERFACE_(IDirectPlay8LobbyClient,IUnknown)
203 {
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_ CONST PVOID pvUserContext, CONST PFNDPNMESSAGEHANDLER pfn, CONST DWORD dwFlags) PURE;
210     STDMETHOD(EnumLocalPrograms)(THIS_ GUID* CONST pGuidApplication, BYTE* CONST pEnumData, DWORD* CONST pdwEnumData, DWORD* CONST pdwItems, CONST DWORD dwFlags) PURE;
211     STDMETHOD(ConnectApplication)(THIS_ DPL_CONNECT_INFO* CONST pdplConnectionInfo, CONST PVOID pvConnectionContext, DPNHANDLE* CONST hApplication, CONST DWORD dwTimeOut, CONST DWORD dwFlags) PURE;
212     STDMETHOD(Send)(THIS_ CONST DPNHANDLE hConnection, BYTE* CONST pBuffer, CONST DWORD pBufferSize, CONST DWORD dwFlags) PURE;
213     STDMETHOD(ReleaseApplication)(THIS_ CONST DPNHANDLE hConnection, CONST DWORD dwFlags) PURE;
214     STDMETHOD(Close)(THIS_ CONST DWORD dwFlags) PURE;
215     STDMETHOD(GetConnectionSettings)(THIS_ CONST DPNHANDLE hConnection, DPL_CONNECTION_SETTINGS* CONST pdplSessionInfo, DWORD* pdwInfoSize, CONST DWORD dwFlags) PURE;  
216     STDMETHOD(SetConnectionSettings)(THIS_ CONST DPNHANDLE hConnection, CONST DPL_CONNECTION_SETTINGS* CONST pdplSessionInfo, CONST DWORD dwFlags) PURE;
217 };
218 #undef INTERFACE
219
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
249
250
251 /* Export functions */
252
253 HRESULT WINAPI DirectPlay8LobbyCreate(CONST GUID* pcIID, LPVOID* ppvInterface, IUnknown* pUnknown);
254
255 #ifdef __cplusplus
256 }
257 #endif
258
259 #endif