Commit de5a266a authored by Alexandre Julliard's avatar Alexandre Julliard

dplayx: Remove some unused functions.

parent c437e3d9
...@@ -202,7 +202,7 @@ static BOOL DP_BuildSPCompoundAddr( LPGUID lpcSpGuid, LPVOID* lplpAddrBuf, ...@@ -202,7 +202,7 @@ static BOOL DP_BuildSPCompoundAddr( LPGUID lpcSpGuid, LPVOID* lplpAddrBuf,
static inline DPID DP_NextObjectId(void); static inline DPID DP_NextObjectId(void);
static DPID DP_GetRemoteNextObjectId(void); static DPID DP_GetRemoteNextObjectId(void);
static DWORD DP_CalcSessionDescSize( LPCDPSESSIONDESC2 lpSessDesc, BOOL bAnsi );
static void DP_CopySessionDesc( LPDPSESSIONDESC2 destSessionDesc, static void DP_CopySessionDesc( LPDPSESSIONDESC2 destSessionDesc,
LPCDPSESSIONDESC2 srcSessDesc, BOOL bAnsi ); LPCDPSESSIONDESC2 srcSessDesc, BOOL bAnsi );
...@@ -3349,7 +3349,7 @@ static HRESULT WINAPI DirectPlay2WImpl_SetSessionDesc ...@@ -3349,7 +3349,7 @@ static HRESULT WINAPI DirectPlay2WImpl_SetSessionDesc
} }
/* FIXME: See about merging some of this stuff with dplayx_global.c stuff */ /* FIXME: See about merging some of this stuff with dplayx_global.c stuff */
DWORD DP_CalcSessionDescSize( LPCDPSESSIONDESC2 lpSessDesc, BOOL bAnsi ) static DWORD DP_CalcSessionDescSize( LPCDPSESSIONDESC2 lpSessDesc, BOOL bAnsi )
{ {
DWORD dwSize = 0; DWORD dwSize = 0;
......
...@@ -31,8 +31,6 @@ extern HRESULT DPL_EnumAddress( LPDPENUMADDRESSCALLBACK lpEnumAddressCallback, ...@@ -31,8 +31,6 @@ extern HRESULT DPL_EnumAddress( LPDPENUMADDRESSCALLBACK lpEnumAddressCallback,
LPCVOID lpAddress, DWORD dwAddressSize, LPCVOID lpAddress, DWORD dwAddressSize,
LPVOID lpContext ); LPVOID lpContext );
extern DWORD DP_CalcSessionDescSize( LPCDPSESSIONDESC2 lpSessDesc, BOOL bAnsi );
/***************************************************************************** /*****************************************************************************
* Predeclare the interface implementation structures * Predeclare the interface implementation structures
*/ */
......
...@@ -89,8 +89,7 @@ typedef struct ...@@ -89,8 +89,7 @@ typedef struct
static DPLAYX_MEM_SLICE* lpMemArea; static DPLAYX_MEM_SLICE* lpMemArea;
void DPLAYX_PrivHeapFree( LPVOID addr ); static void DPLAYX_PrivHeapFree( LPVOID addr )
void DPLAYX_PrivHeapFree( LPVOID addr )
{ {
LPVOID lpAddrStart; LPVOID lpAddrStart;
DWORD dwBlockUsed; DWORD dwBlockUsed;
...@@ -107,9 +106,7 @@ void DPLAYX_PrivHeapFree( LPVOID addr ) ...@@ -107,9 +106,7 @@ void DPLAYX_PrivHeapFree( LPVOID addr )
lpMemArea[ dwBlockUsed ].used = 0; lpMemArea[ dwBlockUsed ].used = 0;
} }
/* FIXME: This should be static, but is being used for a hack right now */ static LPVOID DPLAYX_PrivHeapAlloc( DWORD flags, DWORD size )
LPVOID DPLAYX_PrivHeapAlloc( DWORD flags, DWORD size );
LPVOID DPLAYX_PrivHeapAlloc( DWORD flags, DWORD size )
{ {
LPVOID lpvArea = NULL; LPVOID lpvArea = NULL;
UINT uBlockUsed; UINT uBlockUsed;
...@@ -144,27 +141,6 @@ LPVOID DPLAYX_PrivHeapAlloc( DWORD flags, DWORD size ) ...@@ -144,27 +141,6 @@ LPVOID DPLAYX_PrivHeapAlloc( DWORD flags, DWORD size )
return lpvArea; return lpvArea;
} }
LPSTR DPLAYX_strdupA( DWORD flags, LPCSTR str );
LPSTR DPLAYX_strdupA( DWORD flags, LPCSTR str )
{
LPSTR p = DPLAYX_PrivHeapAlloc( flags, strlen(str) + 1 );
if(p) {
strcpy( p, str );
}
return p;
}
LPWSTR DPLAYX_strdupW( DWORD flags, LPCWSTR str );
LPWSTR DPLAYX_strdupW( DWORD flags, LPCWSTR str )
{
INT len = strlenW(str) + 1;
LPWSTR p = DPLAYX_PrivHeapAlloc( flags, len * sizeof(WCHAR) );
if(p) {
strcpyW( p, str );
}
return p;
}
enum { numSupportedLobbies = 32, numSupportedSessions = 32 }; enum { numSupportedLobbies = 32, numSupportedSessions = 32 };
typedef struct tagDPLAYX_LOBBYDATA typedef struct tagDPLAYX_LOBBYDATA
...@@ -1062,15 +1038,6 @@ DWORD DPLAYX_SizeOfLobbyDataW( const DPLCONNECTION *lpConn ) ...@@ -1062,15 +1038,6 @@ DWORD DPLAYX_SizeOfLobbyDataW( const DPLCONNECTION *lpConn )
static LPDPSESSIONDESC2 DPLAYX_CopyAndAllocateSessionDesc2A( LPCDPSESSIONDESC2 lpSessionSrc )
{
LPDPSESSIONDESC2 lpSessionDest =
HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *lpSessionSrc ) );
DPLAYX_CopyIntoSessionDesc2A( lpSessionDest, lpSessionSrc );
return lpSessionDest;
}
/* Copy an ANSI session desc structure to the given buffer */ /* Copy an ANSI session desc structure to the given buffer */
BOOL DPLAYX_CopyIntoSessionDesc2A( LPDPSESSIONDESC2 lpSessionDest, BOOL DPLAYX_CopyIntoSessionDesc2A( LPDPSESSIONDESC2 lpSessionDest,
LPCDPSESSIONDESC2 lpSessionSrc ) LPCDPSESSIONDESC2 lpSessionSrc )
...@@ -1093,38 +1060,6 @@ BOOL DPLAYX_CopyIntoSessionDesc2A( LPDPSESSIONDESC2 lpSessionDest, ...@@ -1093,38 +1060,6 @@ BOOL DPLAYX_CopyIntoSessionDesc2A( LPDPSESSIONDESC2 lpSessionDest,
return TRUE; return TRUE;
} }
/* Start the index at 0. index will be updated to equal that which should
be passed back into this function for the next element */
LPDPSESSIONDESC2 DPLAYX_CopyAndAllocateLocalSession( UINT* index )
{
for( ; (*index) < numSupportedSessions; (*index)++ )
{
if( sessionData[(*index)].dwSize != 0 )
{
return DPLAYX_CopyAndAllocateSessionDesc2A( &sessionData[(*index)++] );
}
}
/* No more sessions */
return NULL;
}
/* Start the index at 0. index will be updated to equal that which should
be passed back into this function for the next element */
BOOL DPLAYX_CopyLocalSession( UINT* index, LPDPSESSIONDESC2 lpsd )
{
for( ; (*index) < numSupportedSessions; (*index)++ )
{
if( sessionData[(*index)].dwSize != 0 )
{
return DPLAYX_CopyIntoSessionDesc2A( lpsd, &sessionData[(*index)++] );
}
}
/* No more sessions */
return FALSE;
}
void DPLAYX_SetLocalSession( LPCDPSESSIONDESC2 lpsd ) void DPLAYX_SetLocalSession( LPCDPSESSIONDESC2 lpsd )
{ {
UINT i; UINT i;
......
...@@ -44,7 +44,6 @@ HRESULT DPLAYX_SetConnectionSettingsW ( DWORD dwFlags, ...@@ -44,7 +44,6 @@ HRESULT DPLAYX_SetConnectionSettingsW ( DWORD dwFlags,
const DPLCONNECTION *lpConn ); const DPLCONNECTION *lpConn );
BOOL DPLAYX_CreateLobbyApplication( DWORD dwAppID ); BOOL DPLAYX_CreateLobbyApplication( DWORD dwAppID );
BOOL DPLAYX_DestroyLobbyApplication( DWORD dwAppID );
BOOL DPLAYX_WaitForConnectionSettings( BOOL bWait ); BOOL DPLAYX_WaitForConnectionSettings( BOOL bWait );
BOOL DPLAYX_AnyLobbiesWaitingForConnSettings(void); BOOL DPLAYX_AnyLobbiesWaitingForConnSettings(void);
...@@ -52,20 +51,10 @@ BOOL DPLAYX_AnyLobbiesWaitingForConnSettings(void); ...@@ -52,20 +51,10 @@ BOOL DPLAYX_AnyLobbiesWaitingForConnSettings(void);
BOOL DPLAYX_SetLobbyHandles( DWORD dwAppID, BOOL DPLAYX_SetLobbyHandles( DWORD dwAppID,
HANDLE hStart, HANDLE hDeath, HANDLE hConnRead ); HANDLE hStart, HANDLE hDeath, HANDLE hConnRead );
LPDPSESSIONDESC2 DPLAYX_CopyAndAllocateLocalSession( UINT* index );
BOOL DPLAYX_CopyLocalSession( UINT* index, LPDPSESSIONDESC2 lpsd );
void DPLAYX_SetLocalSession( LPCDPSESSIONDESC2 lpsd ); void DPLAYX_SetLocalSession( LPCDPSESSIONDESC2 lpsd );
BOOL DPLAYX_SetLobbyMsgThreadId( DWORD dwAppId, DWORD dwThreadId ); BOOL DPLAYX_SetLobbyMsgThreadId( DWORD dwAppId, DWORD dwThreadId );
/* FIXME: This should not be here */
LPVOID DPLAYX_PrivHeapAlloc( DWORD flags, DWORD size );
void DPLAYX_PrivHeapFree( LPVOID addr );
LPSTR DPLAYX_strdupA( DWORD flags, LPCSTR str );
LPWSTR DPLAYX_strdupW( DWORD flags, LPCWSTR str );
/* FIXME: End shared data alloc which should be local */
/* Convert a DP or DPL HRESULT code into a string for human consumption */ /* Convert a DP or DPL HRESULT code into a string for human consumption */
LPCSTR DPLAYX_HresultToString( HRESULT hr ); LPCSTR DPLAYX_HresultToString( HRESULT hr );
......
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