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,
static inline DPID DP_NextObjectId(void);
static DPID DP_GetRemoteNextObjectId(void);
static DWORD DP_CalcSessionDescSize( LPCDPSESSIONDESC2 lpSessDesc, BOOL bAnsi );
static void DP_CopySessionDesc( LPDPSESSIONDESC2 destSessionDesc,
LPCDPSESSIONDESC2 srcSessDesc, BOOL bAnsi );
......@@ -3349,7 +3349,7 @@ static HRESULT WINAPI DirectPlay2WImpl_SetSessionDesc
}
/* 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;
......
......@@ -31,8 +31,6 @@ extern HRESULT DPL_EnumAddress( LPDPENUMADDRESSCALLBACK lpEnumAddressCallback,
LPCVOID lpAddress, DWORD dwAddressSize,
LPVOID lpContext );
extern DWORD DP_CalcSessionDescSize( LPCDPSESSIONDESC2 lpSessDesc, BOOL bAnsi );
/*****************************************************************************
* Predeclare the interface implementation structures
*/
......
......@@ -89,8 +89,7 @@ typedef struct
static DPLAYX_MEM_SLICE* lpMemArea;
void DPLAYX_PrivHeapFree( LPVOID addr );
void DPLAYX_PrivHeapFree( LPVOID addr )
static void DPLAYX_PrivHeapFree( LPVOID addr )
{
LPVOID lpAddrStart;
DWORD dwBlockUsed;
......@@ -107,9 +106,7 @@ void DPLAYX_PrivHeapFree( LPVOID addr )
lpMemArea[ dwBlockUsed ].used = 0;
}
/* FIXME: This should be static, but is being used for a hack right now */
LPVOID DPLAYX_PrivHeapAlloc( DWORD flags, DWORD size );
LPVOID DPLAYX_PrivHeapAlloc( DWORD flags, DWORD size )
static LPVOID DPLAYX_PrivHeapAlloc( DWORD flags, DWORD size )
{
LPVOID lpvArea = NULL;
UINT uBlockUsed;
......@@ -144,27 +141,6 @@ LPVOID DPLAYX_PrivHeapAlloc( DWORD flags, DWORD size )
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 };
typedef struct tagDPLAYX_LOBBYDATA
......@@ -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 */
BOOL DPLAYX_CopyIntoSessionDesc2A( LPDPSESSIONDESC2 lpSessionDest,
LPCDPSESSIONDESC2 lpSessionSrc )
......@@ -1093,38 +1060,6 @@ BOOL DPLAYX_CopyIntoSessionDesc2A( LPDPSESSIONDESC2 lpSessionDest,
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 )
{
UINT i;
......
......@@ -44,7 +44,6 @@ HRESULT DPLAYX_SetConnectionSettingsW ( DWORD dwFlags,
const DPLCONNECTION *lpConn );
BOOL DPLAYX_CreateLobbyApplication( DWORD dwAppID );
BOOL DPLAYX_DestroyLobbyApplication( DWORD dwAppID );
BOOL DPLAYX_WaitForConnectionSettings( BOOL bWait );
BOOL DPLAYX_AnyLobbiesWaitingForConnSettings(void);
......@@ -52,20 +51,10 @@ BOOL DPLAYX_AnyLobbiesWaitingForConnSettings(void);
BOOL DPLAYX_SetLobbyHandles( DWORD dwAppID,
HANDLE hStart, HANDLE hDeath, HANDLE hConnRead );
LPDPSESSIONDESC2 DPLAYX_CopyAndAllocateLocalSession( UINT* index );
BOOL DPLAYX_CopyLocalSession( UINT* index, LPDPSESSIONDESC2 lpsd );
void DPLAYX_SetLocalSession( LPCDPSESSIONDESC2 lpsd );
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 */
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