ReactOS 0.4.16-dev-109-gf4cb10f
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 "lobbysp.h"
28#include "dplayx_queue.h"
29
30extern HRESULT DPL_EnumAddress( LPDPENUMADDRESSCALLBACK lpEnumAddressCallback,
31 LPCVOID lpAddress, DWORD dwAddressSize,
32 LPVOID lpContext ) DECLSPEC_HIDDEN;
33
35{
42
44{
49 /* FIXME: Is the message header required as well? */
51
53{
57
59{
60 /* Individual player information */
62
65
66 ULONG uRef; /* What is the reference count on this data? */
67
68 /* View of local data */
71
72 /* View of remote data */
75
76 /* SP data on a per player basis */
78
79 DWORD dwFlags; /* Special remarks about the type of player */
80};
81typedef struct PlayerData* lpPlayerData;
82
84{
86
88};
89typedef struct PlayerList* lpPlayerList;
90
92{
93 /* Internal information */
94 DPID parent; /* If parent == 0 it's a top level group */
95
96 ULONG uRef; /* Reference count */
97
98 DPQ_HEAD(GroupList) groups; /* A group has [0..n] groups */
99 DPQ_HEAD(PlayerList) players; /* A group has [0..n] players */
100
101 DPID idGroupOwner; /* ID of player who owns the group */
102
103 DWORD dwFlags; /* Flags describing anything special about the group */
104
107
108 /* View of local data */
111
112 /* View of remote data */
115};
116typedef struct GroupData GroupData;
117typedef struct GroupData* lpGroupData;
118
120{
122
124};
125typedef struct GroupList* lpGroupList;
126
127struct DPMSG
128{
131};
132typedef struct DPMSG* LPDPMSG;
133
135{
140
141/* Contains all data members. FIXME: Rename me */
142typedef struct tagDirectPlay2Data
143{
145
146 /* For async EnumSessions requests */
150
151 LPVOID lpNameServerData; /* DPlay interface doesn't know contents */
152
153 BOOL bHostInterface; /* Did this interface create the session */
154
155 lpGroupData lpSysGroup; /* System group with _everything_ in it */
156
158
159 /* I/O Msg queues */
160 DPQ_HEAD( DPMSG ) receiveMsgs; /* Msg receive queue */
161 DPQ_HEAD( DPMSG ) sendMsgs; /* Msg send pending queue */
162
163 /* Information about the service provider active on this connection */
166
167 /* Information about the lobby server that's attached to this DP object */
170
171 /* Our service provider */
173
174 /* Our DP lobby provider */
176
178
179 /* Expected messages queue */
182
183typedef struct IDirectPlayImpl
184{
185 IDirectPlay IDirectPlay_iface;
187 IDirectPlay2 IDirectPlay2_iface;
189 IDirectPlay3 IDirectPlay3_iface;
191 IDirectPlay4 IDirectPlay4_iface;
192 LONG numIfaces; /* "in use interfaces" refcount */
197
198HRESULT DP_HandleMessage( IDirectPlayImpl *This, const void *lpMessageBody,
199 DWORD dwMessageBodySize, const void *lpMessageHeader, WORD wCommandId, WORD wVersion,
200 void **lplpReply, DWORD *lpdwMsgSize ) DECLSPEC_HIDDEN;
201
202/* DP SP external interfaces into DirectPlay */
203extern HRESULT DP_GetSPPlayerData( IDirectPlayImpl *lpDP, DPID idPlayer, void **lplpData ) DECLSPEC_HIDDEN;
204extern HRESULT DP_SetSPPlayerData( IDirectPlayImpl *lpDP, DPID idPlayer, void *lpData ) DECLSPEC_HIDDEN;
205
206/* DP external interfaces to call into DPSP interface */
208
213
214#endif /* __WINE_DPLAY_GLOBAL_INCLUDED */
#define DECLSPEC_HIDDEN
Definition: precomp.h:8
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:135
@ DP_LOBBY_PROVIDER
Definition: dplay_global.h:138
@ NO_PROVIDER
Definition: dplay_global.h:136
@ DP_SERVICE_PROVIDER
Definition: dplay_global.h:137
struct tagDP_MSG_REPLY_STRUCT_LIST * LPDP_MSG_REPLY_STRUCT_LIST
HRESULT DP_HandleMessage(IDirectPlayImpl *This, const void *lpMessageBody, DWORD dwMessageBodySize, const void *lpMessageHeader, WORD wCommandId, WORD wVersion, void **lplpReply, DWORD *lpdwMsgSize) DECLSPEC_HIDDEN
Definition: dplay.c:269
HRESULT DP_SetSPPlayerData(IDirectPlayImpl *lpDP, DPID idPlayer, void *lpData) DECLSPEC_HIDDEN
Definition: dplay.c:5731
struct tagDirectPlay2Data DirectPlay2Data
struct PlayerData * lpPlayerData
Definition: dplay_global.h:81
struct GroupData * lpGroupData
Definition: dplay_global.h:117
struct tagDP_MSG_REPLY_STRUCT_LIST DP_MSG_REPLY_STRUCT_LIST
HRESULT dplobbysp_create(REFIID riid, void **ppv, IDirectPlayImpl *dp) DECLSPEC_HIDDEN
Definition: lobbysp.c:230
struct tagDP_MSG_REPLY_STRUCT DP_MSG_REPLY_STRUCT
HRESULT dplay_create(REFIID riid, void **ppv) DECLSPEC_HIDDEN
Definition: dplay.c:5676
struct DPMSG * LPDPMSG
Definition: dplay_global.h:132
struct tagDP_MSG_REPLY_STRUCT * LPDP_MSG_REPLY_STRUCT
struct PlayerList * lpPlayerList
Definition: dplay_global.h:89
HRESULT dplobby_create(REFIID riid, void **ppv) DECLSPEC_HIDDEN
Definition: dplobby.c:2026
HRESULT DPL_EnumAddress(LPDPENUMADDRESSCALLBACK lpEnumAddressCallback, LPCVOID lpAddress, DWORD dwAddressSize, LPVOID lpContext) DECLSPEC_HIDDEN
Definition: dplobby.c:644
struct tagEnumSessionAsyncCallbackData EnumSessionAsyncCallbackData
LPVOID DPSP_CreateSPPlayerData(void) DECLSPEC_HIDDEN
Definition: dplaysp.c:711
HRESULT dplaysp_create(REFIID riid, void **ppv, IDirectPlayImpl *dp) DECLSPEC_HIDDEN
Definition: dplaysp.c:686
HRESULT DP_GetSPPlayerData(IDirectPlayImpl *lpDP, DPID idPlayer, void **lplpData) DECLSPEC_HIDDEN
Definition: dplay.c:5717
struct GroupList * lpGroupList
Definition: dplay_global.h:125
BOOL(CALLBACK * LPDPENUMADDRESSCALLBACK)(REFGUID guidDataType, DWORD dwDataSize, LPCVOID lpData, LPVOID lpContext)
Definition: dplobby.h:352
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
GLsizei GLuint * groups
Definition: glext.h:11113
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
long LONG
Definition: pedump.c:60
#define REFIID
Definition: guiddef.h:118
DPMSG_GENERIC * msg
Definition: dplay_global.h:130
DPQ_ENTRY(DPMSG) msgs
DPNAME name
Definition: dplay_global.h:106
DPID parent
Definition: dplay_global.h:94
DWORD dwLocalDataSize
Definition: dplay_global.h:110
DPQ_HEAD(PlayerList) players
DWORD dwRemoteDataSize
Definition: dplay_global.h:114
LPVOID lpRemoteData
Definition: dplay_global.h:113
DPID idGroupOwner
Definition: dplay_global.h:101
DWORD dwFlags
Definition: dplay_global.h:103
ULONG uRef
Definition: dplay_global.h:96
LPVOID lpLocalData
Definition: dplay_global.h:109
DPQ_HEAD(GroupList) groups
lpGroupData lpGData
Definition: dplay_global.h:123
DPQ_ENTRY(GroupList) groups
IDirectPlay2A IDirectPlay2A_iface
Definition: dplay_global.h:186
IDirectPlay2 IDirectPlay2_iface
Definition: dplay_global.h:187
CRITICAL_SECTION lock
Definition: dplay_global.h:194
DirectPlay2Data * dp2
Definition: dplay_global.h:195
IDirectPlay IDirectPlay_iface
Definition: dplay_global.h:185
IDirectPlay4 IDirectPlay4_iface
Definition: dplay_global.h:191
IDirectPlay4A IDirectPlay4A_iface
Definition: dplay_global.h:190
IDirectPlay3 IDirectPlay3_iface
Definition: dplay_global.h:189
IDirectPlay3A IDirectPlay3A_iface
Definition: dplay_global.h:188
ULONG uRef
Definition: dplay_global.h:66
DPNAME name
Definition: dplay_global.h:63
DWORD dwLocalDataSize
Definition: dplay_global.h:70
LPVOID lpRemoteData
Definition: dplay_global.h:73
LPVOID lpSPPlayerData
Definition: dplay_global.h:77
LPVOID lpLocalData
Definition: dplay_global.h:69
DWORD dwRemoteDataSize
Definition: dplay_global.h:74
HANDLE hEvent
Definition: dplay_global.h:64
DWORD dwFlags
Definition: dplay_global.h:79
lpPlayerData lpPData
Definition: dplay_global.h:87
DPQ_ENTRY(PlayerList) players
DP_MSG_REPLY_STRUCT replyExpected
Definition: dplay_global.h:55
DPQ_ENTRY(tagDP_MSG_REPLY_STRUCT_LIST) repliesExpected
lpGroupData lpSysGroup
Definition: dplay_global.h:155
HMODULE hDPLobbyProvider
Definition: dplay_global.h:175
DPQ_HEAD(DPMSG) sendMsgs
HANDLE hKillEnumSessionThreadEvent
Definition: dplay_global.h:148
enum SPSTATE connectionInitialized
Definition: dplay_global.h:177
DPQ_HEAD(DPMSG) receiveMsgs
DPQ_HEAD(tagDP_MSG_REPLY_STRUCT_LIST) repliesExpected
SPDATA_INIT dplspData
Definition: dplay_global.h:168
LPDPSESSIONDESC2 lpSessionDesc
Definition: dplay_global.h:157
HMODULE hServiceProvider
Definition: dplay_global.h:172
uint32_t ULONG
Definition: typedefs.h:59
CONST void * LPCVOID
Definition: windef.h:191