Update to sdk 1.49
parent
a36d6e475d
commit
66e596ea29
@ -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
|
@ -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
|
Loading…
Reference in New Issue