Merge pull request #64 from universal963/patch-oldsteamuser

Initial implementation of `ISteamUser004` to `ISteamUser008`
This commit is contained in:
Detanup01 2024-10-22 20:17:42 +02:00 committed by GitHub
commit 3a4d7c4bc1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 710 additions and 1 deletions

View File

@ -361,6 +361,7 @@ public:
CSteamID get_lobby();
bool is_offline();
void set_offline(bool offline);
uint16 get_port();
void set_port(uint16 port);

View File

@ -22,6 +22,11 @@
#include "auth.h"
class Steam_User :
public ISteamUser004,
public ISteamUser005,
public ISteamUser006,
public ISteamUser007,
public ISteamUser008,
public ISteamUser009,
public ISteamUser010,
public ISteamUser011,
@ -48,6 +53,8 @@ public ISteamUser
std::chrono::high_resolution_clock::time_point last_get_voice{};
std::string encrypted_app_ticket{};
Auth_Manager *auth_manager{};
std::map<std::string, std::string> registry{};
std::string registry_nullptr{};
public:
Steam_User(Settings *settings, Local_Storage *local_storage, class Networking *network, class SteamCallResults *callback_results, class SteamCallBacks *callbacks);
@ -57,15 +64,41 @@ public:
// this is only used internally by the API, and by a few select interfaces that support multi-user
HSteamUser GetHSteamUser();
void LogOn( CSteamID steamID );
void LogOff();
// returns true if the Steam client current has a live connection to the Steam servers.
// If false, it means there is no active connection due to either a networking issue on the local machine, or the Steam server is down/busy.
// The Steam client will automatically be trying to recreate the connection as often as possible.
bool BLoggedOn();
ELogonState GetLogonState();
bool BConnected();
// returns the CSteamID of the account currently logged into the Steam client
// a CSteamID is a unique identifier for an account, and used to differentiate users in all parts of the Steamworks API
CSteamID GetSteamID();
bool IsVACBanned( int nGameID );
bool RequireShowVACBannedMessage( int nGameID );
void AcknowledgeVACBanning( int nGameID );
// These are dead.
int NClientGameIDAdd( int nGameID );
void RemoveClientGame( int nClientGameID );
void SetClientGameServer( int nClientGameID, uint32 unIPServer, uint16 usPortServer );
void SetSteam2Ticket( uint8 *pubTicket, int cubTicket );
void AddServerNetAddress( uint32 unIP, uint16 unPort );
bool SetEmail( const char *pchEmail );
// logon cookie - this is obsolete and never used
int GetSteamGameConnectToken( void *pBlob, int cbMaxBlob );
bool SetRegistryString( EConfigSubTree eRegistrySubTree, const char *pchKey, const char *pchValue );
bool GetRegistryString( EConfigSubTree eRegistrySubTree, const char *pchKey, char *pchValue, int cbValue );
bool SetRegistryInt( EConfigSubTree eRegistrySubTree, const char *pchKey, int iValue );
bool GetRegistryInt( EConfigSubTree eRegistrySubTree, const char *pchKey, int *piValue );
// Multiplayer Authentication functions
// InitiateGameConnection() starts the state machine for authenticating the game client with the game server
@ -86,15 +119,40 @@ public:
int InitiateGameConnection( void *pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, CGameID gameID, uint32 unIPServer, uint16 usPortServer, bool bSecure );
int InitiateGameConnection( void *pBlob, int cbMaxBlob, CSteamID steamID, CGameID gameID, uint32 unIPServer, uint16 usPortServer, bool bSecure, void *pvSteam2GetEncryptionKey, int cbSteam2GetEncryptionKey );
int InitiateGameConnection( void *pBlob, int cbMaxBlob, CSteamID steamID, int nGameAppID, uint32 unIPServer, uint16 usPortServer, bool bSecure );
// notify of disconnect
// needs to occur when the game client leaves the specified game server, needs to match with the InitiateGameConnection() call
void TerminateGameConnection( uint32 unIPServer, uint16 usPortServer );
// Legacy functions
void SetSelfAsPrimaryChatDestination();
bool IsPrimaryChatDestination();
void RequestLegacyCDKey( uint32 nAppID );
bool SendGuestPassByEmail( const char *pchEmailAccount, GID_t gidGuestPassID, bool bResending );
bool SendGuestPassByAccountID( uint32 uAccountID, GID_t gidGuestPassID, bool bResending );
bool AckGuestPass(const char *pchGuestPassCode);
bool RedeemGuestPass(const char *pchGuestPassCode);
uint32 GetGuestPassToGiveCount();
uint32 GetGuestPassToRedeemCount();
RTime32 GetGuestPassLastUpdateTime();
bool GetGuestPassToGiveInfo( uint32 nPassIndex, GID_t *pgidGuestPassID, PackageId_t *pnPackageID, RTime32 *pRTime32Created, RTime32 *pRTime32Expiration, RTime32 *pRTime32Sent, RTime32 *pRTime32Redeemed, char *pchRecipientAddress, int cRecipientAddressSize );
bool GetGuestPassToRedeemInfo( uint32 nPassIndex, GID_t *pgidGuestPassID, PackageId_t *pnPackageID, RTime32 *pRTime32Created, RTime32 *pRTime32Expiration, RTime32 *pRTime32Sent, RTime32 *pRTime32Redeemed);
bool GetGuestPassToRedeemSenderAddress( uint32 nPassIndex, char* pchSenderAddress, int cSenderAddressSize );
bool GetGuestPassToRedeemSenderName( uint32 nPassIndex, char* pchSenderName, int cSenderNameSize );
void AcknowledgeMessageByGID( const char *pchMessageGID );
bool SetLanguage( const char *pchLanguage );
// used by only a few games to track usage events
void TrackAppUsageEvent( CGameID gameID, int eAppUsageEvent, const char *pchExtraInfo);
void SetAccountName( const char *pchAccountName );
void SetPassword( const char *pchPassword );
void SetAccountCreationTime( RTime32 rt );
void RefreshSteam2Login();
// get the local storage folder for current Steam account to write application data, e.g. save games, configs etc.

View File

@ -161,6 +161,11 @@ bool Settings::is_offline()
return offline;
}
void Settings::set_offline(bool offline)
{
this->offline = offline;
}
uint16 Settings::get_port()
{
return port;

View File

@ -71,7 +71,17 @@ ISteamUser *Steam_Client::GetISteamUser( HSteamUser hSteamUser, HSteamPipe hStea
PRINT_DEBUG("%s", pchVersion);
if (!steam_pipes.count(hSteamPipe) || !hSteamUser) return NULL;
if (strcmp(pchVersion, "SteamUser009") == 0) {
if (strcmp(pchVersion, "SteamUser004") == 0) {
return reinterpret_cast<ISteamUser *>(static_cast<ISteamUser004 *>(steam_user)); // sdk 0.99u
} else if (strcmp(pchVersion, "SteamUser005") == 0) {
return reinterpret_cast<ISteamUser *>(static_cast<ISteamUser005 *>(steam_user)); // sdk 0.99v
} else if (strcmp(pchVersion, "SteamUser006") == 0) {
return reinterpret_cast<ISteamUser *>(static_cast<ISteamUser006 *>(steam_user)); // sdk 0.99w
} else if (strcmp(pchVersion, "SteamUser007") == 0) {
return reinterpret_cast<ISteamUser *>(static_cast<ISteamUser007 *>(steam_user)); // sdk 0.99x
} else if (strcmp(pchVersion, "SteamUser008") == 0) {
return reinterpret_cast<ISteamUser *>(static_cast<ISteamUser008 *>(steam_user)); // sdk 0.99y
} else if (strcmp(pchVersion, "SteamUser009") == 0) {
return reinterpret_cast<ISteamUser *>(static_cast<ISteamUser009 *>(steam_user));
} else if (strcmp(pchVersion, "SteamUser010") == 0) {
return reinterpret_cast<ISteamUser *>(static_cast<ISteamUser010 *>(steam_user));

View File

@ -44,6 +44,18 @@ HSteamUser Steam_User::GetHSteamUser()
return CLIENT_HSTEAMUSER;
}
void Steam_User::LogOn( CSteamID steamID )
{
PRINT_DEBUG_ENTRY();
settings->set_offline(false);
}
void Steam_User::LogOff()
{
PRINT_DEBUG_ENTRY();
settings->set_offline(true);
}
// returns true if the Steam client current has a live connection to the Steam servers.
// If false, it means there is no active connection due to either a networking issue on the local machine, or the Steam server is down/busy.
// The Steam client will automatically be trying to recreate the connection as often as possible.
@ -53,6 +65,21 @@ bool Steam_User::BLoggedOn()
return !settings->is_offline();
}
ELogonState Steam_User::GetLogonState()
{
PRINT_DEBUG_ENTRY();
if(settings->is_offline())
return (ELogonState)0;
else
return (ELogonState)4; // tested on real steam, undocumented return value
}
bool Steam_User::BConnected()
{
PRINT_DEBUG_ENTRY();
return !settings->is_offline();
}
// returns the CSteamID of the account currently logged into the Steam client
// a CSteamID is a unique identifier for an account, and used to differentiate users in all parts of the Steamworks API
CSteamID Steam_User::GetSteamID()
@ -63,6 +90,160 @@ CSteamID Steam_User::GetSteamID()
return id;
}
bool Steam_User::IsVACBanned( int nGameID )
{
PRINT_DEBUG_ENTRY();
return false;
}
bool Steam_User::RequireShowVACBannedMessage( int nGameID )
{
PRINT_DEBUG_ENTRY();
return false;
}
void Steam_User::AcknowledgeVACBanning( int nGameID )
{
PRINT_DEBUG_ENTRY();
}
// according to comments in sdk, "these are dead."
int Steam_User::NClientGameIDAdd( int nGameID )
{
PRINT_DEBUG_ENTRY();
return 0;
}
// according to comments in sdk, "these are dead."
void Steam_User::RemoveClientGame( int nClientGameID )
{
PRINT_DEBUG_ENTRY();
}
// according to comments in sdk, "these are dead."
void Steam_User::SetClientGameServer( int nClientGameID, uint32 unIPServer, uint16 usPortServer )
{
PRINT_DEBUG_ENTRY();
}
void Steam_User::SetSteam2Ticket( uint8 *pubTicket, int cubTicket )
{
PRINT_DEBUG_ENTRY();
}
void Steam_User::AddServerNetAddress( uint32 unIP, uint16 unPort )
{
PRINT_DEBUG_ENTRY();
}
bool Steam_User::SetEmail( const char *pchEmail )
{
PRINT_DEBUG_ENTRY();
return false;
}
// according to comments in sdk, "logon cookie - this is obsolete and never used"
int Steam_User::GetSteamGameConnectToken( void *pBlob, int cbMaxBlob )
{
PRINT_DEBUG_ENTRY();
return 0;
}
bool Steam_User::SetRegistryString( EConfigSubTree eRegistrySubTree, const char *pchKey, const char *pchValue )
{
PRINT_DEBUG_TODO();
if (!pchValue)
return false; // real steam crashes, so return value is assumed
if (!pchKey) // tested on real steam
{
registry.clear();
registry_nullptr = std::string(pchValue);
}
else
{
registry[std::string(pchKey)] = std::string(pchValue);
// TODO: save it to disk, because real steam can get the string when app restarts
}
return true;
}
bool Steam_User::GetRegistryString( EConfigSubTree eRegistrySubTree, const char *pchKey, char *pchValue, int cbValue )
{
PRINT_DEBUG_TODO();
// TODO: read data on disk, because real steam can get the string when app restarts
if (pchValue && cbValue > 0)
memset(pchValue, 0, cbValue);
std::string value{};
if(!pchKey)
{
value = registry_nullptr;
}
else
{
auto it = registry.find(std::string(pchKey));
if (it == registry.end())
return false;
value = it->second;
}
if (pchValue && cbValue > 0)
value.copy(pchValue, cbValue - 1);
return true;
}
bool Steam_User::SetRegistryInt( EConfigSubTree eRegistrySubTree, const char *pchKey, int iValue )
{
PRINT_DEBUG_TODO();
if (!pchKey) // tested on real steam
{
registry.clear();
registry_nullptr = std::to_string(iValue);
}
else
{
registry[std::string(pchKey)] = std::to_string(iValue);
// TODO: save it to disk, because real steam can get the string when app restarts
}
return true;
}
bool Steam_User::GetRegistryInt( EConfigSubTree eRegistrySubTree, const char *pchKey, int *piValue )
{
PRINT_DEBUG_TODO();
// TODO: read data on disk, because real steam can get the string when app restarts
if (piValue)
*piValue = 0;
std::string value{};
if(!pchKey)
{
value = registry_nullptr;
}
else
{
auto it = registry.find(std::string(pchKey));
if (it == registry.end())
return false;
value = it->second;
}
try
{
if (piValue)
*piValue = std::stoi(value);
}
catch(...)
{
PRINT_DEBUG("not a number"); // TODO: real steam returns a value other than 0 under this condition
}
return true;
}
// Multiplayer Authentication functions
// InitiateGameConnection() starts the state machine for authenticating the game client with the game server
@ -101,6 +282,18 @@ int Steam_User::InitiateGameConnection( void *pAuthBlob, int cbMaxAuthBlob, CSte
return InitiateGameConnection(pAuthBlob, cbMaxAuthBlob, steamIDGameServer, unIPServer, usPortServer, bSecure);
}
int Steam_User::InitiateGameConnection( void *pBlob, int cbMaxBlob, CSteamID steamID, CGameID gameID, uint32 unIPServer, uint16 usPortServer, bool bSecure, void *pvSteam2GetEncryptionKey, int cbSteam2GetEncryptionKey )
{
PRINT_DEBUG("sdk 0.99x, 0.99y");
return InitiateGameConnection(pBlob, cbMaxBlob, steamID, unIPServer, usPortServer, bSecure);
}
int Steam_User::InitiateGameConnection( void *pBlob, int cbMaxBlob, CSteamID steamID, int nGameAppID, uint32 unIPServer, uint16 usPortServer, bool bSecure )
{
PRINT_DEBUG("sdk 0.99u");
return InitiateGameConnection(pBlob, cbMaxBlob, steamID, unIPServer, usPortServer, bSecure);
}
// notify of disconnect
// needs to occur when the game client leaves the specified game server, needs to match with the InitiateGameConnection() call
void Steam_User::TerminateGameConnection( uint32 unIPServer, uint16 usPortServer )
@ -110,12 +303,147 @@ void Steam_User::TerminateGameConnection( uint32 unIPServer, uint16 usPortServer
// Legacy functions
void Steam_User::SetSelfAsPrimaryChatDestination()
{
PRINT_DEBUG_TODO();
}
bool Steam_User::IsPrimaryChatDestination()
{
PRINT_DEBUG_ENTRY();
return false;
}
void Steam_User::RequestLegacyCDKey( uint32 iAppID )
{
PRINT_DEBUG_TODO();
}
bool Steam_User::SendGuestPassByEmail( const char *pchEmailAccount, GID_t gidGuestPassID, bool bResending )
{
PRINT_DEBUG_TODO();
return false;
}
bool Steam_User::SendGuestPassByAccountID( uint32 uAccountID, GID_t gidGuestPassID, bool bResending )
{
PRINT_DEBUG_TODO();
return false;
}
bool Steam_User::AckGuestPass(const char *pchGuestPassCode)
{
PRINT_DEBUG_TODO();
return false;
}
bool Steam_User::RedeemGuestPass(const char *pchGuestPassCode)
{
PRINT_DEBUG_TODO();
return false;
}
uint32 Steam_User::GetGuestPassToGiveCount()
{
PRINT_DEBUG_TODO();
return 0;
}
uint32 Steam_User::GetGuestPassToRedeemCount()
{
PRINT_DEBUG_TODO();
return 0;
}
RTime32 Steam_User::GetGuestPassLastUpdateTime()
{
PRINT_DEBUG_TODO();
return 0;
}
bool Steam_User::GetGuestPassToGiveInfo( uint32 nPassIndex, GID_t *pgidGuestPassID, PackageId_t *pnPackageID, RTime32 *pRTime32Created, RTime32 *pRTime32Expiration, RTime32 *pRTime32Sent, RTime32 *pRTime32Redeemed, char *pchRecipientAddress, int cRecipientAddressSize )
{
PRINT_DEBUG_TODO();
// TODO: pgidGuestPassID
if (pnPackageID)
*pnPackageID = 0;
if (pRTime32Created)
*pRTime32Created = 0;
if (pRTime32Expiration)
*pRTime32Expiration = 0;
if (pRTime32Sent)
*pRTime32Sent = 0;
if (pRTime32Redeemed)
*pRTime32Redeemed = 0;
if (pchRecipientAddress && cRecipientAddressSize > 0)
memset(pchRecipientAddress, 0, cRecipientAddressSize);
return false;
}
bool Steam_User::GetGuestPassToRedeemInfo( uint32 nPassIndex, GID_t *pgidGuestPassID, PackageId_t *pnPackageID, RTime32 *pRTime32Created, RTime32 *pRTime32Expiration, RTime32 *pRTime32Sent, RTime32 *pRTime32Redeemed)
{
PRINT_DEBUG_TODO();
// TODO: pgidGuestPassID
if (pnPackageID)
*pnPackageID = 0;
if (pRTime32Created)
*pRTime32Created = 0;
if (pRTime32Expiration)
*pRTime32Expiration = 0;
if (pRTime32Sent)
*pRTime32Sent = 0;
if (pRTime32Redeemed)
*pRTime32Redeemed = 0;
return false;
}
bool Steam_User::GetGuestPassToRedeemSenderAddress( uint32 nPassIndex, char* pchSenderAddress, int cSenderAddressSize )
{
PRINT_DEBUG_TODO();
return false;
}
bool Steam_User::GetGuestPassToRedeemSenderName( uint32 nPassIndex, char* pchSenderName, int cSenderNameSize )
{
PRINT_DEBUG_TODO();
if (pchSenderName && cSenderNameSize > 0)
memset(pchSenderName, 0, cSenderNameSize);
return false;
}
void Steam_User::AcknowledgeMessageByGID( const char *pchMessageGID )
{
PRINT_DEBUG_TODO();
}
bool Steam_User::SetLanguage( const char *pchLanguage )
{
PRINT_DEBUG_TODO();
// TODO: don't know what this api actually does other than returning true
return true;
}
// used by only a few games to track usage events
void Steam_User::TrackAppUsageEvent( CGameID gameID, int eAppUsageEvent, const char *pchExtraInfo)
{
PRINT_DEBUG_TODO();
}
void Steam_User::SetAccountName( const char *pchAccountName )
{
PRINT_DEBUG_TODO();
}
void Steam_User::SetPassword( const char *pchPassword )
{
PRINT_DEBUG_TODO();
}
void Steam_User::SetAccountCreationTime( RTime32 rt )
{
PRINT_DEBUG_TODO();
}
void Steam_User::RefreshSteam2Login()
{
PRINT_DEBUG_TODO();

53
sdk/steam/isteamuser004.h Normal file
View File

@ -0,0 +1,53 @@
#ifndef ISTEAMUSER004_H
#define ISTEAMUSER004_H
#ifdef STEAM_WIN32
#pragma once
#endif
enum EConfigSubTree {
EConfigSubTree_stub
};
enum ELogonState {
ELogonState_stub
};
class ISteamUser004
{
public:
virtual HSteamUser GetHSteamUser() = 0;
virtual void LogOn( CSteamID steamID ) = 0;
virtual void LogOff() = 0;
virtual bool BLoggedOn() = 0;
virtual ELogonState GetLogonState() = 0;
virtual bool BConnected() = 0;
virtual CSteamID GetSteamID() = 0;
virtual bool IsVACBanned( int nGameID ) = 0;
virtual bool RequireShowVACBannedMessage( int nGameID ) = 0;
virtual void AcknowledgeVACBanning( int nGameID ) = 0;
// These are dead.
virtual int NClientGameIDAdd( int nGameID ) = 0;
virtual void RemoveClientGame( int nClientGameID ) = 0;
virtual void SetClientGameServer( int nClientGameID, uint32 unIPServer, uint16 usPortServer ) = 0;
virtual void SetSteam2Ticket( uint8 *pubTicket, int cubTicket ) = 0;
virtual void AddServerNetAddress( uint32 unIP, uint16 unPort ) = 0;
virtual bool SetEmail( const char *pchEmail ) = 0;
// logon cookie - this is obsolete and never used
virtual int GetSteamGameConnectToken( void *pBlob, int cbMaxBlob ) = 0;
virtual bool SetRegistryString( EConfigSubTree eRegistrySubTree, const char *pchKey, const char *pchValue ) = 0;
virtual bool GetRegistryString( EConfigSubTree eRegistrySubTree, const char *pchKey, char *pchValue, int cbValue ) = 0;
virtual bool SetRegistryInt( EConfigSubTree eRegistrySubTree, const char *pchKey, int iValue ) = 0;
virtual bool GetRegistryInt( EConfigSubTree eRegistrySubTree, const char *pchKey, int *piValue ) = 0;
virtual int InitiateGameConnection( void *pBlob, int cbMaxBlob, CSteamID steamID, int nGameAppID, uint32 unIPServer, uint16 usPortServer, bool bSecure ) = 0;
virtual void TerminateGameConnection( uint32 unIPServer, uint16 usPortServer ) = 0;
virtual void SetSelfAsPrimaryChatDestination() = 0;
virtual bool IsPrimaryChatDestination() = 0;
virtual void RequestLegacyCDKey( uint32 iAppID ) = 0;
};
#endif // ISTEAMUSER004_H

57
sdk/steam/isteamuser005.h Normal file
View File

@ -0,0 +1,57 @@
#ifndef ISTEAMUSER005_H
#define ISTEAMUSER005_H
#ifdef STEAM_WIN32
#pragma once
#endif
//-----------------------------------------------------------------------------
// Purpose: Functions for accessing and manipulating a steam account
// associated with one client instance
//-----------------------------------------------------------------------------
class ISteamUser005
{
public:
virtual HSteamUser GetHSteamUser() = 0;
virtual void LogOn( CSteamID steamID ) = 0;
virtual void LogOff() = 0;
virtual bool BLoggedOn() = 0;
virtual ELogonState GetLogonState() = 0;
virtual bool BConnected() = 0;
virtual CSteamID GetSteamID() = 0;
virtual bool IsVACBanned( int nGameID ) = 0;
virtual bool RequireShowVACBannedMessage( int nAppID ) = 0;
virtual void AcknowledgeVACBanning( int nAppID ) = 0;
virtual void SetSteam2Ticket( uint8 *pubTicket, int cubTicket ) = 0;
virtual void AddServerNetAddress( uint32 unIP, uint16 unPort ) = 0;
virtual bool SetEmail( const char *pchEmail ) = 0;
virtual bool SetRegistryString( EConfigSubTree eRegistrySubTree, const char *pchKey, const char *pchValue ) = 0;
virtual bool GetRegistryString( EConfigSubTree eRegistrySubTree, const char *pchKey, char *pchValue, int cbValue ) = 0;
virtual bool SetRegistryInt( EConfigSubTree eRegistrySubTree, const char *pchKey, int iValue ) = 0;
virtual bool GetRegistryInt( EConfigSubTree eRegistrySubTree, const char *pchKey, int *piValue ) = 0;
virtual int InitiateGameConnection( void *pBlob, int cbMaxBlob, CSteamID steamID, CGameID gameID, uint32 unIPServer, uint16 usPortServer, bool bSecure ) = 0;
virtual void TerminateGameConnection( uint32 unIPServer, uint16 usPortServer ) = 0;
virtual void SetSelfAsPrimaryChatDestination() = 0;
virtual bool IsPrimaryChatDestination() = 0;
virtual void RequestLegacyCDKey( uint32 nAppID ) = 0;
virtual bool SendGuestPassByEmail( const char *pchEmailAccount, GID_t gidGuestPassID, bool bResending ) = 0;
virtual bool SendGuestPassByAccountID( uint32 uAccountID, GID_t gidGuestPassID, bool bResending ) = 0;
virtual bool AckGuestPass(const char *pchGuestPassCode) = 0;
virtual bool RedeemGuestPass(const char *pchGuestPassCode) = 0;
virtual uint32 GetGuestPassToGiveCount() = 0;
virtual uint32 GetGuestPassToRedeemCount() = 0;
virtual RTime32 GetGuestPassLastUpdateTime() = 0;
virtual bool GetGuestPassToGiveInfo( uint32 nPassIndex, GID_t *pgidGuestPassID, PackageId_t *pnPackageID, RTime32 *pRTime32Created, RTime32 *pRTime32Expiration, RTime32 *pRTime32Sent, RTime32 *pRTime32Redeemed, char *pchRecipientAddress, int cRecipientAddressSize ) = 0;
virtual bool GetGuestPassToRedeemInfo( uint32 nPassIndex, GID_t *pgidGuestPassID, PackageId_t *pnPackageID, RTime32 *pRTime32Created, RTime32 *pRTime32Expiration, RTime32 *pRTime32Sent, RTime32 *pRTime32Redeemed) = 0;
virtual bool GetGuestPassToRedeemSenderAddress( uint32 nPassIndex, char* pchSenderAddress, int cSenderAddressSize ) = 0;
virtual bool GetGuestPassToRedeemSenderName( uint32 nPassIndex, char* pchSenderName, int cSenderNameSize ) = 0;
virtual void AcknowledgeMessageByGID( const char *pchMessageGID ) = 0;
virtual bool SetLanguage( const char *pchLanguage ) = 0;
virtual void TrackAppUsageEvent( CGameID gameID, int eAppUsageEvent, const char *pchExtraInfo = "" ) = 0;
virtual void SetAccountName( const char *pchAccountName ) = 0;
virtual void SetPassword( const char *pchPassword ) = 0;
virtual void SetAccountCreationTime( RTime32 rt ) = 0;
};
#endif // ISTEAMUSER005_H

64
sdk/steam/isteamuser006.h Normal file
View File

@ -0,0 +1,64 @@
#ifndef ISTEAMUSER006_H
#define ISTEAMUSER006_H
#ifdef STEAM_WIN32
#pragma once
#endif
//-----------------------------------------------------------------------------
// Purpose: Functions for accessing and manipulating a steam account
// associated with one client instance
//-----------------------------------------------------------------------------
class ISteamUser006
{
public:
// returns the HSteamUser this interface represents
// this is only used internally by the API, and by a few select interfaces that support multi-user
virtual HSteamUser GetHSteamUser() = 0;
virtual void LogOn( CSteamID steamID ) = 0;
virtual void LogOff() = 0;
// returns true if the Steam client current has a live connection to the Steam servers.
// If false, it means there is no active connection due to either a networking issue on the local machine, or the Steam server is down/busy.
// The Steam client will automatically be trying to recreate the connection as often as possible.
virtual bool BLoggedOn() = 0;
// returns the CSteamID of the account currently logged into the Steam client
// a CSteamID is a unique identifier for an account, and used to differentiate users in all parts of the Steamworks API
virtual CSteamID GetSteamID() = 0;
virtual bool SetRegistryString( EConfigSubTree eRegistrySubTree, const char *pchKey, const char *pchValue ) = 0;
virtual bool GetRegistryString( EConfigSubTree eRegistrySubTree, const char *pchKey, char *pchValue, int cbValue ) = 0;
virtual bool SetRegistryInt( EConfigSubTree eRegistrySubTree, const char *pchKey, int iValue ) = 0;
virtual bool GetRegistryInt( EConfigSubTree eRegistrySubTree, const char *pchKey, int *piValue ) = 0;
// Multiplayer Authentication functions
// InitiateGameConnection() starts the state machine for authenticating the game client with the game server
// It is the client portion of a three-way handshake between the client, the game server, and the steam servers
//
// Parameters:
// void *pAuthBlob - a pointer to empty memory that will be filled in with the authentication token.
// int cbMaxAuthBlob - the number of bytes of allocated memory in pBlob. Should be at least 2048 bytes.
// CSteamID steamIDGameServer - the steamID of the game server, received from the game server by the client
// CGameID gameID - the ID of the current game. For games without mods, this is just CGameID( <appID> )
// uint32 unIPServer, uint16 usPortServer - the IP address of the game server
// bool bSecure - whether or not the client thinks that the game server is reporting itself as secure (i.e. VAC is running)
//
// return value - returns the number of bytes written to pBlob. If the return is 0, then the buffer passed in was too small, and the call has failed
// The contents of pBlob should then be sent to the game server, for it to use to complete the authentication process.
virtual int InitiateGameConnection( void *pBlob, int cbMaxBlob, CSteamID steamID, CGameID gameID, uint32 unIPServer, uint16 usPortServer, bool bSecure ) = 0;
// notify of disconnect
// needs to occur when the game client leaves the specified game server, needs to match with the InitiateGameConnection() call
virtual void TerminateGameConnection( uint32 unIPServer, uint16 usPortServer ) = 0;
// Legacy functions
// used by only a few games to track usage events
virtual void TrackAppUsageEvent( CGameID gameID, int eAppUsageEvent, const char *pchExtraInfo = "" ) = 0;
};
#endif // ISTEAMUSER006_H

68
sdk/steam/isteamuser007.h Normal file
View File

@ -0,0 +1,68 @@
#ifndef ISTEAMUSER007_H
#define ISTEAMUSER007_H
#ifdef STEAM_WIN32
#pragma once
#endif
//-----------------------------------------------------------------------------
// Purpose: Functions for accessing and manipulating a steam account
// associated with one client instance
//-----------------------------------------------------------------------------
class ISteamUser007
{
public:
// returns the HSteamUser this interface represents
// this is only used internally by the API, and by a few select interfaces that support multi-user
virtual HSteamUser GetHSteamUser() = 0;
virtual void LogOn( CSteamID steamID ) = 0;
virtual void LogOff() = 0;
// returns true if the Steam client current has a live connection to the Steam servers.
// If false, it means there is no active connection due to either a networking issue on the local machine, or the Steam server is down/busy.
// The Steam client will automatically be trying to recreate the connection as often as possible.
virtual bool BLoggedOn() = 0;
// returns the CSteamID of the account currently logged into the Steam client
// a CSteamID is a unique identifier for an account, and used to differentiate users in all parts of the Steamworks API
virtual CSteamID GetSteamID() = 0;
virtual bool SetRegistryString( EConfigSubTree eRegistrySubTree, const char *pchKey, const char *pchValue ) = 0;
virtual bool GetRegistryString( EConfigSubTree eRegistrySubTree, const char *pchKey, char *pchValue, int cbValue ) = 0;
virtual bool SetRegistryInt( EConfigSubTree eRegistrySubTree, const char *pchKey, int iValue ) = 0;
virtual bool GetRegistryInt( EConfigSubTree eRegistrySubTree, const char *pchKey, int *piValue ) = 0;
// Multiplayer Authentication functions
// InitiateGameConnection() starts the state machine for authenticating the game client with the game server
// It is the client portion of a three-way handshake between the client, the game server, and the steam servers
//
// Parameters:
// void *pAuthBlob - a pointer to empty memory that will be filled in with the authentication token.
// int cbMaxAuthBlob - the number of bytes of allocated memory in pBlob. Should be at least 2048 bytes.
// CSteamID steamIDGameServer - the steamID of the game server, received from the game server by the client
// CGameID gameID - the ID of the current game. For games without mods, this is just CGameID( <appID> )
// uint32 unIPServer, uint16 usPortServer - the IP address of the game server
// bool bSecure - whether or not the client thinks that the game server is reporting itself as secure (i.e. VAC is running)
//
// return value - returns the number of bytes written to pBlob. If the return is 0, then the buffer passed in was too small, and the call has failed
// The contents of pBlob should then be sent to the game server, for it to use to complete the authentication process.
virtual int InitiateGameConnection( void *pBlob, int cbMaxBlob, CSteamID steamID, CGameID gameID, uint32 unIPServer, uint16 usPortServer, bool bSecure, void *pvSteam2GetEncryptionKey, int cbSteam2GetEncryptionKey ) = 0;
// notify of disconnect
// needs to occur when the game client leaves the specified game server, needs to match with the InitiateGameConnection() call
virtual void TerminateGameConnection( uint32 unIPServer, uint16 usPortServer ) = 0;
// Legacy functions
// used by only a few games to track usage events
virtual void TrackAppUsageEvent( CGameID gameID, int eAppUsageEvent, const char *pchExtraInfo = "" ) = 0;
// legacy authentication support - need to be called if the game server rejects the user with a 'bad ticket' error
// this is only needed under very specific circumstances
virtual void RefreshSteam2Login() = 0;
};
#endif // ISTEAMUSER007_H

60
sdk/steam/isteamuser008.h Normal file
View File

@ -0,0 +1,60 @@
#ifndef ISTEAMUSER008_H
#define ISTEAMUSER008_H
#ifdef STEAM_WIN32
#pragma once
#endif
//-----------------------------------------------------------------------------
// Purpose: Functions for accessing and manipulating a steam account
// associated with one client instance
//-----------------------------------------------------------------------------
class ISteamUser008
{
public:
// returns the HSteamUser this interface represents
// this is only used internally by the API, and by a few select interfaces that support multi-user
virtual HSteamUser GetHSteamUser() = 0;
// returns true if the Steam client current has a live connection to the Steam servers.
// If false, it means there is no active connection due to either a networking issue on the local machine, or the Steam server is down/busy.
// The Steam client will automatically be trying to recreate the connection as often as possible.
virtual bool BLoggedOn() = 0;
// returns the CSteamID of the account currently logged into the Steam client
// a CSteamID is a unique identifier for an account, and used to differentiate users in all parts of the Steamworks API
virtual CSteamID GetSteamID() = 0;
// Multiplayer Authentication functions
// InitiateGameConnection() starts the state machine for authenticating the game client with the game server
// It is the client portion of a three-way handshake between the client, the game server, and the steam servers
//
// Parameters:
// void *pAuthBlob - a pointer to empty memory that will be filled in with the authentication token.
// int cbMaxAuthBlob - the number of bytes of allocated memory in pBlob. Should be at least 2048 bytes.
// CSteamID steamIDGameServer - the steamID of the game server, received from the game server by the client
// CGameID gameID - the ID of the current game. For games without mods, this is just CGameID( <appID> )
// uint32 unIPServer, uint16 usPortServer - the IP address of the game server
// bool bSecure - whether or not the client thinks that the game server is reporting itself as secure (i.e. VAC is running)
//
// return value - returns the number of bytes written to pBlob. If the return is 0, then the buffer passed in was too small, and the call has failed
// The contents of pBlob should then be sent to the game server, for it to use to complete the authentication process.
virtual int InitiateGameConnection( void *pBlob, int cbMaxBlob, CSteamID steamID, CGameID gameID, uint32 unIPServer, uint16 usPortServer, bool bSecure, void *pvSteam2GetEncryptionKey, int cbSteam2GetEncryptionKey ) = 0;
// notify of disconnect
// needs to occur when the game client leaves the specified game server, needs to match with the InitiateGameConnection() call
virtual void TerminateGameConnection( uint32 unIPServer, uint16 usPortServer ) = 0;
// Legacy functions
// used by only a few games to track usage events
virtual void TrackAppUsageEvent( CGameID gameID, int eAppUsageEvent, const char *pchExtraInfo = "" ) = 0;
// legacy authentication support - need to be called if the game server rejects the user with a 'bad ticket' error
// this is only needed under very specific circumstances
virtual void RefreshSteam2Login() = 0;
};
#endif // ISTEAMUSER008_H

View File

@ -38,6 +38,11 @@
#include "isteamclient019.h"
#include "isteamclient020.h"
#include "isteamuser.h"
#include "isteamuser004.h"
#include "isteamuser005.h"
#include "isteamuser006.h"
#include "isteamuser007.h"
#include "isteamuser008.h"
#include "isteamuser009.h"
#include "isteamuser010.h"
#include "isteamuser011.h"