2018-01-18 19:24:05 +03:00
|
|
|
#include "steam_defs.h"
|
2019-08-16 17:00:45 +03:00
|
|
|
#pragma push_macro("__cdecl")
|
|
|
|
#undef __cdecl
|
2023-05-02 11:43:23 +03:00
|
|
|
#define __cdecl
|
2018-01-18 19:24:05 +03:00
|
|
|
#include "steamworks_sdk_110/steam_api.h"
|
2019-08-16 17:00:45 +03:00
|
|
|
#pragma pop_macro("__cdecl")
|
2018-10-30 22:06:46 +03:00
|
|
|
#include "steamclient_private.h"
|
2018-01-18 19:24:05 +03:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2019-02-26 18:05:29 +03:00
|
|
|
#define SDKVER_110
|
|
|
|
#include "struct_converters.h"
|
|
|
|
#include "cppISteamNetworking_SteamNetworking003.h"
|
2023-09-24 00:44:45 +03:00
|
|
|
|
|
|
|
struct cppISteamNetworking_SteamNetworking003
|
|
|
|
{
|
|
|
|
#ifdef __cplusplus
|
|
|
|
virtual bool SendP2PPacket( CSteamID, const void *, uint32_t, uint32_t ) = 0;
|
|
|
|
virtual bool IsP2PPacketAvailable( uint32_t * ) = 0;
|
|
|
|
virtual bool ReadP2PPacket( void *, uint32_t, uint32_t *, CSteamID * ) = 0;
|
|
|
|
virtual bool AcceptP2PSessionWithUser( CSteamID ) = 0;
|
|
|
|
virtual bool CloseP2PSessionWithUser( CSteamID ) = 0;
|
|
|
|
virtual bool GetP2PSessionState( CSteamID, P2PSessionState_t * ) = 0;
|
|
|
|
virtual uint32_t CreateListenSocket( int32_t, uint32_t, uint16_t, bool ) = 0;
|
|
|
|
virtual uint32_t CreateP2PConnectionSocket( CSteamID, int32_t, int32_t, bool ) = 0;
|
|
|
|
virtual uint32_t CreateConnectionSocket( uint32_t, uint16_t, int32_t ) = 0;
|
|
|
|
virtual bool DestroySocket( uint32_t, bool ) = 0;
|
|
|
|
virtual bool DestroyListenSocket( uint32_t, bool ) = 0;
|
|
|
|
virtual bool SendDataOnSocket( uint32_t, void *, uint32_t, bool ) = 0;
|
|
|
|
virtual bool IsDataAvailableOnSocket( uint32_t, uint32_t * ) = 0;
|
|
|
|
virtual bool RetrieveDataFromSocket( uint32_t, void *, uint32_t, uint32_t * ) = 0;
|
|
|
|
virtual bool IsDataAvailable( uint32_t, uint32_t *, uint32_t * ) = 0;
|
|
|
|
virtual bool RetrieveData( uint32_t, void *, uint32_t, uint32_t *, uint32_t * ) = 0;
|
|
|
|
virtual bool GetSocketInfo( uint32_t, CSteamID *, int32_t *, uint32_t *, uint16_t * ) = 0;
|
|
|
|
virtual bool GetListenSocketInfo( uint32_t, uint32_t *, uint16_t * ) = 0;
|
|
|
|
virtual uint32_t GetSocketConnectionType( uint32_t ) = 0;
|
|
|
|
virtual int32_t GetMaxPacketSize( uint32_t ) = 0;
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
};
|
|
|
|
|
2023-09-27 15:34:23 +03:00
|
|
|
void cppISteamNetworking_SteamNetworking003_SendP2PPacket( struct cppISteamNetworking_SteamNetworking003_SendP2PPacket_params *params )
|
2018-01-18 19:24:05 +03:00
|
|
|
{
|
2023-09-24 00:44:45 +03:00
|
|
|
struct cppISteamNetworking_SteamNetworking003 *iface = (struct cppISteamNetworking_SteamNetworking003 *)params->linux_side;
|
|
|
|
params->_ret = iface->SendP2PPacket( params->steamIDRemote, params->pubData, params->cubData, params->eP2PSendType );
|
2018-01-18 19:24:05 +03:00
|
|
|
}
|
|
|
|
|
2023-09-27 15:34:23 +03:00
|
|
|
void cppISteamNetworking_SteamNetworking003_IsP2PPacketAvailable( struct cppISteamNetworking_SteamNetworking003_IsP2PPacketAvailable_params *params )
|
2018-01-18 19:24:05 +03:00
|
|
|
{
|
2023-09-24 00:44:45 +03:00
|
|
|
struct cppISteamNetworking_SteamNetworking003 *iface = (struct cppISteamNetworking_SteamNetworking003 *)params->linux_side;
|
|
|
|
params->_ret = iface->IsP2PPacketAvailable( params->pcubMsgSize );
|
2018-01-18 19:24:05 +03:00
|
|
|
}
|
|
|
|
|
2023-09-27 15:34:23 +03:00
|
|
|
void cppISteamNetworking_SteamNetworking003_ReadP2PPacket( struct cppISteamNetworking_SteamNetworking003_ReadP2PPacket_params *params )
|
2018-01-18 19:24:05 +03:00
|
|
|
{
|
2023-09-24 00:44:45 +03:00
|
|
|
struct cppISteamNetworking_SteamNetworking003 *iface = (struct cppISteamNetworking_SteamNetworking003 *)params->linux_side;
|
|
|
|
params->_ret = iface->ReadP2PPacket( params->pubDest, params->cubDest, params->pcubMsgSize, params->psteamIDRemote );
|
2018-01-18 19:24:05 +03:00
|
|
|
}
|
|
|
|
|
2023-09-27 15:34:23 +03:00
|
|
|
void cppISteamNetworking_SteamNetworking003_AcceptP2PSessionWithUser( struct cppISteamNetworking_SteamNetworking003_AcceptP2PSessionWithUser_params *params )
|
2018-01-18 19:24:05 +03:00
|
|
|
{
|
2023-09-24 00:44:45 +03:00
|
|
|
struct cppISteamNetworking_SteamNetworking003 *iface = (struct cppISteamNetworking_SteamNetworking003 *)params->linux_side;
|
|
|
|
params->_ret = iface->AcceptP2PSessionWithUser( params->steamIDRemote );
|
2018-01-18 19:24:05 +03:00
|
|
|
}
|
|
|
|
|
2023-09-27 15:34:23 +03:00
|
|
|
void cppISteamNetworking_SteamNetworking003_CloseP2PSessionWithUser( struct cppISteamNetworking_SteamNetworking003_CloseP2PSessionWithUser_params *params )
|
2018-01-18 19:24:05 +03:00
|
|
|
{
|
2023-09-24 00:44:45 +03:00
|
|
|
struct cppISteamNetworking_SteamNetworking003 *iface = (struct cppISteamNetworking_SteamNetworking003 *)params->linux_side;
|
|
|
|
params->_ret = iface->CloseP2PSessionWithUser( params->steamIDRemote );
|
2018-01-18 19:24:05 +03:00
|
|
|
}
|
|
|
|
|
2023-09-27 15:34:23 +03:00
|
|
|
void cppISteamNetworking_SteamNetworking003_GetP2PSessionState( struct cppISteamNetworking_SteamNetworking003_GetP2PSessionState_params *params )
|
2018-01-18 19:24:05 +03:00
|
|
|
{
|
2023-09-24 00:44:45 +03:00
|
|
|
struct cppISteamNetworking_SteamNetworking003 *iface = (struct cppISteamNetworking_SteamNetworking003 *)params->linux_side;
|
|
|
|
params->_ret = iface->GetP2PSessionState( params->steamIDRemote, params->pConnectionState );
|
2018-01-18 19:24:05 +03:00
|
|
|
}
|
|
|
|
|
2023-09-27 15:34:23 +03:00
|
|
|
void cppISteamNetworking_SteamNetworking003_CreateListenSocket( struct cppISteamNetworking_SteamNetworking003_CreateListenSocket_params *params )
|
2018-01-18 19:24:05 +03:00
|
|
|
{
|
2023-09-24 00:44:45 +03:00
|
|
|
struct cppISteamNetworking_SteamNetworking003 *iface = (struct cppISteamNetworking_SteamNetworking003 *)params->linux_side;
|
|
|
|
params->_ret = iface->CreateListenSocket( params->nVirtualP2PPort, params->nIP, params->nPort, params->bAllowUseOfPacketRelay );
|
2018-01-18 19:24:05 +03:00
|
|
|
}
|
|
|
|
|
2023-09-27 15:34:23 +03:00
|
|
|
void cppISteamNetworking_SteamNetworking003_CreateP2PConnectionSocket( struct cppISteamNetworking_SteamNetworking003_CreateP2PConnectionSocket_params *params )
|
2018-01-18 19:24:05 +03:00
|
|
|
{
|
2023-09-24 00:44:45 +03:00
|
|
|
struct cppISteamNetworking_SteamNetworking003 *iface = (struct cppISteamNetworking_SteamNetworking003 *)params->linux_side;
|
|
|
|
params->_ret = iface->CreateP2PConnectionSocket( params->steamIDTarget, params->nVirtualPort, params->nTimeoutSec, params->bAllowUseOfPacketRelay );
|
2018-01-18 19:24:05 +03:00
|
|
|
}
|
|
|
|
|
2023-09-27 15:34:23 +03:00
|
|
|
void cppISteamNetworking_SteamNetworking003_CreateConnectionSocket( struct cppISteamNetworking_SteamNetworking003_CreateConnectionSocket_params *params )
|
2018-01-18 19:24:05 +03:00
|
|
|
{
|
2023-09-24 00:44:45 +03:00
|
|
|
struct cppISteamNetworking_SteamNetworking003 *iface = (struct cppISteamNetworking_SteamNetworking003 *)params->linux_side;
|
|
|
|
params->_ret = iface->CreateConnectionSocket( params->nIP, params->nPort, params->nTimeoutSec );
|
2018-01-18 19:24:05 +03:00
|
|
|
}
|
|
|
|
|
2023-09-27 15:34:23 +03:00
|
|
|
void cppISteamNetworking_SteamNetworking003_DestroySocket( struct cppISteamNetworking_SteamNetworking003_DestroySocket_params *params )
|
2018-01-18 19:24:05 +03:00
|
|
|
{
|
2023-09-24 00:44:45 +03:00
|
|
|
struct cppISteamNetworking_SteamNetworking003 *iface = (struct cppISteamNetworking_SteamNetworking003 *)params->linux_side;
|
|
|
|
params->_ret = iface->DestroySocket( params->hSocket, params->bNotifyRemoteEnd );
|
2018-01-18 19:24:05 +03:00
|
|
|
}
|
|
|
|
|
2023-09-27 15:34:23 +03:00
|
|
|
void cppISteamNetworking_SteamNetworking003_DestroyListenSocket( struct cppISteamNetworking_SteamNetworking003_DestroyListenSocket_params *params )
|
2018-01-18 19:24:05 +03:00
|
|
|
{
|
2023-09-24 00:44:45 +03:00
|
|
|
struct cppISteamNetworking_SteamNetworking003 *iface = (struct cppISteamNetworking_SteamNetworking003 *)params->linux_side;
|
|
|
|
params->_ret = iface->DestroyListenSocket( params->hSocket, params->bNotifyRemoteEnd );
|
2018-01-18 19:24:05 +03:00
|
|
|
}
|
|
|
|
|
2023-09-27 15:34:23 +03:00
|
|
|
void cppISteamNetworking_SteamNetworking003_SendDataOnSocket( struct cppISteamNetworking_SteamNetworking003_SendDataOnSocket_params *params )
|
2018-01-18 19:24:05 +03:00
|
|
|
{
|
2023-09-24 00:44:45 +03:00
|
|
|
struct cppISteamNetworking_SteamNetworking003 *iface = (struct cppISteamNetworking_SteamNetworking003 *)params->linux_side;
|
|
|
|
params->_ret = iface->SendDataOnSocket( params->hSocket, params->pubData, params->cubData, params->bReliable );
|
2018-01-18 19:24:05 +03:00
|
|
|
}
|
|
|
|
|
2023-09-27 15:34:23 +03:00
|
|
|
void cppISteamNetworking_SteamNetworking003_IsDataAvailableOnSocket( struct cppISteamNetworking_SteamNetworking003_IsDataAvailableOnSocket_params *params )
|
2018-01-18 19:24:05 +03:00
|
|
|
{
|
2023-09-24 00:44:45 +03:00
|
|
|
struct cppISteamNetworking_SteamNetworking003 *iface = (struct cppISteamNetworking_SteamNetworking003 *)params->linux_side;
|
|
|
|
params->_ret = iface->IsDataAvailableOnSocket( params->hSocket, params->pcubMsgSize );
|
2018-01-18 19:24:05 +03:00
|
|
|
}
|
|
|
|
|
2023-09-27 15:34:23 +03:00
|
|
|
void cppISteamNetworking_SteamNetworking003_RetrieveDataFromSocket( struct cppISteamNetworking_SteamNetworking003_RetrieveDataFromSocket_params *params )
|
2018-01-18 19:24:05 +03:00
|
|
|
{
|
2023-09-24 00:44:45 +03:00
|
|
|
struct cppISteamNetworking_SteamNetworking003 *iface = (struct cppISteamNetworking_SteamNetworking003 *)params->linux_side;
|
|
|
|
params->_ret = iface->RetrieveDataFromSocket( params->hSocket, params->pubDest, params->cubDest, params->pcubMsgSize );
|
2018-01-18 19:24:05 +03:00
|
|
|
}
|
|
|
|
|
2023-09-27 15:34:23 +03:00
|
|
|
void cppISteamNetworking_SteamNetworking003_IsDataAvailable( struct cppISteamNetworking_SteamNetworking003_IsDataAvailable_params *params )
|
2018-01-18 19:24:05 +03:00
|
|
|
{
|
2023-09-24 00:44:45 +03:00
|
|
|
struct cppISteamNetworking_SteamNetworking003 *iface = (struct cppISteamNetworking_SteamNetworking003 *)params->linux_side;
|
|
|
|
params->_ret = iface->IsDataAvailable( params->hListenSocket, params->pcubMsgSize, params->phSocket );
|
2018-01-18 19:24:05 +03:00
|
|
|
}
|
|
|
|
|
2023-09-27 15:34:23 +03:00
|
|
|
void cppISteamNetworking_SteamNetworking003_RetrieveData( struct cppISteamNetworking_SteamNetworking003_RetrieveData_params *params )
|
2018-01-18 19:24:05 +03:00
|
|
|
{
|
2023-09-24 00:44:45 +03:00
|
|
|
struct cppISteamNetworking_SteamNetworking003 *iface = (struct cppISteamNetworking_SteamNetworking003 *)params->linux_side;
|
|
|
|
params->_ret = iface->RetrieveData( params->hListenSocket, params->pubDest, params->cubDest, params->pcubMsgSize, params->phSocket );
|
2018-01-18 19:24:05 +03:00
|
|
|
}
|
|
|
|
|
2023-09-27 15:34:23 +03:00
|
|
|
void cppISteamNetworking_SteamNetworking003_GetSocketInfo( struct cppISteamNetworking_SteamNetworking003_GetSocketInfo_params *params )
|
2018-01-18 19:24:05 +03:00
|
|
|
{
|
2023-09-24 00:44:45 +03:00
|
|
|
struct cppISteamNetworking_SteamNetworking003 *iface = (struct cppISteamNetworking_SteamNetworking003 *)params->linux_side;
|
|
|
|
params->_ret = iface->GetSocketInfo( params->hSocket, params->pSteamIDRemote, params->peSocketStatus, params->punIPRemote, params->punPortRemote );
|
2018-01-18 19:24:05 +03:00
|
|
|
}
|
|
|
|
|
2023-09-27 15:34:23 +03:00
|
|
|
void cppISteamNetworking_SteamNetworking003_GetListenSocketInfo( struct cppISteamNetworking_SteamNetworking003_GetListenSocketInfo_params *params )
|
2018-01-18 19:24:05 +03:00
|
|
|
{
|
2023-09-24 00:44:45 +03:00
|
|
|
struct cppISteamNetworking_SteamNetworking003 *iface = (struct cppISteamNetworking_SteamNetworking003 *)params->linux_side;
|
|
|
|
params->_ret = iface->GetListenSocketInfo( params->hListenSocket, params->pnIP, params->pnPort );
|
2018-01-18 19:24:05 +03:00
|
|
|
}
|
|
|
|
|
2023-09-27 15:34:23 +03:00
|
|
|
void cppISteamNetworking_SteamNetworking003_GetSocketConnectionType( struct cppISteamNetworking_SteamNetworking003_GetSocketConnectionType_params *params )
|
2018-01-18 19:24:05 +03:00
|
|
|
{
|
2023-09-24 00:44:45 +03:00
|
|
|
struct cppISteamNetworking_SteamNetworking003 *iface = (struct cppISteamNetworking_SteamNetworking003 *)params->linux_side;
|
|
|
|
params->_ret = iface->GetSocketConnectionType( params->hSocket );
|
2018-01-18 19:24:05 +03:00
|
|
|
}
|
|
|
|
|
2023-09-27 15:34:23 +03:00
|
|
|
void cppISteamNetworking_SteamNetworking003_GetMaxPacketSize( struct cppISteamNetworking_SteamNetworking003_GetMaxPacketSize_params *params )
|
2018-01-18 19:24:05 +03:00
|
|
|
{
|
2023-09-24 00:44:45 +03:00
|
|
|
struct cppISteamNetworking_SteamNetworking003 *iface = (struct cppISteamNetworking_SteamNetworking003 *)params->linux_side;
|
|
|
|
params->_ret = iface->GetMaxPacketSize( params->hSocket );
|
2018-01-18 19:24:05 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|