ReactOS 0.4.17-dev-966-gf06eace
dplay_global.h
Go to the documentation of this file.
1/*
2 * Copyright 2000 Peter Hunnisett
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_DPLAY_GLOBAL_INCLUDED
20#define __WINE_DPLAY_GLOBAL_INCLUDED
21
22#include <stdarg.h>
23
24#include "windef.h"
25#include "winbase.h"
26#include "wine/dplaysp.h"
27#include "wine/list.h"
28#include "lobbysp.h"
29#include "dplayx_queue.h"
30
31extern HRESULT DPL_EnumAddress( LPDPENUMADDRESSCALLBACK lpEnumAddressCallback,
32 LPCVOID lpAddress, DWORD dwAddressSize,
33 LPVOID lpContext );
34
35typedef struct
36{
37 struct list entry;
38
41 void *address;
47 char *path;
49
51{
59
61{
69
71{
75
77{
78 /* Individual player information */
80
84
85 ULONG uRef; /* What is the reference count on this data? */
86
87 /* View of local data */
90
91 /* View of remote data */
94
95 /* SP data on a per player basis */
97
98 DWORD dwFlags; /* Special remarks about the type of player */
99};
100typedef struct PlayerData* lpPlayerData;
101
103{
105
107};
108typedef struct PlayerList* lpPlayerList;
109
111{
112 /* Internal information */
113 DPID parent; /* If parent == 0 it's a top level group */
114
115 ULONG uRef; /* Reference count */
116
117 DPQ_HEAD(GroupList) groups; /* A group has [0..n] groups */
118 DPQ_HEAD(PlayerList) players; /* A group has [0..n] players */
119
120 DPID idGroupOwner; /* ID of player who owns the group */
121
122 DWORD dwFlags; /* Flags describing anything special about the group */
123
127
128 /* View of local data */
131
132 /* View of remote data */
135
136 /* SP data on a per player basis */
138};
139typedef struct GroupData GroupData;
140typedef struct GroupData* lpGroupData;
141
143{
145
147};
148typedef struct GroupList* lpGroupList;
149
150typedef DWORD FN_COPY_MESSAGE( DPMSG_GENERIC *genericDst, DPMSG_GENERIC *genericSrc,
151 DWORD genericSize, BOOL ansi );
152
153struct DPMSG
154{
161};
162typedef struct DPMSG* LPDPMSG;
163
165{
170
171/* Contains all data members. FIXME: Rename me */
172typedef struct tagDirectPlay2Data
173{
175
176 /* For async EnumSessions requests */
180
181 LPVOID lpNameServerData; /* DPlay interface doesn't know contents */
182
183 BOOL bHostInterface; /* Did this interface create the session */
184
185 lpGroupData lpSysGroup; /* System group with _everything_ in it */
186
188
190
191 /* I/O Msg queues */
192 DPQ_HEAD( DPMSG ) receiveMsgs; /* Msg receive queue */
193
194 /* Information about the service provider active on this connection */
197
198 /* Information about the lobby server that's attached to this DP object */
201
202 /* Our service provider */
204
205 /* Our DP lobby provider */
207
209
210 /* Expected messages queue */
213
214typedef struct IDirectPlayImpl
215{
216 IDirectPlay IDirectPlay_iface;
218 IDirectPlay2 IDirectPlay2_iface;
220 IDirectPlay3 IDirectPlay3_iface;
222 IDirectPlay4 IDirectPlay4_iface;
227
228HRESULT DP_HandleMessage( IDirectPlayImpl *This, void *messageBody,
229 DWORD dwMessageBodySize, void *messageHeader, WORD wCommandId, WORD wVersion,
230 void **lplpReply, DWORD *lpdwMsgSize );
232HRESULT DP_HandleGameMessage( IDirectPlayImpl *This, void *messageBody, DWORD messageBodySize,
233 DPID fromId, DPID toId );
234HRESULT DP_CreatePlayer( IDirectPlayImpl *This, void *msgHeader, DPID *lpid, DPNAME *lpName,
235 void *data, DWORD dataSize, void *spData, DWORD spDataSize, DWORD dwFlags,
236 HANDLE hEvent, struct PlayerData **playerData, BOOL bAnsi );
237HRESULT DP_CreateGroup( IDirectPlayImpl *This, void *msgHeader, const DPID *lpid,
238 const DPNAME *lpName, void *data, DWORD dataSize, DWORD dwFlags,
239 DPID idParent, BOOL bAnsi );
241
242void DP_FreeConnections(void);
243
244/* DP SP external interfaces into DirectPlay */
245extern HRESULT DP_GetSPPlayerData( IDirectPlayImpl *lpDP, DPID idPlayer, void **lplpData );
246extern HRESULT DP_SetSPPlayerData( IDirectPlayImpl *lpDP, DPID idPlayer, void *lpData );
247
248/* DP external interfaces to call into DPSP interface */
250
251extern HRESULT dplay_create( REFIID riid, void **ppv );
252extern HRESULT dplobby_create( REFIID riid, void **ppv );
253extern HRESULT dplaysp_create( REFIID riid, void **ppv, IDirectPlayImpl *dp );
255
256#endif /* __WINE_DPLAY_GLOBAL_INCLUDED */
Definition: list.h:39
DWORD DPID
Definition: dplay.h:158
struct IDirectPlay3 IDirectPlay3A
Definition: dplay.h:53
struct IDirectPlay4 IDirectPlay4A
Definition: dplay.h:59
struct IDirectPlay2 IDirectPlay2A
Definition: dplay.h:47
SPSTATE
Definition: dplay_global.h:165
@ DP_LOBBY_PROVIDER
Definition: dplay_global.h:168
@ NO_PROVIDER
Definition: dplay_global.h:166
@ DP_SERVICE_PROVIDER
Definition: dplay_global.h:167
DWORD FN_COPY_MESSAGE(DPMSG_GENERIC *genericDst, DPMSG_GENERIC *genericSrc, DWORD genericSize, BOOL ansi)
Definition: dplay_global.h:150
HRESULT DP_SetSPPlayerData(IDirectPlayImpl *lpDP, DPID idPlayer, void *lpData)
Definition: dplay.c:6490
HRESULT DP_HandleMessage(IDirectPlayImpl *This, void *messageBody, DWORD dwMessageBodySize, void *messageHeader, WORD wCommandId, WORD wVersion, void **lplpReply, DWORD *lpdwMsgSize)
Definition: dplay.c:453
struct tagDP_MSG_REPLY_STRUCT_LIST * LPDP_MSG_REPLY_STRUCT_LIST
LPVOID DPSP_CreateSPPlayerData(void)
Definition: dplaysp.c:721
struct tagDirectPlay2Data DirectPlay2Data
struct PlayerData * lpPlayerData
Definition: dplay_global.h:100
struct GroupData * lpGroupData
Definition: dplay_global.h:140
struct tagDP_MSG_REPLY_STRUCT_LIST DP_MSG_REPLY_STRUCT_LIST
struct tagDP_MSG_REPLY_STRUCT DP_MSG_REPLY_STRUCT
struct DPMSG * LPDPMSG
Definition: dplay_global.h:162
HRESULT DPL_EnumAddress(LPDPENUMADDRESSCALLBACK lpEnumAddressCallback, LPCVOID lpAddress, DWORD dwAddressSize, LPVOID lpContext)
Definition: dplobby.c:368
HRESULT DP_CreatePlayer(IDirectPlayImpl *This, void *msgHeader, DPID *lpid, DPNAME *lpName, void *data, DWORD dataSize, void *spData, DWORD spDataSize, DWORD dwFlags, HANDLE hEvent, struct PlayerData **playerData, BOOL bAnsi)
Definition: dplay.c:1823
HRESULT DP_HandleGameMessage(IDirectPlayImpl *This, void *messageBody, DWORD messageBodySize, DPID fromId, DPID toId)
Definition: dplay.c:695
struct tagDP_MSG_REPLY_STRUCT * LPDP_MSG_REPLY_STRUCT
HRESULT DP_AddPlayerToGroup(IDirectPlayImpl *This, DPID group, DPID player)
Definition: dplay.c:1210
struct PlayerList * lpPlayerList
Definition: dplay_global.h:108
HRESULT dplobbysp_create(REFIID riid, void **ppv, IDirectPlayImpl *dp)
Definition: lobbysp.c:230
HRESULT dplay_create(REFIID riid, void **ppv)
Definition: dplay.c:6428
HRESULT DP_CreateGroup(IDirectPlayImpl *This, void *msgHeader, const DPID *lpid, const DPNAME *lpName, void *data, DWORD dataSize, DWORD dwFlags, DPID idParent, BOOL bAnsi)
Definition: dplay.c:1386
HRESULT dplaysp_create(REFIID riid, void **ppv, IDirectPlayImpl *dp)
Definition: dplaysp.c:696
struct tagEnumSessionAsyncCallbackData EnumSessionAsyncCallbackData
void DP_FreeConnections(void)
Definition: dplay.c:5133
HRESULT DP_GetSPPlayerData(IDirectPlayImpl *lpDP, DPID idPlayer, void **lplpData)
Definition: dplay.c:6462
DPSESSIONDESC2 * DP_DuplicateSessionDesc(const DPSESSIONDESC2 *src, BOOL dstAnsi, BOOL srcAnsi)
Definition: dplay.c:4579
struct GroupList * lpGroupList
Definition: dplay_global.h:148
HRESULT dplobby_create(REFIID riid, void **ppv)
Definition: dplobby.c:1401
BOOL(CALLBACK * LPDPENUMADDRESSCALLBACK)(REFGUID guidDataType, DWORD dwDataSize, LPCVOID lpData, LPVOID lpContext)
Definition: dplobby.h:352
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLsizei GLuint * groups
Definition: glext.h:11113
GLenum src
Definition: glext.h:6340
GLboolean GLuint group
Definition: glext.h:11120
GLenum GLsizei dataSize
Definition: glext.h:11123
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
uint32_t entry
Definition: isohybrid.c:63
CONST void * LPCVOID
Definition: minwindef.h:164
static HANDLE hEvent
Definition: comm.c:54
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD dwFlags
Definition: netsh.h:141
short WCHAR
Definition: pedump.c:58
long LONG
Definition: pedump.c:60
#define REFIID
Definition: guiddef.h:118
DWORD reserved1
Definition: dplay_global.h:45
DWORD reserved2
Definition: dplay_global.h:46
void * address
Definition: dplay_global.h:41
DWORD addressSize
Definition: dplay_global.h:42
DPNAME nameA
Definition: dplay_global.h:44
DPID toId
Definition: dplay_global.h:157
DWORD genericSize
Definition: dplay_global.h:160
DPID fromId
Definition: dplay_global.h:156
FN_COPY_MESSAGE * copyMessage
Definition: dplay_global.h:159
DPMSG_GENERIC * msg
Definition: dplay_global.h:158
DPQ_ENTRY(DPMSG) msgs
LPVOID lpSPPlayerData
Definition: dplay_global.h:137
DWORD dwLocalDataSize
Definition: dplay_global.h:130
DPQ_HEAD(PlayerList) players
DWORD dwRemoteDataSize
Definition: dplay_global.h:134
LPVOID lpRemoteData
Definition: dplay_global.h:133
DPID idGroupOwner
Definition: dplay_global.h:120
DWORD dwFlags
Definition: dplay_global.h:122
DPNAME * nameA
Definition: dplay_global.h:126
ULONG uRef
Definition: dplay_global.h:115
LPVOID lpLocalData
Definition: dplay_global.h:129
DPNAME * name
Definition: dplay_global.h:125
DPQ_HEAD(GroupList) groups
lpGroupData lpGData
Definition: dplay_global.h:146
DPQ_ENTRY(GroupList) groups
IDirectPlay2A IDirectPlay2A_iface
Definition: dplay_global.h:217
IDirectPlay2 IDirectPlay2_iface
Definition: dplay_global.h:218
CRITICAL_SECTION lock
Definition: dplay_global.h:224
DirectPlay2Data * dp2
Definition: dplay_global.h:225
IDirectPlay IDirectPlay_iface
Definition: dplay_global.h:216
IDirectPlay4 IDirectPlay4_iface
Definition: dplay_global.h:222
IDirectPlay4A IDirectPlay4A_iface
Definition: dplay_global.h:221
IDirectPlay3 IDirectPlay3_iface
Definition: dplay_global.h:220
IDirectPlay3A IDirectPlay3A_iface
Definition: dplay_global.h:219
ULONG uRef
Definition: dplay_global.h:85
DWORD dwLocalDataSize
Definition: dplay_global.h:89
LPVOID lpRemoteData
Definition: dplay_global.h:92
LPVOID lpSPPlayerData
Definition: dplay_global.h:96
LPVOID lpLocalData
Definition: dplay_global.h:88
DPNAME * nameA
Definition: dplay_global.h:82
DWORD dwRemoteDataSize
Definition: dplay_global.h:93
DPNAME * name
Definition: dplay_global.h:81
HANDLE hEvent
Definition: dplay_global.h:83
DWORD dwFlags
Definition: dplay_global.h:98
lpPlayerData lpPData
Definition: dplay_global.h:106
DPQ_ENTRY(PlayerList) players
DP_MSG_REPLY_STRUCT replyExpected
Definition: dplay_global.h:73
DPQ_ENTRY(tagDP_MSG_REPLY_STRUCT_LIST) repliesExpected
lpGroupData lpSysGroup
Definition: dplay_global.h:185
HMODULE hDPLobbyProvider
Definition: dplay_global.h:206
HANDLE hKillEnumSessionThreadEvent
Definition: dplay_global.h:178
enum SPSTATE connectionInitialized
Definition: dplay_global.h:208
DPQ_HEAD(DPMSG) receiveMsgs
DPQ_HEAD(tagDP_MSG_REPLY_STRUCT_LIST) repliesExpected
SPDATA_INIT dplspData
Definition: dplay_global.h:199
LPDPSESSIONDESC2 lpSessionDesc
Definition: dplay_global.h:189
HMODULE hServiceProvider
Definition: dplay_global.h:203
uint32_t ULONG
Definition: typedefs.h:59
static UINT WPARAM LPARAM BOOL ansi
Definition: misc.c:135
_In_ LPCSTR lpName
Definition: winbase.h:2519