Commit f546609d authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

dplayx: Get rid of the IDirectPlayImpl aliases.

parent 5e038366
......@@ -190,21 +190,13 @@ typedef struct IDirectPlayImpl
DirectPlay2Data *dp2;
} IDirectPlayImpl;
typedef struct IDirectPlayImpl IDirectPlay2Impl;
typedef struct IDirectPlayImpl IDirectPlay2AImpl;
typedef struct IDirectPlayImpl IDirectPlay3Impl;
typedef struct IDirectPlayImpl IDirectPlay3AImpl;
typedef struct IDirectPlayImpl IDirectPlay4Impl;
typedef struct IDirectPlayImpl IDirectPlay4AImpl;
HRESULT DP_HandleMessage( IDirectPlay2Impl* This, LPCVOID lpMessageBody,
DWORD dwMessageBodySize, LPCVOID lpMessageHeader,
WORD wCommandId, WORD wVersion,
LPVOID* lplpReply, LPDWORD lpdwMsgSize ) DECLSPEC_HIDDEN;
HRESULT DP_HandleMessage( IDirectPlayImpl *This, const void *lpMessageBody,
DWORD dwMessageBodySize, const void *lpMessageHeader, WORD wCommandId, WORD wVersion,
void **lplpReply, DWORD *lpdwMsgSize ) DECLSPEC_HIDDEN;
/* DP SP external interfaces into DirectPlay */
extern HRESULT DP_GetSPPlayerData( IDirectPlay2Impl* lpDP, DPID idPlayer, LPVOID* lplpData ) DECLSPEC_HIDDEN;
extern HRESULT DP_SetSPPlayerData( IDirectPlay2Impl* lpDP, DPID idPlayer, LPVOID lpData ) DECLSPEC_HIDDEN;
extern HRESULT DP_GetSPPlayerData( IDirectPlayImpl *lpDP, DPID idPlayer, void **lplpData ) DECLSPEC_HIDDEN;
extern HRESULT DP_SetSPPlayerData( IDirectPlayImpl *lpDP, DPID idPlayer, void *lpData ) DECLSPEC_HIDDEN;
/* DP external interfaces to call into DPSP interface */
extern LPVOID DPSP_CreateSPPlayerData(void) DECLSPEC_HIDDEN;
......
......@@ -36,7 +36,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dplay);
/* Prototypes */
static BOOL DPSP_CreateIUnknown( LPVOID lpSP );
static BOOL DPSP_DestroyIUnknown( LPVOID lpSP );
static BOOL DPSP_CreateDirectPlaySP( LPVOID lpSP, IDirectPlay2Impl* dp );
static BOOL DPSP_CreateDirectPlaySP( void *lpSP, IDirectPlayImpl *dp );
static BOOL DPSP_DestroyDirectPlaySP( LPVOID lpSP );
/* Predefine the interface */
......@@ -56,7 +56,7 @@ typedef struct tagDirectPlaySPData
LPVOID lpSpLocalData;
DWORD dwSpLocalDataSize; /* Size of data pointed to by lpSpLocalData */
IDirectPlay2Impl* dplay; /* FIXME: This should perhaps be iface not impl */
IDirectPlayImpl *dplay; /* FIXME: This should perhaps be iface not impl */
} DirectPlaySPData;
......@@ -85,7 +85,7 @@ typedef struct tagDP_SPPLAYERDATA
} DP_SPPLAYERDATA, *LPDP_SPPLAYERDATA;
/* Create the SP interface */
HRESULT DPSP_CreateInterface( REFIID riid, LPVOID* ppvObj, IDirectPlay2Impl* dp )
HRESULT DPSP_CreateInterface( REFIID riid, void **ppvObj, IDirectPlayImpl *dp )
{
TRACE( " for %s\n", debugstr_guid( riid ) );
......@@ -159,7 +159,7 @@ static BOOL DPSP_DestroyIUnknown( LPVOID lpSP )
}
static BOOL DPSP_CreateDirectPlaySP( LPVOID lpSP, IDirectPlay2Impl* dp )
static BOOL DPSP_CreateDirectPlaySP( void *lpSP, IDirectPlayImpl *dp )
{
IDirectPlaySPImpl *This = lpSP;
......
......@@ -45,9 +45,8 @@ typedef struct tagMSGTHREADINFO
} MSGTHREADINFO, *LPMSGTHREADINFO;
static DWORD CALLBACK DPL_MSG_ThreadMain( LPVOID lpContext );
static LPVOID DP_MSG_ExpectReply( IDirectPlay2AImpl* This, LPDPSP_SENDDATA data,
DWORD dwWaitTime, WORD wReplyCommandId,
LPVOID* lplpReplyMsg, LPDWORD lpdwMsgBodySize );
static void *DP_MSG_ExpectReply( IDirectPlayImpl *This, DPSP_SENDDATA *data, DWORD dwWaitTime,
WORD wReplyCommandId, void **lplpReplyMsg, DWORD *lpdwMsgBodySize );
/* Create the message reception thread to allow the application to receive
......@@ -154,9 +153,8 @@ end_of_thread:
}
/* DP messaging stuff */
static
HANDLE DP_MSG_BuildAndLinkReplyStruct( IDirectPlay2Impl* This,
LPDP_MSG_REPLY_STRUCT_LIST lpReplyStructList, WORD wReplyCommandId )
static HANDLE DP_MSG_BuildAndLinkReplyStruct( IDirectPlayImpl *This,
DP_MSG_REPLY_STRUCT_LIST *lpReplyStructList, WORD wReplyCommandId )
{
lpReplyStructList->replyExpected.hReceipt = CreateEventW( NULL, FALSE, FALSE, NULL );
lpReplyStructList->replyExpected.wExpectedReply = wReplyCommandId;
......@@ -183,8 +181,7 @@ LPVOID DP_MSG_CleanReplyStruct( LPDP_MSG_REPLY_STRUCT_LIST lpReplyStructList,
return lpReplyStructList->replyExpected.lpReplyMsg;
}
HRESULT DP_MSG_SendRequestPlayerId( IDirectPlay2AImpl* This, DWORD dwFlags,
LPDPID lpdpidAllocatedId )
HRESULT DP_MSG_SendRequestPlayerId( IDirectPlayImpl *This, DWORD dwFlags, DPID *lpdpidAllocatedId )
{
LPVOID lpMsg;
LPDPMSG_REQUESTNEWPLAYERID lpMsgBody;
......@@ -250,7 +247,7 @@ HRESULT DP_MSG_SendRequestPlayerId( IDirectPlay2AImpl* This, DWORD dwFlags,
return hr;
}
HRESULT DP_MSG_ForwardPlayerCreation( IDirectPlay2AImpl* This, DPID dpidServer )
HRESULT DP_MSG_ForwardPlayerCreation( IDirectPlayImpl *This, DPID dpidServer )
{
LPVOID lpMsg;
LPDPMSG_FORWARDADDPLAYER lpMsgBody;
......@@ -368,10 +365,8 @@ HRESULT DP_MSG_ForwardPlayerCreation( IDirectPlay2AImpl* This, DPID dpidServer )
* ordering issues on sends and receives from the opposite machine. No wonder MS is not
* a networking company.
*/
static
LPVOID DP_MSG_ExpectReply( IDirectPlay2AImpl* This, LPDPSP_SENDDATA lpData,
DWORD dwWaitTime, WORD wReplyCommandId,
LPVOID* lplpReplyMsg, LPDWORD lpdwMsgBodySize )
static void *DP_MSG_ExpectReply( IDirectPlayImpl *This, DPSP_SENDDATA *lpData, DWORD dwWaitTime,
WORD wReplyCommandId, void **lplpReplyMsg, DWORD *lpdwMsgBodySize )
{
HRESULT hr;
HANDLE hMsgReceipt;
......@@ -410,8 +405,8 @@ LPVOID DP_MSG_ExpectReply( IDirectPlay2AImpl* This, LPDPSP_SENDDATA lpData,
* all important data. It is quite silly to have to copy the message, but the documents
* indicate that a copy is taken. Silly really.
*/
void DP_MSG_ReplyReceived( IDirectPlay2AImpl* This, WORD wCommandId,
LPCVOID lpcMsgBody, DWORD dwMsgBodySize )
void DP_MSG_ReplyReceived( IDirectPlayImpl *This, WORD wCommandId, const void *lpcMsgBody,
DWORD dwMsgBodySize )
{
LPDP_MSG_REPLY_STRUCT_LIST lpReplyList;
......@@ -449,7 +444,7 @@ void DP_MSG_ReplyReceived( IDirectPlay2AImpl* This, WORD wCommandId,
}
}
void DP_MSG_ToSelf( IDirectPlay2AImpl* This, DPID dpidSelf )
void DP_MSG_ToSelf( IDirectPlayImpl *This, DPID dpidSelf )
{
LPVOID lpMsg;
LPDPMSG_SENDENVELOPE lpMsgBody;
......@@ -486,8 +481,8 @@ void DP_MSG_ToSelf( IDirectPlay2AImpl* This, DPID dpidSelf )
}
}
void DP_MSG_ErrorReceived( IDirectPlay2AImpl* This, WORD wCommandId,
LPCVOID lpMsgBody, DWORD dwMsgBodySize )
void DP_MSG_ErrorReceived( IDirectPlayImpl *This, WORD wCommandId, const void *lpMsgBody,
DWORD dwMsgBodySize )
{
LPCDPMSG_FORWARDADDPLAYERNACK lpcErrorMsg;
......
......@@ -31,15 +31,15 @@
DWORD CreateLobbyMessageReceptionThread( HANDLE hNotifyEvent, HANDLE hStart,
HANDLE hDeath, HANDLE hConnRead ) DECLSPEC_HIDDEN;
HRESULT DP_MSG_SendRequestPlayerId( IDirectPlay2AImpl* This, DWORD dwFlags,
HRESULT DP_MSG_SendRequestPlayerId( IDirectPlayImpl *This, DWORD dwFlags,
LPDPID lpdipidAllocatedId ) DECLSPEC_HIDDEN;
HRESULT DP_MSG_ForwardPlayerCreation( IDirectPlay2AImpl* This, DPID dpidServer ) DECLSPEC_HIDDEN;
HRESULT DP_MSG_ForwardPlayerCreation( IDirectPlayImpl *This, DPID dpidServer ) DECLSPEC_HIDDEN;
void DP_MSG_ReplyReceived( IDirectPlay2AImpl* This, WORD wCommandId,
void DP_MSG_ReplyReceived( IDirectPlayImpl *This, WORD wCommandId,
LPCVOID lpMsgBody, DWORD dwMsgBodySize ) DECLSPEC_HIDDEN;
void DP_MSG_ErrorReceived( IDirectPlay2AImpl* This, WORD wCommandId,
void DP_MSG_ErrorReceived( IDirectPlayImpl *This, WORD wCommandId,
LPCVOID lpMsgBody, DWORD dwMsgBodySize ) DECLSPEC_HIDDEN;
void DP_MSG_ToSelf( IDirectPlay2AImpl* This, DPID dpidSelf ) DECLSPEC_HIDDEN;
void DP_MSG_ToSelf( IDirectPlayImpl *This, DPID dpidSelf ) DECLSPEC_HIDDEN;
/* Timings -> 1000 ticks/sec */
#define DPMSG_WAIT_5_SECS 5000
......
......@@ -29,7 +29,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dplay);
/* Prototypes */
static BOOL DPLSP_CreateIUnknown( LPVOID lpSP );
static BOOL DPLSP_DestroyIUnknown( LPVOID lpSP );
static BOOL DPLSP_CreateDPLobbySP( LPVOID lpSP, IDirectPlay2Impl* dp );
static BOOL DPLSP_CreateDPLobbySP( void *lpSP, IDirectPlayImpl *dp );
static BOOL DPLSP_DestroyDPLobbySP( LPVOID lpSP );
......@@ -44,7 +44,7 @@ typedef struct tagDPLobbySPIUnknownData
typedef struct tagDPLobbySPData
{
IDirectPlay2Impl* dplay;
IDirectPlayImpl *dplay;
} DPLobbySPData;
#define DPLSP_IMPL_FIELDS \
......@@ -61,7 +61,7 @@ struct IDPLobbySPImpl
/* Forward declaration of virtual tables */
static const IDPLobbySPVtbl dpLobbySPVT;
HRESULT DPLSP_CreateInterface( REFIID riid, LPVOID* ppvObj, IDirectPlay2Impl* dp )
HRESULT DPLSP_CreateInterface( REFIID riid, void **ppvObj, IDirectPlayImpl *dp )
{
TRACE( " for %s\n", debugstr_guid( riid ) );
......@@ -134,7 +134,7 @@ static BOOL DPLSP_DestroyIUnknown( LPVOID lpSP )
return TRUE;
}
static BOOL DPLSP_CreateDPLobbySP( LPVOID lpSP, IDirectPlay2Impl* dp )
static BOOL DPLSP_CreateDPLobbySP( void *lpSP, IDirectPlayImpl *dp )
{
IDPLobbySPImpl *This = lpSP;
......
......@@ -353,10 +353,8 @@ void NS_PruneSessionCache( LPVOID lpNSInfo )
}
/* NAME SERVER Message stuff */
void NS_ReplyToEnumSessionsRequest( LPCVOID lpcMsg,
LPVOID* lplpReplyData,
LPDWORD lpdwReplySize,
IDirectPlay2Impl* lpDP )
void NS_ReplyToEnumSessionsRequest( const void *lpcMsg, void **lplpReplyData, DWORD *lpdwReplySize,
IDirectPlayImpl *lpDP )
{
LPDPMSG_ENUMSESSIONSREPLY rmsg;
DWORD dwVariableSize;
......
......@@ -40,7 +40,7 @@ void NS_SetLocalAddr( LPVOID lpNSInfo, LPCVOID lpHdr, DWORD dwHdrSize ) DECLSPEC
void NS_ReplyToEnumSessionsRequest( LPCVOID lpcMsg,
LPVOID* lplpReplyData,
LPDWORD lpdwReplySize,
IDirectPlay2Impl* lpDP ) DECLSPEC_HIDDEN;
IDirectPlayImpl *lpDP ) DECLSPEC_HIDDEN;
HRESULT NS_SendSessionRequestBroadcast( LPCGUID lpcGuid,
DWORD dwFlags,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment