SDK 1.56 and 1.57

This commit is contained in:
Mr_Goldberg 2023-05-08 22:36:51 -04:00
parent 802d8bcc8f
commit 475342f0d8
No known key found for this signature in database
GPG key ID: 8597D87419DEF278
27 changed files with 1181 additions and 57 deletions

View file

@ -207,6 +207,16 @@ STEAMAPI_API ISteamRemotePlay * SteamAPI_ISteamClient_GetISteamRemotePlay( IStea
return get_steam_client()->GetISteamRemotePlay(hSteamUser, hSteamPipe, pchVersion);
}
STEAMAPI_API ISteamUser *SteamAPI_SteamUser_v023()
{
return get_steam_client()->GetISteamUser(flat_hsteamuser(), flat_hsteampipe(), "SteamUser023");
}
STEAMAPI_API ISteamUser *SteamAPI_SteamUser_v022()
{
return get_steam_client()->GetISteamUser(flat_hsteamuser(), flat_hsteampipe(), "SteamUser022");
}
STEAMAPI_API ISteamUser *SteamAPI_SteamUser_v021()
{
return get_steam_client()->GetISteamUser(flat_hsteamuser(), flat_hsteampipe(), "SteamUser021");
@ -292,11 +302,16 @@ STEAMAPI_API uint32 SteamAPI_ISteamUser_GetVoiceOptimalSampleRate( ISteamUser* s
return (get_steam_client()->steam_user)->GetVoiceOptimalSampleRate();
}
STEAMAPI_API HAuthTicket SteamAPI_ISteamUser_GetAuthSessionTicket( ISteamUser* self, void * pTicket, int cbMaxTicket, uint32 * pcbTicket )
STEAMAPI_API HAuthTicket SteamAPI_ISteamUser_GetAuthSessionTicket( ISteamUser* self, void * pTicket, int cbMaxTicket, uint32 * pcbTicket, const SteamNetworkingIdentity * pSteamNetworkingIdentity)
{
return (get_steam_client()->steam_user)->GetAuthSessionTicket(pTicket, cbMaxTicket, pcbTicket);
}
STEAMAPI_API HAuthTicket SteamAPI_ISteamUser_GetAuthTicketForWebApi( ISteamUser* self, const char * pchIdentity )
{
return (get_steam_client()->steam_user)->GetAuthTicketForWebApi(pchIdentity);
}
STEAMAPI_API EBeginAuthSessionResult SteamAPI_ISteamUser_BeginAuthSession( ISteamUser* self, const void * pAuthTicket, int cbAuthTicket, uint64_steamid steamID )
{
return (get_steam_client()->steam_user)->BeginAuthSession(pAuthTicket, cbAuthTicket, steamID);
@ -3493,6 +3508,11 @@ STEAMAPI_API ISteamUGC *SteamAPI_SteamUGC_v016()
return get_steam_client()->GetISteamUGC(flat_hsteamuser(), flat_hsteampipe(), "STEAMUGC_INTERFACE_VERSION016");
}
STEAMAPI_API ISteamUGC *SteamAPI_SteamUGC_v017()
{
return get_steam_client()->GetISteamUGC(flat_hsteamuser(), flat_hsteampipe(), "STEAMUGC_INTERFACE_VERSION017");
}
STEAMAPI_API ISteamUGC *SteamAPI_SteamGameServerUGC_v014()
{
return get_steam_client()->GetISteamUGC(flat_gs_hsteamuser(), flat_gs_hsteampipe(), "STEAMUGC_INTERFACE_VERSION014");
@ -3508,6 +3528,11 @@ STEAMAPI_API ISteamUGC *SteamAPI_SteamGameServerUGC_v016()
return get_steam_client()->GetISteamUGC(flat_gs_hsteamuser(), flat_gs_hsteampipe(), "STEAMUGC_INTERFACE_VERSION016");
}
STEAMAPI_API ISteamUGC *SteamAPI_SteamGameServerUGC_v017()
{
return get_steam_client()->GetISteamUGC(flat_gs_hsteamuser(), flat_gs_hsteampipe(), "STEAMUGC_INTERFACE_VERSION017");
}
STEAMAPI_API UGCQueryHandle_t SteamAPI_ISteamUGC_CreateQueryUserUGCRequest( ISteamUGC* self, AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage )
{
long long test1 = ((char *)self - (char*)get_steam_client()->steam_ugc);
@ -3760,6 +3785,18 @@ STEAMAPI_API steam_bool SteamAPI_ISteamUGC_GetQueryFirstUGCKeyValueTag( ISteamUG
return (ptr)->GetQueryUGCKeyValueTag(handle, index, pchKey, pchValue, cchValueSize);
}
STEAMAPI_API uint32 SteamAPI_ISteamUGC_GetQueryUGCContentDescriptors( ISteamUGC* self, UGCQueryHandle_t handle, uint32 index, EUGCContentDescriptorID * pvecDescriptors, uint32 cMaxEntries )
{
long long test1 = ((char *)self - (char*)get_steam_client()->steam_ugc);
long long test2 = ((char *)self - (char*)get_steam_client()->steam_gameserver_ugc);
auto ptr = get_steam_client()->steam_gameserver_ugc;
if (test1 >= 0 && (test2 < 0 || test1 < test2)) {
ptr = get_steam_client()->steam_ugc;
}
return (ptr)->GetQueryUGCContentDescriptors(handle, index, pvecDescriptors, cMaxEntries);
}
STEAMAPI_API steam_bool SteamAPI_ISteamUGC_ReleaseQueryUGCRequest( ISteamUGC* self, UGCQueryHandle_t handle )
{
long long test1 = ((char *)self - (char*)get_steam_client()->steam_ugc);
@ -4252,6 +4289,30 @@ STEAMAPI_API steam_bool SteamAPI_ISteamUGC_RemoveItemPreview( ISteamUGC* self, U
return (ptr)->RemoveItemPreview(handle, index);
}
STEAMAPI_API steam_bool SteamAPI_ISteamUGC_AddContentDescriptor( ISteamUGC* self, UGCUpdateHandle_t handle, EUGCContentDescriptorID descid )
{
long long test1 = ((char *)self - (char*)get_steam_client()->steam_ugc);
long long test2 = ((char *)self - (char*)get_steam_client()->steam_gameserver_ugc);
auto ptr = get_steam_client()->steam_gameserver_ugc;
if (test1 >= 0 && (test2 < 0 || test1 < test2)) {
ptr = get_steam_client()->steam_ugc;
}
return (ptr)->AddContentDescriptor(handle, descid);
}
STEAMAPI_API steam_bool SteamAPI_ISteamUGC_RemoveContentDescriptor( ISteamUGC* self, UGCUpdateHandle_t handle, EUGCContentDescriptorID descid )
{
long long test1 = ((char *)self - (char*)get_steam_client()->steam_ugc);
long long test2 = ((char *)self - (char*)get_steam_client()->steam_gameserver_ugc);
auto ptr = get_steam_client()->steam_gameserver_ugc;
if (test1 >= 0 && (test2 < 0 || test1 < test2)) {
ptr = get_steam_client()->steam_ugc;
}
return (ptr)->RemoveContentDescriptor(handle, descid);
}
STEAMAPI_API SteamAPICall_t SteamAPI_ISteamUGC_SubmitItemUpdate( ISteamUGC* self, UGCUpdateHandle_t handle, const char * pchChangeNote )
{
long long test1 = ((char *)self - (char*)get_steam_client()->steam_ugc);
@ -6393,6 +6454,11 @@ STEAMAPI_API ISteamGameServer *SteamAPI_SteamGameServer_v014()
return get_steam_client()->GetISteamGameServer(flat_gs_hsteamuser(), flat_gs_hsteampipe(), "SteamGameServer014");
}
STEAMAPI_API ISteamGameServer *SteamAPI_SteamGameServer_v015()
{
return get_steam_client()->GetISteamGameServer(flat_gs_hsteamuser(), flat_gs_hsteampipe(), "SteamGameServer015");
}
STEAMAPI_API steam_bool SteamAPI_ISteamGameServer_InitGameServer(intptr_t instancePtr, uint32 unIP, uint16 usGamePort, uint16 usQueryPort, uint32 unFlags, AppId_t nGameAppId, const char * pchVersionString)
{
return ((ISteamGameServer *)instancePtr)->InitGameServer(unIP, usGamePort, usQueryPort, unFlags, nGameAppId, pchVersionString);
@ -6548,7 +6614,7 @@ STEAMAPI_API void SteamAPI_ISteamGameServer_SetAdvertiseServerActive( ISteamGame
return get_steam_client()->steam_gameserver->SetAdvertiseServerActive(bActive);
}
STEAMAPI_API HAuthTicket SteamAPI_ISteamGameServer_GetAuthSessionTicket( ISteamGameServer* self, void * pTicket, int cbMaxTicket, uint32 * pcbTicket )
STEAMAPI_API HAuthTicket SteamAPI_ISteamGameServer_GetAuthSessionTicket( ISteamGameServer* self, void * pTicket, int cbMaxTicket, uint32 * pcbTicket, const SteamNetworkingIdentity * pSnid )
{
return get_steam_client()->steam_gameserver->GetAuthSessionTicket(pTicket, cbMaxTicket, pcbTicket);
}

View file

@ -334,6 +334,10 @@ ISteamUser *Steam_Client::GetISteamUser( HSteamUser hSteamUser, HSteamPipe hStea
return (ISteamUser *)(void *)(ISteamUser019 *)steam_user;
} else if (strcmp(pchVersion, "SteamUser020") == 0) {
return (ISteamUser *)(void *)(ISteamUser020 *)steam_user;
} else if (strcmp(pchVersion, "SteamUser021") == 0) {
return (ISteamUser *)(void *)(ISteamUser021 *)steam_user;
} else if (strcmp(pchVersion, "SteamUser022") == 0) {
return (ISteamUser *)(void *)(ISteamUser022 *)steam_user;
} else if (strcmp(pchVersion, STEAMUSER_INTERFACE_VERSION) == 0) {
return (ISteamUser *)(void *)(ISteamUser *)steam_user;
} else {
@ -370,6 +374,9 @@ ISteamGameServer *Steam_Client::GetISteamGameServer( HSteamUser hSteamUser, HSte
} else if (strcmp(pchVersion, "SteamGameServer013") == 0) {
gameserver_has_ipv6_functions = true;
return (ISteamGameServer *)(void *)(ISteamGameServer013 *)steam_gameserver;
} else if (strcmp(pchVersion, "SteamGameServer014") == 0) {
gameserver_has_ipv6_functions = true;
return (ISteamGameServer *)(void *)(ISteamGameServer014 *)steam_gameserver;
} else if (strcmp(pchVersion, STEAMGAMESERVER_INTERFACE_VERSION) == 0) {
gameserver_has_ipv6_functions = true;
return (ISteamGameServer *)(void *)(ISteamGameServer *)steam_gameserver;
@ -1020,6 +1027,8 @@ ISteamUGC *Steam_Client::GetISteamUGC( HSteamUser hSteamUser, HSteamPipe hSteamP
return (ISteamUGC *)(void *)(ISteamUGC014 *)steam_ugc_temp;
} else if (strcmp(pchVersion, "STEAMUGC_INTERFACE_VERSION015") == 0) {
return (ISteamUGC *)(void *)(ISteamUGC015 *)steam_ugc_temp;
} else if (strcmp(pchVersion, "STEAMUGC_INTERFACE_VERSION016") == 0) {
return (ISteamUGC *)(void *)(ISteamUGC016 *)steam_ugc_temp;
} else if (strcmp(pchVersion, STEAMUGC_INTERFACE_VERSION) == 0) {
return (ISteamUGC *)(void *)(ISteamUGC *)steam_ugc_temp;
} else {

View file

@ -481,6 +481,13 @@ bool Steam_GameServer::BGetUserAchievementStatus( CSteamID steamID, const char *
// Retrieve ticket to be sent to the entity who wishes to authenticate you ( using BeginAuthSession API ).
// pcbTicket retrieves the length of the actual ticket.
HAuthTicket Steam_GameServer::GetAuthSessionTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket )
{
return GetAuthSessionTicket(pTicket, cbMaxTicket, pcbTicket, NULL);
}
// SteamNetworkingIdentity is an optional parameter to hold the public IP address of the entity you are connecting to
// if an IP address is passed Steam will only allow the ticket to be used by an entity with that IP address
HAuthTicket Steam_GameServer::GetAuthSessionTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket, const SteamNetworkingIdentity *pSnid )
{
PRINT_DEBUG("Steam_GameServer::GetAuthSessionTicket\n");
std::lock_guard<std::recursive_mutex> lock(global_mutex);

View file

@ -37,6 +37,7 @@ public ISteamGameServer010,
public ISteamGameServer011,
public ISteamGameServer012,
public ISteamGameServer013,
public ISteamGameServer014,
public ISteamGameServer
{
class Settings *settings;
@ -253,6 +254,9 @@ public:
// Retrieve ticket to be sent to the entity who wishes to authenticate you ( using BeginAuthSession API ).
// pcbTicket retrieves the length of the actual ticket.
HAuthTicket GetAuthSessionTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket );
// SteamNetworkingIdentity is an optional parameter to hold the public IP address of the entity you are connecting to
// if an IP address is passed Steam will only allow the ticket to be used by an entity with that IP address
HAuthTicket GetAuthSessionTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket, const SteamNetworkingIdentity *pSnid );
// Authenticate ticket ( from GetAuthSessionTicket ) from entity steamID to be sure it is valid and isnt reused
// Registers for callbacks if the entity goes offline or cancels the ticket ( see ValidateAuthTicketResponse_t callback and EAuthSessionResponse )

View file

@ -40,6 +40,7 @@ public ISteamUGC012,
public ISteamUGC013,
public ISteamUGC014,
public ISteamUGC015,
public ISteamUGC016,
public ISteamUGC
{
class Settings *settings;
@ -273,6 +274,11 @@ bool GetQueryUGCKeyValueTag( UGCQueryHandle_t handle, uint32 index, const char *
return false;
}
uint32 GetQueryUGCContentDescriptors( UGCQueryHandle_t handle, uint32 index, EUGCContentDescriptorID *pvecDescriptors, uint32 cMaxEntries )
{
PRINT_DEBUG("Steam_UGC::GetQueryUGCContentDescriptors\n");
return 0;
}
// Release the request to free up memory, after retrieving results
bool ReleaseQueryUGCRequest( UGCQueryHandle_t handle )
@ -592,6 +598,17 @@ bool RemoveItemPreview( UGCUpdateHandle_t handle, uint32 index )
}
// remove a preview by index starting at 0 (previews are sorted)
bool AddContentDescriptor( UGCUpdateHandle_t handle, EUGCContentDescriptorID descid )
{
PRINT_DEBUG("Steam_UGC::AddContentDescriptor %llu %u\n", handle, index);
return false;
}
bool RemoveContentDescriptor( UGCUpdateHandle_t handle, EUGCContentDescriptorID descid )
{
PRINT_DEBUG("Steam_UGC::RemoveContentDescriptor %llu %u\n", handle, index);
return false;
}
STEAM_CALL_RESULT( SubmitItemUpdateResult_t )
SteamAPICall_t SubmitItemUpdate( UGCUpdateHandle_t handle, const char *pchChangeNote )

View file

@ -32,6 +32,7 @@ public ISteamUser017,
public ISteamUser018,
public ISteamUser019,
public ISteamUser020,
public ISteamUser021,
public ISteamUser
{
Settings *settings;
@ -299,6 +300,13 @@ uint32 GetVoiceOptimalSampleRate()
// Retrieve ticket to be sent to the entity who wishes to authenticate you.
// pcbTicket retrieves the length of the actual ticket.
HAuthTicket GetAuthSessionTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket )
{
return GetAuthSessionTicket(pTicket, cbMaxTicket, pcbTicket, NULL);
}
// SteamNetworkingIdentity is an optional input parameter to hold the public IP address or SteamID of the entity you are connecting to
// if an IP address is passed Steam will only allow the ticket to be used by an entity with that IP address
// if a Steam ID is passed Steam will only allow the ticket to be used by that Steam ID
HAuthTicket GetAuthSessionTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket, const SteamNetworkingIdentity *pSteamNetworkingIdentity )
{
PRINT_DEBUG("Steam_User::GetAuthSessionTicket %i\n", cbMaxTicket);
std::lock_guard<std::recursive_mutex> lock(global_mutex);
@ -306,6 +314,15 @@ HAuthTicket GetAuthSessionTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTic
return ticket_manager->getTicket(pTicket, cbMaxTicket, pcbTicket);
}
// Request a ticket which will be used for webapi "ISteamUserAuth\AuthenticateUserTicket"
// pchIdentity is an optional input parameter to identify the service the ticket will be sent to
// the ticket will be returned in callback GetTicketForWebApiResponse_t
HAuthTicket GetAuthTicketForWebApi( const char *pchIdentity )
{
PRINT_DEBUG("TODO: Steam_User::GetAuthTicketForWebApi %s\n", pchIdentity);
return 0;
}
// Authenticate ticket from entity steamID to be sure it is valid and isnt reused
// Registers for callbacks if the entity goes offline or cancels the ticket ( see ValidateAuthTicketResponse_t callback and EAuthSessionResponse )
EBeginAuthSessionResult BeginAuthSession( const void *pAuthTicket, int cbAuthTicket, CSteamID steamID )