mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2024-11-23 19:25:35 +08:00
stub for appticket
This commit is contained in:
parent
f8bb8b2285
commit
ab99591483
@ -1,3 +1,25 @@
|
||||
/* 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/>. */
|
||||
|
||||
#ifndef __INCLUDED_STEAM_APP_TICKET_H__
|
||||
#define __INCLUDED_STEAM_APP_TICKET_H__
|
||||
|
||||
#include "base.h"
|
||||
#include "steam/isteamappticket.h"
|
||||
|
||||
struct AppTicketV1
|
||||
{
|
||||
@ -298,3 +320,29 @@ public:
|
||||
return buffer;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class Steam_AppTicket :
|
||||
public ISteamAppTicket
|
||||
{
|
||||
private:
|
||||
class Settings *settings;
|
||||
|
||||
public:
|
||||
Steam_AppTicket(class Settings *settings) :
|
||||
settings(settings)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
virtual uint32 GetAppOwnershipTicketData( uint32 nAppID, void *pvBuffer, uint32 cbBufferLength, uint32 *piAppId, uint32 *piSteamId, uint32 *piSignature, uint32 *pcbSignature )
|
||||
{
|
||||
PRINT_DEBUG("TODO GetAppOwnershipTicketData: %u, %p, %u, %p, %p, %p, %p\n", nAppID, pvBuffer, cbBufferLength, piAppId, piSteamId, piSignature, pcbSignature);
|
||||
std::lock_guard<std::recursive_mutex> lock(global_mutex);
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
#endif // __INCLUDED_STEAM_APP_TICKET_H__
|
||||
|
@ -16,6 +16,7 @@
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "base.h"
|
||||
#include "appticket.h"
|
||||
#include "steam_user.h"
|
||||
#include "steam_friends.h"
|
||||
#include "steam_utils.h"
|
||||
@ -127,6 +128,7 @@ public:
|
||||
Steam_Networking_Messages *steam_gameserver_networking_messages;
|
||||
Steam_Game_Coordinator *steam_gameserver_game_coordinator;
|
||||
Steam_Masterserver_Updater *steam_masterserver_updater;
|
||||
Steam_AppTicket *steam_app_ticket;
|
||||
|
||||
Steam_Overlay* steam_overlay;
|
||||
|
||||
@ -285,6 +287,8 @@ public:
|
||||
// Steam Remote Play interface
|
||||
ISteamRemotePlay *GetISteamRemotePlay( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion );
|
||||
|
||||
ISteamAppTicket *GetAppTicket( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion );
|
||||
|
||||
void RegisterCallback( class CCallbackBase *pCallback, int iCallback);
|
||||
void UnregisterCallback( class CCallbackBase *pCallback);
|
||||
|
||||
|
@ -117,6 +117,9 @@ Steam_Client::Steam_Client()
|
||||
steam_gameserver_game_coordinator = new Steam_Game_Coordinator(settings_server, network, callback_results_server, callbacks_server, run_every_runcb);
|
||||
steam_masterserver_updater = new Steam_Masterserver_Updater(settings_server, network, callback_results_server, callbacks_server, run_every_runcb);
|
||||
|
||||
PRINT_DEBUG("client init AppTicket\n");
|
||||
steam_app_ticket = new Steam_AppTicket(settings_client);
|
||||
|
||||
gameserver_has_ipv6_functions = false;
|
||||
|
||||
last_cb_run = 0;
|
||||
@ -705,6 +708,8 @@ void *Steam_Client::GetISteamGenericInterface( HSteamUser hSteamUser, HSteamPipe
|
||||
return GetISteamRemotePlay(hSteamUser, hSteamPipe, pchVersion);
|
||||
} else if (strstr(pchVersion, "STEAMPARENTALSETTINGS_INTERFACE_VERSION") == pchVersion) {
|
||||
return GetISteamParentalSettings(hSteamUser, hSteamPipe, pchVersion);
|
||||
} else if (strstr(pchVersion, "STEAMAPPTICKET_INTERFACE_VERSION") == pchVersion) {
|
||||
return GetAppTicket(hSteamUser, hSteamPipe, pchVersion);
|
||||
} else {
|
||||
PRINT_DEBUG("No interface: %s\n", pchVersion);
|
||||
//TODO: all the interfaces
|
||||
@ -1387,6 +1392,22 @@ ISteamRemotePlay *Steam_Client::GetISteamRemotePlay( HSteamUser hSteamUser, HSte
|
||||
return (ISteamRemotePlay *)(void *)(ISteamRemotePlay *)steam_remoteplay;
|
||||
}
|
||||
|
||||
ISteamAppTicket *Steam_Client::GetAppTicket( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion )
|
||||
{
|
||||
PRINT_DEBUG("GetAppTicket %s\n", pchVersion);
|
||||
if (!steam_pipes.count(hSteamPipe) || !hSteamUser) return NULL;
|
||||
|
||||
if (strcmp(pchVersion, STEAMAPPTICKET_INTERFACE_VERSION) == 0) {
|
||||
return (ISteamAppTicket *)(void *)(ISteamAppTicket *)steam_app_ticket;
|
||||
} else {
|
||||
return (ISteamAppTicket *)(void *)(ISteamAppTicket *)steam_app_ticket;
|
||||
}
|
||||
|
||||
// we can get here if one of the if-statements didn't return in all paths
|
||||
PRINT_DEBUG("Missing handling for interface: %s\n", pchVersion);
|
||||
return (ISteamAppTicket *)(void *)(ISteamAppTicket *)steam_app_ticket;
|
||||
}
|
||||
|
||||
void Steam_Client::RegisterCallback( class CCallbackBase *pCallback, int iCallback)
|
||||
{
|
||||
int base_callback = (iCallback / 100) * 100;
|
||||
|
Loading…
Reference in New Issue
Block a user