KDE 1.x has problems with using XShapeCombineMask when there was no
[wine/hacks.git] / dlls / dplayx / dplay_global.h
blob0cfc5f5dd9f56c9ec4425ce91393435ba79c09dc
1 #ifndef __WINE_DPLAY_GLOBAL_INCLUDED
2 #define __WINE_DPLAY_GLOBAL_INCLUDED
4 #include "dplaysp.h"
5 #include "dplayx_queue.h"
7 extern HRESULT DPL_EnumAddress( LPDPENUMADDRESSCALLBACK lpEnumAddressCallback,
8 LPCVOID lpAddress, DWORD dwAddressSize,
9 LPVOID lpContext );
11 extern DWORD DP_CalcSessionDescSize( LPCDPSESSIONDESC2 lpSessDesc, BOOL bAnsi );
13 /*****************************************************************************
14 * Predeclare the interface implementation structures
16 typedef struct IDirectPlay2Impl IDirectPlay2AImpl;
17 typedef struct IDirectPlay2Impl IDirectPlay2Impl;
18 typedef struct IDirectPlay3Impl IDirectPlay3AImpl;
19 typedef struct IDirectPlay3Impl IDirectPlay3Impl;
20 typedef struct IDirectPlay4Impl IDirectPlay4AImpl;
21 typedef struct IDirectPlay4Impl IDirectPlay4Impl;
23 typedef struct tagDirectPlayIUnknownData
25 ULONG ulObjRef;
26 CRITICAL_SECTION DP_lock;
27 } DirectPlayIUnknownData;
29 typedef struct tagEnumSessionAsyncCallbackData
31 LPSPINITDATA lpSpData;
32 GUID requestGuid;
33 DWORD dwEnumSessionFlags;
34 DWORD dwTimeout;
35 HANDLE hSuicideRequest;
36 } EnumSessionAsyncCallbackData;
38 struct PlayerData
40 /* Individual player information */
41 DPID dpid;
43 DPNAME name;
44 HANDLE hEvent;
46 ULONG uRef; /* What is the reference count on this data? */
48 /* View of local data */
49 LPVOID lpLocalData;
50 DWORD dwLocalDataSize;
52 /* View of remote data */
53 LPVOID lpRemoteData;
54 DWORD dwRemoteDataSize;
56 DWORD dwFlags; /* Special remarks about the type of player */
58 typedef struct PlayerData* lpPlayerData;
60 struct PlayerList
62 DPQ_ENTRY(PlayerList) players;
64 lpPlayerData lpPData;
66 typedef struct PlayerList* lpPlayerList;
68 struct GroupData
70 /* Internal information */
71 DPID parent; /* If parent == 0 it's a top level group */
73 ULONG uRef; /* Reference count */
75 DPQ_HEAD(GroupList) groups; /* A group has [0..n] groups */
76 DPQ_HEAD(PlayerList) players; /* A group has [0..n] players */
78 DPID idGroupOwner; /* ID of player who owns the group */
80 DWORD dwFlags; /* Flags describing anything special about the group */
82 DPID dpid;
83 DPNAME name;
85 /* View of local data */
86 LPVOID lpLocalData;
87 DWORD dwLocalDataSize;
89 /* View of remote data */
90 LPVOID lpRemoteData;
91 DWORD dwRemoteDataSize;
93 typedef struct GroupData GroupData;
94 typedef struct GroupData* lpGroupData;
96 struct GroupList
98 DPQ_ENTRY(GroupList) groups;
100 lpGroupData lpGData;
102 typedef struct GroupList* lpGroupList;
104 struct DPMSG
106 DPQ_ENTRY( DPMSG ) msgs;
107 DPMSG_GENERIC* msg;
109 typedef struct DPMSG* LPDPMSG;
111 /* Contains all dp1 and dp2 data members */
112 typedef struct tagDirectPlay2Data
114 BOOL bConnectionOpen;
116 /* For async EnumSessions requests */
117 HANDLE hEnumSessionThread;
118 HANDLE hKillEnumSessionThreadEvent;
120 LPVOID lpNameServerData; /* DPlay interface doesn't know contents */
122 BOOL bHostInterface; /* Did this interface create the session */
124 lpGroupData lpSysGroup; /* System group with _everything_ in it */
126 LPDPSESSIONDESC2 lpSessionDesc;
128 /* I/O Msg queues */
129 DPQ_HEAD( DPMSG ) receiveMsgs; /* Msg receive queue */
130 DPQ_HEAD( DPMSG ) sendMsgs; /* Msg send pending queue */
132 /* Information about the service provider active on this connection */
133 SPINITDATA spData;
135 /* Our service provider */
136 HMODULE hServiceProvider;
138 BOOL bConnectionInitialized;
141 /* proof of concept for message reception */
142 HANDLE hMsgReceipt;
143 LPVOID lpMsgReceived;
144 } DirectPlay2Data;
146 typedef struct tagDirectPlay3Data
148 BOOL dummy;
149 } DirectPlay3Data;
150 typedef struct tagDirectPlay4Data
152 BOOL dummy;
153 } DirectPlay4Data;
155 #define DP_IMPL_FIELDS \
156 ULONG ulInterfaceRef; \
157 DirectPlayIUnknownData* unk; \
158 DirectPlay2Data* dp2; \
159 DirectPlay3Data* dp3; \
160 DirectPlay4Data* dp4;
162 struct IDirectPlay2Impl
164 ICOM_VFIELD(IDirectPlay2);
165 DP_IMPL_FIELDS
168 struct IDirectPlay3Impl
170 ICOM_VFIELD(IDirectPlay3);
171 DP_IMPL_FIELDS
174 struct IDirectPlay4Impl
176 ICOM_VFIELD(IDirectPlay4);
177 DP_IMPL_FIELDS
180 /* Forward declarations of virtual tables */
181 extern ICOM_VTABLE(IDirectPlay2) directPlay2AVT;
182 extern ICOM_VTABLE(IDirectPlay3) directPlay3AVT;
183 extern ICOM_VTABLE(IDirectPlay4) directPlay4AVT;
185 extern ICOM_VTABLE(IDirectPlay2) directPlay2WVT;
186 extern ICOM_VTABLE(IDirectPlay3) directPlay3WVT;
187 extern ICOM_VTABLE(IDirectPlay4) directPlay4WVT;
190 HRESULT DP_HandleMessage( IDirectPlay2Impl* This, LPCVOID lpMessageBody,
191 DWORD dwMessageBodySize, LPCVOID lpMessageHeader,
192 WORD wCommandId, WORD wVersion,
193 LPVOID* lplpReply, LPDWORD lpdwMsgSize );
196 #endif /* __WINE_DPLAY_GLOBAL_INCLUDED */