Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygendplay_global.h
Go to the documentation of this file.
00001 /* 00002 * Copyright 2000 Peter Hunnisett 00003 * 00004 * This library is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU Lesser General Public 00006 * License as published by the Free Software Foundation; either 00007 * version 2.1 of the License, or (at your option) any later version. 00008 * 00009 * This library is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * Lesser General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Lesser General Public 00015 * License along with this library; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00017 */ 00018 00019 #ifndef __WINE_DPLAY_GLOBAL_INCLUDED 00020 #define __WINE_DPLAY_GLOBAL_INCLUDED 00021 00022 #include <stdarg.h> 00023 00024 #include "windef.h" 00025 #include "winbase.h" 00026 #include "dplaysp.h" 00027 #include "lobbysp.h" 00028 #include "dplayx_queue.h" 00029 00030 extern HRESULT DPL_EnumAddress( LPDPENUMADDRESSCALLBACK lpEnumAddressCallback, 00031 LPCVOID lpAddress, DWORD dwAddressSize, 00032 LPVOID lpContext ); 00033 00034 extern DWORD DP_CalcSessionDescSize( LPCDPSESSIONDESC2 lpSessDesc, BOOL bAnsi ); 00035 00036 /***************************************************************************** 00037 * Predeclare the interface implementation structures 00038 */ 00039 typedef struct IDirectPlay2Impl IDirectPlay2AImpl; 00040 typedef struct IDirectPlay2Impl IDirectPlay2Impl; 00041 typedef struct IDirectPlay3Impl IDirectPlay3AImpl; 00042 typedef struct IDirectPlay3Impl IDirectPlay3Impl; 00043 typedef struct IDirectPlay4Impl IDirectPlay4AImpl; 00044 typedef struct IDirectPlay4Impl IDirectPlay4Impl; 00045 00046 typedef struct tagDirectPlayIUnknownData 00047 { 00048 LONG ulObjRef; 00049 CRITICAL_SECTION DP_lock; 00050 } DirectPlayIUnknownData; 00051 00052 typedef struct tagEnumSessionAsyncCallbackData 00053 { 00054 LPSPINITDATA lpSpData; 00055 GUID requestGuid; 00056 DWORD dwEnumSessionFlags; 00057 DWORD dwTimeout; 00058 HANDLE hSuicideRequest; 00059 } EnumSessionAsyncCallbackData; 00060 00061 typedef struct tagDP_MSG_REPLY_STRUCT 00062 { 00063 HANDLE hReceipt; 00064 WORD wExpectedReply; 00065 LPVOID lpReplyMsg; 00066 DWORD dwMsgBodySize; 00067 /* FIXME: Is the message header required as well? */ 00068 } DP_MSG_REPLY_STRUCT, *LPDP_MSG_REPLY_STRUCT; 00069 00070 typedef struct tagDP_MSG_REPLY_STRUCT_LIST 00071 { 00072 DPQ_ENTRY(tagDP_MSG_REPLY_STRUCT_LIST) replysExpected; 00073 DP_MSG_REPLY_STRUCT replyExpected; 00074 } DP_MSG_REPLY_STRUCT_LIST, *LPDP_MSG_REPLY_STRUCT_LIST; 00075 00076 struct PlayerData 00077 { 00078 /* Individual player information */ 00079 DPID dpid; 00080 00081 DPNAME name; 00082 HANDLE hEvent; 00083 00084 ULONG uRef; /* What is the reference count on this data? */ 00085 00086 /* View of local data */ 00087 LPVOID lpLocalData; 00088 DWORD dwLocalDataSize; 00089 00090 /* View of remote data */ 00091 LPVOID lpRemoteData; 00092 DWORD dwRemoteDataSize; 00093 00094 /* SP data on a per player basis */ 00095 LPVOID lpSPPlayerData; 00096 00097 DWORD dwFlags; /* Special remarks about the type of player */ 00098 }; 00099 typedef struct PlayerData* lpPlayerData; 00100 00101 struct PlayerList 00102 { 00103 DPQ_ENTRY(PlayerList) players; 00104 00105 lpPlayerData lpPData; 00106 }; 00107 typedef struct PlayerList* lpPlayerList; 00108 00109 struct GroupData 00110 { 00111 /* Internal information */ 00112 DPID parent; /* If parent == 0 it's a top level group */ 00113 00114 ULONG uRef; /* Reference count */ 00115 00116 DPQ_HEAD(GroupList) groups; /* A group has [0..n] groups */ 00117 DPQ_HEAD(PlayerList) players; /* A group has [0..n] players */ 00118 00119 DPID idGroupOwner; /* ID of player who owns the group */ 00120 00121 DWORD dwFlags; /* Flags describing anything special about the group */ 00122 00123 DPID dpid; 00124 DPNAME name; 00125 00126 /* View of local data */ 00127 LPVOID lpLocalData; 00128 DWORD dwLocalDataSize; 00129 00130 /* View of remote data */ 00131 LPVOID lpRemoteData; 00132 DWORD dwRemoteDataSize; 00133 }; 00134 typedef struct GroupData GroupData; 00135 typedef struct GroupData* lpGroupData; 00136 00137 struct GroupList 00138 { 00139 DPQ_ENTRY(GroupList) groups; 00140 00141 lpGroupData lpGData; 00142 }; 00143 typedef struct GroupList* lpGroupList; 00144 00145 struct DPMSG 00146 { 00147 DPQ_ENTRY( DPMSG ) msgs; 00148 DPMSG_GENERIC* msg; 00149 }; 00150 typedef struct DPMSG* LPDPMSG; 00151 00152 enum SPSTATE 00153 { 00154 NO_PROVIDER = 0, 00155 DP_SERVICE_PROVIDER = 1, 00156 DP_LOBBY_PROVIDER = 2 00157 }; 00158 00159 /* Contains all data members. FIXME: Rename me */ 00160 typedef struct tagDirectPlay2Data 00161 { 00162 BOOL bConnectionOpen; 00163 00164 /* For async EnumSessions requests */ 00165 HANDLE hEnumSessionThread; 00166 HANDLE hKillEnumSessionThreadEvent; 00167 00168 LPVOID lpNameServerData; /* DPlay interface doesn't know contents */ 00169 00170 BOOL bHostInterface; /* Did this interface create the session */ 00171 00172 lpGroupData lpSysGroup; /* System group with _everything_ in it */ 00173 00174 LPDPSESSIONDESC2 lpSessionDesc; 00175 00176 /* I/O Msg queues */ 00177 DPQ_HEAD( DPMSG ) receiveMsgs; /* Msg receive queue */ 00178 DPQ_HEAD( DPMSG ) sendMsgs; /* Msg send pending queue */ 00179 00180 /* Information about the service provider active on this connection */ 00181 SPINITDATA spData; 00182 BOOL bSPInitialized; 00183 00184 /* Information about the lobby server that's attached to this DP object */ 00185 SPDATA_INIT dplspData; 00186 BOOL bDPLSPInitialized; 00187 00188 /* Our service provider */ 00189 HMODULE hServiceProvider; 00190 00191 /* Our DP lobby provider */ 00192 HMODULE hDPLobbyProvider; 00193 00194 enum SPSTATE connectionInitialized; 00195 00196 /* Expected messages queue */ 00197 DPQ_HEAD( tagDP_MSG_REPLY_STRUCT_LIST ) replysExpected; 00198 } DirectPlay2Data; 00199 00200 typedef struct tagDirectPlay3Data 00201 { 00202 BOOL dummy; 00203 } DirectPlay3Data; 00204 typedef struct tagDirectPlay4Data 00205 { 00206 BOOL dummy; 00207 } DirectPlay4Data; 00208 00209 #define DP_IMPL_FIELDS \ 00210 LONG ulInterfaceRef; \ 00211 DirectPlayIUnknownData* unk; \ 00212 DirectPlay2Data* dp2; \ 00213 DirectPlay3Data* dp3; \ 00214 DirectPlay4Data* dp4; 00215 00216 struct IDirectPlay2Impl 00217 { 00218 const IDirectPlay2Vtbl *lpVtbl; 00219 DP_IMPL_FIELDS 00220 }; 00221 00222 struct IDirectPlay3Impl 00223 { 00224 const IDirectPlay3Vtbl *lpVtbl; 00225 DP_IMPL_FIELDS 00226 }; 00227 00228 struct IDirectPlay4Impl 00229 { 00230 const IDirectPlay4Vtbl *lpVtbl; 00231 DP_IMPL_FIELDS 00232 }; 00233 00234 HRESULT DP_HandleMessage( IDirectPlay2Impl* This, LPCVOID lpMessageBody, 00235 DWORD dwMessageBodySize, LPCVOID lpMessageHeader, 00236 WORD wCommandId, WORD wVersion, 00237 LPVOID* lplpReply, LPDWORD lpdwMsgSize ); 00238 00239 /* DP SP external interfaces into DirectPlay */ 00240 extern HRESULT DP_GetSPPlayerData( IDirectPlay2Impl* lpDP, DPID idPlayer, LPVOID* lplpData ); 00241 extern HRESULT DP_SetSPPlayerData( IDirectPlay2Impl* lpDP, DPID idPlayer, LPVOID lpData ); 00242 00243 /* DP external interfaces to call into DPSP interface */ 00244 extern LPVOID DPSP_CreateSPPlayerData(void); 00245 00246 #endif /* __WINE_DPLAY_GLOBAL_INCLUDED */ Generated on Fri May 25 2012 04:19:33 for ReactOS by
1.7.6.1
|