mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2025-12-05 03:34:52 +01:00
Update to sdk 1.48
This commit is contained in:
parent
a0b66407bf
commit
5c41ba020c
32 changed files with 4617 additions and 2410 deletions
237
dll/dll.cpp
237
dll/dll.cpp
|
|
@ -709,12 +709,161 @@ STEAMAPI_API uint32 SteamGameServer_GetIPCCallCount()
|
|||
|
||||
STEAMAPI_API void S_CALLTYPE SteamAPI_UseBreakpadCrashHandler( char const *pchVersion, char const *pchDate, char const *pchTime, bool bFullMemoryDumps, void *pvContext, PFNPreMinidumpCallback m_pfnPreMinidumpCallback )
|
||||
{
|
||||
|
||||
PRINT_DEBUG("%s\n", __FUNCTION__);
|
||||
}
|
||||
|
||||
STEAMAPI_API void S_CALLTYPE SteamAPI_SetBreakpadAppID( uint32 unAppID )
|
||||
{
|
||||
PRINT_DEBUG("%s\n", __FUNCTION__);
|
||||
}
|
||||
|
||||
struct cb_data {
|
||||
int cb_id;
|
||||
std::vector<char> result;
|
||||
};
|
||||
static std::queue<struct cb_data> client_cb;
|
||||
static std::queue<struct cb_data> server_cb;
|
||||
|
||||
static void cb_add_queue_server(std::vector<char> result, int callback)
|
||||
{
|
||||
struct cb_data cb;
|
||||
cb.cb_id = callback;
|
||||
cb.result = result;
|
||||
server_cb.push(cb);
|
||||
}
|
||||
|
||||
static void cb_add_queue_client(std::vector<char> result, int callback)
|
||||
{
|
||||
struct cb_data cb;
|
||||
cb.cb_id = callback;
|
||||
cb.result = result;
|
||||
client_cb.push(cb);
|
||||
}
|
||||
|
||||
/// Inform the API that you wish to use manual event dispatch. This must be called after SteamAPI_Init, but before
|
||||
/// you use any of the other manual dispatch functions below.
|
||||
STEAMAPI_API void S_CALLTYPE SteamAPI_ManualDispatch_Init()
|
||||
{
|
||||
PRINT_DEBUG("%s\n", __FUNCTION__);
|
||||
Steam_Client *steam_client = get_steam_client();
|
||||
steam_client->callback_results_server->setCbAll(&cb_add_queue_server);
|
||||
steam_client->callback_results_client->setCbAll(&cb_add_queue_client);
|
||||
}
|
||||
|
||||
/// Perform certain periodic actions that need to be performed.
|
||||
STEAMAPI_API void S_CALLTYPE SteamAPI_ManualDispatch_RunFrame( HSteamPipe hSteamPipe )
|
||||
{
|
||||
PRINT_DEBUG("%s %i\n", __FUNCTION__, hSteamPipe);
|
||||
Steam_Client *steam_client = get_steam_client();
|
||||
if (!steam_client->steam_pipes.count(hSteamPipe)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (steam_client->steam_pipes[hSteamPipe] == Steam_Pipe::SERVER) {
|
||||
steam_client->RunCallbacks(false, true);
|
||||
} else if (steam_client->steam_pipes[hSteamPipe] == Steam_Pipe::CLIENT) {
|
||||
steam_client->RunCallbacks(true, false);
|
||||
}
|
||||
}
|
||||
|
||||
/// Fetch the next pending callback on the given pipe, if any. If a callback is available, true is returned
|
||||
/// and the structure is populated. In this case, you MUST call SteamAPI_ManualDispatch_FreeLastCallback
|
||||
/// (after dispatching the callback) before calling SteamAPI_ManualDispatch_GetNextCallback again.
|
||||
STEAMAPI_API bool S_CALLTYPE SteamAPI_ManualDispatch_GetNextCallback( HSteamPipe hSteamPipe, CallbackMsg_t *pCallbackMsg )
|
||||
{
|
||||
PRINT_DEBUG("%s\n", __FUNCTION__);
|
||||
std::queue<struct cb_data> *q = NULL;
|
||||
HSteamUser m_hSteamUser = 0;
|
||||
Steam_Client *steam_client = get_steam_client();
|
||||
if (!steam_client->steamclient_server_inited) {
|
||||
while(!server_cb.empty()) server_cb.pop();
|
||||
}
|
||||
|
||||
if (!steam_client->steam_pipes.count(hSteamPipe)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (steam_client->steam_pipes[hSteamPipe] == Steam_Pipe::SERVER) {
|
||||
q = &server_cb;
|
||||
m_hSteamUser = SERVER_HSTEAMUSER;
|
||||
} else if (steam_client->steam_pipes[hSteamPipe] == Steam_Pipe::CLIENT) {
|
||||
q = &client_cb;
|
||||
m_hSteamUser = CLIENT_HSTEAMUSER;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (q->empty()) return false;
|
||||
if (pCallbackMsg) {
|
||||
pCallbackMsg->m_hSteamUser = m_hSteamUser;
|
||||
pCallbackMsg->m_iCallback = q->front().cb_id;
|
||||
pCallbackMsg->m_pubParam = (uint8 *)&(q->front().result[0]);
|
||||
pCallbackMsg->m_cubParam = q->front().result.size();
|
||||
PRINT_DEBUG("Steam_BGetCallback cb number %i\n", q->front().cb_id);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/// You must call this after dispatching the callback, if SteamAPI_ManualDispatch_GetNextCallback returns true.
|
||||
STEAMAPI_API void S_CALLTYPE SteamAPI_ManualDispatch_FreeLastCallback( HSteamPipe hSteamPipe )
|
||||
{
|
||||
PRINT_DEBUG("%s %i\n", __FUNCTION__, hSteamPipe);
|
||||
std::queue<struct cb_data> *q = NULL;
|
||||
Steam_Client *steam_client = get_steam_client();
|
||||
if (!steam_client->steam_pipes.count(hSteamPipe)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (steam_client->steam_pipes[hSteamPipe] == Steam_Pipe::SERVER) {
|
||||
q = &server_cb;
|
||||
} else if (steam_client->steam_pipes[hSteamPipe] == Steam_Pipe::CLIENT) {
|
||||
q = &client_cb;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!q->empty()) q->pop();
|
||||
}
|
||||
|
||||
/// Return the call result for the specified call on the specified pipe. You really should
|
||||
/// only call this in a handler for SteamAPICallCompleted_t callback.
|
||||
STEAMAPI_API bool S_CALLTYPE SteamAPI_ManualDispatch_GetAPICallResult( HSteamPipe hSteamPipe, SteamAPICall_t hSteamAPICall, void *pCallback, int cubCallback, int iCallbackExpected, bool *pbFailed )
|
||||
{
|
||||
PRINT_DEBUG("SteamAPI_ManualDispatch_GetAPICallResult %i %llu %i %i\n", hSteamPipe, hSteamAPICall, cubCallback, iCallbackExpected);
|
||||
Steam_Client *steam_client = get_steam_client();
|
||||
if (!steam_client->steam_pipes.count(hSteamPipe)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (steam_client->steam_pipes[hSteamPipe] == Steam_Pipe::SERVER) {
|
||||
return get_steam_client()->steam_gameserver_utils->GetAPICallResult(hSteamAPICall, pCallback, cubCallback, iCallbackExpected, pbFailed);
|
||||
} else if (steam_client->steam_pipes[hSteamPipe] == Steam_Pipe::CLIENT) {
|
||||
return get_steam_client()->steam_utils->GetAPICallResult(hSteamAPICall, pCallback, cubCallback, iCallbackExpected, pbFailed);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
HSteamUser flat_hsteamuser()
|
||||
{
|
||||
return SteamAPI_GetHSteamUser();
|
||||
}
|
||||
|
||||
HSteamPipe flat_hsteampipe()
|
||||
{
|
||||
return SteamAPI_GetHSteamPipe();
|
||||
}
|
||||
|
||||
HSteamUser flat_gs_hsteamuser()
|
||||
{
|
||||
return SteamGameServer_GetHSteamUser();
|
||||
}
|
||||
|
||||
HSteamPipe flat_gs_hsteampipe()
|
||||
{
|
||||
return SteamGameServer_GetHSteamPipe();
|
||||
}
|
||||
|
||||
//VR stuff
|
||||
|
|
@ -811,104 +960,26 @@ SteamMasterServerUpdater
|
|||
|
||||
*/
|
||||
|
||||
struct cb_data {
|
||||
int cb_id;
|
||||
std::vector<char> result;
|
||||
};
|
||||
static std::queue<struct cb_data> client_cb;
|
||||
static std::queue<struct cb_data> server_cb;
|
||||
|
||||
static void cb_add_queue_server(std::vector<char> result, int callback)
|
||||
{
|
||||
struct cb_data cb;
|
||||
cb.cb_id = callback;
|
||||
cb.result = result;
|
||||
server_cb.push(cb);
|
||||
}
|
||||
|
||||
static void cb_add_queue_client(std::vector<char> result, int callback)
|
||||
{
|
||||
struct cb_data cb;
|
||||
cb.cb_id = callback;
|
||||
cb.result = result;
|
||||
client_cb.push(cb);
|
||||
}
|
||||
|
||||
STEAMCLIENT_API bool Steam_BGetCallback( HSteamPipe hSteamPipe, CallbackMsg_t *pCallbackMsg )
|
||||
{
|
||||
PRINT_DEBUG("%s %i\n", __FUNCTION__, hSteamPipe);
|
||||
std::queue<struct cb_data> *q = NULL;
|
||||
HSteamUser m_hSteamUser = 0;
|
||||
SteamAPI_ManualDispatch_Init();
|
||||
Steam_Client *steam_client = get_steam_client();
|
||||
steam_client->callback_results_server->setCbAll(&cb_add_queue_server);
|
||||
steam_client->callback_results_client->setCbAll(&cb_add_queue_client);
|
||||
steam_client->RunCallbacks(true, true);
|
||||
if (!steam_client->steamclient_server_inited) {
|
||||
while(!server_cb.empty()) server_cb.pop();
|
||||
}
|
||||
|
||||
if (!steam_client->steam_pipes.count(hSteamPipe)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (steam_client->steam_pipes[hSteamPipe] == Steam_Pipe::SERVER) {
|
||||
q = &server_cb;
|
||||
m_hSteamUser = SERVER_HSTEAMUSER;
|
||||
} else if (steam_client->steam_pipes[hSteamPipe] == Steam_Pipe::CLIENT) {
|
||||
q = &client_cb;
|
||||
m_hSteamUser = CLIENT_HSTEAMUSER;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (q->empty()) return false;
|
||||
if (pCallbackMsg) {
|
||||
pCallbackMsg->m_hSteamUser = m_hSteamUser;
|
||||
pCallbackMsg->m_iCallback = q->front().cb_id;
|
||||
pCallbackMsg->m_pubParam = (uint8 *)&(q->front().result[0]);
|
||||
pCallbackMsg->m_cubParam = q->front().result.size();
|
||||
PRINT_DEBUG("Steam_BGetCallback cb number %i\n", q->front().cb_id);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return SteamAPI_ManualDispatch_GetNextCallback( hSteamPipe, pCallbackMsg );
|
||||
}
|
||||
|
||||
STEAMCLIENT_API void Steam_FreeLastCallback( HSteamPipe hSteamPipe )
|
||||
{
|
||||
PRINT_DEBUG("%s %i\n", __FUNCTION__, hSteamPipe);
|
||||
std::queue<struct cb_data> *q = NULL;
|
||||
Steam_Client *steam_client = get_steam_client();
|
||||
if (!steam_client->steam_pipes.count(hSteamPipe)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (steam_client->steam_pipes[hSteamPipe] == Steam_Pipe::SERVER) {
|
||||
q = &server_cb;
|
||||
} else if (steam_client->steam_pipes[hSteamPipe] == Steam_Pipe::CLIENT) {
|
||||
q = &client_cb;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!q->empty()) q->pop();
|
||||
SteamAPI_ManualDispatch_FreeLastCallback( hSteamPipe );
|
||||
}
|
||||
|
||||
STEAMCLIENT_API bool Steam_GetAPICallResult( HSteamPipe hSteamPipe, SteamAPICall_t hSteamAPICall, void* pCallback, int cubCallback, int iCallbackExpected, bool* pbFailed )
|
||||
{
|
||||
PRINT_DEBUG("Steam_GetAPICallResult %i %llu %i %i\n", hSteamPipe, hSteamAPICall, cubCallback, iCallbackExpected);
|
||||
Steam_Client *steam_client = get_steam_client();
|
||||
if (!steam_client->steam_pipes.count(hSteamPipe)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (steam_client->steam_pipes[hSteamPipe] == Steam_Pipe::SERVER) {
|
||||
return get_steam_client()->steam_gameserver_utils->GetAPICallResult(hSteamAPICall, pCallback, cubCallback, iCallbackExpected, pbFailed);
|
||||
} else if (steam_client->steam_pipes[hSteamPipe] == Steam_Pipe::CLIENT) {
|
||||
return get_steam_client()->steam_utils->GetAPICallResult(hSteamAPICall, pCallback, cubCallback, iCallbackExpected, pbFailed);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return SteamAPI_ManualDispatch_GetAPICallResult(hSteamPipe, hSteamAPICall, pCallback, cubCallback, iCallbackExpected, pbFailed);
|
||||
}
|
||||
|
||||
STEAMCLIENT_API void *CreateInterface( const char *pName, int *pReturnCode )
|
||||
|
|
|
|||
|
|
@ -26,4 +26,9 @@
|
|||
#endif
|
||||
|
||||
Steam_Client *get_steam_client();
|
||||
bool steamclient_has_ipv6_functions();
|
||||
bool steamclient_has_ipv6_functions();
|
||||
|
||||
HSteamUser flat_hsteamuser();
|
||||
HSteamPipe flat_hsteampipe();
|
||||
HSteamUser flat_gs_hsteamuser();
|
||||
HSteamPipe flat_gs_hsteampipe();
|
||||
|
|
|
|||
3550
dll/flat.cpp
3550
dll/flat.cpp
File diff suppressed because it is too large
Load diff
|
|
@ -93,6 +93,7 @@ Steam_Client::Steam_Client()
|
|||
steam_game_search = new Steam_Game_Search(settings_client, network, callback_results_client, callbacks_client, run_every_runcb);
|
||||
steam_parties = new Steam_Parties(settings_client, network, callback_results_client, callbacks_client, run_every_runcb);
|
||||
steam_remoteplay = new Steam_RemotePlay(settings_client, network, callback_results_client, callbacks_client, run_every_runcb);
|
||||
steam_tv = new Steam_TV(settings_client, network, callback_results_client, callbacks_client, run_every_runcb);
|
||||
|
||||
PRINT_DEBUG("client init gameserver\n");
|
||||
steam_gameserver = new Steam_GameServer(settings_server, network, callbacks_server);
|
||||
|
|
@ -487,6 +488,8 @@ void *Steam_Client::GetISteamGenericInterface( HSteamUser hSteamUser, HSteamPipe
|
|||
return (void *)(ISteamNetworkingSockets002 *) steam_networking_sockets_temp;
|
||||
} else if (strcmp(pchVersion, "SteamNetworkingSockets003") == 0) {
|
||||
return (void *)(ISteamNetworkingSockets003 *) steam_networking_sockets_temp;
|
||||
} else if (strcmp(pchVersion, "SteamNetworkingSockets006") == 0) {
|
||||
return (void *)(ISteamNetworkingSockets006 *) steam_networking_sockets_temp;
|
||||
} else {
|
||||
return (void *)(ISteamNetworkingSockets *) steam_networking_sockets_temp;
|
||||
}
|
||||
|
|
@ -499,6 +502,8 @@ void *Steam_Client::GetISteamGenericInterface( HSteamUser hSteamUser, HSteamPipe
|
|||
}
|
||||
|
||||
return (void *)(ISteamGameCoordinator *)steam_game_coordinator_temp;
|
||||
} else if (strstr(pchVersion, STEAMTV_INTERFACE_VERSION) == pchVersion) {
|
||||
return (void *)(ISteamTV *)steam_tv;
|
||||
} else if (strstr(pchVersion, "SteamNetworkingUtils") == pchVersion) {
|
||||
if (strcmp(pchVersion, "SteamNetworkingUtils001") == 0) {
|
||||
return (void *)(ISteamNetworkingUtils001 *)steam_networking_utils;
|
||||
|
|
@ -675,7 +680,7 @@ ISteamNetworking *Steam_Client::GetISteamNetworking( HSteamUser hSteamUser, HSte
|
|||
return (ISteamNetworking *)(void *)(ISteamNetworking004 *)steam_networking_temp;
|
||||
} else if (strcmp(pchVersion, "SteamNetworking005") == 0) {
|
||||
return (ISteamNetworking *)(void *)(ISteamNetworking005 *)steam_networking_temp;
|
||||
} else if (strcmp(pchVersion, STEAMUGC_INTERFACE_VERSION) == 0) {
|
||||
} else if (strcmp(pchVersion, STEAMNETWORKING_INTERFACE_VERSION) == 0) {
|
||||
return (ISteamNetworking *)(void *)(ISteamNetworking *)steam_networking_temp;
|
||||
} else {
|
||||
return (ISteamNetworking *)(void *)(ISteamNetworking *)steam_networking_temp;
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@
|
|||
#include "steam_gamesearch.h"
|
||||
#include "steam_parties.h"
|
||||
#include "steam_remoteplay.h"
|
||||
#include "steam_tv.h"
|
||||
|
||||
#include "steam_gameserver.h"
|
||||
#include "steam_gameserverstats.h"
|
||||
|
|
@ -115,6 +116,7 @@ public:
|
|||
Steam_Game_Search *steam_game_search;
|
||||
Steam_Parties *steam_parties;
|
||||
Steam_RemotePlay *steam_remoteplay;
|
||||
Steam_TV *steam_tv;
|
||||
|
||||
Steam_GameServer *steam_gameserver;
|
||||
Steam_Utils *steam_gameserver_utils;
|
||||
|
|
|
|||
|
|
@ -994,6 +994,11 @@ int GetNumChatsWithUnreadPriorityMessages()
|
|||
return 0;
|
||||
}
|
||||
|
||||
void ActivateGameOverlayRemotePlayTogetherInviteDialog( CSteamID steamIDLobby )
|
||||
{
|
||||
PRINT_DEBUG("Steam_Friends::ActivateGameOverlayRemotePlayTogetherInviteDialog\n");
|
||||
}
|
||||
|
||||
void RunCallbacks()
|
||||
{
|
||||
PRINT_DEBUG("Steam_Friends::RunCallbacks\n");
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ class Steam_Networking_Sockets :
|
|||
public ISteamNetworkingSockets001,
|
||||
public ISteamNetworkingSockets002,
|
||||
public ISteamNetworkingSockets003,
|
||||
public ISteamNetworkingSockets006,
|
||||
public ISteamNetworkingSockets
|
||||
{
|
||||
class Settings *settings;
|
||||
|
|
@ -980,6 +981,64 @@ ESteamNetworkingAvailability GetAuthenticationStatus( SteamNetAuthenticationStat
|
|||
PRINT_DEBUG("Steam_Networking_Sockets::GetAuthenticationStatus\n");
|
||||
}
|
||||
|
||||
/// Create a new poll group.
|
||||
///
|
||||
/// You should destroy the poll group when you are done using DestroyPollGroup
|
||||
HSteamNetPollGroup CreatePollGroup()
|
||||
{
|
||||
PRINT_DEBUG("Steam_Networking_Sockets::CreatePollGroup\n");
|
||||
}
|
||||
|
||||
/// Destroy a poll group created with CreatePollGroup().
|
||||
///
|
||||
/// If there are any connections in the poll group, they are removed from the group,
|
||||
/// and left in a state where they are not part of any poll group.
|
||||
/// Returns false if passed an invalid poll group handle.
|
||||
bool DestroyPollGroup( HSteamNetPollGroup hPollGroup )
|
||||
{
|
||||
PRINT_DEBUG("Steam_Networking_Sockets::DestroyPollGroup\n");
|
||||
}
|
||||
|
||||
/// Assign a connection to a poll group. Note that a connection may only belong to a
|
||||
/// single poll group. Adding a connection to a poll group implicitly removes it from
|
||||
/// any other poll group it is in.
|
||||
///
|
||||
/// You can pass k_HSteamNetPollGroup_Invalid to remove a connection from its current
|
||||
/// poll group without adding it to a new poll group.
|
||||
///
|
||||
/// If there are received messages currently pending on the connection, an attempt
|
||||
/// is made to add them to the queue of messages for the poll group in approximately
|
||||
/// the order that would have applied if the connection was already part of the poll
|
||||
/// group at the time that the messages were received.
|
||||
///
|
||||
/// Returns false if the connection handle is invalid, or if the poll group handle
|
||||
/// is invalid (and not k_HSteamNetPollGroup_Invalid).
|
||||
bool SetConnectionPollGroup( HSteamNetConnection hConn, HSteamNetPollGroup hPollGroup )
|
||||
{
|
||||
PRINT_DEBUG("Steam_Networking_Sockets::SetConnectionPollGroup\n");
|
||||
}
|
||||
|
||||
/// Same as ReceiveMessagesOnConnection, but will return the next messages available
|
||||
/// on any connection in the poll group. Examine SteamNetworkingMessage_t::m_conn
|
||||
/// to know which connection. (SteamNetworkingMessage_t::m_nConnUserData might also
|
||||
/// be useful.)
|
||||
///
|
||||
/// Delivery order of messages among different connections will usually match the
|
||||
/// order that the last packet was received which completed the message. But this
|
||||
/// is not a strong guarantee, especially for packets received right as a connection
|
||||
/// is being assigned to poll group.
|
||||
///
|
||||
/// Delivery order of messages on the same connection is well defined and the
|
||||
/// same guarantees are present as mentioned in ReceiveMessagesOnConnection.
|
||||
/// (But the messages are not grouped by connection, so they will not necessarily
|
||||
/// appear consecutively in the list; they may be interleaved with messages for
|
||||
/// other connections.)
|
||||
int ReceiveMessagesOnPollGroup( HSteamNetPollGroup hPollGroup, SteamNetworkingMessage_t **ppOutMessages, int nMaxMessages )
|
||||
{
|
||||
PRINT_DEBUG("Steam_Networking_Sockets::ReceiveMessagesOnPollGroup\n");
|
||||
}
|
||||
|
||||
|
||||
//#ifndef STEAMNETWORKINGSOCKETS_OPENSOURCE
|
||||
|
||||
//
|
||||
|
|
@ -1345,6 +1404,29 @@ bool ReceivedP2PCustomSignal( const void *pMsg, int cbMsg, ISteamNetworkingCusto
|
|||
PRINT_DEBUG("Steam_Networking_Sockets::ReceivedP2PCustomSignal\n");
|
||||
}
|
||||
|
||||
//
|
||||
// Certificate provision by the application. On Steam, we normally handle all this automatically
|
||||
// and you will not need to use these advanced functions.
|
||||
//
|
||||
|
||||
/// Get blob that describes a certificate request. You can send this to your game coordinator.
|
||||
/// Upon entry, *pcbBlob should contain the size of the buffer. On successful exit, it will
|
||||
/// return the number of bytes that were populated. You can pass pBlob=NULL to query for the required
|
||||
/// size. (256 bytes is a very conservative estimate.)
|
||||
///
|
||||
/// Pass this blob to your game coordinator and call SteamDatagram_CreateCert.
|
||||
bool GetCertificateRequest( int *pcbBlob, void *pBlob, SteamNetworkingErrMsg &errMsg )
|
||||
{
|
||||
PRINT_DEBUG("Steam_Networking_Sockets::GetCertificateRequest\n");
|
||||
}
|
||||
|
||||
/// Set the certificate. The certificate blob should be the output of
|
||||
/// SteamDatagram_CreateCert.
|
||||
bool SetCertificate( const void *pCertificate, int cbCertificate, SteamNetworkingErrMsg &errMsg )
|
||||
{
|
||||
PRINT_DEBUG("Steam_Networking_Sockets::SetCertificate\n");
|
||||
}
|
||||
|
||||
// TEMP KLUDGE Call to invoke all queued callbacks.
|
||||
// Eventually this function will go away, and callwacks will be ordinary Steamworks callbacks.
|
||||
// You should call this at the same time you call SteamAPI_RunCallbacks and SteamGameServer_RunCallbacks
|
||||
|
|
|
|||
124
dll/steam_tv.h
Normal file
124
dll/steam_tv.h
Normal file
|
|
@ -0,0 +1,124 @@
|
|||
/* Copyright (C) 2019 Mr Goldberg
|
||||
This file is part of the Goldberg Emulator
|
||||
|
||||
The Goldberg Emulator is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 3 of the License, or (at your option) any later version.
|
||||
|
||||
The Goldberg Emulator is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the Goldberg Emulator; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "base.h"
|
||||
|
||||
class Steam_TV :
|
||||
public ISteamTV
|
||||
{
|
||||
class Settings *settings;
|
||||
class Networking *network;
|
||||
class SteamCallResults *callback_results;
|
||||
class SteamCallBacks *callbacks;
|
||||
class RunEveryRunCB *run_every_runcb;
|
||||
std::chrono::time_point<std::chrono::steady_clock> initialized_time = std::chrono::steady_clock::now();
|
||||
FSteamNetworkingSocketsDebugOutput debug_function;
|
||||
|
||||
public:
|
||||
static void steam_callback(void *object, Common_Message *msg)
|
||||
{
|
||||
PRINT_DEBUG("steam_tv_callback\n");
|
||||
|
||||
Steam_TV *steam_parties = (Steam_TV *)object;
|
||||
steam_parties->Callback(msg);
|
||||
}
|
||||
|
||||
static void steam_run_every_runcb(void *object)
|
||||
{
|
||||
PRINT_DEBUG("steam_tv_run_every_runcb\n");
|
||||
|
||||
Steam_TV *steam_parties = (Steam_TV *)object;
|
||||
steam_parties->RunCallbacks();
|
||||
}
|
||||
|
||||
Steam_TV(class Settings *settings, class Networking *network, class SteamCallResults *callback_results, class SteamCallBacks *callbacks, class RunEveryRunCB *run_every_runcb)
|
||||
{
|
||||
this->settings = settings;
|
||||
this->network = network;
|
||||
this->run_every_runcb = run_every_runcb;
|
||||
//this->network->setCallback(CALLBACK_ID_USER_STATUS, settings->get_local_steam_id(), &Steam_TV::steam_callback, this);
|
||||
// this->run_every_runcb->add(&Steam_TV::steam_run_every_runcb, this);
|
||||
|
||||
this->callback_results = callback_results;
|
||||
this->callbacks = callbacks;
|
||||
}
|
||||
|
||||
~Steam_TV()
|
||||
{
|
||||
//TODO rm network callbacks
|
||||
//this->run_every_runcb->remove(&Steam_TV::steam_run_every_runcb, this);
|
||||
}
|
||||
|
||||
bool IsBroadcasting(int *pnNumViewers)
|
||||
{
|
||||
PRINT_DEBUG("%s\n", __FUNCTION__);
|
||||
return false;
|
||||
}
|
||||
|
||||
void AddBroadcastGameData(const char * pchKey, const char * pchValue)
|
||||
{
|
||||
PRINT_DEBUG("%s\n", __FUNCTION__);
|
||||
}
|
||||
|
||||
void RemoveBroadcastGameData(const char * pchKey)
|
||||
{
|
||||
PRINT_DEBUG("%s\n", __FUNCTION__);
|
||||
}
|
||||
|
||||
void AddTimelineMarker(const char * pchTemplateName, bool bPersistent, uint8 nColorR, uint8 nColorG, uint8 nColorB)
|
||||
{
|
||||
PRINT_DEBUG("%s\n", __FUNCTION__);
|
||||
}
|
||||
|
||||
void RemoveTimelineMarker()
|
||||
{
|
||||
PRINT_DEBUG("%s\n", __FUNCTION__);
|
||||
}
|
||||
|
||||
uint32 AddRegion(const char * pchElementName, const char * pchTimelineDataSection, const SteamTVRegion_t * pSteamTVRegion, ESteamTVRegionBehavior eSteamTVRegionBehavior)
|
||||
{
|
||||
PRINT_DEBUG("%s\n", __FUNCTION__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void RemoveRegion(uint32 unRegionHandle)
|
||||
{
|
||||
PRINT_DEBUG("%s\n", __FUNCTION__);
|
||||
}
|
||||
|
||||
void RunCallbacks()
|
||||
{
|
||||
}
|
||||
|
||||
void Callback(Common_Message *msg)
|
||||
{
|
||||
if (msg->has_low_level()) {
|
||||
if (msg->low_level().type() == Low_Level::CONNECT) {
|
||||
|
||||
}
|
||||
|
||||
if (msg->low_level().type() == Low_Level::DISCONNECT) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (msg->has_networking_sockets()) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue