lsteamclient: Synthesize SDK version 0.99x

For SteamFriends001, SteamGameServer002, SteamUser007, and
STEAMUSERSTATS_INTERFACE_VERSION001.
This commit is contained in:
Andrew Eikum
2019-02-14 08:32:39 -06:00
parent 7008e8bf21
commit 164490165d
32 changed files with 4218 additions and 1 deletions
@@ -0,0 +1,146 @@
#include "steam_defs.h"
#include "steamworks_sdk_099x/steam_api.h"
#include "steamclient_private.h"
#include "cppISteamFriends_SteamFriends001.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "struct_converters_099x.h"
const char * cppISteamFriends_SteamFriends001_GetPersonaName(void *linux_side)
{
return ((ISteamFriends*)linux_side)->GetPersonaName();
}
void cppISteamFriends_SteamFriends001_SetPersonaName(void *linux_side, const char * pchPersonaName)
{
((ISteamFriends*)linux_side)->SetPersonaName((const char *)pchPersonaName);
}
EPersonaState cppISteamFriends_SteamFriends001_GetPersonaState(void *linux_side)
{
return ((ISteamFriends*)linux_side)->GetPersonaState();
}
void cppISteamFriends_SteamFriends001_SetPersonaState(void *linux_side, EPersonaState ePersonaState)
{
((ISteamFriends*)linux_side)->SetPersonaState((EPersonaState)ePersonaState);
}
bool cppISteamFriends_SteamFriends001_AddFriend(void *linux_side, CSteamID steamIDFriend)
{
return ((ISteamFriends*)linux_side)->AddFriend((CSteamID)steamIDFriend);
}
bool cppISteamFriends_SteamFriends001_RemoveFriend(void *linux_side, CSteamID steamIDFriend)
{
return ((ISteamFriends*)linux_side)->RemoveFriend((CSteamID)steamIDFriend);
}
bool cppISteamFriends_SteamFriends001_HasFriend(void *linux_side, CSteamID steamIDFriend)
{
return ((ISteamFriends*)linux_side)->HasFriend((CSteamID)steamIDFriend);
}
EFriendRelationship cppISteamFriends_SteamFriends001_GetFriendRelationship(void *linux_side, CSteamID steamIDFriend)
{
return ((ISteamFriends*)linux_side)->GetFriendRelationship((CSteamID)steamIDFriend);
}
EPersonaState cppISteamFriends_SteamFriends001_GetFriendPersonaState(void *linux_side, CSteamID steamIDFriend)
{
return ((ISteamFriends*)linux_side)->GetFriendPersonaState((CSteamID)steamIDFriend);
}
bool cppISteamFriends_SteamFriends001_Deprecated_GetFriendGamePlayed(void *linux_side, CSteamID steamIDFriend, int32 * pnGameID, uint32 * punGameIP, uint16 * pusGamePort)
{
return ((ISteamFriends*)linux_side)->Deprecated_GetFriendGamePlayed((CSteamID)steamIDFriend, (int32 *)pnGameID, (uint32 *)punGameIP, (uint16 *)pusGamePort);
}
const char * cppISteamFriends_SteamFriends001_GetFriendPersonaName(void *linux_side, CSteamID steamIDFriend)
{
return ((ISteamFriends*)linux_side)->GetFriendPersonaName((CSteamID)steamIDFriend);
}
int32 cppISteamFriends_SteamFriends001_AddFriendByName(void *linux_side, const char * pchEmailOrAccountName)
{
return ((ISteamFriends*)linux_side)->AddFriendByName((const char *)pchEmailOrAccountName);
}
int cppISteamFriends_SteamFriends001_GetFriendCount(void *linux_side)
{
return ((ISteamFriends*)linux_side)->GetFriendCount();
}
CSteamID cppISteamFriends_SteamFriends001_GetFriendByIndex(void *linux_side, int iFriend)
{
return ((ISteamFriends*)linux_side)->GetFriendByIndex((int)iFriend);
}
void cppISteamFriends_SteamFriends001_SendMsgToFriend(void *linux_side, CSteamID steamIDFriend, EChatEntryType eChatEntryType, const char * pchMsgBody)
{
((ISteamFriends*)linux_side)->SendMsgToFriend((CSteamID)steamIDFriend, (EChatEntryType)eChatEntryType, (const char *)pchMsgBody);
}
void cppISteamFriends_SteamFriends001_SetFriendRegValue(void *linux_side, CSteamID steamIDFriend, const char * pchKey, const char * pchValue)
{
((ISteamFriends*)linux_side)->SetFriendRegValue((CSteamID)steamIDFriend, (const char *)pchKey, (const char *)pchValue);
}
const char * cppISteamFriends_SteamFriends001_GetFriendRegValue(void *linux_side, CSteamID steamIDFriend, const char * pchKey)
{
return ((ISteamFriends*)linux_side)->GetFriendRegValue((CSteamID)steamIDFriend, (const char *)pchKey);
}
const char * cppISteamFriends_SteamFriends001_GetFriendPersonaNameHistory(void *linux_side, CSteamID steamIDFriend, int iPersonaName)
{
return ((ISteamFriends*)linux_side)->GetFriendPersonaNameHistory((CSteamID)steamIDFriend, (int)iPersonaName);
}
int cppISteamFriends_SteamFriends001_GetChatMessage(void *linux_side, CSteamID steamIDFriend, int iChatID, void * pvData, int cubData, EChatEntryType * peChatEntryType)
{
return ((ISteamFriends*)linux_side)->GetChatMessage((CSteamID)steamIDFriend, (int)iChatID, (void *)pvData, (int)cubData, (EChatEntryType *)peChatEntryType);
}
bool cppISteamFriends_SteamFriends001_SendMsgToFriend_2(void *linux_side, CSteamID steamIDFriend, EChatEntryType eChatEntryType, const void * pvMsgBody, int cubMsgBody)
{
return ((ISteamFriends*)linux_side)->SendMsgToFriend((CSteamID)steamIDFriend, (EChatEntryType)eChatEntryType, (const void *)pvMsgBody, (int)cubMsgBody);
}
int cppISteamFriends_SteamFriends001_GetChatIDOfChatHistoryStart(void *linux_side, CSteamID steamIDFriend)
{
return ((ISteamFriends*)linux_side)->GetChatIDOfChatHistoryStart((CSteamID)steamIDFriend);
}
void cppISteamFriends_SteamFriends001_SetChatHistoryStart(void *linux_side, CSteamID steamIDFriend, int iChatID)
{
((ISteamFriends*)linux_side)->SetChatHistoryStart((CSteamID)steamIDFriend, (int)iChatID);
}
void cppISteamFriends_SteamFriends001_ClearChatHistory(void *linux_side, CSteamID steamIDFriend)
{
((ISteamFriends*)linux_side)->ClearChatHistory((CSteamID)steamIDFriend);
}
bool cppISteamFriends_SteamFriends001_InviteFriendByEmail(void *linux_side, const char * pchEmailAccount)
{
return ((ISteamFriends*)linux_side)->InviteFriendByEmail((const char *)pchEmailAccount);
}
int cppISteamFriends_SteamFriends001_GetBlockedFriendCount(void *linux_side)
{
return ((ISteamFriends*)linux_side)->GetBlockedFriendCount();
}
bool cppISteamFriends_SteamFriends001_GetFriendGamePlayed(void *linux_side, CSteamID steamIDFriend, uint64 * pulGameID, uint32 * punGameIP, uint16 * pusGamePort)
{
return ((ISteamFriends*)linux_side)->GetFriendGamePlayed((CSteamID)steamIDFriend, (uint64 *)pulGameID, (uint32 *)punGameIP, (uint16 *)pusGamePort);
}
bool cppISteamFriends_SteamFriends001_GetFriendGamePlayed2(void *linux_side, CSteamID steamIDFriend, uint64 * pulGameID, uint32 * punGameIP, uint16 * pusGamePort, uint16 * pusQueryPort)
{
return ((ISteamFriends*)linux_side)->GetFriendGamePlayed2((CSteamID)steamIDFriend, (uint64 *)pulGameID, (uint32 *)punGameIP, (uint16 *)pusGamePort, (uint16 *)pusQueryPort);
}
#ifdef __cplusplus
}
#endif
@@ -0,0 +1,33 @@
#ifdef __cplusplus
extern "C" {
#endif
extern const char * cppISteamFriends_SteamFriends001_GetPersonaName(void *);
extern void cppISteamFriends_SteamFriends001_SetPersonaName(void *, const char *);
extern EPersonaState cppISteamFriends_SteamFriends001_GetPersonaState(void *);
extern void cppISteamFriends_SteamFriends001_SetPersonaState(void *, EPersonaState);
extern bool cppISteamFriends_SteamFriends001_AddFriend(void *, CSteamID);
extern bool cppISteamFriends_SteamFriends001_RemoveFriend(void *, CSteamID);
extern bool cppISteamFriends_SteamFriends001_HasFriend(void *, CSteamID);
extern EFriendRelationship cppISteamFriends_SteamFriends001_GetFriendRelationship(void *, CSteamID);
extern EPersonaState cppISteamFriends_SteamFriends001_GetFriendPersonaState(void *, CSteamID);
extern bool cppISteamFriends_SteamFriends001_Deprecated_GetFriendGamePlayed(void *, CSteamID, int32 *, uint32 *, uint16 *);
extern const char * cppISteamFriends_SteamFriends001_GetFriendPersonaName(void *, CSteamID);
extern int32 cppISteamFriends_SteamFriends001_AddFriendByName(void *, const char *);
extern int cppISteamFriends_SteamFriends001_GetFriendCount(void *);
extern CSteamID cppISteamFriends_SteamFriends001_GetFriendByIndex(void *, int);
extern void cppISteamFriends_SteamFriends001_SendMsgToFriend(void *, CSteamID, EChatEntryType, const char *);
extern void cppISteamFriends_SteamFriends001_SetFriendRegValue(void *, CSteamID, const char *, const char *);
extern const char * cppISteamFriends_SteamFriends001_GetFriendRegValue(void *, CSteamID, const char *);
extern const char * cppISteamFriends_SteamFriends001_GetFriendPersonaNameHistory(void *, CSteamID, int);
extern int cppISteamFriends_SteamFriends001_GetChatMessage(void *, CSteamID, int, void *, int, EChatEntryType *);
extern bool cppISteamFriends_SteamFriends001_SendMsgToFriend_2(void *, CSteamID, EChatEntryType, const void *, int);
extern int cppISteamFriends_SteamFriends001_GetChatIDOfChatHistoryStart(void *, CSteamID);
extern void cppISteamFriends_SteamFriends001_SetChatHistoryStart(void *, CSteamID, int);
extern void cppISteamFriends_SteamFriends001_ClearChatHistory(void *, CSteamID);
extern bool cppISteamFriends_SteamFriends001_InviteFriendByEmail(void *, const char *);
extern int cppISteamFriends_SteamFriends001_GetBlockedFriendCount(void *);
extern bool cppISteamFriends_SteamFriends001_GetFriendGamePlayed(void *, CSteamID, uint64 *, uint32 *, uint16 *);
extern bool cppISteamFriends_SteamFriends001_GetFriendGamePlayed2(void *, CSteamID, uint64 *, uint32 *, uint16 *, uint16 *);
#ifdef __cplusplus
}
#endif
@@ -0,0 +1,117 @@
#include "steam_defs.h"
#include "steamworks_sdk_099x/steam_api.h"
#include "steamworks_sdk_099x/isteamgameserver.h"
#include "steamclient_private.h"
#include "cppISteamGameServer_SteamGameServer002.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "struct_converters_099x.h"
void cppISteamGameServer_SteamGameServer002_LogOn(void *linux_side)
{
((ISteamGameServer*)linux_side)->LogOn();
}
void cppISteamGameServer_SteamGameServer002_LogOff(void *linux_side)
{
((ISteamGameServer*)linux_side)->LogOff();
}
bool cppISteamGameServer_SteamGameServer002_BLoggedOn(void *linux_side)
{
return ((ISteamGameServer*)linux_side)->BLoggedOn();
}
void cppISteamGameServer_SteamGameServer002_GSSetSpawnCount(void *linux_side, uint32 ucSpawn)
{
((ISteamGameServer*)linux_side)->GSSetSpawnCount((uint32)ucSpawn);
}
bool cppISteamGameServer_SteamGameServer002_GSGetSteam2GetEncryptionKeyToSendToNewClient(void *linux_side, void * pvEncryptionKey, uint32 * pcbEncryptionKey, uint32 cbMaxEncryptionKey)
{
return ((ISteamGameServer*)linux_side)->GSGetSteam2GetEncryptionKeyToSendToNewClient((void *)pvEncryptionKey, (uint32 *)pcbEncryptionKey, (uint32)cbMaxEncryptionKey);
}
bool cppISteamGameServer_SteamGameServer002_GSSendSteam2UserConnect(void *linux_side, uint32 unUserID, const void * pvRawKey, uint32 unKeyLen, uint32 unIPPublic, uint16 usPort, const void * pvCookie, uint32 cubCookie)
{
return ((ISteamGameServer*)linux_side)->GSSendSteam2UserConnect((uint32)unUserID, (const void *)pvRawKey, (uint32)unKeyLen, (uint32)unIPPublic, (uint16)usPort, (const void *)pvCookie, (uint32)cubCookie);
}
bool cppISteamGameServer_SteamGameServer002_GSSendSteam3UserConnect(void *linux_side, CSteamID steamID, uint32 unIPPublic, const void * pvCookie, uint32 cubCookie)
{
return ((ISteamGameServer*)linux_side)->GSSendSteam3UserConnect((CSteamID)steamID, (uint32)unIPPublic, (const void *)pvCookie, (uint32)cubCookie);
}
bool cppISteamGameServer_SteamGameServer002_GSRemoveUserConnect(void *linux_side, uint32 unUserID)
{
return ((ISteamGameServer*)linux_side)->GSRemoveUserConnect((uint32)unUserID);
}
bool cppISteamGameServer_SteamGameServer002_GSSendUserDisconnect(void *linux_side, CSteamID steamID, uint32 unUserID)
{
return ((ISteamGameServer*)linux_side)->GSSendUserDisconnect((CSteamID)steamID, (uint32)unUserID);
}
bool cppISteamGameServer_SteamGameServer002_GSSendUserStatusResponse(void *linux_side, CSteamID steamID, int nSecondsConnected, int nSecondsSinceLast)
{
return ((ISteamGameServer*)linux_side)->GSSendUserStatusResponse((CSteamID)steamID, (int)nSecondsConnected, (int)nSecondsSinceLast);
}
bool cppISteamGameServer_SteamGameServer002_Obsolete_GSSetStatus(void *linux_side, int32 nAppIdServed, uint32 unServerFlags, int cPlayers, int cPlayersMax, int cBotPlayers, int unGamePort, const char * pchServerName, const char * pchGameDir, const char * pchMapName, const char * pchVersion)
{
return ((ISteamGameServer*)linux_side)->Obsolete_GSSetStatus((int32)nAppIdServed, (uint32)unServerFlags, (int)cPlayers, (int)cPlayersMax, (int)cBotPlayers, (int)unGamePort, (const char *)pchServerName, (const char *)pchGameDir, (const char *)pchMapName, (const char *)pchVersion);
}
bool cppISteamGameServer_SteamGameServer002_GSUpdateStatus(void *linux_side, int cPlayers, int cPlayersMax, int cBotPlayers, const char * pchServerName, const char * pchMapName)
{
return ((ISteamGameServer*)linux_side)->GSUpdateStatus((int)cPlayers, (int)cPlayersMax, (int)cBotPlayers, (const char *)pchServerName, (const char *)pchMapName);
}
bool cppISteamGameServer_SteamGameServer002_BSecure(void *linux_side)
{
return ((ISteamGameServer*)linux_side)->BSecure();
}
CSteamID cppISteamGameServer_SteamGameServer002_GetSteamID(void *linux_side)
{
return ((ISteamGameServer*)linux_side)->GetSteamID();
}
bool cppISteamGameServer_SteamGameServer002_GSSetServerType(void *linux_side, int32 nGameAppId, uint32 unServerFlags, uint32 unGameIP, uint32 unGamePort, const char * pchGameDir, const char * pchVersion)
{
return ((ISteamGameServer*)linux_side)->GSSetServerType((int32)nGameAppId, (uint32)unServerFlags, (uint32)unGameIP, (uint32)unGamePort, (const char *)pchGameDir, (const char *)pchVersion);
}
bool cppISteamGameServer_SteamGameServer002_GSSetServerType2(void *linux_side, int32 nGameAppId, uint32 unServerFlags, uint32 unGameIP, uint16 unGamePort, uint16 unSpectatorPort, uint16 usQueryPort, const char * pchGameDir, const char * pchVersion, bool bLANMode)
{
return ((ISteamGameServer*)linux_side)->GSSetServerType2((int32)nGameAppId, (uint32)unServerFlags, (uint32)unGameIP, (uint16)unGamePort, (uint16)unSpectatorPort, (uint16)usQueryPort, (const char *)pchGameDir, (const char *)pchVersion, (bool)bLANMode);
}
bool cppISteamGameServer_SteamGameServer002_GSUpdateStatus2(void *linux_side, int cPlayers, int cPlayersMax, int cBotPlayers, const char * pchServerName, const char * pSpectatorServerName, const char * pchMapName)
{
return ((ISteamGameServer*)linux_side)->GSUpdateStatus2((int)cPlayers, (int)cPlayersMax, (int)cBotPlayers, (const char *)pchServerName, (const char *)pSpectatorServerName, (const char *)pchMapName);
}
bool cppISteamGameServer_SteamGameServer002_GSCreateUnauthenticatedUser(void *linux_side, CSteamID * pSteamID)
{
return ((ISteamGameServer*)linux_side)->GSCreateUnauthenticatedUser((CSteamID *)pSteamID);
}
bool cppISteamGameServer_SteamGameServer002_GSSetUserData(void *linux_side, CSteamID steamID, const char * pPlayerName, uint32 nFrags)
{
return ((ISteamGameServer*)linux_side)->GSSetUserData((CSteamID)steamID, (const char *)pPlayerName, (uint32)nFrags);
}
void cppISteamGameServer_SteamGameServer002_GSUpdateSpectatorPort(void *linux_side, uint16 unSpectatorPort)
{
((ISteamGameServer*)linux_side)->GSUpdateSpectatorPort((uint16)unSpectatorPort);
}
void cppISteamGameServer_SteamGameServer002_GSSetGameType(void *linux_side, const char * pchType)
{
((ISteamGameServer*)linux_side)->GSSetGameType((const char *)pchType);
}
#ifdef __cplusplus
}
#endif
@@ -0,0 +1,27 @@
#ifdef __cplusplus
extern "C" {
#endif
extern void cppISteamGameServer_SteamGameServer002_LogOn(void *);
extern void cppISteamGameServer_SteamGameServer002_LogOff(void *);
extern bool cppISteamGameServer_SteamGameServer002_BLoggedOn(void *);
extern void cppISteamGameServer_SteamGameServer002_GSSetSpawnCount(void *, uint32);
extern bool cppISteamGameServer_SteamGameServer002_GSGetSteam2GetEncryptionKeyToSendToNewClient(void *, void *, uint32 *, uint32);
extern bool cppISteamGameServer_SteamGameServer002_GSSendSteam2UserConnect(void *, uint32, const void *, uint32, uint32, uint16, const void *, uint32);
extern bool cppISteamGameServer_SteamGameServer002_GSSendSteam3UserConnect(void *, CSteamID, uint32, const void *, uint32);
extern bool cppISteamGameServer_SteamGameServer002_GSRemoveUserConnect(void *, uint32);
extern bool cppISteamGameServer_SteamGameServer002_GSSendUserDisconnect(void *, CSteamID, uint32);
extern bool cppISteamGameServer_SteamGameServer002_GSSendUserStatusResponse(void *, CSteamID, int, int);
extern bool cppISteamGameServer_SteamGameServer002_Obsolete_GSSetStatus(void *, int32, uint32, int, int, int, int, const char *, const char *, const char *, const char *);
extern bool cppISteamGameServer_SteamGameServer002_GSUpdateStatus(void *, int, int, int, const char *, const char *);
extern bool cppISteamGameServer_SteamGameServer002_BSecure(void *);
extern CSteamID cppISteamGameServer_SteamGameServer002_GetSteamID(void *);
extern bool cppISteamGameServer_SteamGameServer002_GSSetServerType(void *, int32, uint32, uint32, uint32, const char *, const char *);
extern bool cppISteamGameServer_SteamGameServer002_GSSetServerType2(void *, int32, uint32, uint32, uint16, uint16, uint16, const char *, const char *, bool);
extern bool cppISteamGameServer_SteamGameServer002_GSUpdateStatus2(void *, int, int, int, const char *, const char *, const char *);
extern bool cppISteamGameServer_SteamGameServer002_GSCreateUnauthenticatedUser(void *, CSteamID *);
extern bool cppISteamGameServer_SteamGameServer002_GSSetUserData(void *, CSteamID, const char *, uint32);
extern void cppISteamGameServer_SteamGameServer002_GSUpdateSpectatorPort(void *, uint16);
extern void cppISteamGameServer_SteamGameServer002_GSSetGameType(void *, const char *);
#ifdef __cplusplus
}
#endif
@@ -0,0 +1,121 @@
#include "steam_defs.h"
#include "steamworks_sdk_099x/steam_api.h"
#include "steamclient_private.h"
#include "cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "struct_converters_099x.h"
uint32 cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_GetNumStats(void *linux_side, CGameID nGameID)
{
return ((ISteamUserStats*)linux_side)->GetNumStats((CGameID)nGameID);
}
const char * cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_GetStatName(void *linux_side, CGameID nGameID, uint32 iStat)
{
return ((ISteamUserStats*)linux_side)->GetStatName((CGameID)nGameID, (uint32)iStat);
}
ESteamUserStatType cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_GetStatType(void *linux_side, CGameID nGameID, const char * pchName)
{
return ((ISteamUserStats*)linux_side)->GetStatType((CGameID)nGameID, (const char *)pchName);
}
uint32 cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_GetNumAchievements(void *linux_side, CGameID nGameID)
{
return ((ISteamUserStats*)linux_side)->GetNumAchievements((CGameID)nGameID);
}
const char * cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_GetAchievementName(void *linux_side, CGameID nGameID, uint32 iAchievement)
{
return ((ISteamUserStats*)linux_side)->GetAchievementName((CGameID)nGameID, (uint32)iAchievement);
}
uint32 cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_GetNumGroupAchievements(void *linux_side, CGameID nGameID)
{
return ((ISteamUserStats*)linux_side)->GetNumGroupAchievements((CGameID)nGameID);
}
const char * cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_GetGroupAchievementName(void *linux_side, CGameID nGameID, uint32 iAchievement)
{
return ((ISteamUserStats*)linux_side)->GetGroupAchievementName((CGameID)nGameID, (uint32)iAchievement);
}
bool cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_RequestCurrentStats(void *linux_side, CGameID nGameID)
{
return ((ISteamUserStats*)linux_side)->RequestCurrentStats((CGameID)nGameID);
}
bool cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_GetStat(void *linux_side, CGameID nGameID, const char * pchName, int32 * pData)
{
return ((ISteamUserStats*)linux_side)->GetStat((CGameID)nGameID, (const char *)pchName, (int32 *)pData);
}
bool cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_GetStat_2(void *linux_side, CGameID nGameID, const char * pchName, float * pData)
{
return ((ISteamUserStats*)linux_side)->GetStat((CGameID)nGameID, (const char *)pchName, (float *)pData);
}
bool cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_SetStat(void *linux_side, CGameID nGameID, const char * pchName, int32 nData)
{
return ((ISteamUserStats*)linux_side)->SetStat((CGameID)nGameID, (const char *)pchName, (int32)nData);
}
bool cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_SetStat_2(void *linux_side, CGameID nGameID, const char * pchName, float fData)
{
return ((ISteamUserStats*)linux_side)->SetStat((CGameID)nGameID, (const char *)pchName, (float)fData);
}
bool cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_UpdateAvgRateStat(void *linux_side, CGameID nGameID, const char * pchName, float flCountThisSession, double dSessionLength)
{
return ((ISteamUserStats*)linux_side)->UpdateAvgRateStat((CGameID)nGameID, (const char *)pchName, (float)flCountThisSession, (double)dSessionLength);
}
bool cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_GetAchievement(void *linux_side, CGameID nGameID, const char * pchName, bool * pbAchieved)
{
return ((ISteamUserStats*)linux_side)->GetAchievement((CGameID)nGameID, (const char *)pchName, (bool *)pbAchieved);
}
bool cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_GetGroupAchievement(void *linux_side, CGameID nGameID, const char * pchName, bool * pbAchieved)
{
return ((ISteamUserStats*)linux_side)->GetGroupAchievement((CGameID)nGameID, (const char *)pchName, (bool *)pbAchieved);
}
bool cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_SetAchievement(void *linux_side, CGameID nGameID, const char * pchName)
{
return ((ISteamUserStats*)linux_side)->SetAchievement((CGameID)nGameID, (const char *)pchName);
}
bool cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_SetGroupAchievement(void *linux_side, CGameID nGameID, const char * pchName)
{
return ((ISteamUserStats*)linux_side)->SetGroupAchievement((CGameID)nGameID, (const char *)pchName);
}
bool cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_StoreStats(void *linux_side, CGameID nGameID)
{
return ((ISteamUserStats*)linux_side)->StoreStats((CGameID)nGameID);
}
bool cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_ClearAchievement(void *linux_side, CGameID nGameID, const char * pchName)
{
return ((ISteamUserStats*)linux_side)->ClearAchievement((CGameID)nGameID, (const char *)pchName);
}
bool cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_ClearGroupAchievement(void *linux_side, CGameID nGameID, const char * pchName)
{
return ((ISteamUserStats*)linux_side)->ClearGroupAchievement((CGameID)nGameID, (const char *)pchName);
}
int cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_GetAchievementIcon(void *linux_side, CGameID nGameID, const char * pchName)
{
return ((ISteamUserStats*)linux_side)->GetAchievementIcon((CGameID)nGameID, (const char *)pchName);
}
const char * cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_GetAchievementDisplayAttribute(void *linux_side, CGameID nGameID, const char * pchName, const char * pchKey)
{
return ((ISteamUserStats*)linux_side)->GetAchievementDisplayAttribute((CGameID)nGameID, (const char *)pchName, (const char *)pchKey);
}
#ifdef __cplusplus
}
#endif
@@ -0,0 +1,28 @@
#ifdef __cplusplus
extern "C" {
#endif
extern uint32 cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_GetNumStats(void *, CGameID);
extern const char * cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_GetStatName(void *, CGameID, uint32);
extern ESteamUserStatType cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_GetStatType(void *, CGameID, const char *);
extern uint32 cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_GetNumAchievements(void *, CGameID);
extern const char * cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_GetAchievementName(void *, CGameID, uint32);
extern uint32 cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_GetNumGroupAchievements(void *, CGameID);
extern const char * cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_GetGroupAchievementName(void *, CGameID, uint32);
extern bool cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_RequestCurrentStats(void *, CGameID);
extern bool cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_GetStat(void *, CGameID, const char *, int32 *);
extern bool cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_GetStat_2(void *, CGameID, const char *, float *);
extern bool cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_SetStat(void *, CGameID, const char *, int32);
extern bool cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_SetStat_2(void *, CGameID, const char *, float);
extern bool cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_UpdateAvgRateStat(void *, CGameID, const char *, float, double);
extern bool cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_GetAchievement(void *, CGameID, const char *, bool *);
extern bool cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_GetGroupAchievement(void *, CGameID, const char *, bool *);
extern bool cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_SetAchievement(void *, CGameID, const char *);
extern bool cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_SetGroupAchievement(void *, CGameID, const char *);
extern bool cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_StoreStats(void *, CGameID);
extern bool cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_ClearAchievement(void *, CGameID, const char *);
extern bool cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_ClearGroupAchievement(void *, CGameID, const char *);
extern int cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_GetAchievementIcon(void *, CGameID, const char *);
extern const char * cppISteamUserStats_STEAMUSERSTATS_INTERFACE_VERSION001_GetAchievementDisplayAttribute(void *, CGameID, const char *, const char *);
#ifdef __cplusplus
}
#endif
@@ -0,0 +1,76 @@
#include "steam_defs.h"
#include "steamworks_sdk_099x/steam_api.h"
#include "steamclient_private.h"
#include "cppISteamUser_SteamUser007.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "struct_converters_099x.h"
HSteamUser cppISteamUser_SteamUser007_GetHSteamUser(void *linux_side)
{
return ((ISteamUser*)linux_side)->GetHSteamUser();
}
void cppISteamUser_SteamUser007_LogOn(void *linux_side, CSteamID steamID)
{
((ISteamUser*)linux_side)->LogOn((CSteamID)steamID);
}
void cppISteamUser_SteamUser007_LogOff(void *linux_side)
{
((ISteamUser*)linux_side)->LogOff();
}
bool cppISteamUser_SteamUser007_BLoggedOn(void *linux_side)
{
return ((ISteamUser*)linux_side)->BLoggedOn();
}
CSteamID cppISteamUser_SteamUser007_GetSteamID(void *linux_side)
{
return ((ISteamUser*)linux_side)->GetSteamID();
}
bool cppISteamUser_SteamUser007_SetRegistryString(void *linux_side, EConfigSubTree eRegistrySubTree, const char * pchKey, const char * pchValue)
{
return ((ISteamUser*)linux_side)->SetRegistryString((EConfigSubTree)eRegistrySubTree, (const char *)pchKey, (const char *)pchValue);
}
bool cppISteamUser_SteamUser007_GetRegistryString(void *linux_side, EConfigSubTree eRegistrySubTree, const char * pchKey, char * pchValue, int cbValue)
{
return ((ISteamUser*)linux_side)->GetRegistryString((EConfigSubTree)eRegistrySubTree, (const char *)pchKey, (char *)pchValue, (int)cbValue);
}
bool cppISteamUser_SteamUser007_SetRegistryInt(void *linux_side, EConfigSubTree eRegistrySubTree, const char * pchKey, int iValue)
{
return ((ISteamUser*)linux_side)->SetRegistryInt((EConfigSubTree)eRegistrySubTree, (const char *)pchKey, (int)iValue);
}
bool cppISteamUser_SteamUser007_GetRegistryInt(void *linux_side, EConfigSubTree eRegistrySubTree, const char * pchKey, int * piValue)
{
return ((ISteamUser*)linux_side)->GetRegistryInt((EConfigSubTree)eRegistrySubTree, (const char *)pchKey, (int *)piValue);
}
int cppISteamUser_SteamUser007_InitiateGameConnection(void *linux_side, void * pBlob, int cbMaxBlob, CSteamID steamID, CGameID gameID, uint32 unIPServer, uint16 usPortServer, bool bSecure, void * pvSteam2GetEncryptionKey, int cbSteam2GetEncryptionKey)
{
return ((ISteamUser*)linux_side)->InitiateGameConnection((void *)pBlob, (int)cbMaxBlob, (CSteamID)steamID, (CGameID)gameID, (uint32)unIPServer, (uint16)usPortServer, (bool)bSecure, (void *)pvSteam2GetEncryptionKey, (int)cbSteam2GetEncryptionKey);
}
void cppISteamUser_SteamUser007_TerminateGameConnection(void *linux_side, uint32 unIPServer, uint16 usPortServer)
{
((ISteamUser*)linux_side)->TerminateGameConnection((uint32)unIPServer, (uint16)usPortServer);
}
void cppISteamUser_SteamUser007_TrackAppUsageEvent(void *linux_side, CGameID gameID, int eAppUsageEvent, const char * pchExtraInfo)
{
((ISteamUser*)linux_side)->TrackAppUsageEvent((CGameID)gameID, (int)eAppUsageEvent, (const char *)pchExtraInfo);
}
void cppISteamUser_SteamUser007_RefreshSteam2Login(void *linux_side)
{
((ISteamUser*)linux_side)->RefreshSteam2Login();
}
#ifdef __cplusplus
}
#endif
+19
View File
@@ -0,0 +1,19 @@
#ifdef __cplusplus
extern "C" {
#endif
extern HSteamUser cppISteamUser_SteamUser007_GetHSteamUser(void *);
extern void cppISteamUser_SteamUser007_LogOn(void *, CSteamID);
extern void cppISteamUser_SteamUser007_LogOff(void *);
extern bool cppISteamUser_SteamUser007_BLoggedOn(void *);
extern CSteamID cppISteamUser_SteamUser007_GetSteamID(void *);
extern bool cppISteamUser_SteamUser007_SetRegistryString(void *, EConfigSubTree, const char *, const char *);
extern bool cppISteamUser_SteamUser007_GetRegistryString(void *, EConfigSubTree, const char *, char *, int);
extern bool cppISteamUser_SteamUser007_SetRegistryInt(void *, EConfigSubTree, const char *, int);
extern bool cppISteamUser_SteamUser007_GetRegistryInt(void *, EConfigSubTree, const char *, int *);
extern int cppISteamUser_SteamUser007_InitiateGameConnection(void *, void *, int, CSteamID, CGameID, uint32, uint16, bool, void *, int);
extern void cppISteamUser_SteamUser007_TerminateGameConnection(void *, uint32, uint16);
extern void cppISteamUser_SteamUser007_TrackAppUsageEvent(void *, CGameID, int, const char *);
extern void cppISteamUser_SteamUser007_RefreshSteam2Login(void *);
#ifdef __cplusplus
}
#endif
+1
View File
@@ -74,6 +74,7 @@ sdk_versions = [
"101",
"100",
"099y",
"099x",
]
files = [
+2 -1
View File
@@ -64,7 +64,8 @@ typedef uint32_t EUserUGCList,
EControllerActionOrigin,
EMatchMakingType,
AudioPlayback_Status,
ESteamUserStatType
ESteamUserStatType,
EConfigSubTree
;
/* these are PODs, so just copy the data. hopefully the
@@ -0,0 +1,38 @@
//====== Copyright © 1996-2008, Valve Corporation, All rights reserved. =======
//
// Purpose: interface to app data in Steam
//
//=============================================================================
#ifndef ISTEAMAPPS_H
#define ISTEAMAPPS_H
#ifdef _WIN32
#pragma once
#endif
//-----------------------------------------------------------------------------
// Purpose: interface to app data
//-----------------------------------------------------------------------------
class ISteamApps
{
public:
// returns 0 if the key does not exist
// this may be true on first call, since the app data may not be cached locally yet
// If you expect it to exists wait for the AppDataChanged_t after the first failure and ask again
virtual int GetAppData( AppId_t nAppID, const char *pchKey, char *pchValue, int cchValueMax ) = 0;
};
#define STEAMAPPS_INTERFACE_VERSION "STEAMAPPS_INTERFACE_VERSION001"
//-----------------------------------------------------------------------------
// Purpose: called when new information about an app has arrived
//-----------------------------------------------------------------------------
struct AppDataChanged_t
{
enum { k_iCallback = k_iSteamAppsCallbacks + 1 };
uint32 m_nAppID; // appid that changed
bool m_bBySteamUI; // change came from SteamUI
bool m_bCDDBUpdate; // the cddb entry for this app changed
};
#endif // ISTEAMAPPS_H
@@ -0,0 +1,137 @@
//====== Copyright © 1996-2008, Valve Corporation, All rights reserved. =======
//
// Purpose: Main interface for loading and accessing Steamworks API's from the
// Steam client.
// For most uses, this code is wrapped inside of SteamAPI_Init()
//=============================================================================
#ifndef ISTEAMCLIENT_H
#define ISTEAMCLIENT_H
#ifdef _WIN32
#pragma once
#endif
#include "steamtypes.h"
#include "steamclientpublic.h"
// handle to a communication pipe to the Steam client
typedef int32 HSteamPipe;
// handle to single instance of a steam user
typedef int32 HSteamUser;
// function prototype
#if defined( POSIX ) && !defined( _CYGWIN )
#define __cdecl
#endif
extern "C" typedef void (__cdecl *SteamAPIWarningMessageHook_t)(int, const char *);
// interface predec
class ISteamUser;
class ISteamGameServer;
class ISteamFriends;
class ISteamUtils;
class ISteamMatchmaking;
class ISteamContentServer;
class ISteamMasterServerUpdater;
class ISteamMatchmakingServers;
class ISteamUserStats;
class ISteamApps;
class ISteamNetworking;
//-----------------------------------------------------------------------------
// Purpose: Interface to creating a new steam instance, or to
// connect to an existing steam instance, whether it's in a
// different process or is local.
//
// For most scenarios this is all handled automatically via SteamAPI_Init().
// You'll only need to use these interfaces if you have a more complex versioning scheme,
// where you want to get different versions of the same interface in different dll's in your project.
//-----------------------------------------------------------------------------
class ISteamClient
{
public:
// Creates a communication pipe to the Steam client
virtual HSteamPipe CreateSteamPipe() = 0;
// Releases a previously created communications pipe
virtual bool BReleaseSteamPipe( HSteamPipe hSteamPipe ) = 0;
virtual HSteamUser CreateGlobalUser( HSteamPipe *phSteamPipe ) = 0;
// connects to an existing global user, failing if none exists
// used by the game to coordinate with the steamUI
virtual HSteamUser ConnectToGlobalUser( HSteamPipe hSteamPipe ) = 0;
// used by game servers, create a steam user that won't be shared with anyone else
virtual HSteamUser CreateLocalUser( HSteamPipe *phSteamPipe ) = 0;
// removes an allocated user
virtual void ReleaseUser( HSteamPipe hSteamPipe, HSteamUser hUser ) = 0;
// retrieves the ISteamUser interface associated with the handle
virtual ISteamUser *GetISteamUser( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
virtual void *GetIVAC( HSteamUser hSteamUser ) = 0;
// retrieves the ISteamGameServer interface associated with the handle
virtual ISteamGameServer *GetISteamGameServer( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// set the local IP and Port to bind to
// this must be set before CreateLocalUser()
virtual void SetLocalIPBinding( uint32 unIP, uint16 usPort ) = 0;
virtual const char *GetUniverseName( EUniverse eUniverse ) = 0;
// returns the ISteamFriends interface
virtual ISteamFriends *GetISteamFriends( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// returns the ISteamUtils interface
virtual ISteamUtils *GetISteamUtils( HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
virtual void *GetISteamBilling( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// returns the ISteamMatchmaking interface
virtual ISteamMatchmaking *GetISteamMatchmaking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
virtual ISteamApps *GetISteamApps( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// returns the ISteamContentServer interface
virtual ISteamContentServer *GetISteamContentServer( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// returns the ISteamMasterServerUpdater interface
virtual ISteamMasterServerUpdater *GetISteamMasterServerUpdater( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// returns the ISteamMatchmakingServers interface
virtual ISteamMatchmakingServers *GetISteamMatchmakingServers( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// this needs to be called every frame to process matchmaking results
// redundant if you're already calling SteamAPI_RunCallbacks()
virtual void RunFrame() = 0;
// returns the number of IPC calls made since the last time this function was called
// Used for perf debugging so you can understand how many IPC calls your game makes per frame
// Every IPC call is at minimum a thread context switch if not a process one so you want to rate
// control how often you do them.
virtual uint32 GetIPCCallCount() = 0;
};
#define STEAMCLIENT_INTERFACE_VERSION "SteamClient006"
//-----------------------------------------------------------------------------
// Purpose: Base values for callback identifiers, each callback must
// have a unique ID.
//-----------------------------------------------------------------------------
enum { k_iSteamUserCallbacks = 100 };
enum { k_iSteamGameServerCallbacks = 200 };
enum { k_iSteamFriendsCallbacks = 300 };
enum { k_iSteamBillingCallbacks = 400 };
enum { k_iSteamMatchmakingCallbacks = 500 };
enum { k_iSteamContentServerCallbacks = 600 };
enum { k_iSteamUtilsCallbacks = 700 };
enum { k_iClientFriendsCallbacks = 800 };
enum { k_iClientUserCallbacks = 900 };
enum { k_iSteamAppsCallbacks = 1000 };
enum { k_iSteamUserStatsCallbacks = 1100 };
enum { k_iSteamNetworkingCallbacks = 1200 };
#endif // ISTEAMCLIENT_H
@@ -0,0 +1,167 @@
//====== Copyright © 1996-2008, Valve Corporation, All rights reserved. =======
//
// Purpose: interface to both friends list data and general information about users
//
//=============================================================================
#ifndef ISTEAMFRIENDS_H
#define ISTEAMFRIENDS_H
#ifdef _WIN32
#pragma once
#endif
#include "isteamclient.h"
//-----------------------------------------------------------------------------
// Purpose: set of relationships to other users
//-----------------------------------------------------------------------------
enum EFriendRelationship
{
k_EFriendRelationshipNone = 0,
k_EFriendRelationshipBlocked = 1,
k_EFriendRelationshipRequestRecipient = 2,
k_EFriendRelationshipFriend = 3,
k_EFriendRelationshipRequestInitiator = 4,
k_EFriendRelationshipIgnored = 5,
k_EFriendRelationshipIgnoredFriend = 6,
};
//-----------------------------------------------------------------------------
// Purpose: list of states a friend can be in
//-----------------------------------------------------------------------------
enum EPersonaState
{
k_EPersonaStateOffline = 0, // friend is not currently logged on
k_EPersonaStateOnline = 1, // friend is logged on
k_EPersonaStateBusy = 2, // user is on, but busy
k_EPersonaStateAway = 3, // auto-away feature
k_EPersonaStateSnooze = 4, // auto-away for a long time
k_EPersonaStateMax,
};
//-----------------------------------------------------------------------------
// Purpose: flags for enumerating friends list, or quickly checking a the relationship between users
//-----------------------------------------------------------------------------
enum k_EFriendFlags
{
k_EFriendFlagNone = 0x00,
k_EFriendFlagBlocked = 0x01,
k_EFriendFlagFriendshipRequested = 0x02,
k_EFriendFlagImmediate = 0x04, // "regular" friend
k_EFriendFlagClanMember = 0x08,
k_EFriendFlagOnGameServer = 0x10,
// k_EFriendFlagHasPlayedWith = 0x20, // not currently used
// k_EFriendFlagFriendOfFriend = 0x40, // not currently used
k_EFriendFlagRequestingFriendship = 0x80,
k_EFriendFlagRequestingInfo = 0x100,
k_EFriendFlagIgnored = 0x200,
k_EFriendFlagIgnoredFriend = 0x400,
k_EFriendFlagAll = 0xFFFF,
};
// maximum number of characters in a users name
enum { k_cchPersonaNameMax = 128 };
// size limit on chat room or member metadata
const uint32 k_cubChatMetadataMax = 4096;
//-----------------------------------------------------------------------------
// Purpose: interface to accessing information about individual users,
// that can be a friend, in a group, on a game server or in a lobby with the local user
//-----------------------------------------------------------------------------
class ISteamFriends
{
public:
// returns the local players name - guaranteed to not be NULL.
// this is the same name as on the users community profile page
// this is stored in UTF-8 format
// like all the other interface functions that return a char *, it's important that this pointer is not saved
// off; it will eventually be free'd or re-allocated
virtual const char *GetPersonaName() = 0;
virtual void SetPersonaName( const char *pchPersonaName ) = 0;
virtual EPersonaState GetPersonaState() = 0;
virtual void SetPersonaState( EPersonaState ePersonaState ) = 0;
virtual bool AddFriend( CSteamID steamIDFriend ) = 0;
virtual bool RemoveFriend( CSteamID steamIDFriend ) = 0;
virtual bool HasFriend( CSteamID steamIDFriend ) = 0;
virtual EFriendRelationship GetFriendRelationship( CSteamID steamIDFriend ) = 0;
virtual EPersonaState GetFriendPersonaState( CSteamID steamIDFriend ) = 0;
virtual bool Deprecated_GetFriendGamePlayed( CSteamID steamIDFriend, int32 *pnGameID, uint32 *punGameIP, uint16 *pusGamePort ) = 0;
virtual const char *GetFriendPersonaName( CSteamID steamIDFriend ) = 0;
virtual int32 AddFriendByName( const char *pchEmailOrAccountName ) = 0;
virtual int GetFriendCount() = 0;
virtual CSteamID GetFriendByIndex( int iFriend ) = 0;
virtual void SendMsgToFriend( CSteamID steamIDFriend, EChatEntryType eChatEntryType, const char *pchMsgBody ) = 0;
virtual void SetFriendRegValue( CSteamID steamIDFriend, const char *pchKey, const char *pchValue ) = 0;
virtual const char *GetFriendRegValue( CSteamID steamIDFriend, const char *pchKey ) = 0;
virtual const char *GetFriendPersonaNameHistory( CSteamID steamIDFriend, int iPersonaName ) = 0;
virtual int GetChatMessage( CSteamID steamIDFriend, int iChatID, void *pvData, int cubData, EChatEntryType *peChatEntryType ) = 0;
virtual bool SendMsgToFriend( CSteamID steamIDFriend, EChatEntryType eChatEntryType, const void *pvMsgBody, int cubMsgBody ) = 0;
virtual int GetChatIDOfChatHistoryStart( CSteamID steamIDFriend ) = 0;
virtual void SetChatHistoryStart( CSteamID steamIDFriend, int iChatID ) = 0;
virtual void ClearChatHistory( CSteamID steamIDFriend ) = 0;
virtual bool InviteFriendByEmail( const char *pchEmailAccount ) = 0;
virtual int GetBlockedFriendCount() = 0;
virtual bool GetFriendGamePlayed( CSteamID steamIDFriend, uint64 *pulGameID, uint32 *punGameIP, uint16 *pusGamePort ) = 0;
virtual bool GetFriendGamePlayed2( CSteamID steamIDFriend, uint64 *pulGameID, uint32 *punGameIP, uint16 *pusGamePort, uint16 *pusQueryPort ) = 0;
};
#define STEAMFRIENDS_INTERFACE_VERSION "SteamFriends001"
//-----------------------------------------------------------------------------
// Purpose: called when a friends' status changes
//-----------------------------------------------------------------------------
struct PersonaStateChange_t
{
enum { k_iCallback = k_iSteamFriendsCallbacks + 4 };
uint64 m_ulSteamID; // steamID of the friend who changed
int m_nChangeFlags; // what's changed
};
// used in PersonaStateChange_t::m_nChangeFlags to describe what's changed about a user
// these flags describe what the client has learned has changed recently, so on startup you'll see a name, avatar & relationship change for every friend
enum EPersonaChange
{
k_EPersonaChangeName = 0x001,
k_EPersonaChangeStatus = 0x002,
k_EPersonaChangeComeOnline = 0x004,
k_EPersonaChangeGoneOffline = 0x008,
k_EPersonaChangeGamePlayed = 0x010,
k_EPersonaChangeGameServer = 0x020,
k_EPersonaChangeAvatar = 0x040,
k_EPersonaChangeJoinedSource= 0x080,
k_EPersonaChangeLeftSource = 0x100,
k_EPersonaChangeRelationshipChanged = 0x200,
k_EPersonaChangeNameFirstSet = 0x400,
};
//-----------------------------------------------------------------------------
// Purpose: posted when game overlay activates or deactivates
// the game can use this to be pause or resume single player games
//-----------------------------------------------------------------------------
struct GameOverlayActivated_t
{
enum { k_iCallback = k_iSteamFriendsCallbacks + 31 };
uint8 m_bActive; // true if it's just been activated, false otherwise
};
//-----------------------------------------------------------------------------
// Purpose: called when the user tries to join a different game server from their friends list
// game client should attempt to connect to specified server when this is received
//-----------------------------------------------------------------------------
struct GameServerChangeRequested_t
{
enum { k_iCallback = k_iSteamFriendsCallbacks + 32 };
char m_rgchServer[64]; // server address ("127.0.0.1:27015", "tf2.valvesoftware.com")
char m_rgchPassword[64]; // server password, if any
};
#endif // ISTEAMFRIENDS_H
@@ -0,0 +1,110 @@
//====== Copyright © 1996-2008, Valve Corporation, All rights reserved. =======
//
// Purpose: interface to steam for game servers
//
//=============================================================================
#ifndef ISTEAMGAMESERVER_H
#define ISTEAMGAMESERVER_H
#ifdef _WIN32
#pragma once
#endif
#include "isteamclient.h"
//-----------------------------------------------------------------------------
// Purpose: Functions for authenticating users via Steam to play on a game server
//-----------------------------------------------------------------------------
class ISteamGameServer
{
public:
virtual void LogOn() = 0;
virtual void LogOff() = 0;
virtual bool BLoggedOn() = 0;
virtual void GSSetSpawnCount( uint32 ucSpawn ) = 0;
virtual bool GSGetSteam2GetEncryptionKeyToSendToNewClient( void *pvEncryptionKey, uint32 *pcbEncryptionKey, uint32 cbMaxEncryptionKey ) = 0;
virtual bool GSSendSteam2UserConnect( uint32 unUserID, const void *pvRawKey, uint32 unKeyLen, uint32 unIPPublic, uint16 usPort, const void *pvCookie, uint32 cubCookie ) = 0;
virtual bool GSSendSteam3UserConnect( CSteamID steamID, uint32 unIPPublic, const void *pvCookie, uint32 cubCookie ) = 0;
virtual bool GSRemoveUserConnect( uint32 unUserID ) = 0;
virtual bool GSSendUserDisconnect( CSteamID steamID, uint32 unUserID ) = 0;
virtual bool GSSendUserStatusResponse( CSteamID steamID, int nSecondsConnected, int nSecondsSinceLast ) = 0;
virtual bool Obsolete_GSSetStatus( int32 nAppIdServed, uint32 unServerFlags, int cPlayers, int cPlayersMax, int cBotPlayers, int unGamePort, const char *pchServerName, const char *pchGameDir, const char *pchMapName, const char *pchVersion ) = 0;
virtual bool GSUpdateStatus( int cPlayers, int cPlayersMax, int cBotPlayers, const char *pchServerName, const char *pchMapName ) = 0;
virtual bool BSecure() = 0;
virtual CSteamID GetSteamID() = 0;
virtual bool GSSetServerType( int32 nGameAppId, uint32 unServerFlags, uint32 unGameIP, uint32 unGamePort, const char *pchGameDir, const char *pchVersion ) = 0;
virtual bool GSSetServerType2( int32 nGameAppId, uint32 unServerFlags, uint32 unGameIP, uint16 unGamePort, uint16 unSpectatorPort, uint16 usQueryPort, const char *pchGameDir, const char *pchVersion, bool bLANMode ) = 0;
virtual bool GSUpdateStatus2( int cPlayers, int cPlayersMax, int cBotPlayers, const char *pchServerName, const char *pSpectatorServerName, const char *pchMapName ) = 0;
virtual bool GSCreateUnauthenticatedUser( CSteamID *pSteamID ) = 0;
virtual bool GSSetUserData( CSteamID steamID, const char *pPlayerName, uint32 nFrags ) = 0;
virtual void GSUpdateSpectatorPort( uint16 unSpectatorPort ) = 0;
virtual void GSSetGameType( const char *pchType ) = 0;
};
#define STEAMGAMESERVER_INTERFACE_VERSION "SteamGameServer002"
// game server flags
const uint32 k_unServerFlagNone = 0x00;
const uint32 k_unServerFlagActive = 0x01; // server has users playing
const uint32 k_unServerFlagSecure = 0x02; // server wants to be secure
const uint32 k_unServerFlagDedicated = 0x04; // server is dedicated
const uint32 k_unServerFlagLinux = 0x08; // linux build
const uint32 k_unServerFlagPassworded = 0x10; // password protected
const uint32 k_unServerFlagPrivate = 0x20; // server shouldn't list on master server and
// won't enforce authentication of users that connect to the server.
// Useful when you run a server where the clients may not
// be connected to the internet but you want them to play (i.e LANs)
// callbacks
// client has been approved to connect to this game server
struct GSClientApprove_t
{
enum { k_iCallback = k_iSteamGameServerCallbacks + 1 };
CSteamID m_SteamID;
};
// client has been denied to connection to this game server
struct GSClientDeny_t
{
enum { k_iCallback = k_iSteamGameServerCallbacks + 2 };
CSteamID m_SteamID;
EDenyReason m_eDenyReason;
char m_rgchOptionalText[128];
};
// request the game server should kick the user
struct GSClientKick_t
{
enum { k_iCallback = k_iSteamGameServerCallbacks + 3 };
CSteamID m_SteamID;
EDenyReason m_eDenyReason;
};
// NOTE: callback values 4 and 5 are skipped because they are used for old deprecated callbacks,
// do not reuse them here.
// client achievement info
struct GSClientAchievementStatus_t
{
enum { k_iCallback = k_iSteamGameServerCallbacks + 6 };
uint64 m_SteamID;
char m_pchAchievement[128];
bool m_bUnlocked;
};
// received when the game server requests to be displayed as secure (VAC protected)
// m_bSecure is true if the game server should display itself as secure to users, false otherwise
struct GSPolicyResponse_t
{
enum { k_iCallback = k_iSteamUserCallbacks + 15 };
uint8 m_bSecure;
};
#endif // ISTEAMGAMESERVER_H
@@ -0,0 +1,103 @@
//====== Copyright © 1996-2008, Valve Corporation, All rights reserved. =======
//
// Purpose: interface to steam for retrieving list of game servers
//
//=============================================================================
#ifndef ISTEAMMASTERSERVERUPDATER_H
#define ISTEAMMASTERSERVERUPDATER_H
#ifdef _WIN32
#pragma once
#endif
#include "isteamclient.h"
#define MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE ((uint16)-1)
//-----------------------------------------------------------------------------
// Purpose: Game engines use this to tell the Steam master servers
// about their games so their games can show up in the server browser.
//-----------------------------------------------------------------------------
class ISteamMasterServerUpdater
{
public:
// Call this as often as you like to tell the master server updater whether or not
// you want it to be active (default: off).
virtual void SetActive( bool bActive ) = 0;
// You usually don't need to modify this.
// Pass -1 to use the default value for iHeartbeatInterval.
// Some mods change this.
virtual void SetHeartbeatInterval( int iHeartbeatInterval ) = 0;
// These are in GameSocketShare mode, where instead of ISteamMasterServerUpdater creating its own
// socket to talk to the master server on, it lets the game use its socket to forward messages
// back and forth. This prevents us from requiring server ops to open up yet another port
// in their firewalls.
//
// the IP address and port should be in host order, i.e 127.0.0.1 == 0x7f000001
// These are used when you've elected to multiplex the game server's UDP socket
// rather than having the master server updater use its own sockets.
//
// Source games use this to simplify the job of the server admins, so they
// don't have to open up more ports on their firewalls.
// Call this when a packet that starts with 0xFFFFFFFF comes in. That means
// it's for us.
virtual bool HandleIncomingPacket( const void *pData, int cbData, uint32 srcIP, uint16 srcPort ) = 0;
// AFTER calling HandleIncomingPacket for any packets that came in that frame, call this.
// This gets a packet that the master server updater needs to send out on UDP.
// It returns the length of the packet it wants to send, or 0 if there are no more packets to send.
// Call this each frame until it returns 0.
virtual int GetNextOutgoingPacket( void *pOut, int cbMaxOut, uint32 *pNetAdr, uint16 *pPort ) = 0;
// Functions to set various fields that are used to respond to queries.
// Call this to set basic data that is passed to the server browser.
virtual void SetBasicServerData(
unsigned short nProtocolVersion,
bool bDedicatedServer,
const char *pRegionName,
const char *pProductName,
unsigned short nMaxReportedClients,
bool bPasswordProtected,
const char *pGameDescription ) = 0;
// Call this to clear the whole list of key/values that are sent in rules queries.
virtual void ClearAllKeyValues() = 0;
// Call this to add/update a key/value pair.
virtual void SetKeyValue( const char *pKey, const char *pValue ) = 0;
// You can call this upon shutdown to clear out data stored for this game server and
// to tell the master servers that this server is going away.
virtual void NotifyShutdown() = 0;
// Returns true if the master server has requested a restart.
// Only returns true once per request.
virtual bool WasRestartRequested() = 0;
// Force it to request a heartbeat from the master servers.
virtual void ForceHeartbeat() = 0;
// Manually edit and query the master server list.
// It will provide name resolution and use the default master server port if none is provided.
virtual bool AddMasterServer( const char *pServerAddress ) = 0;
virtual bool RemoveMasterServer( const char *pServerAddress ) = 0;
virtual int GetNumMasterServers() = 0;
// Returns the # of bytes written to pOut.
virtual int GetMasterServerAddress( int iServer, char *pOut, int outBufferSize ) = 0;
};
#define STEAMMASTERSERVERUPDATER_INTERFACE_VERSION "SteamMasterServerUpdater001"
#endif // ISTEAMMASTERSERVERUPDATER_H
@@ -0,0 +1,435 @@
//====== Copyright © 1996-2008, Valve Corporation, All rights reserved. =======
//
// Purpose: interface to steam managing game server/client match making
//
//=============================================================================
#ifndef ISTEAMMATCHMAKING
#define ISTEAMMATCHMAKING
#ifdef _WIN32
#pragma once
#endif
#include "steamtypes.h"
#include "steamclientpublic.h"
#include "matchmakingtypes.h"
#include "isteamclient.h"
#include "isteamfriends.h"
//-----------------------------------------------------------------------------
// Purpose: Functions for match making services for clients to get to favorites
// and to operate on game lobbies.
//-----------------------------------------------------------------------------
class ISteamMatchmaking
{
public:
// game server favorites storage
// saves basic details about a multiplayer game server locally
// returns the number of favorites servers the user has stored
virtual int GetFavoriteGameCount() = 0;
// returns the details of the game server
// iGame is of range [0,GetFavoriteGameCount())
// *pnIP, *pnConnPort are filled in the with IP:port of the game server
// *punFlags specify whether the game server was stored as an explicit favorite or in the history of connections
// *pRTime32LastPlayedOnServer is filled in the with the Unix time the favorite was added
virtual bool GetFavoriteGame( int iGame, uint32 *pnAppID, uint32 *pnIP, uint16 *pnConnPort, uint32 *punFlags, uint32 *pRTime32LastPlayedOnServer ) = 0;
// adds the game server to the local list; updates the time played of the server if it already exists in the list
virtual int AddFavoriteGame( uint32 nAppID, uint32 nIP, uint16 nConnPort, uint32 unFlags, uint32 rTime32LastPlayedOnServer ) = 0;
// removes the game server from the local storage; returns true if one was removed
virtual bool RemoveFavoriteGame( uint32 nAppID, uint32 nIP, uint16 nConnPort, uint32 unFlags ) = 0;
virtual bool GetFavoriteGame2( int iGame, uint32 *pnAppID, uint32 *pnIP, uint16 *pnConnPort, uint16 *pnQueryPort, uint32 *punFlags, uint32 *pRTime32LastPlayedOnServer ) = 0;
virtual int AddFavoriteGame2( uint32 nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags, uint32 rTime32LastPlayedOnServer ) = 0;
virtual bool RemoveFavoriteGame2( uint32 nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags ) = 0;
///////
// Game lobby functions
virtual void RequestLobbyList( uint64 ulGameID, MatchMakingKeyValuePair_t *pFilters, uint32 nFilters ) = 0;
virtual CSteamID GetLobbyByIndex( int iLobby ) = 0;
virtual void CreateLobby( uint64 ulGameID, bool bPrivate ) = 0;
virtual void JoinLobby( CSteamID steamIDLobby ) = 0;
virtual void LeaveLobby( CSteamID steamIDLobby ) = 0;
virtual bool InviteUserToLobby( CSteamID steamIDLobby, CSteamID steamIDInvitee ) = 0;
virtual int GetNumLobbyMembers( CSteamID steamIDLobby ) = 0;
virtual CSteamID GetLobbyMemberByIndex( CSteamID steamIDLobby, int iMember ) = 0;
virtual const char *GetLobbyData( CSteamID SteamIDLobby, const char *pchKey ) = 0;
// Sets a key/value pair in the lobby metadata
// each user in the lobby will be broadcast this new value, and any new users joining will receive any existing data
// this can be used to set lobby names, map, etc.
// to reset a key, just set it to ""
// other users in the lobby will receive notification of the lobby data change via a LobbyDataUpdate_t callback
virtual bool SetLobbyData( CSteamID steamIDLobby, const char *pchKey, const char *pchValue ) = 0;
// As above, but gets per-user data for someone in this lobby
virtual const char *GetLobbyMemberData( CSteamID steamIDLobby, CSteamID steamIDUser, const char *pchKey ) = 0;
// Sets per-user metadata (for the local user implicitly)
virtual bool SetLobbyMemberData( CSteamID steamIDLobby, const char *pchKey, const char *pchValue ) = 0;
// Broadcasts a chat message to the all the users in the lobby
// users in the lobby (including the local user) will receive a LobbyChatMsg_t callback
// returns true if the message is successfully sent
virtual bool SendLobbyChatMsg( CSteamID steamIDLobby, const void *pvMsgBody, int cubMsgBody ) = 0;
// Get a chat message as specified in a LobbyChatMsg_t callback
// iChatID is the LobbyChatMsg_t::m_iChatID value in the callback
// *pSteamIDUser is filled in with the CSteamID of the member
// *pvData is filled in with the message itself
// return value is the number of bytes written into the buffer
virtual int GetLobbyChatEntry( CSteamID steamIDLobby, int iChatID, CSteamID *pSteamIDUser, void *pvData, int cubData, EChatEntryType *peChatEntryType ) = 0;
// Fetch metadata for a lobby you're not necessarily in right now
// this will send down all the metadata associated with a lobby
// this is an asynchronous call
// returns false if the local user is not connected to the Steam servers
virtual bool RequestLobbyData( CSteamID steamIDLobby ) = 0;
};
#define STEAMMATCHMAKING_INTERFACE_VERSION "SteamMatchMaking001"
//-----------------------------------------------------------------------------
// Callback interfaces for server list functions (see ISteamMatchmakingServers below)
//
// The idea here is that your game code implements objects that implement these
// interfaces to receive callback notifications after calling asynchronous functions
// inside the ISteamMatchmakingServers() interface below.
//
// This is different than normal Steam callback handling due to the potentially
// large size of server lists.
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// Purpose: Callback interface for receiving responses after a server list refresh
// or an individual server update.
//
// Since you get these callbacks after requesting full list refreshes you will
// usually implement this interface inside an object like CServerBrowser. If that
// object is getting destructed you should use ISteamMatchMakingServers()->CancelQuery()
// to cancel any in-progress queries so you don't get a callback into the destructed
// object and crash.
//-----------------------------------------------------------------------------
class ISteamMatchmakingServerListResponse
{
public:
// Server has responded ok with updated data
virtual void ServerResponded( int iServer ) = 0;
// Server has failed to respond
virtual void ServerFailedToRespond( int iServer ) = 0;
// A list refresh you had initiated is now 100% completed
virtual void RefreshComplete( EMatchMakingServerResponse response ) = 0;
};
//-----------------------------------------------------------------------------
// Purpose: Callback interface for receiving responses after pinging an individual server
//
// These callbacks all occur in response to querying an individual server
// via the ISteamMatchmakingServers()->PingServer() call below. If you are
// destructing an object that implements this interface then you should call
// ISteamMatchmakingServers()->CancelServerQuery() passing in the handle to the query
// which is in progress. Failure to cancel in progress queries when destructing
// a callback handler may result in a crash when a callback later occurs.
//-----------------------------------------------------------------------------
class ISteamMatchmakingPingResponse
{
public:
// Server has responded successfully and has updated data
virtual void ServerResponded( gameserveritem_t &server ) = 0;
// Server failed to respond to the ping request
virtual void ServerFailedToRespond() = 0;
};
//-----------------------------------------------------------------------------
// Purpose: Callback interface for receiving responses after requesting details on
// who is playing on a particular server.
//
// These callbacks all occur in response to querying an individual server
// via the ISteamMatchmakingServers()->PlayerDetails() call below. If you are
// destructing an object that implements this interface then you should call
// ISteamMatchmakingServers()->CancelServerQuery() passing in the handle to the query
// which is in progress. Failure to cancel in progress queries when destructing
// a callback handler may result in a crash when a callback later occurs.
//-----------------------------------------------------------------------------
class ISteamMatchmakingPlayersResponse
{
public:
// Got data on a new player on the server -- you'll get this callback once per player
// on the server which you have requested player data on.
virtual void AddPlayerToList( const char *pchName, int nScore, float flTimePlayed ) = 0;
// The server failed to respond to the request for player details
virtual void PlayersFailedToRespond() = 0;
// The server has finished responding to the player details request
// (ie, you won't get anymore AddPlayerToList callbacks)
virtual void PlayersRefreshComplete() = 0;
};
//-----------------------------------------------------------------------------
// Purpose: Callback interface for receiving responses after requesting rules
// details on a particular server.
//
// These callbacks all occur in response to querying an individual server
// via the ISteamMatchmakingServers()->ServerRules() call below. If you are
// destructing an object that implements this interface then you should call
// ISteamMatchmakingServers()->CancelServerQuery() passing in the handle to the query
// which is in progress. Failure to cancel in progress queries when destructing
// a callback handler may result in a crash when a callback later occurs.
//-----------------------------------------------------------------------------
class ISteamMatchmakingRulesResponse
{
public:
// Got data on a rule on the server -- you'll get one of these per rule defined on
// the server you are querying
virtual void RulesResponded( const char *pchRule, const char *pchValue ) = 0;
// The server failed to respond to the request for rule details
virtual void RulesFailedToRespond() = 0;
// The server has finished responding to the rule details request
// (ie, you won't get anymore RulesResponded callbacks)
virtual void RulesRefreshComplete() = 0;
};
//-----------------------------------------------------------------------------
// Typedef for handle type you will receive when querying details on an individual server.
//-----------------------------------------------------------------------------
typedef int HServerQuery;
const int HSERVERQUERY_INVALID = 0xffffffff;
//-----------------------------------------------------------------------------
// Purpose: Functions for match making services for clients to get to game lists and details
//-----------------------------------------------------------------------------
class ISteamMatchmakingServers
{
public:
// Request a new list of servers of a particular type. These calls each correspond to one of the EMatchMakingType values.
virtual void RequestInternetServerList( AppId_t iApp, MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0;
virtual void RequestLANServerList( AppId_t iApp, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0;
virtual void RequestFriendsServerList( AppId_t iApp, MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0;
virtual void RequestFavoritesServerList( AppId_t iApp, MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0;
virtual void RequestHistoryServerList( AppId_t iApp, MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0;
virtual void RequestSpectatorServerList( AppId_t iApp, MatchMakingKeyValuePair_t **ppchFilters, uint32 nFilters, ISteamMatchmakingServerListResponse *pRequestServersResponse ) = 0;
// Get details on a given server in the list, you can get the valid range of index
// values by calling GetServerCount(). You will also receive index values in
// ISteamMatchmakingServerListResponse::ServerResponded() callbacks
virtual gameserveritem_t *GetServerDetails( EMatchMakingType eType, int iServer ) = 0;
// Cancel an request which is operation on the given list type. You should call this to cancel
// any in-progress requests before destructing a callback object that may have been passed
// to one of the above list request calls. Not doing so may result in a crash when a callback
// occurs on the destructed object.
virtual void CancelQuery( EMatchMakingType eType ) = 0;
// Ping every server in your list again but don't update the list of servers
virtual void RefreshQuery( EMatchMakingType eType ) = 0;
// Returns true if the list is currently refreshing its server list
virtual bool IsRefreshing( EMatchMakingType eType ) = 0;
// How many servers in the given list, GetServerDetails above takes 0... GetServerCount() - 1
virtual int GetServerCount( EMatchMakingType eType ) = 0;
// Refresh a single server inside of a query (rather than all the servers )
virtual void RefreshServer( EMatchMakingType eType, int iServer ) = 0;
//-----------------------------------------------------------------------------
// Queries to individual servers directly via IP/Port
//-----------------------------------------------------------------------------
// Request updated ping time and other details from a single server
virtual HServerQuery PingServer( uint32 unIP, uint16 usPort, ISteamMatchmakingPingResponse *pRequestServersResponse ) = 0;
// Request the list of players currently playing on a server
virtual HServerQuery PlayerDetails( uint32 unIP, uint16 usPort, ISteamMatchmakingPlayersResponse *pRequestServersResponse ) = 0;
// Request the list of rules that the server is running (See ISteamMasterServerUpdater->SetKeyValue() to set the rules server side)
virtual HServerQuery ServerRules( uint32 unIP, uint16 usPort, ISteamMatchmakingRulesResponse *pRequestServersResponse ) = 0;
// Cancel an outstanding Ping/Players/Rules query from above. You should call this to cancel
// any in-progress requests before destructing a callback object that may have been passed
// to one of the above calls to avoid crashing when callbacks occur.
virtual void CancelServerQuery( HServerQuery hServerQuery ) = 0;
};
#define STEAMMATCHMAKINGSERVERS_INTERFACE_VERSION "SteamMatchMakingServers001"
//-----------------------------------------------------------------------------
// Callbacks for ISteamMatchmaking which go through the regular Steam callback registration system
//-----------------------------------------------------------------------------
// game server flags
const uint32 k_unFavoriteFlagNone = 0x00;
const uint32 k_unFavoriteFlagFavorite = 0x01; // this game favorite entry is for the favorites list
const uint32 k_unFavoriteFlagHistory = 0x02; // this game favorite entry is for the history list
// callbacks
//-----------------------------------------------------------------------------
// Purpose: a server was added/removed from the favorites list, you should refresh now
//-----------------------------------------------------------------------------
struct FavoritesListChanged_t
{
enum { k_iCallback = k_iSteamMatchmakingCallbacks + 2 };
uint32 m_nIP; // an IP of 0 means reload the whole list, any other value means just one server
uint32 m_nQueryPort;
uint32 m_nConnPort;
uint32 m_nAppID;
uint32 m_nFlags;
bool m_bAdd; // true if this is adding the entry, otherwise it is a remove
};
//-----------------------------------------------------------------------------
// Purpose: Someone has invited you to join a Lobby
//-----------------------------------------------------------------------------
struct LobbyInvite_t
{
enum { k_iCallback = k_iSteamMatchmakingCallbacks + 3 };
uint64 m_ulSteamIDUser; // Steam ID of the person making the invite
uint64 m_ulSteamIDLobby; // Steam ID of the Lobby
};
//-----------------------------------------------------------------------------
// Purpose: Sent on entering a Lobby
// m_EChatRoomEnterResponse will be set to k_EChatRoomEnterResponseSuccess on success,
// or a higher value on failure (see enum EChatRoomEnterResponse)
//-----------------------------------------------------------------------------
struct LobbyEnter_t
{
enum { k_iCallback = k_iSteamMatchmakingCallbacks + 4 };
uint64 m_ulSteamIDLobby; // SteamID of the Lobby you have entered
uint32 m_rgfChatPermissions; // Permissions of the current user
bool m_bLocked; // If true, then only invited users may join
uint32 m_EChatRoomEnterResponse; // EChatRoomEnterResponse
};
//-----------------------------------------------------------------------------
// Purpose: The lobby metadata has changed
// if m_ulSteamIDMember is the steamID of a lobby member, use GetLobbyMemberData() to access per-user details
// if m_ulSteamIDMember == m_ulSteamIDLobby, use GetLobbyData() to access lobby metadata
//-----------------------------------------------------------------------------
struct LobbyDataUpdate_t
{
enum { k_iCallback = k_iSteamMatchmakingCallbacks + 5 };
uint64 m_ulSteamIDLobby; // steamID of the Lobby
uint64 m_ulSteamIDMember; // steamID of the member whose data changed, or the room itself
};
//-----------------------------------------------------------------------------
// Purpose: The lobby chat room state has changed
// this is usually sent when a user has joined or left the lobby
//-----------------------------------------------------------------------------
struct LobbyChatUpdate_t
{
enum { k_iCallback = k_iSteamMatchmakingCallbacks + 6 };
uint64 m_ulSteamIDLobby; // Lobby ID
uint64 m_ulSteamIDUserChanged; // user who's status in the lobby just changed - can be recipient
uint64 m_ulSteamIDMakingChange; // Chat member who made the change (different from SteamIDUserChange if kicking, muting, etc.)
// for example, if one user kicks another from the lobby, this will be set to the id of the user who initiated the kick
uint32 m_rgfChatMemberStateChange; // bitfield of EChatMemberStateChange values
};
//-----------------------------------------------------------------------------
// Purpose: A chat message for this lobby has been sent
// use GetLobbyChatEntry( m_iChatID ) to retrieve the contents of this message
//-----------------------------------------------------------------------------
struct LobbyChatMsg_t
{
enum { k_iCallback = k_iSteamMatchmakingCallbacks + 7 };
uint64 m_ulSteamIDLobby; // the lobby id this is in
uint64 m_ulSteamIDUser; // steamID of the user who has sent this message
uint8 m_eChatEntryType; // type of message
uint32 m_iChatID; // index of the chat entry to lookup
};
//-----------------------------------------------------------------------------
// Purpose: A game created a game for all the members of the lobby to join,
// as triggered by a SetLobbyGameServer()
// it's up to the individual clients to take action on this; the usual
// game behavior is to leave the lobby and connect to the specified game server
//-----------------------------------------------------------------------------
struct LobbyGameCreated_t
{
enum { k_iCallback = k_iSteamMatchmakingCallbacks + 9 };
uint64 m_ulSteamIDLobby; // the lobby we were in
uint64 m_ulSteamIDGameServer; // the new game server that has been created or found for the lobby members
uint32 m_unIP; // IP & Port of the game server (if any)
uint16 m_usPort;
};
//-----------------------------------------------------------------------------
// Purpose: Number of matching lobbies found
// iterate the returned lobbies with GetLobbyByIndex(), from values 0 to m_nLobbiesMatching-1
//-----------------------------------------------------------------------------
struct LobbyMatchList_t
{
enum { k_iCallback = k_iSteamMatchmakingCallbacks + 10 };
uint32 m_nLobbiesMatching; // Number of lobbies that matched search criteria and we have SteamIDs for
};
//-----------------------------------------------------------------------------
// Purpose: Called when the lobby is being forcefully closed
// lobby details functions will no longer be updated
//-----------------------------------------------------------------------------
struct LobbyClosing_t
{
enum { k_iCallback = k_iSteamMatchmakingCallbacks + 11 };
uint64 m_ulSteamIDLobby; // Lobby
};
//-----------------------------------------------------------------------------
// Purpose: Called when the local user has been kicked from the lobby
// lobby details functions will no longer be updated
//-----------------------------------------------------------------------------
struct LobbyKicked_t
{
enum { k_iCallback = k_iSteamMatchmakingCallbacks + 12 };
uint64 m_ulSteamIDLobby; // Lobby
uint64 m_ulSteamIDAdmin; // User who kicked you
};
//-----------------------------------------------------------------------------
// Purpose: Result of our request to create a Lobby
// m_eResult == k_EResultOK on success
// at this point, the local user may not have finishing joining this lobby;
// game code should wait until the subsequent LobbyEnter_t callback is received
//-----------------------------------------------------------------------------
struct LobbyCreated_t
{
enum { k_iCallback = k_iSteamMatchmakingCallbacks + 13 };
EResult m_eResult; // Result
uint64 m_ulSteamIDLobby; // chat room, zero if failed
};
#endif // ISTEAMMATCHMAKING
@@ -0,0 +1,135 @@
//====== Copyright © 1996-2008, Valve Corporation, All rights reserved. =======
//
// Purpose: interface to steam managing network connections between game clients & servers
//
//=============================================================================
#ifndef ISTEAMNETWORKING
#define ISTEAMNETWORKING
#ifdef _WIN32
#pragma once
#endif
#include "steamtypes.h"
#include "steamclientpublic.h"
// handle to a socket
typedef uint32 SNetSocket_t;
typedef uint32 SNetListenSocket_t;
// connection progress indicators
enum ESNetSocketState
{
k_ESNetSocketStateInvalid = 0,
// communication is valid
k_ESNetSocketStateConnected = 1,
// states while establishing a connection
k_ESNetSocketStateInitiated = 10, // the connection state machine has started
// p2p connections
k_ESNetSocketStateLocalCandidatesFound = 11, // we've found our local IP info
k_ESNetSocketStateReceivedRemoteCandidates = 12,// we've received information from the remote machine, via the Steam back-end, about their IP info
// direct connections
k_ESNetSocketStateChallengeHandshake = 15, // we've received a challenge packet from the server
// failure states
k_ESNetSocketStateDisconnecting = 21, // the API shut it down, and we're in the process of telling the other end
k_ESNetSocketStateLocalDisconnect = 22, // the API shut it down, and we've completed shutdown
k_ESNetSocketStateTimeoutDuringConnect = 23, // we timed out while trying to creating the connection
k_ESNetSocketStateRemoteEndDisconnected = 24, // the remote end has disconnected from us
k_ESNetSocketStateConnectionBroken = 25, // connection has been broken; either the other end has disappeared or our local network connection has broke
};
//-----------------------------------------------------------------------------
// Purpose: Functions for making connections and sending data between clients,
// traversing NAT's where possible
//-----------------------------------------------------------------------------
class ISteamNetworking
{
public:
// creates a socket and listens others to connect
// will trigger a SocketStatusCallback_t callback on another client connecting
// nVirtualP2PPort is the unique ID that the client will connect to, in case you have multiple ports
// this can usually just be 0 unless you want multiple sets of connections
// unIP is the local IP address to bind to
// pass in 0 if you just want the default local IP
// unPort is the port to use
// pass in 0 if you don't want users to be able to connect via IP/Port, but expect to be always peer-to-peer connections only
virtual SNetListenSocket_t CreateListenSocket( int nVirtualP2PPort, uint32 nIP, uint16 nPort ) = 0;
// creates a socket and begin connection to a remote destination
// can connect via a known steamID (client or game server), or directly to an IP
// on success will trigger a SocketConnectCallback_t callback
// on failure or timeout will trigger a SocketConnectionFailureCallback_t callback
virtual SNetSocket_t CreateP2PConnectionSocket( CSteamID steamIDTarget, int nVirtualPort, int nTimeoutSec ) = 0;
virtual SNetSocket_t CreateConnectionSocket( uint32 nIP, uint16 nPort, int nTimeoutSec ) = 0;
// disconnects the connection to the socket, if any, and invalidates the handle
// any unread data on the socket will be thrown away
// if bNotifyRemoteEnd is set, socket will not be completely destroyed until the remote end acknowledges the disconnect
virtual bool DestroySocket( SNetSocket_t hSocket, bool bNotifyRemoteEnd ) = 0;
// destroying a listen socket will automatically kill all the regular sockets generated from it
virtual bool DestroyListenSocket( SNetListenSocket_t hSocket, bool bNotifyRemoteEnd ) = 0;
// sending data
// must be a handle to a connected socket
// data size cannot be more than 8k, although in UDP mode (default),
// it's recommended packets be no larger than 1300 bytes
// use the reliable flag with caution; although the resend rate is pretty aggressive,
// it can still cause stalls in receiving data (like TCP)
virtual bool SendDataOnSocket( SNetSocket_t hSocket, void *pubData, uint32 cubData, bool bReliable ) = 0;
// receiving data
// returns false if there is no data remaining
// fills out *pcubMsgSize with the size of the next message, in bytes
virtual bool IsDataAvailableOnSocket( SNetSocket_t hSocket, uint32 *pcubMsgSize ) = 0;
// fills in pubDest with the contents of the message
// messages are always complete, of the same size as was sent (i.e. packetized, not streaming)
// if *pcubMsgSize < cubDest, only partial data is written
// returns false if no data is available
virtual bool RetrieveDataFromSocket( SNetSocket_t hSocket, void *pubDest, uint32 cubDest, uint32 *pcubMsgSize ) = 0;
// checks for data from any socket that has been connected off this listen socket
// returns false if there is no data remaining
// fills out *pcubMsgSize with the size of the next message, in bytes
// fills out *phSocket with the socket that data is available on
virtual bool IsDataAvailable( SNetListenSocket_t hListenSocket, uint32 *pcubMsgSize, SNetSocket_t *phSocket ) = 0;
// retrieves data from any socket that has been connected off this listen socket
// fills in pubDest with the contents of the message
// messages are always complete, of the same size as was sent (i.e. packetized, not streaming)
// if *pcubMsgSize < cubDest, only partial data is written
// returns false if no data is available
// fills out *phSocket with the socket that data is available on
virtual bool RetrieveData( SNetListenSocket_t hListenSocket, void *pubDest, uint32 cubDest, uint32 *pcubMsgSize, SNetSocket_t *phSocket ) = 0;
// returns information about the specified socket, filling out the contents of the pointers
virtual bool GetSocketInfo( SNetSocket_t hSocket, CSteamID *pSteamIDRemote, int *peSocketStatus, uint32 *punIPRemote, uint16 *punPortRemote ) = 0;
// returns which local port the listen socket is bound to
// *pnIP and *pnPort will be 0 if the socket is set to listen for P2P connections only
virtual bool GetListenSocketInfo( SNetListenSocket_t hListenSocket, uint32 *pnIP, uint16 *pnPort ) = 0;
};
#define STEAMNETWORKING_INTERFACE_VERSION "SteamNetworking001"
// callback notification - status of a socket has changed
struct SocketStatusCallback_t
{
enum { k_iCallback = k_iSteamNetworkingCallbacks + 1 };
SNetSocket_t m_hSocket; // the socket used to send/receive data to the remote host
SNetListenSocket_t m_hListenSocket; // this is the server socket that we were listening on; NULL if this was an outgoing connection
CSteamID m_steamIDRemote; // remote steamID we have connected to, if it has one
int m_eSNetSocketState; // socket state, ESNetSocketState
};
#endif // ISTEAMNETWORKING
@@ -0,0 +1,160 @@
//====== Copyright © 1996-2008, Valve Corporation, All rights reserved. =======
//
// Purpose: interface to user account information in Steam
//
//=============================================================================
#ifndef ISTEAMUSER_H
#define ISTEAMUSER_H
#ifdef _WIN32
#pragma once
#endif
#include "isteamclient.h"
// structure that contains client callback data
// see callbacks documentation for more details
struct CallbackMsg_t
{
HSteamUser m_hSteamUser;
int m_iCallback;
uint8 *m_pubParam;
int m_cubParam;
};
// reference to a steam call, to filter results by
typedef int32 HSteamCall;
enum EConfigSubTree {
stub
};
//-----------------------------------------------------------------------------
// Purpose: Functions for accessing and manipulating a steam account
// associated with one client instance
//-----------------------------------------------------------------------------
class ISteamUser
{
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;
};
#define STEAMUSER_INTERFACE_VERSION "SteamUser007"
// callbacks
//-----------------------------------------------------------------------------
// Purpose: called when a connections to the Steam back-end has been established
// this means the Steam client now has a working connection to the Steam servers
// usually this will have occurred before the game has launched, and should
// only be seen if the user has dropped connection due to a networking issue
// or a Steam server update
//-----------------------------------------------------------------------------
struct SteamServersConnected_t
{
enum { k_iCallback = k_iSteamUserCallbacks + 1 };
};
//-----------------------------------------------------------------------------
// Purpose: called when a connection attempt has failed
// this will occur periodically if the Steam client is not connected,
// and has failed in it's retry to establish a connection
//-----------------------------------------------------------------------------
struct SteamServerConnectFailure_t
{
enum { k_iCallback = k_iSteamUserCallbacks + 2 };
EResult m_eResult;
};
//-----------------------------------------------------------------------------
// Purpose: called if the client has lost connection to the Steam servers
// real-time services will be disabled until a matching SteamServersConnected_t has been posted
//-----------------------------------------------------------------------------
struct SteamServersDisconnected_t
{
enum { k_iCallback = k_iSteamUserCallbacks + 3 };
EResult m_eResult;
};
//-----------------------------------------------------------------------------
// Purpose: Sent by the Steam server to the client telling it to disconnect from the specified game server,
// which it may be in the process of or already connected to.
// The game client should immediately disconnect upon receiving this message.
// This can usually occur if the user doesn't have rights to play on the game server.
//-----------------------------------------------------------------------------
struct ClientGameServerDeny_t
{
enum { k_iCallback = k_iSteamUserCallbacks + 13 };
uint32 m_uAppID;
uint32 m_unGameServerIP;
uint16 m_usGameServerPort;
uint16 m_bSecure;
uint32 m_uReason;
};
//-----------------------------------------------------------------------------
// Purpose: called when the callback system for this client is in an error state (and has flushed pending callbacks)
// When getting this message the client should disconnect from Steam, reset any stored Steam state and reconnect.
// This usually occurs in the rare event the Steam client has some kind of fatal error.
//-----------------------------------------------------------------------------
struct CallbackPipeFailure_t
{
enum { k_iCallback = k_iSteamUserCallbacks + 17 };
};
#endif // ISTEAMUSER_H
@@ -0,0 +1,87 @@
//====== Copyright © 1996-2008, Valve Corporation, All rights reserved. =======
//
// Purpose: interface to user account information in Steam
//
//=============================================================================
#ifndef ISTEAMUSERSTATS_H
#define ISTEAMUSERSTATS_H
#ifdef _WIN32
#pragma once
#endif
#include "isteamclient.h"
// size limit on stat or achievement name
const uint32 k_cchStatNameMax = 128;
class ISteamUserStats
{
public:
virtual uint32 GetNumStats( CGameID nGameID ) = 0;
virtual const char *GetStatName( CGameID nGameID, uint32 iStat ) = 0;
virtual ESteamUserStatType GetStatType( CGameID nGameID, const char *pchName ) = 0;
virtual uint32 GetNumAchievements( CGameID nGameID ) = 0;
virtual const char *GetAchievementName( CGameID nGameID, uint32 iAchievement ) = 0;
virtual uint32 GetNumGroupAchievements( CGameID nGameID ) = 0;
virtual const char *GetGroupAchievementName( CGameID nGameID, uint32 iAchievement ) = 0;
virtual bool RequestCurrentStats( CGameID nGameID ) = 0;
virtual bool GetStat( CGameID nGameID, const char *pchName, int32 *pData ) = 0;
virtual bool GetStat( CGameID nGameID, const char *pchName, float *pData ) = 0;
virtual bool SetStat( CGameID nGameID, const char *pchName, int32 nData ) = 0;
virtual bool SetStat( CGameID nGameID, const char *pchName, float fData ) = 0;
virtual bool UpdateAvgRateStat( CGameID nGameID, const char *pchName, float flCountThisSession, double dSessionLength ) = 0;
virtual bool GetAchievement( CGameID nGameID, const char *pchName, bool *pbAchieved ) = 0;
virtual bool GetGroupAchievement( CGameID nGameID, const char *pchName, bool *pbAchieved ) = 0;
virtual bool SetAchievement( CGameID nGameID, const char *pchName ) = 0;
virtual bool SetGroupAchievement( CGameID nGameID, const char *pchName ) = 0;
virtual bool StoreStats( CGameID nGameID ) = 0;
virtual bool ClearAchievement( CGameID nGameID, const char *pchName ) = 0;
virtual bool ClearGroupAchievement( CGameID nGameID, const char *pchName ) = 0;
virtual int GetAchievementIcon( CGameID nGameID, const char *pchName ) = 0;
virtual const char *GetAchievementDisplayAttribute( CGameID nGameID, const char *pchName, const char *pchKey ) = 0;
};
#define STEAMUSERSTATS_INTERFACE_VERSION "STEAMUSERSTATS_INTERFACE_VERSION001"
//-----------------------------------------------------------------------------
// Purpose: called when the latests stats and achievements have been received
// from the server
//-----------------------------------------------------------------------------
struct UserStatsReceived_t
{
enum { k_iCallback = k_iSteamUserStatsCallbacks + 1 };
uint64 m_nGameID; // Game these stats are for
EResult m_eResult; // Success / error fetching the stats
};
//-----------------------------------------------------------------------------
// Purpose: result of a request to store the user stats for a game
//-----------------------------------------------------------------------------
struct UserStatsStored_t
{
enum { k_iCallback = k_iSteamUserStatsCallbacks + 2 };
uint64 m_nGameID; // Game these stats are for
EResult m_eResult; // success / error
};
//-----------------------------------------------------------------------------
// Purpose: result of a request to store the achievements for a game, or an
// "indicate progress" call. If both m_nCurProgress and m_nMaxProgress
// are zero, that means the achievement has been fully unlocked.
//-----------------------------------------------------------------------------
struct UserAchievementStored_t
{
enum { k_iCallback = k_iSteamUserStatsCallbacks + 3 };
uint64 m_nGameID; // Game this is for
bool m_bGroupAchievement; // if this is a "group" achievement
char m_rgchAchievementName[k_cchStatNameMax]; // name of the achievement
uint32 m_nCurProgress; // current progress towards the achievement
uint32 m_nMaxProgress; // "out of" this many
};
#endif // ISTEAMUSER_H
@@ -0,0 +1,77 @@
//====== Copyright © 1996-2008, Valve Corporation, All rights reserved. =======
//
// Purpose: interface to utility functions in Steam
//
//=============================================================================
#ifndef ISTEAMUTILS_H
#define ISTEAMUTILS_H
#ifdef _WIN32
#pragma once
#endif
#include "isteamclient.h"
//-----------------------------------------------------------------------------
// Purpose: interface to user independent utility functions
//-----------------------------------------------------------------------------
class ISteamUtils
{
public:
// return the number of seconds since the user
virtual uint32 GetSecondsSinceAppActive() = 0;
virtual uint32 GetSecondsSinceComputerActive() = 0;
// the universe this client is connecting to
virtual EUniverse GetConnectedUniverse() = 0;
// Steam server time - in PST, number of seconds since January 1, 1970 (i.e unix time)
virtual uint32 GetServerRealTime() = 0;
// returns the 2 digit ISO 3166-1-alpha-2 format country code this client is running in (as looked up via an IP-to-location database)
// e.g "US" or "UK".
virtual const char *GetIPCountry() = 0;
// returns true if the image exists, and valid sizes were filled out
virtual bool GetImageSize( int iImage, uint32 *pnWidth, uint32 *pnHeight ) = 0;
// returns true if the image exists, and the buffer was successfully filled out
// results are returned in RGBA format
// the destination buffer size should be 4 * height * width * sizeof(char)
virtual bool GetImageRGBA( int iImage, uint8 *pubDest, int nDestBufferSize ) = 0;
// returns the IP of the reporting server for valve - currently only used in Source engine games
virtual bool GetCSERIPPort( uint32 *unIP, uint16 *usPort ) = 0;
// return the amount of battery power left in the current system in % [0..100], 255 for being on AC power
virtual uint8 GetCurrentBatteryPower() = 0;
// returns the appID of the current process
virtual uint32 GetAppID() = 0;
};
#define STEAMUTILS_INTERFACE_VERSION "SteamUtils002"
// callbacks
//-----------------------------------------------------------------------------
// Purpose: The country of the user changed
//-----------------------------------------------------------------------------
struct IPCountry_t
{
enum { k_iCallback = k_iSteamUtilsCallbacks + 1 };
};
//-----------------------------------------------------------------------------
// Purpose: Fired when running on a laptop and less than 10 minutes of battery is left, fires then every minute
//-----------------------------------------------------------------------------
struct LowBatteryPower_t
{
enum { k_iCallback = k_iSteamUtilsCallbacks + 2 };
uint8 m_nMinutesBatteryLeft;
};
#endif // ISTEAMUTILS_H

Some files were not shown because too many files have changed in this diff Show More