mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2024-12-24 09:24:15 +08:00
Update to sdk 1.49
This commit is contained in:
parent
a36d6e475d
commit
66e596ea29
62
dll/flat.cpp
62
dll/flat.cpp
@ -208,6 +208,11 @@ STEAMAPI_API ISteamRemotePlay * SteamAPI_ISteamClient_GetISteamRemotePlay( IStea
|
||||
return get_steam_client()->GetISteamRemotePlay(hSteamUser, hSteamPipe, pchVersion);
|
||||
}
|
||||
|
||||
STEAMAPI_API ISteamUser *SteamAPI_SteamUser_v021()
|
||||
{
|
||||
return get_steam_client()->GetISteamUser(flat_hsteamuser(), flat_hsteampipe(), "SteamUser021");
|
||||
}
|
||||
|
||||
STEAMAPI_API ISteamUser *SteamAPI_SteamUser_v020()
|
||||
{
|
||||
return get_steam_client()->GetISteamUser(flat_hsteamuser(), flat_hsteampipe(), "SteamUser020");
|
||||
@ -368,6 +373,11 @@ STEAMAPI_API SteamAPICall_t SteamAPI_ISteamUser_GetDurationControl( ISteamUser*
|
||||
return (get_steam_client()->steam_user)->GetDurationControl();
|
||||
}
|
||||
|
||||
STEAMAPI_API bool SteamAPI_ISteamUser_BSetDurationControlOnlineState( ISteamUser* self, EDurationControlOnlineState eNewState )
|
||||
{
|
||||
return (get_steam_client()->steam_user)->BSetDurationControlOnlineState(eNewState);
|
||||
}
|
||||
|
||||
STEAMAPI_API ISteamFriends *SteamAPI_SteamFriends_v017()
|
||||
{
|
||||
return get_steam_client()->GetISteamFriends(flat_hsteamuser(), flat_hsteampipe(), "SteamFriends017");
|
||||
@ -743,6 +753,11 @@ STEAMAPI_API void SteamAPI_ISteamFriends_ActivateGameOverlayRemotePlayTogetherIn
|
||||
return (get_steam_client()->steam_friends)->ActivateGameOverlayRemotePlayTogetherInviteDialog(steamIDLobby);
|
||||
}
|
||||
|
||||
STEAMAPI_API bool SteamAPI_ISteamFriends_RegisterProtocolInOverlayBrowser( ISteamFriends* self, const char * pchProtocol )
|
||||
{
|
||||
return (get_steam_client()->steam_friends)->RegisterProtocolInOverlayBrowser(pchProtocol);
|
||||
}
|
||||
|
||||
STEAMAPI_API ISteamUtils *SteamAPI_SteamUtils_v009()
|
||||
{
|
||||
return get_steam_client()->GetISteamUtils(flat_hsteampipe(), "SteamUtils009");
|
||||
@ -1909,6 +1924,11 @@ STEAMAPI_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_UGCDownloadToLocation(
|
||||
return (get_steam_client()->steam_remote_storage)->UGCDownloadToLocation(hContent, pchLocation, unPriority);
|
||||
}
|
||||
|
||||
STEAMAPI_API ISteamUserStats *SteamAPI_SteamUserStats_v012()
|
||||
{
|
||||
return get_steam_client()->GetISteamUserStats(flat_hsteamuser(), flat_hsteampipe(), "STEAMUSERSTATS_INTERFACE_VERSION012");
|
||||
}
|
||||
|
||||
STEAMAPI_API ISteamUserStats *SteamAPI_SteamUserStats_v011()
|
||||
{
|
||||
return get_steam_client()->GetISteamUserStats(flat_hsteamuser(), flat_hsteampipe(), "STEAMUSERSTATS_INTERFACE_VERSION011");
|
||||
@ -2179,6 +2199,16 @@ STEAMAPI_API int32 SteamAPI_ISteamUserStats_GetGlobalStatHistoryDouble( ISteamUs
|
||||
return (get_steam_client()->steam_user_stats)->GetGlobalStatHistory(pchStatName, pData, cubData);
|
||||
}
|
||||
|
||||
STEAMAPI_API bool SteamAPI_ISteamUserStats_GetAchievementProgressLimitsInt32( ISteamUserStats* self, const char * pchName, int32 * pnMinProgress, int32 * pnMaxProgress )
|
||||
{
|
||||
return (get_steam_client()->steam_user_stats)->GetAchievementProgressLimits(pchName, pnMinProgress, pnMaxProgress);
|
||||
}
|
||||
|
||||
STEAMAPI_API bool SteamAPI_ISteamUserStats_GetAchievementProgressLimitsFloat( ISteamUserStats* self, const char * pchName, float * pfMinProgress, float * pfMaxProgress )
|
||||
{
|
||||
return (get_steam_client()->steam_user_stats)->GetAchievementProgressLimits(pchName, pfMinProgress, pfMaxProgress);
|
||||
}
|
||||
|
||||
STEAMAPI_API ISteamApps *SteamAPI_SteamApps_v008()
|
||||
{
|
||||
return get_steam_client()->GetISteamApps(flat_hsteamuser(), flat_hsteampipe(), "STEAMAPPS_INTERFACE_VERSION008");
|
||||
@ -2329,6 +2359,11 @@ STEAMAPI_API bool SteamAPI_ISteamApps_BIsSubscribedFromFamilySharing( ISteamApps
|
||||
return self->BIsSubscribedFromFamilySharing();
|
||||
}
|
||||
|
||||
STEAMAPI_API bool SteamAPI_ISteamApps_BIsTimedTrial( ISteamApps* self, uint32 * punSecondsAllowed, uint32 * punSecondsPlayed )
|
||||
{
|
||||
return self->BIsTimedTrial(punSecondsAllowed, punSecondsPlayed);
|
||||
}
|
||||
|
||||
STEAMAPI_API ISteamNetworking *SteamAPI_SteamNetworking_v006()
|
||||
{
|
||||
return get_steam_client()->GetISteamNetworking(flat_hsteamuser(), flat_hsteampipe(), "SteamNetworking006");
|
||||
@ -4925,6 +4960,18 @@ STEAMAPI_API bool SteamAPI_ISteamInventory_SubmitUpdateProperties( ISteamInvento
|
||||
return (ptr)->SubmitUpdateProperties(handle, pResultHandle);
|
||||
}
|
||||
|
||||
STEAMAPI_API bool SteamAPI_ISteamInventory_InspectItem( ISteamInventory* self, SteamInventoryResult_t * pResultHandle, const char * pchItemToken )
|
||||
{
|
||||
int test1 = ((char *)self - (char*)get_steam_client()->steam_inventory);
|
||||
int test2 = ((char *)self - (char*)get_steam_client()->steam_gameserver_inventory);
|
||||
auto ptr = get_steam_client()->steam_gameserver_inventory;
|
||||
if (test1 >= 0 && (test2 < 0 || test1 < test2)) {
|
||||
ptr = get_steam_client()->steam_inventory;
|
||||
}
|
||||
|
||||
return (ptr)->InspectItem(pResultHandle, pchItemToken);
|
||||
}
|
||||
|
||||
STEAMAPI_API ISteamVideo *SteamAPI_SteamVideo_v002()
|
||||
{
|
||||
return get_steam_client()->GetISteamVideo(flat_hsteamuser(), flat_hsteampipe(), "STEAMVIDEO_INTERFACE_V002");
|
||||
@ -5991,6 +6038,21 @@ STEAMAPI_API void SteamAPI_SteamNetworkingMessage_t_Release( SteamNetworkingMess
|
||||
return self->Release();
|
||||
}
|
||||
|
||||
STEAMAPI_API const char * SteamAPI_SteamNetworkingPOPIDRender_c_str( SteamNetworkingPOPIDRender* self )
|
||||
{
|
||||
return self->c_str();
|
||||
}
|
||||
|
||||
STEAMAPI_API const char * SteamAPI_SteamNetworkingIdentityRender_c_str( SteamNetworkingIdentityRender* self )
|
||||
{
|
||||
return self->c_str();
|
||||
}
|
||||
|
||||
STEAMAPI_API const char * SteamAPI_SteamNetworkingIPAddrRender_c_str( SteamNetworkingIPAddrRender* self )
|
||||
{
|
||||
return self->c_str();
|
||||
}
|
||||
|
||||
STEAMAPI_API void SteamAPI_SteamDatagramHostedAddress_Clear( SteamDatagramHostedAddress* self )
|
||||
{
|
||||
return self->Clear();
|
||||
|
@ -303,3 +303,10 @@ bool Steam_Apps::BIsSubscribedFromFamilySharing()
|
||||
PRINT_DEBUG("BIsSubscribedFromFamilySharing\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
// check if game is a timed trial with limited playtime
|
||||
bool Steam_Apps::BIsTimedTrial( uint32* punSecondsAllowed, uint32* punSecondsPlayed )
|
||||
{
|
||||
PRINT_DEBUG("BIsTimedTrial\n");
|
||||
return false;
|
||||
}
|
||||
|
@ -97,4 +97,7 @@ public:
|
||||
|
||||
// Check if user borrowed this game via Family Sharing, If true, call GetAppOwner() to get the lender SteamID
|
||||
bool BIsSubscribedFromFamilySharing();
|
||||
|
||||
// check if game is a timed trial with limited playtime
|
||||
bool BIsTimedTrial( uint32* punSecondsAllowed, uint32* punSecondsPlayed );
|
||||
};
|
||||
|
@ -269,6 +269,8 @@ ISteamUser *Steam_Client::GetISteamUser( HSteamUser hSteamUser, HSteamPipe hStea
|
||||
return (ISteamUser *)(void *)(ISteamUser018 *)steam_user;
|
||||
} else if (strcmp(pchVersion, "SteamUser019") == 0) {
|
||||
return (ISteamUser *)(void *)(ISteamUser019 *)steam_user;
|
||||
} else if (strcmp(pchVersion, "SteamUser020") == 0) {
|
||||
return (ISteamUser *)(void *)(ISteamUser020 *)steam_user;
|
||||
} else if (strcmp(pchVersion, STEAMUSER_INTERFACE_VERSION) == 0) {
|
||||
return (ISteamUser *)(void *)(ISteamUser *)steam_user;
|
||||
} else {
|
||||
@ -605,6 +607,8 @@ ISteamUserStats *Steam_Client::GetISteamUserStats( HSteamUser hSteamUser, HSteam
|
||||
return (ISteamUserStats *)(void *)(ISteamUserStats009 *)steam_user_stats;
|
||||
} else if (strcmp(pchVersion, "STEAMUSERSTATS_INTERFACE_VERSION010") == 0) {
|
||||
return (ISteamUserStats *)(void *)(ISteamUserStats010 *)steam_user_stats;
|
||||
} else if (strcmp(pchVersion, "STEAMUSERSTATS_INTERFACE_VERSION011") == 0) {
|
||||
return (ISteamUserStats *)(void *)(ISteamUserStats011 *)steam_user_stats;
|
||||
} else if (strcmp(pchVersion, STEAMUSERSTATS_INTERFACE_VERSION) == 0) {
|
||||
return (ISteamUserStats *)(void *)(ISteamUserStats *)steam_user_stats;
|
||||
} else {
|
||||
|
@ -999,6 +999,15 @@ void ActivateGameOverlayRemotePlayTogetherInviteDialog( CSteamID steamIDLobby )
|
||||
PRINT_DEBUG("Steam_Friends::ActivateGameOverlayRemotePlayTogetherInviteDialog\n");
|
||||
}
|
||||
|
||||
// Call this before calling ActivateGameOverlayToWebPage() to have the Steam Overlay Browser block navigations
|
||||
// to your specified protocol (scheme) uris and instead dispatch a OverlayBrowserProtocolNavigation_t callback to your game.
|
||||
// ActivateGameOverlayToWebPage() must have been called with k_EActivateGameOverlayToWebPageMode_Modal
|
||||
bool RegisterProtocolInOverlayBrowser( const char *pchProtocol )
|
||||
{
|
||||
PRINT_DEBUG("Steam_Friends::RegisterProtocolInOverlayBrowser\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
void RunCallbacks()
|
||||
{
|
||||
PRINT_DEBUG("Steam_Friends::RunCallbacks\n");
|
||||
|
@ -858,6 +858,12 @@ bool SubmitUpdateProperties( SteamInventoryUpdateHandle_t handle, SteamInventory
|
||||
return false;
|
||||
}
|
||||
|
||||
bool InspectItem( SteamInventoryResult_t *pResultHandle, const char *pchItemToken )
|
||||
{
|
||||
PRINT_DEBUG("InspectItem\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
void RunCallbacks()
|
||||
{
|
||||
if (call_definition_update || !inventory_requests.empty()) {
|
||||
|
@ -29,6 +29,7 @@ public ISteamUser016,
|
||||
public ISteamUser017,
|
||||
public ISteamUser018,
|
||||
public ISteamUser019,
|
||||
public ISteamUser020,
|
||||
public ISteamUser
|
||||
{
|
||||
Settings *settings;
|
||||
@ -469,4 +470,13 @@ SteamAPICall_t GetDurationControl()
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Advise steam china duration control system about the online state of the game.
|
||||
// This will prevent offline gameplay time from counting against a user's
|
||||
// playtime limits.
|
||||
bool BSetDurationControlOnlineState( EDurationControlOnlineState eNewState )
|
||||
{
|
||||
PRINT_DEBUG("BSetDurationControlOnlineState\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
};
|
||||
|
@ -40,6 +40,7 @@ public ISteamUserStats007,
|
||||
public ISteamUserStats008,
|
||||
public ISteamUserStats009,
|
||||
public ISteamUserStats010,
|
||||
public ISteamUserStats011,
|
||||
public ISteamUserStats
|
||||
{
|
||||
public:
|
||||
@ -855,6 +856,23 @@ int32 GetGlobalStatHistory( const char *pchStatName, STEAM_ARRAY_COUNT(cubData)
|
||||
PRINT_DEBUG("GetGlobalStatHistory double %s\n", pchStatName);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// For achievements that have related Progress stats, use this to query what the bounds of that progress are.
|
||||
// You may want this info to selectively call IndicateAchievementProgress when appropriate milestones of progress
|
||||
// have been made, to show a progress notification to the user.
|
||||
bool GetAchievementProgressLimits( const char *pchName, int32 *pnMinProgress, int32 *pnMaxProgress )
|
||||
{
|
||||
PRINT_DEBUG("GetAchievementProgressLimits int\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
bool GetAchievementProgressLimits( const char *pchName, float *pfMinProgress, float *pfMaxProgress )
|
||||
{
|
||||
PRINT_DEBUG("GetAchievementProgressLimits float\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif//__INCLUDED_STEAM_USER_STATS_H__
|
||||
|
@ -105,6 +105,9 @@ public:
|
||||
|
||||
// Check if user borrowed this game via Family Sharing, If true, call GetAppOwner() to get the lender SteamID
|
||||
virtual bool BIsSubscribedFromFamilySharing() = 0;
|
||||
|
||||
// check if game is a timed trial with limited playtime
|
||||
virtual bool BIsTimedTrial( uint32* punSecondsAllowed, uint32* punSecondsPlayed ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMAPPS_INTERFACE_VERSION "STEAMAPPS_INTERFACE_VERSION008"
|
||||
@ -200,5 +203,17 @@ struct FileDetailsResult_t
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: called for games in Timed Trial mode
|
||||
//-----------------------------------------------------------------------------
|
||||
struct TimedTrialStatus_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamAppsCallbacks + 30 };
|
||||
AppId_t m_unAppID; // appID
|
||||
bool m_bIsOffline; // if true, time allowed / played refers to offline time, not total time
|
||||
uint32 m_unSecondsAllowed; // how many seconds the app can be played in total
|
||||
uint32 m_unSecondsPlayed; // how many seconds the app was already played
|
||||
};
|
||||
|
||||
#pragma pack( pop )
|
||||
#endif // ISTEAMAPPS_H
|
||||
|
@ -425,6 +425,11 @@ public:
|
||||
|
||||
// activates game overlay to open the remote play together invite dialog. Invitations will be sent for remote play together
|
||||
virtual void ActivateGameOverlayRemotePlayTogetherInviteDialog( CSteamID steamIDLobby ) = 0;
|
||||
|
||||
// Call this before calling ActivateGameOverlayToWebPage() to have the Steam Overlay Browser block navigations
|
||||
// to your specified protocol (scheme) uris and instead dispatch a OverlayBrowserProtocolNavigation_t callback to your game.
|
||||
// ActivateGameOverlayToWebPage() must have been called with k_EActivateGameOverlayToWebPageMode_Modal
|
||||
virtual bool RegisterProtocolInOverlayBrowser( const char *pchProtocol ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMFRIENDS_INTERFACE_VERSION "SteamFriends017"
|
||||
@ -682,6 +687,17 @@ struct UnreadChatMessagesChanged_t
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 48 };
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Dispatched when an overlay browser instance is navigated to a protocol/scheme registered by RegisterProtocolInOverlayBrowser()
|
||||
//-----------------------------------------------------------------------------
|
||||
struct OverlayBrowserProtocolNavigation_t
|
||||
{
|
||||
enum { k_iCallback = k_iSteamFriendsCallbacks + 49 };
|
||||
char rgchURI[ 1024 ];
|
||||
};
|
||||
|
||||
|
||||
#pragma pack( pop )
|
||||
|
||||
#endif // ISTEAMFRIENDS_H
|
||||
|
@ -366,6 +366,8 @@ public:
|
||||
// Submit the update request by handle
|
||||
virtual bool SubmitUpdateProperties( SteamInventoryUpdateHandle_t handle, SteamInventoryResult_t * pResultHandle ) = 0;
|
||||
|
||||
STEAM_METHOD_DESC(Look up the given token and return a pseudo-Inventory item.)
|
||||
virtual bool InspectItem( SteamInventoryResult_t *pResultHandle, const char *pchItemToken ) = 0;
|
||||
};
|
||||
|
||||
#define STEAMINVENTORY_INTERFACE_VERSION "STEAMINVENTORY_INTERFACE_V003"
|
||||
|
@ -231,6 +231,10 @@ public:
|
||||
/// value means more important, and the value you pass is the lowest priority (highest
|
||||
/// numeric value) you wish to receive callbacks for.
|
||||
///
|
||||
/// The value here controls the detail level for most messages. You can control the
|
||||
/// detail level for various subsystems (perhaps only for certain connections) by
|
||||
/// adjusting the configuration values k_ESteamNetworkingConfig_LogLevel_Xxxxx.
|
||||
///
|
||||
/// Except when debugging, you should only use k_ESteamNetworkingSocketsDebugOutputType_Msg
|
||||
/// or k_ESteamNetworkingSocketsDebugOutputType_Warning. For best performance, do NOT
|
||||
/// request a high detail level and then filter out messages in your callback. This incurs
|
||||
@ -366,6 +370,24 @@ struct SteamRelayNetworkStatus_t
|
||||
char m_debugMsg[ 256 ];
|
||||
};
|
||||
|
||||
/// Utility class for printing a SteamNetworkingIdentity.
|
||||
/// E.g. printf( "Identity is '%s'\n", SteamNetworkingIdentityRender( identity ).c_str() );
|
||||
struct SteamNetworkingIdentityRender
|
||||
{
|
||||
SteamNetworkingIdentityRender( const SteamNetworkingIdentity &x ) { x.ToString( buf, sizeof(buf) ); }
|
||||
inline const char *c_str() const { return buf; }
|
||||
private:
|
||||
char buf[ SteamNetworkingIdentity::k_cchMaxString ];
|
||||
};
|
||||
|
||||
/// Utility class for printing a SteamNetworkingIPAddrRender.
|
||||
struct SteamNetworkingIPAddrRender
|
||||
{
|
||||
SteamNetworkingIPAddrRender( const SteamNetworkingIPAddr &x, bool bWithPort = true ) { x.ToString( buf, sizeof(buf), bWithPort ); }
|
||||
inline const char *c_str() const { return buf; }
|
||||
private:
|
||||
char buf[ SteamNetworkingIPAddr::k_cchMaxString ];
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
@ -197,9 +197,14 @@ public:
|
||||
STEAM_CALL_RESULT( DurationControl_t )
|
||||
virtual SteamAPICall_t GetDurationControl() = 0;
|
||||
|
||||
// Advise steam china duration control system about the online state of the game.
|
||||
// This will prevent offline gameplay time from counting against a user's
|
||||
// playtime limits.
|
||||
virtual bool BSetDurationControlOnlineState( EDurationControlOnlineState eNewState ) = 0;
|
||||
|
||||
};
|
||||
|
||||
#define STEAMUSER_INTERFACE_VERSION "SteamUser020"
|
||||
#define STEAMUSER_INTERFACE_VERSION "SteamUser021"
|
||||
|
||||
#ifndef STEAM_API_EXPORTS
|
||||
// Global interface accessor
|
||||
|
192
sdk_includes/isteamuser020.h
Normal file
192
sdk_includes/isteamuser020.h
Normal file
@ -0,0 +1,192 @@
|
||||
|
||||
#ifndef ISTEAMUSER020_H
|
||||
#define ISTEAMUSER020_H
|
||||
#ifdef STEAM_WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
|
||||
class ISteamUser020
|
||||
{
|
||||
public:
|
||||
// returns the HSteamUser this interface represents
|
||||
// this is only used internally by the API, and by a few select interfaces that support multi-user
|
||||
virtual HSteamUser GetHSteamUser() = 0;
|
||||
|
||||
// returns true if the Steam client current has a live connection to the Steam servers.
|
||||
// If false, it means there is no active connection due to either a networking issue on the local machine, or the Steam server is down/busy.
|
||||
// The Steam client will automatically be trying to recreate the connection as often as possible.
|
||||
virtual bool BLoggedOn() = 0;
|
||||
|
||||
// returns the CSteamID of the account currently logged into the Steam client
|
||||
// a CSteamID is a unique identifier for an account, and used to differentiate users in all parts of the Steamworks API
|
||||
virtual CSteamID GetSteamID() = 0;
|
||||
|
||||
// Multiplayer Authentication functions
|
||||
|
||||
// InitiateGameConnection() starts the state machine for authenticating the game client with the game server
|
||||
// It is the client portion of a three-way handshake between the client, the game server, and the steam servers
|
||||
//
|
||||
// Parameters:
|
||||
// void *pAuthBlob - a pointer to empty memory that will be filled in with the authentication token.
|
||||
// int cbMaxAuthBlob - the number of bytes of allocated memory in pBlob. Should be at least 2048 bytes.
|
||||
// CSteamID steamIDGameServer - the steamID of the game server, received from the game server by the client
|
||||
// CGameID gameID - the ID of the current game. For games without mods, this is just CGameID( <appID> )
|
||||
// uint32 unIPServer, uint16 usPortServer - the IP address of the game server
|
||||
// bool bSecure - whether or not the client thinks that the game server is reporting itself as secure (i.e. VAC is running)
|
||||
//
|
||||
// return value - returns the number of bytes written to pBlob. If the return is 0, then the buffer passed in was too small, and the call has failed
|
||||
// The contents of pBlob should then be sent to the game server, for it to use to complete the authentication process.
|
||||
virtual int InitiateGameConnection( void *pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer, bool bSecure ) = 0;
|
||||
|
||||
// notify of disconnect
|
||||
// needs to occur when the game client leaves the specified game server, needs to match with the InitiateGameConnection() call
|
||||
virtual void TerminateGameConnection( uint32 unIPServer, uint16 usPortServer ) = 0;
|
||||
|
||||
// Legacy functions
|
||||
|
||||
// used by only a few games to track usage events
|
||||
virtual void TrackAppUsageEvent( CGameID gameID, int eAppUsageEvent, const char *pchExtraInfo = "" ) = 0;
|
||||
|
||||
// get the local storage folder for current Steam account to write application data, e.g. save games, configs etc.
|
||||
// this will usually be something like "C:\Progam Files\Steam\userdata\<SteamID>\<AppID>\local"
|
||||
virtual bool GetUserDataFolder( char *pchBuffer, int cubBuffer ) = 0;
|
||||
|
||||
// Starts voice recording. Once started, use GetVoice() to get the data
|
||||
virtual void StartVoiceRecording( ) = 0;
|
||||
|
||||
// Stops voice recording. Because people often release push-to-talk keys early, the system will keep recording for
|
||||
// a little bit after this function is called. GetVoice() should continue to be called until it returns
|
||||
// k_eVoiceResultNotRecording
|
||||
virtual void StopVoiceRecording( ) = 0;
|
||||
|
||||
// Determine the size of captured audio data that is available from GetVoice.
|
||||
// Most applications will only use compressed data and should ignore the other
|
||||
// parameters, which exist primarily for backwards compatibility. See comments
|
||||
// below for further explanation of "uncompressed" data.
|
||||
virtual EVoiceResult GetAvailableVoice( uint32 *pcbCompressed, uint32 *pcbUncompressed_Deprecated = 0, uint32 nUncompressedVoiceDesiredSampleRate_Deprecated = 0 ) = 0;
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// NOTE: "uncompressed" audio is a deprecated feature and should not be used
|
||||
// by most applications. It is raw single-channel 16-bit PCM wave data which
|
||||
// may have been run through preprocessing filters and/or had silence removed,
|
||||
// so the uncompressed audio could have a shorter duration than you expect.
|
||||
// There may be no data at all during long periods of silence. Also, fetching
|
||||
// uncompressed audio will cause GetVoice to discard any leftover compressed
|
||||
// audio, so you must fetch both types at once. Finally, GetAvailableVoice is
|
||||
// not precisely accurate when the uncompressed size is requested. So if you
|
||||
// really need to use uncompressed audio, you should call GetVoice frequently
|
||||
// with two very large (20kb+) output buffers instead of trying to allocate
|
||||
// perfectly-sized buffers. But most applications should ignore all of these
|
||||
// details and simply leave the "uncompressed" parameters as NULL/zero.
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
// Read captured audio data from the microphone buffer. This should be called
|
||||
// at least once per frame, and preferably every few milliseconds, to keep the
|
||||
// microphone input delay as low as possible. Most applications will only use
|
||||
// compressed data and should pass NULL/zero for the "uncompressed" parameters.
|
||||
// Compressed data can be transmitted by your application and decoded into raw
|
||||
// using the DecompressVoice function below.
|
||||
virtual EVoiceResult GetVoice( bool bWantCompressed, void *pDestBuffer, uint32 cbDestBufferSize, uint32 *nBytesWritten, bool bWantUncompressed_Deprecated = false, void *pUncompressedDestBuffer_Deprecated = 0, uint32 cbUncompressedDestBufferSize_Deprecated = 0, uint32 *nUncompressBytesWritten_Deprecated = 0, uint32 nUncompressedVoiceDesiredSampleRate_Deprecated = 0 ) = 0;
|
||||
|
||||
// Decodes the compressed voice data returned by GetVoice. The output data is
|
||||
// raw single-channel 16-bit PCM audio. The decoder supports any sample rate
|
||||
// from 11025 to 48000; see GetVoiceOptimalSampleRate() below for details.
|
||||
// If the output buffer is not large enough, then *nBytesWritten will be set
|
||||
// to the required buffer size, and k_EVoiceResultBufferTooSmall is returned.
|
||||
// It is suggested to start with a 20kb buffer and reallocate as necessary.
|
||||
virtual EVoiceResult DecompressVoice( const void *pCompressed, uint32 cbCompressed, void *pDestBuffer, uint32 cbDestBufferSize, uint32 *nBytesWritten, uint32 nDesiredSampleRate ) = 0;
|
||||
|
||||
// This returns the native sample rate of the Steam voice decompressor; using
|
||||
// this sample rate for DecompressVoice will perform the least CPU processing.
|
||||
// However, the final audio quality will depend on how well the audio device
|
||||
// (and/or your application's audio output SDK) deals with lower sample rates.
|
||||
// You may find that you get the best audio output quality when you ignore
|
||||
// this function and use the native sample rate of your audio output device,
|
||||
// which is usually 48000 or 44100.
|
||||
virtual uint32 GetVoiceOptimalSampleRate() = 0;
|
||||
|
||||
// Retrieve ticket to be sent to the entity who wishes to authenticate you.
|
||||
// pcbTicket retrieves the length of the actual ticket.
|
||||
virtual HAuthTicket GetAuthSessionTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket ) = 0;
|
||||
|
||||
// Authenticate ticket from entity steamID to be sure it is valid and isnt reused
|
||||
// Registers for callbacks if the entity goes offline or cancels the ticket ( see ValidateAuthTicketResponse_t callback and EAuthSessionResponse )
|
||||
virtual EBeginAuthSessionResult BeginAuthSession( const void *pAuthTicket, int cbAuthTicket, CSteamID steamID ) = 0;
|
||||
|
||||
// Stop tracking started by BeginAuthSession - called when no longer playing game with this entity
|
||||
virtual void EndAuthSession( CSteamID steamID ) = 0;
|
||||
|
||||
// Cancel auth ticket from GetAuthSessionTicket, called when no longer playing game with the entity you gave the ticket to
|
||||
virtual void CancelAuthTicket( HAuthTicket hAuthTicket ) = 0;
|
||||
|
||||
// After receiving a user's authentication data, and passing it to BeginAuthSession, use this function
|
||||
// to determine if the user owns downloadable content specified by the provided AppID.
|
||||
virtual EUserHasLicenseForAppResult UserHasLicenseForApp( CSteamID steamID, AppId_t appID ) = 0;
|
||||
|
||||
// returns true if this users looks like they are behind a NAT device. Only valid once the user has connected to steam
|
||||
// (i.e a SteamServersConnected_t has been issued) and may not catch all forms of NAT.
|
||||
virtual bool BIsBehindNAT() = 0;
|
||||
|
||||
// set data to be replicated to friends so that they can join your game
|
||||
// CSteamID steamIDGameServer - the steamID of the game server, received from the game server by the client
|
||||
// uint32 unIPServer, uint16 usPortServer - the IP address of the game server
|
||||
virtual void AdvertiseGame( CSteamID steamIDGameServer, uint32 unIPServer, uint16 usPortServer ) = 0;
|
||||
|
||||
// Requests a ticket encrypted with an app specific shared key
|
||||
// pDataToInclude, cbDataToInclude will be encrypted into the ticket
|
||||
// ( This is asynchronous, you must wait for the ticket to be completed by the server )
|
||||
STEAM_CALL_RESULT( EncryptedAppTicketResponse_t )
|
||||
virtual SteamAPICall_t RequestEncryptedAppTicket( void *pDataToInclude, int cbDataToInclude ) = 0;
|
||||
|
||||
// Retrieves a finished ticket.
|
||||
// If no ticket is available, or your buffer is too small, returns false.
|
||||
// Upon exit, *pcbTicket will be either the size of the ticket copied into your buffer
|
||||
// (if true was returned), or the size needed (if false was returned). To determine the
|
||||
// proper size of the ticket, you can pass pTicket=NULL and cbMaxTicket=0; if a ticket
|
||||
// is available, *pcbTicket will contain the size needed, otherwise it will be zero.
|
||||
virtual bool GetEncryptedAppTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket ) = 0;
|
||||
|
||||
// Trading Card badges data access
|
||||
// if you only have one set of cards, the series will be 1
|
||||
// the user has can have two different badges for a series; the regular (max level 5) and the foil (max level 1)
|
||||
virtual int GetGameBadgeLevel( int nSeries, bool bFoil ) = 0;
|
||||
|
||||
// gets the Steam Level of the user, as shown on their profile
|
||||
virtual int GetPlayerSteamLevel() = 0;
|
||||
|
||||
// Requests a URL which authenticates an in-game browser for store check-out,
|
||||
// and then redirects to the specified URL. As long as the in-game browser
|
||||
// accepts and handles session cookies, Steam microtransaction checkout pages
|
||||
// will automatically recognize the user instead of presenting a login page.
|
||||
// The result of this API call will be a StoreAuthURLResponse_t callback.
|
||||
// NOTE: The URL has a very short lifetime to prevent history-snooping attacks,
|
||||
// so you should only call this API when you are about to launch the browser,
|
||||
// or else immediately navigate to the result URL using a hidden browser window.
|
||||
// NOTE 2: The resulting authorization cookie has an expiration time of one day,
|
||||
// so it would be a good idea to request and visit a new auth URL every 12 hours.
|
||||
STEAM_CALL_RESULT( StoreAuthURLResponse_t )
|
||||
virtual SteamAPICall_t RequestStoreAuthURL( const char *pchRedirectURL ) = 0;
|
||||
|
||||
// gets whether the users phone number is verified
|
||||
virtual bool BIsPhoneVerified() = 0;
|
||||
|
||||
// gets whether the user has two factor enabled on their account
|
||||
virtual bool BIsTwoFactorEnabled() = 0;
|
||||
|
||||
// gets whether the users phone number is identifying
|
||||
virtual bool BIsPhoneIdentifying() = 0;
|
||||
|
||||
// gets whether the users phone number is awaiting (re)verification
|
||||
virtual bool BIsPhoneRequiringVerification() = 0;
|
||||
|
||||
STEAM_CALL_RESULT( MarketEligibilityResponse_t )
|
||||
virtual SteamAPICall_t GetMarketEligibility() = 0;
|
||||
|
||||
// Retrieves anti indulgence / duration control for current user
|
||||
STEAM_CALL_RESULT( DurationControl_t )
|
||||
virtual SteamAPICall_t GetDurationControl() = 0;
|
||||
};
|
||||
|
||||
|
||||
#endif // ISTEAMUSER020_H
|
@ -293,28 +293,18 @@ public:
|
||||
STEAM_FLAT_NAME( GetGlobalStatHistoryDouble )
|
||||
virtual int32 GetGlobalStatHistory( const char *pchStatName, STEAM_ARRAY_COUNT(cubData) double *pData, uint32 cubData ) = 0;
|
||||
|
||||
#ifdef _PS3
|
||||
// Call to kick off installation of the PS3 trophies. This call is asynchronous, and the results will be returned in a PS3TrophiesInstalled_t
|
||||
// callback.
|
||||
virtual bool InstallPS3Trophies() = 0;
|
||||
// For achievements that have related Progress stats, use this to query what the bounds of that progress are.
|
||||
// You may want this info to selectively call IndicateAchievementProgress when appropriate milestones of progress
|
||||
// have been made, to show a progress notification to the user.
|
||||
STEAM_FLAT_NAME( GetAchievementProgressLimitsInt32 )
|
||||
virtual bool GetAchievementProgressLimits( const char *pchName, int32 *pnMinProgress, int32 *pnMaxProgress ) = 0;
|
||||
|
||||
// Returns the amount of space required at boot to install trophies. This value can be used when comparing the amount of space needed
|
||||
// by the game to the available space value passed to the game at boot. The value is set during InstallPS3Trophies().
|
||||
virtual uint64 GetTrophySpaceRequiredBeforeInstall() = 0;
|
||||
STEAM_FLAT_NAME( GetAchievementProgressLimitsFloat )
|
||||
virtual bool GetAchievementProgressLimits( const char *pchName, float *pfMinProgress, float *pfMaxProgress ) = 0;
|
||||
|
||||
// On PS3, user stats & achievement progress through Steam must be stored with the user's saved game data.
|
||||
// At startup, before calling RequestCurrentStats(), you must pass the user's stats data to Steam via this method.
|
||||
// If you do not have any user data, call this function with pvData = NULL and cubData = 0
|
||||
virtual bool SetUserStatsData( const void *pvData, uint32 cubData ) = 0;
|
||||
|
||||
// Call to get the user's current stats data. You should retrieve this data after receiving successful UserStatsReceived_t & UserStatsStored_t
|
||||
// callbacks, and store the data with the user's save game data. You can call this method with pvData = NULL and cubData = 0 to get the required
|
||||
// buffer size.
|
||||
virtual bool GetUserStatsData( void *pvData, uint32 cubData, uint32 *pcubWritten ) = 0;
|
||||
#endif
|
||||
};
|
||||
|
||||
#define STEAMUSERSTATS_INTERFACE_VERSION "STEAMUSERSTATS_INTERFACE_VERSION011"
|
||||
#define STEAMUSERSTATS_INTERFACE_VERSION "STEAMUSERSTATS_INTERFACE_VERSION012"
|
||||
|
||||
#ifndef STEAM_API_EXPORTS
|
||||
// Global interface accessor
|
||||
|
240
sdk_includes/isteamuserstats011.h
Normal file
240
sdk_includes/isteamuserstats011.h
Normal file
@ -0,0 +1,240 @@
|
||||
|
||||
#ifndef ISTEAMUSERSTATS011_H
|
||||
#define ISTEAMUSERSTATS011_H
|
||||
#ifdef STEAM_WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Functions for accessing stats, achievements, and leaderboard information
|
||||
//-----------------------------------------------------------------------------
|
||||
class ISteamUserStats011
|
||||
{
|
||||
public:
|
||||
// Ask the server to send down this user's data and achievements for this game
|
||||
STEAM_CALL_BACK( UserStatsReceived_t )
|
||||
virtual bool RequestCurrentStats() = 0;
|
||||
|
||||
// Data accessors
|
||||
STEAM_FLAT_NAME( GetStatInt32 )
|
||||
virtual bool GetStat( const char *pchName, int32 *pData ) = 0;
|
||||
|
||||
STEAM_FLAT_NAME( GetStatFloat )
|
||||
virtual bool GetStat( const char *pchName, float *pData ) = 0;
|
||||
|
||||
// Set / update data
|
||||
STEAM_FLAT_NAME( SetStatInt32 )
|
||||
virtual bool SetStat( const char *pchName, int32 nData ) = 0;
|
||||
|
||||
STEAM_FLAT_NAME( SetStatFloat )
|
||||
virtual bool SetStat( const char *pchName, float fData ) = 0;
|
||||
|
||||
virtual bool UpdateAvgRateStat( const char *pchName, float flCountThisSession, double dSessionLength ) = 0;
|
||||
|
||||
// Achievement flag accessors
|
||||
virtual bool GetAchievement( const char *pchName, bool *pbAchieved ) = 0;
|
||||
virtual bool SetAchievement( const char *pchName ) = 0;
|
||||
virtual bool ClearAchievement( const char *pchName ) = 0;
|
||||
|
||||
// Get the achievement status, and the time it was unlocked if unlocked.
|
||||
// If the return value is true, but the unlock time is zero, that means it was unlocked before Steam
|
||||
// began tracking achievement unlock times (December 2009). Time is seconds since January 1, 1970.
|
||||
virtual bool GetAchievementAndUnlockTime( const char *pchName, bool *pbAchieved, uint32 *punUnlockTime ) = 0;
|
||||
|
||||
// Store the current data on the server, will get a callback when set
|
||||
// And one callback for every new achievement
|
||||
//
|
||||
// If the callback has a result of k_EResultInvalidParam, one or more stats
|
||||
// uploaded has been rejected, either because they broke constraints
|
||||
// or were out of date. In this case the server sends back updated values.
|
||||
// The stats should be re-iterated to keep in sync.
|
||||
virtual bool StoreStats() = 0;
|
||||
|
||||
// Achievement / GroupAchievement metadata
|
||||
|
||||
// Gets the icon of the achievement, which is a handle to be used in ISteamUtils::GetImageRGBA(), or 0 if none set.
|
||||
// A return value of 0 may indicate we are still fetching data, and you can wait for the UserAchievementIconFetched_t callback
|
||||
// which will notify you when the bits are ready. If the callback still returns zero, then there is no image set for the
|
||||
// specified achievement.
|
||||
virtual int GetAchievementIcon( const char *pchName ) = 0;
|
||||
|
||||
// Get general attributes for an achievement. Accepts the following keys:
|
||||
// - "name" and "desc" for retrieving the localized achievement name and description (returned in UTF8)
|
||||
// - "hidden" for retrieving if an achievement is hidden (returns "0" when not hidden, "1" when hidden)
|
||||
virtual const char *GetAchievementDisplayAttribute( const char *pchName, const char *pchKey ) = 0;
|
||||
|
||||
// Achievement progress - triggers an AchievementProgress callback, that is all.
|
||||
// Calling this w/ N out of N progress will NOT set the achievement, the game must still do that.
|
||||
virtual bool IndicateAchievementProgress( const char *pchName, uint32 nCurProgress, uint32 nMaxProgress ) = 0;
|
||||
|
||||
// Used for iterating achievements. In general games should not need these functions because they should have a
|
||||
// list of existing achievements compiled into them
|
||||
virtual uint32 GetNumAchievements() = 0;
|
||||
// Get achievement name iAchievement in [0,GetNumAchievements)
|
||||
virtual const char *GetAchievementName( uint32 iAchievement ) = 0;
|
||||
|
||||
// Friends stats & achievements
|
||||
|
||||
// downloads stats for the user
|
||||
// returns a UserStatsReceived_t received when completed
|
||||
// if the other user has no stats, UserStatsReceived_t.m_eResult will be set to k_EResultFail
|
||||
// these stats won't be auto-updated; you'll need to call RequestUserStats() again to refresh any data
|
||||
STEAM_CALL_RESULT( UserStatsReceived_t )
|
||||
virtual SteamAPICall_t RequestUserStats( CSteamID steamIDUser ) = 0;
|
||||
|
||||
// requests stat information for a user, usable after a successful call to RequestUserStats()
|
||||
STEAM_FLAT_NAME( GetUserStatInt32 )
|
||||
virtual bool GetUserStat( CSteamID steamIDUser, const char *pchName, int32 *pData ) = 0;
|
||||
|
||||
STEAM_FLAT_NAME( GetUserStatFloat )
|
||||
virtual bool GetUserStat( CSteamID steamIDUser, const char *pchName, float *pData ) = 0;
|
||||
|
||||
virtual bool GetUserAchievement( CSteamID steamIDUser, const char *pchName, bool *pbAchieved ) = 0;
|
||||
// See notes for GetAchievementAndUnlockTime above
|
||||
virtual bool GetUserAchievementAndUnlockTime( CSteamID steamIDUser, const char *pchName, bool *pbAchieved, uint32 *punUnlockTime ) = 0;
|
||||
|
||||
// Reset stats
|
||||
virtual bool ResetAllStats( bool bAchievementsToo ) = 0;
|
||||
|
||||
// Leaderboard functions
|
||||
|
||||
// asks the Steam back-end for a leaderboard by name, and will create it if it's not yet
|
||||
// This call is asynchronous, with the result returned in LeaderboardFindResult_t
|
||||
STEAM_CALL_RESULT(LeaderboardFindResult_t)
|
||||
virtual SteamAPICall_t FindOrCreateLeaderboard( const char *pchLeaderboardName, ELeaderboardSortMethod eLeaderboardSortMethod, ELeaderboardDisplayType eLeaderboardDisplayType ) = 0;
|
||||
|
||||
// as above, but won't create the leaderboard if it's not found
|
||||
// This call is asynchronous, with the result returned in LeaderboardFindResult_t
|
||||
STEAM_CALL_RESULT( LeaderboardFindResult_t )
|
||||
virtual SteamAPICall_t FindLeaderboard( const char *pchLeaderboardName ) = 0;
|
||||
|
||||
// returns the name of a leaderboard
|
||||
virtual const char *GetLeaderboardName( SteamLeaderboard_t hSteamLeaderboard ) = 0;
|
||||
|
||||
// returns the total number of entries in a leaderboard, as of the last request
|
||||
virtual int GetLeaderboardEntryCount( SteamLeaderboard_t hSteamLeaderboard ) = 0;
|
||||
|
||||
// returns the sort method of the leaderboard
|
||||
virtual ELeaderboardSortMethod GetLeaderboardSortMethod( SteamLeaderboard_t hSteamLeaderboard ) = 0;
|
||||
|
||||
// returns the display type of the leaderboard
|
||||
virtual ELeaderboardDisplayType GetLeaderboardDisplayType( SteamLeaderboard_t hSteamLeaderboard ) = 0;
|
||||
|
||||
// Asks the Steam back-end for a set of rows in the leaderboard.
|
||||
// This call is asynchronous, with the result returned in LeaderboardScoresDownloaded_t
|
||||
// LeaderboardScoresDownloaded_t will contain a handle to pull the results from GetDownloadedLeaderboardEntries() (below)
|
||||
// You can ask for more entries than exist, and it will return as many as do exist.
|
||||
// k_ELeaderboardDataRequestGlobal requests rows in the leaderboard from the full table, with nRangeStart & nRangeEnd in the range [1, TotalEntries]
|
||||
// k_ELeaderboardDataRequestGlobalAroundUser requests rows around the current user, nRangeStart being negate
|
||||
// e.g. DownloadLeaderboardEntries( hLeaderboard, k_ELeaderboardDataRequestGlobalAroundUser, -3, 3 ) will return 7 rows, 3 before the user, 3 after
|
||||
// k_ELeaderboardDataRequestFriends requests all the rows for friends of the current user
|
||||
STEAM_CALL_RESULT( LeaderboardScoresDownloaded_t )
|
||||
virtual SteamAPICall_t DownloadLeaderboardEntries( SteamLeaderboard_t hSteamLeaderboard, ELeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd ) = 0;
|
||||
// as above, but downloads leaderboard entries for an arbitrary set of users - ELeaderboardDataRequest is k_ELeaderboardDataRequestUsers
|
||||
// if a user doesn't have a leaderboard entry, they won't be included in the result
|
||||
// a max of 100 users can be downloaded at a time, with only one outstanding call at a time
|
||||
STEAM_METHOD_DESC(Downloads leaderboard entries for an arbitrary set of users - ELeaderboardDataRequest is k_ELeaderboardDataRequestUsers)
|
||||
STEAM_CALL_RESULT( LeaderboardScoresDownloaded_t )
|
||||
virtual SteamAPICall_t DownloadLeaderboardEntriesForUsers( SteamLeaderboard_t hSteamLeaderboard,
|
||||
STEAM_ARRAY_COUNT_D(cUsers, Array of users to retrieve) CSteamID *prgUsers, int cUsers ) = 0;
|
||||
|
||||
// Returns data about a single leaderboard entry
|
||||
// use a for loop from 0 to LeaderboardScoresDownloaded_t::m_cEntryCount to get all the downloaded entries
|
||||
// e.g.
|
||||
// void OnLeaderboardScoresDownloaded( LeaderboardScoresDownloaded_t *pLeaderboardScoresDownloaded )
|
||||
// {
|
||||
// for ( int index = 0; index < pLeaderboardScoresDownloaded->m_cEntryCount; index++ )
|
||||
// {
|
||||
// LeaderboardEntry_t leaderboardEntry;
|
||||
// int32 details[3]; // we know this is how many we've stored previously
|
||||
// GetDownloadedLeaderboardEntry( pLeaderboardScoresDownloaded->m_hSteamLeaderboardEntries, index, &leaderboardEntry, details, 3 );
|
||||
// assert( leaderboardEntry.m_cDetails == 3 );
|
||||
// ...
|
||||
// }
|
||||
// once you've accessed all the entries, the data will be free'd, and the SteamLeaderboardEntries_t handle will become invalid
|
||||
virtual bool GetDownloadedLeaderboardEntry( SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, LeaderboardEntry_t *pLeaderboardEntry, int32 *pDetails, int cDetailsMax ) = 0;
|
||||
|
||||
// Uploads a user score to the Steam back-end.
|
||||
// This call is asynchronous, with the result returned in LeaderboardScoreUploaded_t
|
||||
// Details are extra game-defined information regarding how the user got that score
|
||||
// pScoreDetails points to an array of int32's, cScoreDetailsCount is the number of int32's in the list
|
||||
STEAM_CALL_RESULT( LeaderboardScoreUploaded_t )
|
||||
virtual SteamAPICall_t UploadLeaderboardScore( SteamLeaderboard_t hSteamLeaderboard, ELeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int32 nScore, const int32 *pScoreDetails, int cScoreDetailsCount ) = 0;
|
||||
|
||||
// Attaches a piece of user generated content the user's entry on a leaderboard.
|
||||
// hContent is a handle to a piece of user generated content that was shared using ISteamUserRemoteStorage::FileShare().
|
||||
// This call is asynchronous, with the result returned in LeaderboardUGCSet_t.
|
||||
STEAM_CALL_RESULT( LeaderboardUGCSet_t )
|
||||
virtual SteamAPICall_t AttachLeaderboardUGC( SteamLeaderboard_t hSteamLeaderboard, UGCHandle_t hUGC ) = 0;
|
||||
|
||||
// Retrieves the number of players currently playing your game (online + offline)
|
||||
// This call is asynchronous, with the result returned in NumberOfCurrentPlayers_t
|
||||
STEAM_CALL_RESULT( NumberOfCurrentPlayers_t )
|
||||
virtual SteamAPICall_t GetNumberOfCurrentPlayers() = 0;
|
||||
|
||||
// Requests that Steam fetch data on the percentage of players who have received each achievement
|
||||
// for the game globally.
|
||||
// This call is asynchronous, with the result returned in GlobalAchievementPercentagesReady_t.
|
||||
STEAM_CALL_RESULT( GlobalAchievementPercentagesReady_t )
|
||||
virtual SteamAPICall_t RequestGlobalAchievementPercentages() = 0;
|
||||
|
||||
// Get the info on the most achieved achievement for the game, returns an iterator index you can use to fetch
|
||||
// the next most achieved afterwards. Will return -1 if there is no data on achievement
|
||||
// percentages (ie, you haven't called RequestGlobalAchievementPercentages and waited on the callback).
|
||||
virtual int GetMostAchievedAchievementInfo( char *pchName, uint32 unNameBufLen, float *pflPercent, bool *pbAchieved ) = 0;
|
||||
|
||||
// Get the info on the next most achieved achievement for the game. Call this after GetMostAchievedAchievementInfo or another
|
||||
// GetNextMostAchievedAchievementInfo call passing the iterator from the previous call. Returns -1 after the last
|
||||
// achievement has been iterated.
|
||||
virtual int GetNextMostAchievedAchievementInfo( int iIteratorPrevious, char *pchName, uint32 unNameBufLen, float *pflPercent, bool *pbAchieved ) = 0;
|
||||
|
||||
// Returns the percentage of users who have achieved the specified achievement.
|
||||
virtual bool GetAchievementAchievedPercent( const char *pchName, float *pflPercent ) = 0;
|
||||
|
||||
// Requests global stats data, which is available for stats marked as "aggregated".
|
||||
// This call is asynchronous, with the results returned in GlobalStatsReceived_t.
|
||||
// nHistoryDays specifies how many days of day-by-day history to retrieve in addition
|
||||
// to the overall totals. The limit is 60.
|
||||
STEAM_CALL_RESULT( GlobalStatsReceived_t )
|
||||
virtual SteamAPICall_t RequestGlobalStats( int nHistoryDays ) = 0;
|
||||
|
||||
// Gets the lifetime totals for an aggregated stat
|
||||
STEAM_FLAT_NAME( GetGlobalStatInt64 )
|
||||
virtual bool GetGlobalStat( const char *pchStatName, int64 *pData ) = 0;
|
||||
|
||||
STEAM_FLAT_NAME( GetGlobalStatDouble )
|
||||
virtual bool GetGlobalStat( const char *pchStatName, double *pData ) = 0;
|
||||
|
||||
// Gets history for an aggregated stat. pData will be filled with daily values, starting with today.
|
||||
// So when called, pData[0] will be today, pData[1] will be yesterday, and pData[2] will be two days ago,
|
||||
// etc. cubData is the size in bytes of the pubData buffer. Returns the number of
|
||||
// elements actually set.
|
||||
|
||||
STEAM_FLAT_NAME( GetGlobalStatHistoryInt64 )
|
||||
virtual int32 GetGlobalStatHistory( const char *pchStatName, STEAM_ARRAY_COUNT(cubData) int64 *pData, uint32 cubData ) = 0;
|
||||
|
||||
STEAM_FLAT_NAME( GetGlobalStatHistoryDouble )
|
||||
virtual int32 GetGlobalStatHistory( const char *pchStatName, STEAM_ARRAY_COUNT(cubData) double *pData, uint32 cubData ) = 0;
|
||||
|
||||
#ifdef _PS3
|
||||
// Call to kick off installation of the PS3 trophies. This call is asynchronous, and the results will be returned in a PS3TrophiesInstalled_t
|
||||
// callback.
|
||||
virtual bool InstallPS3Trophies() = 0;
|
||||
|
||||
// Returns the amount of space required at boot to install trophies. This value can be used when comparing the amount of space needed
|
||||
// by the game to the available space value passed to the game at boot. The value is set during InstallPS3Trophies().
|
||||
virtual uint64 GetTrophySpaceRequiredBeforeInstall() = 0;
|
||||
|
||||
// On PS3, user stats & achievement progress through Steam must be stored with the user's saved game data.
|
||||
// At startup, before calling RequestCurrentStats(), you must pass the user's stats data to Steam via this method.
|
||||
// If you do not have any user data, call this function with pvData = NULL and cubData = 0
|
||||
virtual bool SetUserStatsData( const void *pvData, uint32 cubData ) = 0;
|
||||
|
||||
// Call to get the user's current stats data. You should retrieve this data after receiving successful UserStatsReceived_t & UserStatsStored_t
|
||||
// callbacks, and store the data with the user's save game data. You can call this method with pvData = NULL and cubData = 0 to get the required
|
||||
// buffer size.
|
||||
virtual bool GetUserStatsData( void *pvData, uint32 cubData, uint32 *pcubWritten ) = 0;
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif // ISTEAMUSERSTATS011_H
|
@ -47,6 +47,7 @@
|
||||
#include "isteamuser017.h"
|
||||
#include "isteamuser018.h"
|
||||
#include "isteamuser019.h"
|
||||
#include "isteamuser020.h"
|
||||
#include "isteamfriends.h"
|
||||
#include "isteamfriends004.h"
|
||||
#include "isteamfriends005.h"
|
||||
@ -74,6 +75,7 @@
|
||||
#include "isteammatchmaking007.h"
|
||||
#include "isteammatchmaking008.h"
|
||||
#include "isteamuserstats.h"
|
||||
#include "isteamuserstats011.h"
|
||||
#include "isteamuserstats010.h"
|
||||
#include "isteamuserstats009.h"
|
||||
#include "isteamuserstats008.h"
|
||||
|
@ -56,6 +56,7 @@ STEAMAPI_API ISteamParties * SteamAPI_ISteamClient_GetISteamParties( ISteamClien
|
||||
STEAMAPI_API ISteamRemotePlay * SteamAPI_ISteamClient_GetISteamRemotePlay( ISteamClient* self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion );
|
||||
|
||||
// ISteamUser
|
||||
STEAMAPI_API ISteamUser *SteamAPI_SteamUser_v021();
|
||||
STEAMAPI_API ISteamUser *SteamAPI_SteamUser_v020();
|
||||
STEAMAPI_API HSteamUser SteamAPI_ISteamUser_GetHSteamUser( ISteamUser* self );
|
||||
STEAMAPI_API bool SteamAPI_ISteamUser_BLoggedOn( ISteamUser* self );
|
||||
@ -88,6 +89,7 @@ STEAMAPI_API bool SteamAPI_ISteamUser_BIsPhoneIdentifying( ISteamUser* self );
|
||||
STEAMAPI_API bool SteamAPI_ISteamUser_BIsPhoneRequiringVerification( ISteamUser* self );
|
||||
STEAMAPI_API SteamAPICall_t SteamAPI_ISteamUser_GetMarketEligibility( ISteamUser* self );
|
||||
STEAMAPI_API SteamAPICall_t SteamAPI_ISteamUser_GetDurationControl( ISteamUser* self );
|
||||
STEAMAPI_API bool SteamAPI_ISteamUser_BSetDurationControlOnlineState( ISteamUser* self, EDurationControlOnlineState eNewState );
|
||||
|
||||
// ISteamFriends
|
||||
STEAMAPI_API ISteamFriends *SteamAPI_SteamFriends_v017();
|
||||
@ -165,6 +167,7 @@ STEAMAPI_API bool SteamAPI_ISteamFriends_IsClanPublic( ISteamFriends* self, uint
|
||||
STEAMAPI_API bool SteamAPI_ISteamFriends_IsClanOfficialGameGroup( ISteamFriends* self, uint64_steamid steamIDClan );
|
||||
STEAMAPI_API int SteamAPI_ISteamFriends_GetNumChatsWithUnreadPriorityMessages( ISteamFriends* self );
|
||||
STEAMAPI_API void SteamAPI_ISteamFriends_ActivateGameOverlayRemotePlayTogetherInviteDialog( ISteamFriends* self, uint64_steamid steamIDLobby );
|
||||
STEAMAPI_API bool SteamAPI_ISteamFriends_RegisterProtocolInOverlayBrowser( ISteamFriends* self, const char * pchProtocol );
|
||||
|
||||
// ISteamUtils
|
||||
STEAMAPI_API ISteamUtils *SteamAPI_SteamUtils_v009();
|
||||
@ -374,6 +377,7 @@ STEAMAPI_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_EnumeratePublishedWorks
|
||||
STEAMAPI_API SteamAPICall_t SteamAPI_ISteamRemoteStorage_UGCDownloadToLocation( ISteamRemoteStorage* self, UGCHandle_t hContent, const char * pchLocation, uint32 unPriority );
|
||||
|
||||
// ISteamUserStats
|
||||
STEAMAPI_API ISteamUserStats *SteamAPI_SteamUserStats_v012();
|
||||
STEAMAPI_API ISteamUserStats *SteamAPI_SteamUserStats_v011();
|
||||
STEAMAPI_API bool SteamAPI_ISteamUserStats_RequestCurrentStats( ISteamUserStats* self );
|
||||
STEAMAPI_API bool SteamAPI_ISteamUserStats_GetStatInt32( ISteamUserStats* self, const char * pchName, int32 * pData );
|
||||
@ -418,6 +422,8 @@ STEAMAPI_API bool SteamAPI_ISteamUserStats_GetGlobalStatInt64( ISteamUserStats*
|
||||
STEAMAPI_API bool SteamAPI_ISteamUserStats_GetGlobalStatDouble( ISteamUserStats* self, const char * pchStatName, double * pData );
|
||||
STEAMAPI_API int32 SteamAPI_ISteamUserStats_GetGlobalStatHistoryInt64( ISteamUserStats* self, const char * pchStatName, int64 * pData, uint32 cubData );
|
||||
STEAMAPI_API int32 SteamAPI_ISteamUserStats_GetGlobalStatHistoryDouble( ISteamUserStats* self, const char * pchStatName, double * pData, uint32 cubData );
|
||||
STEAMAPI_API bool SteamAPI_ISteamUserStats_GetAchievementProgressLimitsInt32( ISteamUserStats* self, const char * pchName, int32 * pnMinProgress, int32 * pnMaxProgress );
|
||||
STEAMAPI_API bool SteamAPI_ISteamUserStats_GetAchievementProgressLimitsFloat( ISteamUserStats* self, const char * pchName, float * pfMinProgress, float * pfMaxProgress );
|
||||
|
||||
// ISteamApps
|
||||
STEAMAPI_API ISteamApps *SteamAPI_SteamApps_v008();
|
||||
@ -450,6 +456,7 @@ STEAMAPI_API void SteamAPI_ISteamApps_RequestAllProofOfPurchaseKeys( ISteamApps*
|
||||
STEAMAPI_API SteamAPICall_t SteamAPI_ISteamApps_GetFileDetails( ISteamApps* self, const char * pszFileName );
|
||||
STEAMAPI_API int SteamAPI_ISteamApps_GetLaunchCommandLine( ISteamApps* self, char * pszCommandLine, int cubCommandLine );
|
||||
STEAMAPI_API bool SteamAPI_ISteamApps_BIsSubscribedFromFamilySharing( ISteamApps* self );
|
||||
STEAMAPI_API bool SteamAPI_ISteamApps_BIsTimedTrial( ISteamApps* self, uint32 * punSecondsAllowed, uint32 * punSecondsPlayed );
|
||||
|
||||
// ISteamNetworking
|
||||
STEAMAPI_API ISteamNetworking *SteamAPI_SteamNetworking_v006();
|
||||
@ -811,6 +818,7 @@ STEAMAPI_API bool SteamAPI_ISteamInventory_SetPropertyBool( ISteamInventory* sel
|
||||
STEAMAPI_API bool SteamAPI_ISteamInventory_SetPropertyInt64( ISteamInventory* self, SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char * pchPropertyName, int64 nValue );
|
||||
STEAMAPI_API bool SteamAPI_ISteamInventory_SetPropertyFloat( ISteamInventory* self, SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, const char * pchPropertyName, float flValue );
|
||||
STEAMAPI_API bool SteamAPI_ISteamInventory_SubmitUpdateProperties( ISteamInventory* self, SteamInventoryUpdateHandle_t handle, SteamInventoryResult_t * pResultHandle );
|
||||
STEAMAPI_API bool SteamAPI_ISteamInventory_InspectItem( ISteamInventory* self, SteamInventoryResult_t * pResultHandle, const char * pchItemToken );
|
||||
|
||||
// ISteamVideo
|
||||
STEAMAPI_API ISteamVideo *SteamAPI_SteamVideo_v002();
|
||||
@ -1053,6 +1061,15 @@ STEAMAPI_API bool SteamAPI_SteamNetworkingIdentity_ParseString( SteamNetworkingI
|
||||
// SteamNetworkingMessage_t
|
||||
STEAMAPI_API void SteamAPI_SteamNetworkingMessage_t_Release( SteamNetworkingMessage_t* self );
|
||||
|
||||
// SteamNetworkingPOPIDRender
|
||||
STEAMAPI_API const char * SteamAPI_SteamNetworkingPOPIDRender_c_str( SteamNetworkingPOPIDRender* self );
|
||||
|
||||
// SteamNetworkingIdentityRender
|
||||
STEAMAPI_API const char * SteamAPI_SteamNetworkingIdentityRender_c_str( SteamNetworkingIdentityRender* self );
|
||||
|
||||
// SteamNetworkingIPAddrRender
|
||||
STEAMAPI_API const char * SteamAPI_SteamNetworkingIPAddrRender_c_str( SteamNetworkingIPAddrRender* self );
|
||||
|
||||
// SteamDatagramHostedAddress
|
||||
STEAMAPI_API void SteamAPI_SteamDatagramHostedAddress_Clear( SteamDatagramHostedAddress* self );
|
||||
STEAMAPI_API SteamNetworkingPOPID SteamAPI_SteamDatagramHostedAddress_GetPopID( SteamDatagramHostedAddress* self );
|
||||
|
@ -310,6 +310,7 @@ enum { k_iSteamSTARCallbacks = 5500 };
|
||||
enum { k_iClientSTARCallbacks = 5600 };
|
||||
enum { k_iSteamRemotePlayCallbacks = 5700 };
|
||||
enum { k_iClientCompatCallbacks = 5800 };
|
||||
enum { k_iSteamChatCallbacks = 5900 };
|
||||
|
||||
#ifdef _MSVC_VER
|
||||
#pragma warning( pop )
|
||||
|
@ -141,6 +141,7 @@ enum EResult
|
||||
k_EResultCantRemoveItem = 113, // item can't be removed
|
||||
k_EResultAccountDeleted = 114, // account has been deleted
|
||||
k_EResultExistingUserCancelledLicense = 115, // A license for this already exists, but cancelled
|
||||
k_EResultCommunityCooldown = 116, // access is denied because of a community cooldown (probably from support profile data resets)
|
||||
};
|
||||
|
||||
// Error codes for use with the voice functions
|
||||
@ -246,9 +247,9 @@ enum EAccountType
|
||||
enum EAppReleaseState
|
||||
{
|
||||
k_EAppReleaseState_Unknown = 0, // unknown, required appinfo or license info is missing
|
||||
k_EAppReleaseState_Unavailable = 1, // even if user 'just' owns it, can see game at all
|
||||
k_EAppReleaseState_Prerelease = 2, // can be purchased and is visible in games list, nothing else. Common appInfo section released
|
||||
k_EAppReleaseState_PreloadOnly = 3, // owners can preload app, not play it. AppInfo fully released.
|
||||
k_EAppReleaseState_Unavailable = 1, // even owners can't see game in library yet, no AppInfo released
|
||||
k_EAppReleaseState_Prerelease = 2, // app can be purchased and is visible in library, nothing else. Only Common AppInfo section released
|
||||
k_EAppReleaseState_PreloadOnly = 3, // owners can preload app, but not play it. All AppInfo sections fully released
|
||||
k_EAppReleaseState_Released = 4, // owners can download and play app.
|
||||
};
|
||||
|
||||
@ -280,6 +281,7 @@ enum EAppOwnershipFlags
|
||||
k_EAppOwnershipFlags_SiteLicense = 0x40000, // Is from a site license
|
||||
k_EAppOwnershipFlags_LegacyFreeSub = 0x80000, // App only owned through Steam's legacy free sub
|
||||
k_EAppOwnershipFlags_InvalidOSType = 0x100000, // app not supported on current OS version, used to indicate a game is 32-bit on post-catalina. Currently it's own flag so the library will display a notice.
|
||||
k_EAppOwnershipFlags_TimedTrial = 0x200000, // App is playable only for limited time
|
||||
};
|
||||
|
||||
|
||||
@ -504,6 +506,18 @@ static inline bool BIsVRLaunchOptionType( const ELaunchOptionType eType )
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: true if this launch option is any of the vr launching types
|
||||
//-----------------------------------------------------------------------------
|
||||
static inline bool BIsLaunchOptionTypeExemptFromGameTheater( const ELaunchOptionType eType )
|
||||
{
|
||||
return eType == k_ELaunchOptionType_Config
|
||||
|| eType == k_ELaunchOptionType_Server
|
||||
|| eType == k_ELaunchOptionType_Editor
|
||||
|| eType == k_ELaunchOptionType_Manual;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: code points for VR HMD vendors and models
|
||||
// WARNING: DO NOT RENUMBER EXISTING VALUES - STORED IN A DATABASE
|
||||
@ -693,6 +707,18 @@ enum EDurationControlNotification
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// Specifies a game's online state in relation to duration control
|
||||
//
|
||||
enum EDurationControlOnlineState
|
||||
{
|
||||
k_EDurationControlOnlineState_Invalid = 0, // nil value
|
||||
k_EDurationControlOnlineState_Offline = 1, // currently in offline play - single-player, offline co-op, etc.
|
||||
k_EDurationControlOnlineState_Online = 2, // currently in online play
|
||||
k_EDurationControlOnlineState_OnlineHighPri = 3, // currently in online play and requests not to be interrupted
|
||||
};
|
||||
|
||||
|
||||
#pragma pack( push, 1 )
|
||||
|
||||
#define CSTEAMID_DEFINED
|
||||
|
@ -34,3 +34,7 @@ S_API bool SteamEncryptedAppTicket_BGetAppDefinedValue( uint8 *rgubTicketDecrypt
|
||||
S_API const uint8 *SteamEncryptedAppTicket_GetUserVariableData( uint8 *rgubTicketDecrypted, uint32 cubTicketDecrypted, uint32 *pcubUserData );
|
||||
|
||||
S_API bool SteamEncryptedAppTicket_BIsTicketSigned( uint8 *rgubTicketDecrypted, uint32 cubTicketDecrypted, const uint8 *pubRSAKey, uint32 cubRSAKey );
|
||||
|
||||
S_API bool SteamEncryptedAppTicket_BIsLicenseBorrowed( uint8 *rgubTicketDecrypted, uint32 cubTicketDecrypted );
|
||||
|
||||
S_API bool SteamEncryptedAppTicket_BIsLicenseTemporary( uint8 *rgubTicketDecrypted, uint32 cubTicketDecrypted );
|
||||
|
@ -84,6 +84,7 @@ enum EHTTPStatusCode
|
||||
k_EHTTPStatusCode417ExpectationFailed = 417,
|
||||
k_EHTTPStatusCode4xxUnknown = 418, // 418 is reserved, so we'll use it to mean unknown
|
||||
k_EHTTPStatusCode429TooManyRequests = 429,
|
||||
k_EHTTPStatusCode444ConnectionClosed = 444, // nginx only?
|
||||
|
||||
// Server error codes
|
||||
k_EHTTPStatusCode500InternalServerError = 500,
|
||||
|
@ -22,7 +22,6 @@
|
||||
#endif
|
||||
#define STEAMNETWORKINGSOCKETS_STEAMCLIENT
|
||||
#define STEAMNETWORKINGSOCKETS_ENABLE_SDR
|
||||
#define STEAMNETWORKINGSOCKETS_ENABLE_P2P
|
||||
#include "steam_api_common.h"
|
||||
//
|
||||
//----------------------------------------
|
||||
@ -180,6 +179,8 @@ struct SteamNetworkingIPAddr
|
||||
/// form according to RFC5952. If you include the port, IPv6 will be surrounded by
|
||||
/// brackets, e.g. [::1:2]:80. Your buffer should be at least k_cchMaxString bytes
|
||||
/// to avoid truncation
|
||||
///
|
||||
/// See also SteamNetworkingIdentityRender
|
||||
inline void ToString( char *buf, size_t cbBuf, bool bWithPort ) const;
|
||||
|
||||
/// Parse an IP address and optional port. If a port is not present, it is set to 0.
|
||||
@ -248,11 +249,13 @@ struct SteamNetworkingIdentity
|
||||
/// or any other time you need to encode the identity as a string. It has a
|
||||
/// URL-like format (type:<type-data>). Your buffer should be at least
|
||||
/// k_cchMaxString bytes big to avoid truncation.
|
||||
///
|
||||
/// See also SteamNetworkingIPAddrRender
|
||||
void ToString( char *buf, size_t cbBuf ) const;
|
||||
|
||||
/// Parse back a string that was generated using ToString. If we don't understand the
|
||||
/// string, but it looks "reasonable" (it matches the pattern type:<type-data> and doesn't
|
||||
/// have any funcky characters, etc), then we will return true, and the type is set to
|
||||
/// have any funky characters, etc), then we will return true, and the type is set to
|
||||
/// k_ESteamNetworkingIdentityType_UnknownType. false will only be returned if the string
|
||||
/// looks invalid.
|
||||
bool ParseString( const char *pszStr );
|
||||
@ -463,7 +466,7 @@ enum ESteamNetConnectionEnd
|
||||
// on our end
|
||||
k_ESteamNetConnectionEnd_Local_HostedServerPrimaryRelay = 3003,
|
||||
|
||||
// We're not able to get the network config. This is
|
||||
// We're not able to get the SDR network config. This is
|
||||
// *almost* always a local issue, since the network config
|
||||
// comes from the CDN, which is pretty darn reliable.
|
||||
k_ESteamNetConnectionEnd_Local_NetworkConfig = 3004,
|
||||
@ -472,6 +475,14 @@ enum ESteamNetConnectionEnd
|
||||
// to do this.
|
||||
k_ESteamNetConnectionEnd_Local_Rights = 3005,
|
||||
|
||||
// ICE P2P rendezvous failed because we were not able to
|
||||
// determine our "public" address (e.g. reflexive address via STUN)
|
||||
//
|
||||
// If relay fallback is available (it always is on Steam), then
|
||||
// this is only used internally and will not be returned as a high
|
||||
// level failure.
|
||||
k_ESteamNetConnectionEnd_Local_P2P_ICE_NoPublicAddresses = 3006,
|
||||
|
||||
k_ESteamNetConnectionEnd_Local_Max = 3999,
|
||||
|
||||
// 4xxx: Connection failed or ended, and it appears that the
|
||||
@ -514,6 +525,15 @@ enum ESteamNetConnectionEnd
|
||||
// (Probably the code you are running is too old.)
|
||||
k_ESteamNetConnectionEnd_Remote_BadProtocolVersion = 4006,
|
||||
|
||||
// NAT punch failed failed because we never received any public
|
||||
// addresses from the remote host. (But we did receive some
|
||||
// signals form them.)
|
||||
//
|
||||
// If relay fallback is available (it always is on Steam), then
|
||||
// this is only used internally and will not be returned as a high
|
||||
// level failure.
|
||||
k_ESteamNetConnectionEnd_Remote_P2P_ICE_NoPublicAddresses = 4007,
|
||||
|
||||
k_ESteamNetConnectionEnd_Remote_Max = 4999,
|
||||
|
||||
// 5xxx: Connection failed for some other reason.
|
||||
@ -546,6 +566,21 @@ enum ESteamNetConnectionEnd
|
||||
// job to open and maintain those sessions.)
|
||||
k_ESteamNetConnectionEnd_Misc_NoRelaySessionsToClient = 5006,
|
||||
|
||||
// While trying to initiate a connection, we never received
|
||||
// *any* communication from the peer.
|
||||
//k_ESteamNetConnectionEnd_Misc_ServerNeverReplied = 5007,
|
||||
|
||||
// P2P rendezvous failed in a way that we don't have more specific
|
||||
// information
|
||||
k_ESteamNetConnectionEnd_Misc_P2P_Rendezvous = 5008,
|
||||
|
||||
// NAT punch failed, probably due to NAT/firewall configuration.
|
||||
//
|
||||
// If relay fallback is available (it always is on Steam), then
|
||||
// this is only used internally and will not be returned as a high
|
||||
// level failure.
|
||||
k_ESteamNetConnectionEnd_Misc_P2P_NAT_Firewall = 5009,
|
||||
|
||||
k_ESteamNetConnectionEnd_Misc_Max = 5999,
|
||||
|
||||
k_ESteamNetConnectionEnd__Force32Bit = 0x7fffffff
|
||||
@ -1055,6 +1090,39 @@ enum ESteamNetworkingConfigValue
|
||||
/// (This flag is itself a dev variable.)
|
||||
k_ESteamNetworkingConfig_EnumerateDevVars = 35,
|
||||
|
||||
//
|
||||
// P2P settings
|
||||
//
|
||||
|
||||
// /// [listen socket int32] When you create a P2P listen socket, we will automatically
|
||||
// /// open up a UDP port to listen for LAN connections. LAN connections can be made
|
||||
// /// without any signaling: both sides can be disconnected from the Internet.
|
||||
// ///
|
||||
// /// This value can be set to zero to disable the feature.
|
||||
// k_ESteamNetworkingConfig_P2P_Discovery_Server_LocalPort = 101,
|
||||
//
|
||||
// /// [connection int32] P2P connections can perform broadcasts looking for the peer
|
||||
// /// on the LAN.
|
||||
// k_ESteamNetworkingConfig_P2P_Discovery_Client_RemotePort = 102,
|
||||
|
||||
/// [connection string] Comma-separated list of STUN servers that can be used
|
||||
/// for NAT piercing. If you set this to an empty string, NAT piercing will
|
||||
/// not be attempted. Also if "public" candidates are not allowed for
|
||||
/// P2P_Transport_ICE_Enable, then this is ignored.
|
||||
k_ESteamNetworkingConfig_P2P_STUN_ServerList = 103,
|
||||
|
||||
/// [connection int32] What types of ICE candidates to share with the peer.
|
||||
/// See k_nSteamNetworkingConfig_P2P_Transport_ICE_Enable_xxx values
|
||||
k_ESteamNetworkingConfig_P2P_Transport_ICE_Enable = 104,
|
||||
|
||||
/// [connection int32] When selecting P2P transport, add various
|
||||
/// penalties to the scores for selected transports. (Route selection
|
||||
/// scores are on a scale of milliseconds. The score begins with the
|
||||
/// route ping time and is then adjusted.)
|
||||
k_ESteamNetworkingConfig_P2P_Transport_ICE_Penalty = 105,
|
||||
k_ESteamNetworkingConfig_P2P_Transport_SDR_Penalty = 106,
|
||||
//k_ESteamNetworkingConfig_P2P_Transport_LANBeacon_Penalty = 107,
|
||||
|
||||
//
|
||||
// Settings for SDR relayed connections
|
||||
//
|
||||
@ -1105,11 +1173,15 @@ enum ESteamNetworkingConfigValue
|
||||
k_ESteamNetworkingConfig_SDRClient_FakeClusterPing = 36,
|
||||
|
||||
//
|
||||
// Log levels for debuging information. A higher priority
|
||||
// (lower numeric value) will cause more stuff to be printed.
|
||||
// Log levels for debugging information of various subsystems.
|
||||
// Higher numeric values will cause more stuff to be printed.
|
||||
// See ISteamNetworkingUtils::SetDebugOutputFunction for more
|
||||
// information
|
||||
//
|
||||
// The default for all values is k_ESteamNetworkingSocketsDebugOutputType_Warning.
|
||||
//
|
||||
k_ESteamNetworkingConfig_LogLevel_AckRTT = 13, // [connection int32] RTT calculations for inline pings and replies
|
||||
k_ESteamNetworkingConfig_LogLevel_PacketDecode = 14, // [connection int32] log SNP packets send
|
||||
k_ESteamNetworkingConfig_LogLevel_PacketDecode = 14, // [connection int32] log SNP packets send/recv
|
||||
k_ESteamNetworkingConfig_LogLevel_Message = 15, // [connection int32] log each message send/recv
|
||||
k_ESteamNetworkingConfig_LogLevel_PacketGaps = 16, // [connection int32] dropped packets
|
||||
k_ESteamNetworkingConfig_LogLevel_P2PRendezvous = 17, // [connection int32] P2P rendezvous messages
|
||||
@ -1118,6 +1190,14 @@ enum ESteamNetworkingConfigValue
|
||||
k_ESteamNetworkingConfigValue__Force32Bit = 0x7fffffff
|
||||
};
|
||||
|
||||
// Bitmask of types to share
|
||||
const int k_nSteamNetworkingConfig_P2P_Transport_ICE_Enable_Default = -1; // Special value - use user defaults
|
||||
const int k_nSteamNetworkingConfig_P2P_Transport_ICE_Enable_Disable = 0; // Do not do any ICE work at all or share any IP addresses with peer
|
||||
const int k_nSteamNetworkingConfig_P2P_Transport_ICE_Enable_Relay = 1; // Relayed connection via TURN server.
|
||||
const int k_nSteamNetworkingConfig_P2P_Transport_ICE_Enable_Private = 2; // host addresses that appear to be link-local or RFC1918 addresses
|
||||
const int k_nSteamNetworkingConfig_P2P_Transport_ICE_Enable_Public = 4; // STUN reflexive addresses, or host address that isn't a "private" address
|
||||
const int k_nSteamNetworkingConfig_P2P_Transport_ICE_Enable_All = 0x7fffffff;
|
||||
|
||||
/// In a few places we need to set configuration options on listen sockets and connections, and
|
||||
/// have them take effect *before* the listen socket or connection really starts doing anything.
|
||||
/// Creating the object and then setting the options "immediately" after creation doesn't work
|
||||
@ -1214,6 +1294,8 @@ inline SteamNetworkingPOPID CalculateSteamNetworkingPOPIDFromString( const char
|
||||
}
|
||||
|
||||
/// Unpack integer to string representation, including terminating '\0'
|
||||
///
|
||||
/// See also SteamNetworkingPOPIDRender
|
||||
template <int N>
|
||||
inline void GetSteamNetworkingLocationPOPStringFromID( SteamNetworkingPOPID id, char (&szCode)[N] )
|
||||
{
|
||||
@ -1228,6 +1310,16 @@ inline void GetSteamNetworkingLocationPOPStringFromID( SteamNetworkingPOPID id,
|
||||
/// The POPID "dev" is used in non-production environments for testing.
|
||||
const SteamNetworkingPOPID k_SteamDatagramPOPID_dev = ( (uint32)'d' << 16U ) | ( (uint32)'e' << 8U ) | (uint32)'v';
|
||||
|
||||
/// Utility class for printing a SteamNetworkingPOPID.
|
||||
struct SteamNetworkingPOPIDRender
|
||||
{
|
||||
SteamNetworkingPOPIDRender( SteamNetworkingPOPID x ) { GetSteamNetworkingLocationPOPStringFromID( x, buf ); }
|
||||
inline const char *c_str() const { return buf; }
|
||||
private:
|
||||
char buf[ 8 ];
|
||||
};
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Internal stuff
|
||||
@ -1268,14 +1360,14 @@ inline bool SteamNetworkingIdentity::operator==(const SteamNetworkingIdentity &x
|
||||
inline void SteamNetworkingMessage_t::Release() { (*m_pfnRelease)( this ); }
|
||||
|
||||
#if defined( STEAMNETWORKINGSOCKETS_STATIC_LINK ) || !defined( STEAMNETWORKINGSOCKETS_STEAMCLIENT )
|
||||
STEAMNETWORKINGSOCKETS_INTERFACE void SteamAPI_SteamNetworkingIPAddr_ToString( const SteamNetworkingIPAddr *pAddr, char *buf, size_t cbBuf, bool bWithPort );
|
||||
STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_SteamNetworkingIPAddr_ParseString( SteamNetworkingIPAddr *pAddr, const char *pszStr );
|
||||
STEAMNETWORKINGSOCKETS_INTERFACE void SteamAPI_SteamNetworkingIdentity_ToString( const SteamNetworkingIdentity &identity, char *buf, size_t cbBuf );
|
||||
STEAMNETWORKINGSOCKETS_INTERFACE bool SteamAPI_SteamNetworkingIdentity_ParseString( SteamNetworkingIdentity *pIdentity, size_t sizeofIdentity, const char *pszStr );
|
||||
inline void SteamNetworkingIPAddr::ToString( char *buf, size_t cbBuf, bool bWithPort ) const { SteamAPI_SteamNetworkingIPAddr_ToString( this, buf, cbBuf, bWithPort ); }
|
||||
inline bool SteamNetworkingIPAddr::ParseString( const char *pszStr ) { return SteamAPI_SteamNetworkingIPAddr_ParseString( this, pszStr ); }
|
||||
inline void SteamNetworkingIdentity::ToString( char *buf, size_t cbBuf ) const { SteamAPI_SteamNetworkingIdentity_ToString( *this, buf, cbBuf ); }
|
||||
inline bool SteamNetworkingIdentity::ParseString( const char *pszStr ) { return SteamAPI_SteamNetworkingIdentity_ParseString( this, sizeof(*this), pszStr ); }
|
||||
STEAMNETWORKINGSOCKETS_INTERFACE void SteamNetworkingIPAddr_ToString( const SteamNetworkingIPAddr *pAddr, char *buf, size_t cbBuf, bool bWithPort );
|
||||
STEAMNETWORKINGSOCKETS_INTERFACE bool SteamNetworkingIPAddr_ParseString( SteamNetworkingIPAddr *pAddr, const char *pszStr );
|
||||
STEAMNETWORKINGSOCKETS_INTERFACE void SteamNetworkingIdentity_ToString( const SteamNetworkingIdentity *pIdentity, char *buf, size_t cbBuf );
|
||||
STEAMNETWORKINGSOCKETS_INTERFACE bool SteamNetworkingIdentity_ParseString( SteamNetworkingIdentity *pIdentity, size_t sizeofIdentity, const char *pszStr );
|
||||
inline void SteamNetworkingIPAddr::ToString( char *buf, size_t cbBuf, bool bWithPort ) const { SteamNetworkingIPAddr_ToString( this, buf, cbBuf, bWithPort ); }
|
||||
inline bool SteamNetworkingIPAddr::ParseString( const char *pszStr ) { return SteamNetworkingIPAddr_ParseString( this, pszStr ); }
|
||||
inline void SteamNetworkingIdentity::ToString( char *buf, size_t cbBuf ) const { SteamNetworkingIdentity_ToString( this, buf, cbBuf ); }
|
||||
inline bool SteamNetworkingIdentity::ParseString( const char *pszStr ) { return SteamNetworkingIdentity_ParseString( this, sizeof(*this), pszStr ); }
|
||||
#endif
|
||||
|
||||
#endif // #ifndef API_GEN
|
||||
|
Loading…
x
Reference in New Issue
Block a user