Update for 159

This commit is contained in:
Detanup01 2024-04-01 22:04:00 +02:00 committed by otavepto
parent f2d59e2a04
commit bfd2235684
23 changed files with 419 additions and 134 deletions

View File

@ -31,6 +31,7 @@
* missing `delete` for ugc_bridge + reset pointers on client objects destruction
* allow overlay invitations to obscure game input to be able to accept/reject the request
* fixed a problem in the overlay where players connected on the same network might be missed during startup, resulting in an empty friend list
* Added Steamwork SDK version 159
---

View File

@ -227,6 +227,8 @@ static void *create_client_interface(const char *ver)
steam_client = (ISteamClient018 *)get_steam_client();
} else if (strcmp(ver, "SteamClient019") == 0) {
steam_client = (ISteamClient019 *)get_steam_client();
} else if (strcmp(ver, "SteamClient020") == 0) {
steam_client = (ISteamClient020 *)get_steam_client();
} else if (strcmp(ver, STEAMCLIENT_INTERFACE_VERSION) == 0) {
steam_client = (ISteamClient *)get_steam_client();
steamclient_has_ipv6_functions_flag = true;
@ -291,6 +293,21 @@ STEAMAPI_API ESteamAPIInitResult S_CALLTYPE SteamInternal_SteamAPI_Init( const c
return ESteamAPIInitResult::k_ESteamAPIInitResult_FailedGeneric;
}
STEAMAPI_API ESteamAPIInitResult S_CALLTYPE SteamAPI_InitFlat( SteamErrMsg *pOutErrMsg )
{
PRINT_DEBUG("SteamAPI_InitFlat\n");
if (SteamAPI_Init()) {
return ESteamAPIInitResult::k_ESteamAPIInitResult_OK;
}
if (pOutErrMsg) {
memcpy(*pOutErrMsg, "SteamInitEx failed", 18);
(*pOutErrMsg)[18] = 0;
(*pOutErrMsg)[19] = 0;
}
return ESteamAPIInitResult::k_ESteamAPIInitResult_FailedGeneric;
}
// SteamAPI_Init must be called before using any other API functions. If it fails, an
// error message will be output to the debugger (or stderr) with further information.
static HSteamPipe user_steam_pipe;

View File

@ -75,6 +75,7 @@ public ISteamClient016,
public ISteamClient017,
public ISteamClient018,
public ISteamClient019,
public ISteamClient020,
public ISteamClient
{
public:

View File

@ -209,8 +209,12 @@ public:
// In game launchers that don't have controller support you can call this to have Steam Input translate the controller input into mouse/kb to navigate the launcher
void SetGameLauncherMode( bool bLauncherMode );
// Dismisses the floating keyboard.
bool DismissFloatingGamepadTextInput();
// Dismisses the full-screen text input dialog.
bool DismissGamepadTextInput();
};
#endif // __STEAM_UTILS_H__

View File

@ -1285,6 +1285,17 @@ STEAMAPI_API steam_bool SteamAPI_ISteamUtils_DismissFloatingGamepadTextInput( IS
}
return (ptr)->DismissFloatingGamepadTextInput();
STEAMAPI_API steam_bool SteamAPI_ISteamUtils_DismissGamepadTextInput( ISteamUtils* self )
{
long long test1 = ((char *)self - (char*)get_steam_client()->steam_utils);
long long test2 = ((char *)self - (char*)get_steam_client()->steam_gameserver_utils);
auto ptr = get_steam_client()->steam_gameserver_utils;
if (test1 >= 0 && (test2 < 0 || test1 < test2)) {
ptr = get_steam_client()->steam_utils;
}
return (ptr)->DismissGamepadTextInput();
}
STEAMAPI_API ISteamMatchmaking *SteamAPI_SteamMatchmaking_v009()

View File

@ -461,3 +461,10 @@ bool Steam_Utils::DismissFloatingGamepadTextInput()
std::lock_guard<std::recursive_mutex> lock(global_mutex);
return true;
}
bool Steam_Utils::DismissGamepadTextInput()
{
PRINT_DEBUG("Steam_Utils::%s\n", __FUNCTION__);
std::lock_guard<std::recursive_mutex> lock(global_mutex);
return true;
}

View File

@ -1,6 +1,6 @@
================================================================
Copyright © 1996-2022, Valve Corporation, All rights reserved.
Copyright © 1996-2022, Valve Corporation, All rights reserved.
================================================================
@ -8,6 +8,18 @@ Copyright
Welcome to the Steamworks SDK. For documentation please see our partner
website at: http://partner.steamgames.com
----------------------------------------------------------------
v1.59 9th February 2024
----------------------------------------------------------------
General
* Added new initialization method, SteamAPI_InitFlat
ISteamUtils
* Added DismissGamepadTextInput
ISteamAppList
* This interface has been removed from the SDK
----------------------------------------------------------------
v1.58a 26th October 2023
----------------------------------------------------------------
@ -25,7 +37,7 @@ ISteamUGC
Misc.
* Added SteamAPI_InitEx and SteamGameServer_InitEx, which will return k_ESteamAPIInitResult_OK upon success or an error code specified in in ESteamAPIInitResult. An optional, non-localized error message can also be returned.
* SteamAPI_Init() will now return false if the installed Steam client needs to be updated to support the games version of the SDK
* SteamAPI_Init() will now return false if the installed Steam client needs to be updated to support the games version of the SDK
* Improved handling of corrupted tickets via updated sdkencryptedappticket.lib
----------------------------------------------------------------
@ -57,10 +69,10 @@ v1.54 16th June 2022
ISteamFriends
* Added various functions to retrieve equipped Steam Community profile items and their properties
** RequestEquippedProfileItems requests information on what Steam Community profile items a user has equipped. Will send callback EquippedProfileItems_t.
** BHasEquippedProfileItem after calling RequestEquippedProfileItems, returns true/false depending on whether a user has a ECommunityProfileItemType equipped or not
** GetProfileItemPropertyString returns a string property given a ECommunityProfileItemType and ECommunityProfileItemProperty
** GetProfileItemPropertyUint returns an unsigned integer property given a ECommunityProfileItemType and ECommunityProfileItemProperty
** RequestEquippedProfileItems requests information on what Steam Community profile items a user has equipped. Will send callback EquippedProfileItems_t.
** BHasEquippedProfileItem after calling RequestEquippedProfileItems, returns true/false depending on whether a user has a ECommunityProfileItemType equipped or not
** GetProfileItemPropertyString returns a string property given a ECommunityProfileItemType and ECommunityProfileItemProperty
** GetProfileItemPropertyUint returns an unsigned integer property given a ECommunityProfileItemType and ECommunityProfileItemProperty
* Added callback EquippedProfileItemsChanged_t for when a user's equipped Steam Community profile items have changed. This will be sent for the current user and for their friends.
Spacewar example:
@ -187,7 +199,7 @@ v1.50 29th August 2020
* Added ISteamNetworkingMessages, a new non-connection-oriented API, similar to UDP. This interface is intended to make it easy to port existing UDP code while taking advantage of the features provided by ISteamNetworkingSockets, especially Steam Datagram Relay (SDR).
* Added poll groups to ISteamNetworkingSockets. Poll groups are a way to receive messages from many different connections at a time.
* ISteamNetworkingSockets::ReceiveMessagesOnListenSocket has been removed. (Use poll groups instead.)
* Added symmetric connect mode to ISteamNetworkingSockets. This can be used to solve the coordination problem of establishing a single connection between two peers, when both peers may initiating the connection at the same time and neither peer is the “server” or “client”.
* Added symmetric connect mode to ISteamNetworkingSockets. This can be used to solve the coordination problem of establishing a single connection between two peers, when both peers may initiating the connection at the same time and neither peer is the “server” or “client”.
* ISteamNetworking is deprecated and may be removed in a future version of the SDK. Please use ISteamNetworkingSockets or ISteamNetworkingMessages instead.
@ -195,8 +207,8 @@ v1.50 29th August 2020
v1.49 12th June 2020
----------------------------------------------------------------
* Added ISteamApps::BIsTimedTrial() which allows a game to check if user only has limited playtime
* Added ISteamFriends::RegisterProtocolInOverlayBrowser() which will enable dispatching callbacks when the overlay web browser navigates to a registered custom protocol, such as “mygame://<callback data>”
* Added ISteamuserStats::GetAchievementProgressLimits() which lets the game query at run-time the progress-based achievements bounds as set by the developers in the Steamworks application settings
* Added ISteamFriends::RegisterProtocolInOverlayBrowser() which will enable dispatching callbacks when the overlay web browser navigates to a registered custom protocol, such as “mygame://<callback data>”
* Added ISteamuserStats::GetAchievementProgressLimits() which lets the game query at run-time the progress-based achievements bounds as set by the developers in the Steamworks application settings
* Added tool to demonstrate processing the steam.signatures file that comes in the steam client package.
@ -280,30 +292,30 @@ v1.43 20th February 2019
----------------------------------------------------------------
ISteamParties
* This API can be used to selectively advertise your multiplayer game session in a Steam chat room group. Tell Steam the number of player spots that are available for your party, and a join-game string, and it will show a beacon in the selected group and allow that many users to “follow” the beacon to your party. Adjust the number of open slots if other players join through alternate matchmaking methods.
* This API can be used to selectively advertise your multiplayer game session in a Steam chat room group. Tell Steam the number of player spots that are available for your party, and a join-game string, and it will show a beacon in the selected group and allow that many users to “follow” the beacon to your party. Adjust the number of open slots if other players join through alternate matchmaking methods.
ISteamController
* This interface will be deprecated and replaced with ISteamInput. For ease in upgrading the SDK ISteamController currently has feature parity with ISteamInput, but future features may not be ported back. Please use ISteamInput for new projects.
* Added GetActionOriginFromXboxOrigin, GetStringForXboxOrigin and GetGlyphForXboxOrigin to allow Xinput games to easily query glyphs for devices coming in through Steam Inputs Xinput emulation, ex: “A button”->”Cross button” on a PS4 controller. This is a simple translation of the button and does not take user remapping into account the full action based API is required for that.
* Added GetActionOriginFromXboxOrigin, GetStringForXboxOrigin and GetGlyphForXboxOrigin to allow Xinput games to easily query glyphs for devices coming in through Steam Inputs Xinput emulation, ex: “A button”->”Cross button” on a PS4 controller. This is a simple translation of the button and does not take user remapping into account the full action based API is required for that.
* Added TranslateActionOrigin which allows Steam Input API games to which are using look up tables to translate action origins from an recognized device released after the game was last built into origins they recognize.
* Added count and max_possible fields to current enums to make using lookup tables easier
ISteamInput
* This new interface replaces ISteamController to better reflect the fact this API supports not just the Steam Controller but every controller connected to Steam including Xbox Controllers, Playstation Controllers and Nintendo Switch controllers. ISteamController currently has feature parity with the new features added in ISteamInput but new feature may not be ported back. Please use this interface instead of ISteamController for any new projects.
* This new interface replaces ISteamController to better reflect the fact this API supports not just the Steam Controller but every controller connected to Steam including Xbox Controllers, Playstation Controllers and Nintendo Switch controllers. ISteamController currently has feature parity with the new features added in ISteamInput but new feature may not be ported back. Please use this interface instead of ISteamController for any new projects.
* Migrating to ISteamInput from ISteamController should mostly be a search-replace operation but any action origin look up tables will need to be adjusted as some of the enum orders have changed.
* Added GetActionOriginFromXboxOrigin, GetStringForXboxOrigin and GetGlyphForXboxOrigin to allow Xinput games to easily query glyphs for devices coming in through Steam Inputs Xinput emulation, ex: “A button”->”Cross button” on a PS4 controller. This is a simple translation of the button and does not take user remapping into account the full action based API is required for that.
* Added GetActionOriginFromXboxOrigin, GetStringForXboxOrigin and GetGlyphForXboxOrigin to allow Xinput games to easily query glyphs for devices coming in through Steam Inputs Xinput emulation, ex: “A button”->”Cross button” on a PS4 controller. This is a simple translation of the button and does not take user remapping into account the full action based API is required for that.
* Added TranslateActionOrigin which allows Steam Input API games to which are using look up tables to translate action origins from an recognized device released after the game was last built into origins they recognize.
* Added count and max_possible fields to current enums to make using lookup tables easier
ISteamFriends
* ActivateGameOverlayToWebPage Added a new parameter to control how the created web browser window is displayed within the Steam Overlay. The default mode will create a new browser tab next to all other overlay windows that the user already has open. The new modal mode will create a new browser window and activate the Steam Overlay, showing only that window. When the browser window is closed, the Steam Overlay is automatically closed as well.
* ActivateGameOverlayToWebPage Added a new parameter to control how the created web browser window is displayed within the Steam Overlay. The default mode will create a new browser tab next to all other overlay windows that the user already has open. The new modal mode will create a new browser window and activate the Steam Overlay, showing only that window. When the browser window is closed, the Steam Overlay is automatically closed as well.
ISteamInventory
* GetItemsWithPrices and GetItemPrice - Added the ability to get the “base price” for a set of items, which you can use to markup in your own UI that items are “on sale”
* GetItemsWithPrices and GetItemPrice - Added the ability to get the “base price” for a set of items, which you can use to markup in your own UI that items are “on sale”
ISteamUGC
* SetAllowLegacyUpload - Call to force the use of Steam Cloud for back-end storage (instead of Steam Pipe), which is faster and more efficient for uploading and downloading small files (less than 100MB).
* CreateQueryAllUGCRequest - Added ability to page through query results using a “cursor” instead of a page number. This is more efficient and supports “deep paging” beyond page 1000. The old version of CreateQueryAllUGCRequest() that takes a page parameter is deprecated and cannot query beyond page 1000. Note that you will need to keep track of the “previous” cursor in order to go to a previous page.
* CreateQueryAllUGCRequest - Added ability to page through query results using a “cursor” instead of a page number. This is more efficient and supports “deep paging” beyond page 1000. The old version of CreateQueryAllUGCRequest() that takes a page parameter is deprecated and cannot query beyond page 1000. Note that you will need to keep track of the “previous” cursor in order to go to a previous page.
ISteamApps
* GetLaunchCommandLine - Get command line if game was launched via Steam URL, e.g. steam://run/<appid>//<command line>/. If you get NewUrlLaunchParameters_t callback while running, call again to get new command line
@ -326,11 +338,11 @@ ISteamInventory
* Deprecated TradeItems
ISteamController
* Added Action Set Layers Action Set Layers are optional sets of action bindings which can be overlaid upon an existing set of controls. In contrast to Action Sets, layers draw their actions from the Action Set they exist within and do not wholesale replace what is already active when applied, but apply small modifications. These can consist of setting changes as well as adding or removing bindings from the base action set. More than one layer can be applied at a time and will be applied consecutively, so an example might be the Sniper Class layer which includes tweaks or bindings specific to snipers in addition to the Scoped-In layer which alters look sensitivity.
* Added ActivateActionSetLayer Activates the specified Layer.
* Added DeactivateActionSetLayer Deactivates the specified Layer.
* Added DeactivateAllActionSetLayers Deactivates all layers, resetting the mapping to the action base Action Set.
* Added GetActiveActionSetLayers Returns all currently active Action Set Layers.
* Added Action Set Layers Action Set Layers are optional sets of action bindings which can be overlaid upon an existing set of controls. In contrast to Action Sets, layers draw their actions from the Action Set they exist within and do not wholesale replace what is already active when applied, but apply small modifications. These can consist of setting changes as well as adding or removing bindings from the base action set. More than one layer can be applied at a time and will be applied consecutively, so an example might be the Sniper Class layer which includes tweaks or bindings specific to snipers in addition to the Scoped-In layer which alters look sensitivity.
* Added ActivateActionSetLayer Activates the specified Layer.
* Added DeactivateActionSetLayer Deactivates the specified Layer.
* Added DeactivateAllActionSetLayers Deactivates all layers, resetting the mapping to the action base Action Set.
* Added GetActiveActionSetLayers Returns all currently active Action Set Layers.
* Added GetInputTypeForHandle - Returns the input type for a particular handle, such as Steam Controller, PS4 Controller, Xbox One or 360.
ISteamHTMLSurface
@ -645,7 +657,7 @@ User:
* Added ISteamUser::GetBadgeLevel and ISteamUser::GetPlayerSteamLevel functions
Friends:
* Games can now initiate Steam Friend requests, removals, request -accepts and request-ignores via ISteamFriends ActivateGameOverlayToUser API. This prompts the user for confirmation before action is taken.
* Games can now initiate Steam Friend requests, removals, request -accepts and request-ignores via ISteamFriends ActivateGameOverlayToUser API. This prompts the user for confirmation before action is taken.
Mac:
* Updated the OS X Content Prep tool and game wrapper for improved compatibility with OS X 10.8 (Mountain Lion).
@ -794,7 +806,7 @@ User
Friends
* Added ISteamFriends::RequestFriendRichPresence, which allows requesting rich presence keys for any Steam user playing the same game as you
* Added a set of functions to ISteamFriends which allow games to integrate with Steam Chat. Games can both join group chats, as well as get friends chats and show them in-line in the game. This API isnt currently used in a game, so there may be some rough edges around the user experience to work out, and some experimentation is required.
* Added a set of functions to ISteamFriends which allow games to integrate with Steam Chat. Games can both join group chats, as well as get friends chats and show them in-line in the game. This API isnt currently used in a game, so there may be some rough edges around the user experience to work out, and some experimentation is required.
Game Servers
* Removed the ISteamMasterServerUpdater interface. It has been merged into the ISteamGameServer interface, which is used to communicate all game server state changes.

View File

@ -115,18 +115,12 @@ public:
// Expose HTTP interface
virtual ISteamHTTP *GetISteamHTTP( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// Deprecated - the ISteamUnifiedMessages interface is no longer intended for public consumption.
STEAM_PRIVATE_API( virtual void *DEPRECATED_GetISteamUnifiedMessages( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0 ; )
// Exposes the ISteamController interface - deprecated in favor of Steam Input
virtual ISteamController *GetISteamController( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// Exposes the ISteamUGC interface
virtual ISteamUGC *GetISteamUGC( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// returns app list interface, only available on specially registered apps
virtual ISteamAppList *GetISteamAppList( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// Music Player
virtual ISteamMusic *GetISteamMusic( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
@ -162,7 +156,7 @@ public:
STEAM_PRIVATE_API( virtual void DestroyAllInterfaces() = 0; )
};
#define STEAMCLIENT_INTERFACE_VERSION "SteamClient020"
#define STEAMCLIENT_INTERFACE_VERSION "SteamClient021"
#ifndef STEAM_API_EXPORTS

146
sdk/steam/isteamclient20.h Normal file
View File

@ -0,0 +1,146 @@
#ifndef ISTEAMCLIENT020_H
#define ISTEAMCLIENT020_H
#ifdef STEAM_WIN32
#pragma once
#endif
class ISteamClient020
{
public:
// Creates a communication pipe to the Steam client.
// NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling
virtual HSteamPipe CreateSteamPipe() = 0;
// Releases a previously created communications pipe
// NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling
virtual bool BReleaseSteamPipe( HSteamPipe hSteamPipe ) = 0;
// connects to an existing global user, failing if none exists
// used by the game to coordinate with the steamUI
// NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling
virtual HSteamUser ConnectToGlobalUser( HSteamPipe hSteamPipe ) = 0;
// used by game servers, create a steam user that won't be shared with anyone else
// NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling
virtual HSteamUser CreateLocalUser( HSteamPipe *phSteamPipe, EAccountType eAccountType ) = 0;
// removes an allocated user
// NOT THREADSAFE - ensure that no other threads are accessing Steamworks API when calling
virtual void ReleaseUser( HSteamPipe hSteamPipe, HSteamUser hUser ) = 0;
// retrieves the ISteamUser interface associated with the handle
virtual ISteamUser *GetISteamUser( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// retrieves the ISteamGameServer interface associated with the handle
virtual ISteamGameServer *GetISteamGameServer( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// set the local IP and Port to bind to
// this must be set before CreateLocalUser()
virtual void SetLocalIPBinding( const SteamIPAddress_t &unIP, uint16 usPort ) = 0;
// returns the ISteamFriends interface
virtual ISteamFriends *GetISteamFriends( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// returns the ISteamUtils interface
virtual ISteamUtils *GetISteamUtils( HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// returns the ISteamMatchmaking interface
virtual ISteamMatchmaking *GetISteamMatchmaking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// returns the ISteamMatchmakingServers interface
virtual ISteamMatchmakingServers *GetISteamMatchmakingServers( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// returns the a generic interface
virtual void *GetISteamGenericInterface( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// returns the ISteamUserStats interface
virtual ISteamUserStats *GetISteamUserStats( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// returns the ISteamGameServerStats interface
virtual ISteamGameServerStats *GetISteamGameServerStats( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// returns apps interface
virtual ISteamApps *GetISteamApps( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// networking
virtual ISteamNetworking *GetISteamNetworking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// remote storage
virtual ISteamRemoteStorage *GetISteamRemoteStorage( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// user screenshots
virtual ISteamScreenshots *GetISteamScreenshots( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// game search
virtual ISteamGameSearch *GetISteamGameSearch( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// Deprecated. Applications should use SteamAPI_RunCallbacks() or SteamGameServer_RunCallbacks() instead.
STEAM_PRIVATE_API( virtual void RunFrame() = 0; )
// returns the number of IPC calls made since the last time this function was called
// Used for perf debugging so you can understand how many IPC calls your game makes per frame
// Every IPC call is at minimum a thread context switch if not a process one so you want to rate
// control how often you do them.
virtual uint32 GetIPCCallCount() = 0;
// API warning handling
// 'int' is the severity; 0 for msg, 1 for warning
// 'const char *' is the text of the message
// callbacks will occur directly after the API function is called that generated the warning or message.
virtual void SetWarningMessageHook( SteamAPIWarningMessageHook_t pFunction ) = 0;
// Trigger global shutdown for the DLL
virtual bool BShutdownIfAllPipesClosed() = 0;
// Expose HTTP interface
virtual ISteamHTTP *GetISteamHTTP( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// Deprecated - the ISteamUnifiedMessages interface is no longer intended for public consumption.
STEAM_PRIVATE_API( virtual void *DEPRECATED_GetISteamUnifiedMessages( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0 ; )
// Exposes the ISteamController interface - deprecated in favor of Steam Input
virtual ISteamController *GetISteamController( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// Exposes the ISteamUGC interface
virtual ISteamUGC *GetISteamUGC( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// returns app list interface, only available on specially registered apps
virtual ISteamAppList *GetISteamAppList( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// Music Player
virtual ISteamMusic *GetISteamMusic( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// Music Player Remote
virtual ISteamMusicRemote *GetISteamMusicRemote(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion) = 0;
// html page display
virtual ISteamHTMLSurface *GetISteamHTMLSurface(HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion) = 0;
// Helper functions for internal Steam usage
STEAM_PRIVATE_API( virtual void DEPRECATED_Set_SteamAPI_CPostAPIResultInProcess( void (*)() ) = 0; )
STEAM_PRIVATE_API( virtual void DEPRECATED_Remove_SteamAPI_CPostAPIResultInProcess( void (*)() ) = 0; )
STEAM_PRIVATE_API( virtual void Set_SteamAPI_CCheckCallbackRegisteredInProcess( SteamAPI_CheckCallbackRegistered_t func ) = 0; )
// inventory
virtual ISteamInventory *GetISteamInventory( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// Video
virtual ISteamVideo *GetISteamVideo( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// Parental controls
virtual ISteamParentalSettings *GetISteamParentalSettings( HSteamUser hSteamuser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// Exposes the Steam Input interface for controller support
virtual ISteamInput *GetISteamInput( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// Steam Parties interface
virtual ISteamParties *GetISteamParties( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
// Steam Remote Play interface
virtual ISteamRemotePlay *GetISteamRemotePlay( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
STEAM_PRIVATE_API( virtual void DestroyAllInterfaces() = 0; )
};
#endif // ISTEAMCLIENT020_H

View File

@ -103,6 +103,12 @@ struct FriendGameInfo_t
};
#pragma pack( pop )
// special values for FriendGameInfo_t::m_usQueryPort
const uint16 k_usFriendGameInfoQueryPort_NotInitialized = 0xFFFF; // We haven't asked the GS for this query port's actual value yet. Was #define QUERY_PORT_NOT_INITIALIZED in older versions of Steamworks SDK.
const uint16 k_usFriendGameInfoQueryPort_Error = 0xFFFE; // We were unable to get the query port for this server. Was #define QUERY_PORT_ERROR in older versions of Steamworks SDK.
// maximum number of characters in a user's name. Two flavors; one for UTF-8 and one for UTF-16.
// The UTF-8 version has to be very generous to accomodate characters that get large when encoded
// in UTF-8.
@ -530,7 +536,7 @@ struct GameOverlayActivated_t
uint8 m_bActive; // true if it's just been activated, false otherwise
bool m_bUserInitiated; // true if the user asked for the overlay to be activated/deactivated
AppId_t m_nAppID; // the appID of the game (should always be the current game)
uint32 m_dwOverlayPID; // used internally
uint32 m_dwOverlayPID; // used internally
};

View File

@ -29,7 +29,7 @@ enum EParentalFeature
k_EFeatureLibrary = 11,
k_EFeatureTest = 12,
k_EFeatureSiteLicense = 13,
k_EFeatureKioskMode = 14,
k_EFeatureKioskMode_Deprecated = 14,
k_EFeatureMax
};

View File

@ -19,6 +19,7 @@ enum ESteamDeviceFormFactor
k_ESteamDeviceFormFactorTablet = 2,
k_ESteamDeviceFormFactorComputer = 3,
k_ESteamDeviceFormFactorTV = 4,
k_ESteamDeviceFormFactorVRHeadset = 5,
};
// Steam Remote Play session ID

View File

@ -102,9 +102,10 @@ enum EWorkshopFileType
k_EWorkshopFileTypeSteamworksAccessInvite = 13, // internal
k_EWorkshopFileTypeSteamVideo = 14, // Steam video
k_EWorkshopFileTypeGameManagedItem = 15, // managed completely by the game, not the user, and not shown on the web
k_EWorkshopFileTypeClip = 16, // internal
// Update k_EWorkshopFileTypeMax if you add values.
k_EWorkshopFileTypeMax = 16
k_EWorkshopFileTypeMax = 17
};

View File

@ -121,6 +121,7 @@ enum EItemState
k_EItemStateNeedsUpdate = 8, // items needs an update. Either because it's not installed yet or creator updated content
k_EItemStateDownloading = 16, // item update is currently downloading
k_EItemStateDownloadPending = 32, // DownloadItem() was called for this item, content isn't available until DownloadItemResult_t is fired
k_EItemStateDisabledLocally = 64, // Item is disabled locally, so it shouldn't be considered subscribed
};
enum EItemStatistic
@ -154,6 +155,7 @@ enum EItemPreviewType
// | |Dn | |
// +---+---+---+---+
k_EItemPreviewType_EnvironmentMap_LatLong = 4, // standard image file expected
k_EItemPreviewType_Clip = 5, // clip id is stored
k_EItemPreviewType_ReservedMax = 255, // you can specify your own types above this value
};
@ -292,7 +294,7 @@ public:
virtual bool SetItemUpdateLanguage( UGCUpdateHandle_t handle, const char *pchLanguage ) = 0; // specify the language of the title or description that will be set
virtual bool SetItemMetadata( UGCUpdateHandle_t handle, const char *pchMetaData ) = 0; // change the metadata of an UGC item (max = k_cchDeveloperMetadataMax)
virtual bool SetItemVisibility( UGCUpdateHandle_t handle, ERemoteStoragePublishedFileVisibility eVisibility ) = 0; // change the visibility of an UGC item
virtual bool SetItemTags( UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t *pTags, bool bAllowAdminTags = false ) = 0; // change the tags of an UGC item
virtual bool SetItemTags( UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t *pTags, bool bAllowAdminTags = false ) = 0; // change the tags of an UGC item
virtual bool SetItemContent( UGCUpdateHandle_t handle, const char *pszContentFolder ) = 0; // update item content from this local folder
virtual bool SetItemPreview( UGCUpdateHandle_t handle, const char *pszPreviewFile ) = 0; // change preview image file for this item. pszPreviewFile points to local image file, which must be under 1MB in size
virtual bool SetAllowLegacyUpload( UGCUpdateHandle_t handle, bool bAllowLegacyUpload ) = 0; // use legacy upload for a single small file. The parameter to SetItemContent() should either be a directory with one file or the full path to the file. The file must also be less than 10MB in size.
@ -382,12 +384,12 @@ public:
// Retrieve information related to the user's acceptance or not of the app's specific Workshop EULA
STEAM_CALL_RESULT( WorkshopEULAStatus_t )
virtual SteamAPICall_t GetWorkshopEULAStatus() = 0;
// Return the user's community content descriptor preferences
virtual uint32 GetUserContentDescriptorPreferences( EUGCContentDescriptorID *pvecDescriptors, uint32 cMaxEntries ) = 0;
// Return the user's community content descriptor preferences
virtual uint32 GetUserContentDescriptorPreferences( EUGCContentDescriptorID *pvecDescriptors, uint32 cMaxEntries ) = 0;
};
#define STEAMUGC_INTERFACE_VERSION "STEAMUGC_INTERFACE_VERSION018"
#define STEAMUGC_INTERFACE_VERSION "STEAMUGC_INTERFACE_VERSION018"
#ifndef STEAM_API_EXPORTS
// Global interface accessor

View File

@ -224,6 +224,9 @@ public:
// Dismisses the floating keyboard.
virtual bool DismissFloatingGamepadTextInput() = 0;
// Dismisses the full-screen text input dialog.
virtual bool DismissGamepadTextInput() = 0;
};
#define STEAMUTILS_INTERFACE_VERSION "SteamUtils010"
@ -257,7 +260,7 @@ struct IPCountry_t
//-----------------------------------------------------------------------------
// Purpose: Fired when running on a handheld PC or laptop with less than 10 minutes of battery is left, fires then every minute
// Purpose: Fired when running on a handheld PC or laptop with less than 10 minutes of battery is left, fires then every minute
//-----------------------------------------------------------------------------
struct LowBatteryPower_t
{

View File

@ -35,6 +35,7 @@
#include "isteamclient017.h"
#include "isteamclient018.h"
#include "isteamclient019.h"
#include "isteamclient020.h"
#include "isteamuser.h"
#include "isteamuser009.h"
#include "isteamuser010.h"
@ -163,7 +164,7 @@
#include "isteamugc014.h"
#include "isteamugc015.h"
#include "isteamugc016.h"
#include "isteamugc017.h"
#include "isteamugc017.h"
#include "isteamapplist.h"
#include "isteamhtmlsurface.h"
#include "isteamhtmlsurface001.h"
@ -183,7 +184,7 @@
#include "isteaminput002.h"
#include "isteaminput005.h"
#include "isteamremoteplay.h"
#include "isteamremoteplay001.h"
#include "isteamremoteplay001.h"
#include "isteamnetworkingmessages.h"
#include "isteamnetworkingsockets.h"
#include "isteamnetworkingutils.h"
@ -198,30 +199,53 @@
//
//----------------------------------------------------------------------------------------------------------------------------------------------------------//
enum ESteamAPIInitResult
{
k_ESteamAPIInitResult_OK = 0,
k_ESteamAPIInitResult_FailedGeneric = 1, // Some other failure
k_ESteamAPIInitResult_NoSteamClient = 2, // We cannot connect to Steam, steam probably isn't running
k_ESteamAPIInitResult_VersionMismatch = 3, // Steam client appears to be out of date
};
// Initialize the Steamworks SDK.
// On success k_ESteamAPIInitResult_OK is returned. Otherwise, if pOutErrMsg is non-NULL,
// it will receive a non-localized message that explains the reason for the failure
//
// Example usage:
//
// SteamErrMsg errMsg;
// if ( SteamAPI_Init(&errMsg) != k_ESteamAPIInitResult_OK )
// FatalError( "Failed to init Steam. %s", errMsg );
inline ESteamAPIInitResult SteamAPI_InitEx( SteamErrMsg *pOutErrMsg );
S_API ESteamAPIInitResult S_CALLTYPE SteamInternal_SteamAPI_Init( const char *pszInternalCheckInterfaceVersions, SteamErrMsg *pOutErrMsg );
enum ESteamAPIInitResult
{
k_ESteamAPIInitResult_OK = 0,
k_ESteamAPIInitResult_FailedGeneric = 1, // Some other failure
k_ESteamAPIInitResult_NoSteamClient = 2, // We cannot connect to Steam, steam probably isn't running
k_ESteamAPIInitResult_VersionMismatch = 3, // Steam client appears to be out of date
};
// SteamAPI_Init must be called before using any other API functions. If it fails, an
// error message will be output to the debugger (or stderr) with further information.
// Initializing the Steamworks SDK
// -----------------------------
//
// There are three different methods you can use to initialize the Steamworks SDK, depending on
// your project's environment. You should only use one method in your project.
//
// If you are able to include this C++ header in your project, we recommend using the following
// initialization methods. They will ensure that all ISteam* interfaces defined in other
// C++ header files have versions that are supported by the user's Steam Client:
// - SteamAPI_InitEx() for new projects so you can show a detailed error message to the user
// - SteamAPI_Init() for existing projects that only display a generic error message
//
// If you are unable to include this C++ header in your project and are dynamically loading
// Steamworks SDK methods from dll/so, you can use the following method:
// - SteamAPI_InitFlat()
// See "Initializing the Steamworks SDK" above for how to choose an init method.
// On success k_ESteamAPIInitResult_OK is returned. Otherwise, returns a value that can be used
// to create a localized error message for the user. If pOutErrMsg is non-NULL,
// it will receive an example error message, in English, that explains the reason for the failure.
//
// Example usage:
//
// SteamErrMsg errMsg;
// if ( SteamAPI_Init(&errMsg) != k_ESteamAPIInitResult_OK )
// FatalError( "Failed to init Steam. %s", errMsg );
inline ESteamAPIInitResult SteamAPI_InitEx( SteamErrMsg *pOutErrMsg );
// See "Initializing the Steamworks SDK" above for how to choose an init method.
// Same usage as SteamAPI_InitEx(), however does not verify ISteam* interfaces are
// supported by the user's client and is exported from the dll
S_API ESteamAPIInitResult S_CALLTYPE SteamAPI_InitFlat( SteamErrMsg *pOutErrMsg );
S_API ESteamAPIInitResult S_CALLTYPE SteamInternal_SteamAPI_Init( const char *pszInternalCheckInterfaceVersions, SteamErrMsg *pOutErrMsg );
// See "Initializing the Steamworks SDK" above for how to choose an init method.
// Returns true on success
S_API steam_bool S_CALLTYPE SteamAPI_Init();
// SteamAPI_Shutdown should be called during process shutdown if possible.
@ -284,7 +308,7 @@ S_API HSteamUser GetHSteamUser();
#if defined( VERSION_SAFE_STEAM_API_INTERFACES )
// exists only for backwards compat with code written against older SDKs
S_API steam_bool S_CALLTYPE SteamAPI_InitSafe();
S_API steam_bool S_CALLTYPE SteamAPI_InitSafe();
#endif
#if defined(USE_BREAKPAD_HANDLER) || defined(STEAM_API_EXPORTS)
@ -473,46 +497,46 @@ inline bool CSteamAPIContext::Init()
#endif
// Internal implementation of SteamAPI_InitEx. This is done in a way that checks
// all of the versions of interfaces from headers being compiled into this code.
// If you are not using any of the C++ interfaces and do not need this version checking
// (for example if you are only using the "flat" interfaces, which have a different type
// of version checking), you can pass a NULL interface version string.
inline ESteamAPIInitResult SteamAPI_InitEx( SteamErrMsg *pOutErrMsg )
{
const char *pszInternalCheckInterfaceVersions =
STEAMUTILS_INTERFACE_VERSION "\0"
STEAMNETWORKINGUTILS_INTERFACE_VERSION "\0"
STEAMAPPLIST_INTERFACE_VERSION "\0"
STEAMAPPS_INTERFACE_VERSION "\0"
STEAMCONTROLLER_INTERFACE_VERSION "\0"
STEAMFRIENDS_INTERFACE_VERSION "\0"
STEAMGAMESEARCH_INTERFACE_VERSION "\0"
STEAMHTMLSURFACE_INTERFACE_VERSION "\0"
STEAMHTTP_INTERFACE_VERSION "\0"
STEAMINPUT_INTERFACE_VERSION "\0"
STEAMINVENTORY_INTERFACE_VERSION "\0"
STEAMMATCHMAKINGSERVERS_INTERFACE_VERSION "\0"
STEAMMATCHMAKING_INTERFACE_VERSION "\0"
STEAMMUSICREMOTE_INTERFACE_VERSION "\0"
STEAMMUSIC_INTERFACE_VERSION "\0"
STEAMNETWORKINGMESSAGES_INTERFACE_VERSION "\0"
STEAMNETWORKINGSOCKETS_INTERFACE_VERSION "\0"
STEAMNETWORKING_INTERFACE_VERSION "\0"
STEAMPARENTALSETTINGS_INTERFACE_VERSION "\0"
STEAMPARTIES_INTERFACE_VERSION "\0"
STEAMREMOTEPLAY_INTERFACE_VERSION "\0"
STEAMREMOTESTORAGE_INTERFACE_VERSION "\0"
STEAMSCREENSHOTS_INTERFACE_VERSION "\0"
STEAMUGC_INTERFACE_VERSION "\0"
STEAMUSERSTATS_INTERFACE_VERSION "\0"
STEAMUSER_INTERFACE_VERSION "\0"
STEAMVIDEO_INTERFACE_VERSION "\0"
"\0";
return SteamInternal_SteamAPI_Init( pszInternalCheckInterfaceVersions, pOutErrMsg );
}
// Internal implementation of SteamAPI_InitEx. This is done in a way that checks
// all of the versions of interfaces from headers being compiled into this code.
// If you are not using any of the C++ interfaces and do not need this version checking
// (for example if you are only using the "flat" interfaces, which have a different type
// of version checking), you can pass a NULL interface version string.
inline ESteamAPIInitResult SteamAPI_InitEx( SteamErrMsg *pOutErrMsg )
{
const char *pszInternalCheckInterfaceVersions =
STEAMUTILS_INTERFACE_VERSION "\0"
STEAMNETWORKINGUTILS_INTERFACE_VERSION "\0"
STEAMAPPLIST_INTERFACE_VERSION "\0"
STEAMAPPS_INTERFACE_VERSION "\0"
STEAMCONTROLLER_INTERFACE_VERSION "\0"
STEAMFRIENDS_INTERFACE_VERSION "\0"
STEAMGAMESEARCH_INTERFACE_VERSION "\0"
STEAMHTMLSURFACE_INTERFACE_VERSION "\0"
STEAMHTTP_INTERFACE_VERSION "\0"
STEAMINPUT_INTERFACE_VERSION "\0"
STEAMINVENTORY_INTERFACE_VERSION "\0"
STEAMMATCHMAKINGSERVERS_INTERFACE_VERSION "\0"
STEAMMATCHMAKING_INTERFACE_VERSION "\0"
STEAMMUSICREMOTE_INTERFACE_VERSION "\0"
STEAMMUSIC_INTERFACE_VERSION "\0"
STEAMNETWORKINGMESSAGES_INTERFACE_VERSION "\0"
STEAMNETWORKINGSOCKETS_INTERFACE_VERSION "\0"
STEAMNETWORKING_INTERFACE_VERSION "\0"
STEAMPARENTALSETTINGS_INTERFACE_VERSION "\0"
STEAMPARTIES_INTERFACE_VERSION "\0"
STEAMREMOTEPLAY_INTERFACE_VERSION "\0"
STEAMREMOTESTORAGE_INTERFACE_VERSION "\0"
STEAMSCREENSHOTS_INTERFACE_VERSION "\0"
STEAMUGC_INTERFACE_VERSION "\0"
STEAMUSERSTATS_INTERFACE_VERSION "\0"
STEAMUSER_INTERFACE_VERSION "\0"
STEAMVIDEO_INTERFACE_VERSION "\0"
"\0";
return SteamInternal_SteamAPI_Init( pszInternalCheckInterfaceVersions, pOutErrMsg );
}
#endif // STEAM_API_H

View File

@ -39,6 +39,13 @@
#endif // STEAM_API_EXPORTS
#endif
#if defined( __cplusplus ) && ( __cplusplus >= 201103L )
#define S_OVERRIDE override
#else
#define S_OVERRIDE
#endif
#ifdef STEAM_API_EXPORTS
#ifdef STEAM_API_FUNCTIONS_IMPL
#ifdef STEAMCLIENT_DLL
@ -174,9 +181,9 @@ public:
protected:
friend class CCallbackMgr;
virtual void Run( void *pvParam ) = 0;
virtual void Run( void *pvParam, bool /*bIOFailure*/, SteamAPICall_t /*hSteamAPICall*/ ) { Run( pvParam ); }
virtual int GetCallbackSizeBytes() { return sizeof_P; }
virtual void Run( void *pvParam ) S_OVERRIDE = 0;
virtual void Run( void *pvParam, bool /*bIOFailure*/, SteamAPICall_t /*hSteamAPICall*/ ) S_OVERRIDE { Run( pvParam ); }
virtual int GetCallbackSizeBytes() S_OVERRIDE { return sizeof_P; }
};
@ -199,9 +206,9 @@ public:
void SetGameserverFlag() { m_nCallbackFlags |= k_ECallbackFlagsGameServer; }
private:
virtual void Run( void *pvParam );
virtual void Run( void *pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall );
virtual int GetCallbackSizeBytes() { return sizeof( P ); }
virtual void Run( void *pvParam ) S_OVERRIDE;
virtual void Run( void *pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall ) S_OVERRIDE;
virtual int GetCallbackSizeBytes() S_OVERRIDE { return sizeof( P ); }
SteamAPICall_t m_hAPICall;
T *m_pObj;
@ -229,7 +236,7 @@ public:
void Unregister();
protected:
virtual void Run( void *pvParam );
virtual void Run( void *pvParam ) S_OVERRIDE;
T *m_pObj;
func_t m_Func;

View File

@ -222,6 +222,7 @@ STEAMAPI_API steam_bool SteamAPI_ISteamUtils_ShowModalGamepadTextInput( ISteamUt
STEAMAPI_API steam_bool SteamAPI_ISteamUtils_ShowFloatingGamepadTextInput( ISteamUtils* self, EFloatingGamepadTextInputMode eKeyboardMode, int nTextFieldXPosition, int nTextFieldYPosition, int nTextFieldWidth, int nTextFieldHeight );
STEAMAPI_API void SteamAPI_ISteamUtils_SetGameLauncherMode( ISteamUtils* self, bool bLauncherMode );
STEAMAPI_API steam_bool SteamAPI_ISteamUtils_DismissFloatingGamepadTextInput( ISteamUtils* self );
STEAMAPI_API steam_bool SteamAPI_ISteamUtils_DismissGamepadTextInput( ISteamUtils* self );
// ISteamMatchmaking
STEAMAPI_API ISteamMatchmaking *SteamAPI_SteamMatchmaking_v009();
@ -697,12 +698,12 @@ STEAMAPI_API ISteamUGC *SteamAPI_SteamUGC_v014();
STEAMAPI_API ISteamUGC *SteamAPI_SteamUGC_v015();
STEAMAPI_API ISteamUGC *SteamAPI_SteamUGC_v016();
STEAMAPI_API ISteamUGC *SteamAPI_SteamUGC_v017();
STEAMAPI_API ISteamUGC *SteamAPI_SteamUGC_v018();
STEAMAPI_API ISteamUGC *SteamAPI_SteamUGC_v018();
STEAMAPI_API ISteamUGC *SteamAPI_SteamGameServerUGC_v014();
STEAMAPI_API ISteamUGC *SteamAPI_SteamGameServerUGC_v015();
STEAMAPI_API ISteamUGC *SteamAPI_SteamGameServerUGC_v016();
STEAMAPI_API ISteamUGC *SteamAPI_SteamGameServerUGC_v017();
STEAMAPI_API ISteamUGC *SteamAPI_SteamGameServerUGC_v018();
STEAMAPI_API ISteamUGC *SteamAPI_SteamGameServerUGC_v018();
STEAMAPI_API UGCQueryHandle_t SteamAPI_ISteamUGC_CreateQueryUserUGCRequest( ISteamUGC* self, AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage );
STEAMAPI_API UGCQueryHandle_t SteamAPI_ISteamUGC_CreateQueryAllUGCRequestPage( ISteamUGC* self, EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage );
STEAMAPI_API UGCQueryHandle_t SteamAPI_ISteamUGC_CreateQueryAllUGCRequestCursor( ISteamUGC* self, EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, const char * pchCursor );
@ -751,7 +752,7 @@ STEAMAPI_API steam_bool SteamAPI_ISteamUGC_SetItemDescription( ISteamUGC* self,
STEAMAPI_API steam_bool SteamAPI_ISteamUGC_SetItemUpdateLanguage( ISteamUGC* self, UGCUpdateHandle_t handle, const char * pchLanguage );
STEAMAPI_API steam_bool SteamAPI_ISteamUGC_SetItemMetadata( ISteamUGC* self, UGCUpdateHandle_t handle, const char * pchMetaData );
STEAMAPI_API steam_bool SteamAPI_ISteamUGC_SetItemVisibility( ISteamUGC* self, UGCUpdateHandle_t handle, ERemoteStoragePublishedFileVisibility eVisibility );
STEAMAPI_API steam_bool SteamAPI_ISteamUGC_SetItemTags( ISteamUGC* self, UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t * pTags, bool bAllowAdminTags ); // Note: param bool bAllowAdminTags was introduced in SDK v158a, but didn't exist before
STEAMAPI_API steam_bool SteamAPI_ISteamUGC_SetItemTags( ISteamUGC* self, UGCUpdateHandle_t updateHandle, const SteamParamStringArray_t * pTags, bool bAllowAdminTags ); // Note: param bool bAllowAdminTags was introduced in SDK v158a, but didn't exist before
STEAMAPI_API steam_bool SteamAPI_ISteamUGC_SetItemContent( ISteamUGC* self, UGCUpdateHandle_t handle, const char * pszContentFolder );
STEAMAPI_API steam_bool SteamAPI_ISteamUGC_SetItemPreview( ISteamUGC* self, UGCUpdateHandle_t handle, const char * pszPreviewFile );
STEAMAPI_API steam_bool SteamAPI_ISteamUGC_SetAllowLegacyUpload( ISteamUGC* self, UGCUpdateHandle_t handle, bool bAllowLegacyUpload );
@ -792,7 +793,7 @@ STEAMAPI_API SteamAPICall_t SteamAPI_ISteamUGC_GetAppDependencies( ISteamUGC* se
STEAMAPI_API SteamAPICall_t SteamAPI_ISteamUGC_DeleteItem( ISteamUGC* self, PublishedFileId_t nPublishedFileID );
STEAMAPI_API steam_bool SteamAPI_ISteamUGC_ShowWorkshopEULA( ISteamUGC* self );
STEAMAPI_API SteamAPICall_t SteamAPI_ISteamUGC_GetWorkshopEULAStatus( ISteamUGC* self );
STEAMAPI_API uint32 SteamAPI_ISteamUGC_GetUserContentDescriptorPreferences( ISteamUGC* self, EUGCContentDescriptorID * pvecDescriptors, uint32 cMaxEntries );
STEAMAPI_API uint32 SteamAPI_ISteamUGC_GetUserContentDescriptorPreferences( ISteamUGC* self, EUGCContentDescriptorID * pvecDescriptors, uint32 cMaxEntries );
// ISteamAppList
STEAMAPI_API ISteamAppList *SteamAPI_SteamAppList_v001();
@ -912,14 +913,14 @@ STEAMAPI_API steam_bool SteamAPI_ISteamParentalSettings_BIsFeatureInBlockList( I
// ISteamRemotePlay
STEAMAPI_API ISteamRemotePlay *SteamAPI_SteamRemotePlay_v001();
STEAMAPI_API ISteamRemotePlay *SteamAPI_SteamRemotePlay_v002();
STEAMAPI_API ISteamRemotePlay *SteamAPI_SteamRemotePlay_v002();
STEAMAPI_API uint32 SteamAPI_ISteamRemotePlay_GetSessionCount( ISteamRemotePlay* self );
STEAMAPI_API RemotePlaySessionID_t SteamAPI_ISteamRemotePlay_GetSessionID( ISteamRemotePlay* self, int iSessionIndex );
STEAMAPI_API uint64_steamid SteamAPI_ISteamRemotePlay_GetSessionSteamID( ISteamRemotePlay* self, RemotePlaySessionID_t unSessionID );
STEAMAPI_API const char * SteamAPI_ISteamRemotePlay_GetSessionClientName( ISteamRemotePlay* self, RemotePlaySessionID_t unSessionID );
STEAMAPI_API ESteamDeviceFormFactor SteamAPI_ISteamRemotePlay_GetSessionClientFormFactor( ISteamRemotePlay* self, RemotePlaySessionID_t unSessionID );
STEAMAPI_API steam_bool SteamAPI_ISteamRemotePlay_BGetSessionClientResolution( ISteamRemotePlay* self, RemotePlaySessionID_t unSessionID, int * pnResolutionX, int * pnResolutionY );
STEAMAPI_API steam_bool SteamAPI_ISteamRemotePlay_BStartRemotePlayTogether( ISteamRemotePlay* self, bool bShowOverlay );
STEAMAPI_API steam_bool SteamAPI_ISteamRemotePlay_BStartRemotePlayTogether( ISteamRemotePlay* self, bool bShowOverlay );
STEAMAPI_API steam_bool SteamAPI_ISteamRemotePlay_BSendRemotePlayTogetherInvite( ISteamRemotePlay* self, uint64_steamid steamIDFriend );
// ISteamNetworkingMessages
@ -982,8 +983,8 @@ STEAMAPI_API SteamNetworkingPOPID SteamAPI_ISteamNetworkingSockets_GetHostedDedi
STEAMAPI_API EResult SteamAPI_ISteamNetworkingSockets_GetHostedDedicatedServerAddress( ISteamNetworkingSockets* self, SteamDatagramHostedAddress * pRouting );
STEAMAPI_API HSteamListenSocket SteamAPI_ISteamNetworkingSockets_CreateHostedDedicatedServerListenSocket( ISteamNetworkingSockets* self, int nLocalVirtualPort, int nOptions, const SteamNetworkingConfigValue_t * pOptions );
STEAMAPI_API EResult SteamAPI_ISteamNetworkingSockets_GetGameCoordinatorServerLogin( ISteamNetworkingSockets* self, SteamDatagramGameCoordinatorServerLogin * pLoginInfo, int * pcbSignedBlob, void * pBlob );
STEAMAPI_API HSteamNetConnection SteamAPI_ISteamNetworkingSockets_ConnectP2PCustomSignaling( ISteamNetworkingSockets* self, ISteamNetworkingConnectionSignaling * pSignaling, const SteamNetworkingIdentity * pPeerIdentity, int nRemoteVirtualPort, int nOptions, const SteamNetworkingConfigValue_t * pOptions );
STEAMAPI_API steam_bool SteamAPI_ISteamNetworkingSockets_ReceivedP2PCustomSignal( ISteamNetworkingSockets* self, const void * pMsg, int cbMsg, ISteamNetworkingSignalingRecvContext * pContext );
STEAMAPI_API HSteamNetConnection SteamAPI_ISteamNetworkingSockets_ConnectP2PCustomSignaling( ISteamNetworkingSockets* self, ISteamNetworkingConnectionSignaling * pSignaling, const SteamNetworkingIdentity * pPeerIdentity, int nRemoteVirtualPort, int nOptions, const SteamNetworkingConfigValue_t * pOptions );
STEAMAPI_API steam_bool SteamAPI_ISteamNetworkingSockets_ReceivedP2PCustomSignal( ISteamNetworkingSockets* self, const void * pMsg, int cbMsg, ISteamNetworkingSignalingRecvContext * pContext );
STEAMAPI_API steam_bool SteamAPI_ISteamNetworkingSockets_GetCertificateRequest( ISteamNetworkingSockets* self, int * pcbBlob, void * pBlob, SteamNetworkingErrMsg & errMsg );
STEAMAPI_API steam_bool SteamAPI_ISteamNetworkingSockets_SetCertificate( ISteamNetworkingSockets* self, const void * pCertificate, int cbCertificate, SteamNetworkingErrMsg & errMsg );
STEAMAPI_API void SteamAPI_ISteamNetworkingSockets_ResetIdentity( ISteamNetworkingSockets* self, const SteamNetworkingIdentity * pIdentity );

View File

@ -60,6 +60,7 @@ S_API void S_CALLTYPE SteamAPI_UnregisterCallResult( class CCallbackBase *pCallb
#pragma warning( disable: 4355 ) // 'this' : used in base member initializer list
#endif
#define _STEAM_CALLBACK_OFFSETOF( type, member ) ( (size_t)( (char *)&( (type *)0 )->member ) )
#define _STEAM_CALLBACK_AUTO_HOOK( thisclass, func, param )
#define _STEAM_CALLBACK_HELPER( _1, _2, SELECTED, ... ) _STEAM_CALLBACK_##SELECTED
#define _STEAM_CALLBACK_SELECT( X, Y ) _STEAM_CALLBACK_HELPER X Y
@ -68,8 +69,8 @@ S_API void S_CALLTYPE SteamAPI_UnregisterCallResult( class CCallbackBase *pCallb
CCallbackInternal_ ## func () { extra_code SteamAPI_RegisterCallback( this, param::k_iCallback ); } \
CCallbackInternal_ ## func ( const CCallbackInternal_ ## func & ) { extra_code SteamAPI_RegisterCallback( this, param::k_iCallback ); } \
CCallbackInternal_ ## func & operator=( const CCallbackInternal_ ## func & ) { return *this; } \
private: virtual void Run( void *pvParam ) { _STEAM_CALLBACK_AUTO_HOOK( thisclass, func, param ) \
thisclass *pOuter = reinterpret_cast<thisclass*>( reinterpret_cast<char*>(this) - offsetof( thisclass, m_steamcallback_ ## func ) ); \
private: virtual void Run( void *pvParam ) S_OVERRIDE { _STEAM_CALLBACK_AUTO_HOOK( thisclass, func, param ) \
thisclass *pOuter = reinterpret_cast<thisclass*>( reinterpret_cast<char*>(this) - _STEAM_CALLBACK_OFFSETOF( thisclass, m_steamcallback_ ## func ) ); \
pOuter->func( reinterpret_cast<param*>( pvParam ) ); \
} \
} m_steamcallback_ ## func ; void func( param *pParam )

View File

@ -153,6 +153,8 @@ enum EResult
k_EResultChargerRequired = 125, // The operation requires a charger to be plugged in, which wasn't present
k_EResultCachedCredentialInvalid = 126, // Cached credential was invalid - user must reauthenticate
K_EResultPhoneNumberIsVOIP = 127, // The phone number provided is a Voice Over IP number
k_EResultNotSupported = 128, // The data being accessed is not supported by this API
k_EResultFamilySizeLimitExceeded = 129, // Reached the maximum size of the family
};
// Error codes for use with the voice functions

View File

@ -1,4 +1,4 @@
//====== Copyright © 1996-2010, Valve Corporation, All rights reserved. =======
//====== Copyright © 1996-2010, Valve Corporation, All rights reserved. =======
//
// Purpose: HTTP related enums, stuff that is shared by both clients and servers, and our
// UI projects goes here.
@ -97,4 +97,10 @@ enum EHTTPStatusCode
k_EHTTPStatusCode5xxUnknown = 599,
};
inline bool BIsHTTPStatusSuccess( EHTTPStatusCode eStatus )
{
return eStatus >= 200 && eStatus <= 299;
}
#endif // STEAMHTTPENUMS_H

View File

@ -1431,6 +1431,32 @@ enum ESteamNetworkingConfigValue
k_ESteamNetworkingConfig_FakeRateLimit_Recv_Rate = 44,
k_ESteamNetworkingConfig_FakeRateLimit_Recv_Burst = 45,
// Timeout used for out-of-order correction. This is used when we see a small
// gap in the sequence number on a packet flow. For example let's say we are
// processing packet 105 when the most recent one was 103. 104 might have dropped,
// but there is also a chance that packets are simply being reordered. It is very
// common on certain types of connections for packet 104 to arrive very soon after 105,
// especially if 104 was large and 104 was small. In this case, when we see packet 105
// we will shunt it aside and pend it, in the hopes of seeing 104 soon after. If 104
// arrives before the a timeout occurs, then we can deliver the packets in order to the
// remainder of packet processing, and we will record this as a "correctable" out-of-order
// situation. If the timer expires, then we will process packet 105, and assume for now
// that 104 has dropped. (If 104 later arrives, we will process it, but that will be
// accounted for as uncorrected.)
//
// The default value is 1000 microseconds. Note that the Windows scheduler does not
// have microsecond precision.
//
// Set the value to 0 to disable out of order correction at the packet layer.
// In many cases we are still effectively able to correct the situation because
// reassembly of message fragments is tolerant of fragments packets arriving out of
// order. Also, when messages are decoded and inserted into the queue for the app
// to receive them, we will correct out of order messages that have not been
// dequeued by the app yet. However, when out-of-order packets are corrected
// at the packet layer, they will not reduce the connection quality measure.
// (E.g. SteamNetConnectionRealTimeStatus_t::m_flConnectionQualityLocal)
k_ESteamNetworkingConfig_OutOfOrderCorrectionWindowMicroseconds = 51,
//
// Callbacks
//
@ -1544,24 +1570,24 @@ enum ESteamNetworkingConfigValue
// Settings for SDR relayed connections
//
/// [int32 global] If the first N pings to a port all fail, mark that port as unavailable for
/// [global int32] If the first N pings to a port all fail, mark that port as unavailable for
/// a while, and try a different one. Some ISPs and routers may drop the first
/// packet, so setting this to 1 may greatly disrupt communications.
k_ESteamNetworkingConfig_SDRClient_ConsecutitivePingTimeoutsFailInitial = 19,
/// [int32 global] If N consecutive pings to a port fail, after having received successful
/// [global int32] If N consecutive pings to a port fail, after having received successful
/// communication, mark that port as unavailable for a while, and try a
/// different one.
k_ESteamNetworkingConfig_SDRClient_ConsecutitivePingTimeoutsFail = 20,
/// [int32 global] Minimum number of lifetime pings we need to send, before we think our estimate
/// [global int32] Minimum number of lifetime pings we need to send, before we think our estimate
/// is solid. The first ping to each cluster is very often delayed because of NAT,
/// routers not having the best route, etc. Until we've sent a sufficient number
/// of pings, our estimate is often inaccurate. Keep pinging until we get this
/// many pings.
k_ESteamNetworkingConfig_SDRClient_MinPingsBeforePingAccurate = 21,
/// [int32 global] Set all steam datagram traffic to originate from the same
/// [global int32] Set all steam datagram traffic to originate from the same
/// local port. By default, we open up a new UDP socket (on a different local
/// port) for each relay. This is slightly less optimal, but it works around
/// some routers that don't implement NAT properly. If you have intermittent
@ -1573,10 +1599,13 @@ enum ESteamNetworkingConfigValue
/// only use relays in that cluster. E.g. 'iad'
k_ESteamNetworkingConfig_SDRClient_ForceRelayCluster = 29,
/// [connection string] For debugging, generate our own (unsigned) ticket, using
/// the specified gameserver address. Router must be configured to accept unsigned
/// tickets.
k_ESteamNetworkingConfig_SDRClient_DebugTicketAddress = 30,
/// [connection string] For development, a base-64 encoded ticket generated
/// using the cert tool. This can be used to connect to a gameserver via SDR
/// without a ticket generated using the game coordinator. (You will still
/// need a key that is trusted for your app, however.)
///
/// This can also be passed using the SDR_DEVTICKET environment variable
k_ESteamNetworkingConfig_SDRClient_DevTicket = 30,
/// [global string] For debugging. Override list of relays from the config with
/// this set (maybe just one). Comma-separated list.
@ -1589,6 +1618,10 @@ enum ESteamNetworkingConfigValue
/// in production.
k_ESteamNetworkingConfig_SDRClient_FakeClusterPing = 36,
/// [global int32] When probing the SteamDatagram network, we limit exploration
/// to the closest N POPs, based on our current best approximated ping to that POP.
k_ESteamNetworkingConfig_SDRClient_LimitPingProbesToNearestN = 60,
//
// Log levels for debugging information of various subsystems.
// Higher numeric values will cause more stuff to be printed.
@ -1604,6 +1637,10 @@ enum ESteamNetworkingConfigValue
k_ESteamNetworkingConfig_LogLevel_P2PRendezvous = 17, // [connection int32] P2P rendezvous messages
k_ESteamNetworkingConfig_LogLevel_SDRRelayPings = 18, // [global int32] Ping relays
// Experimental. Set the ECN header field on all outbound UDP packets
// -1 = the default, and means "don't set anything".
// 0..3 = set that value. (Even though 0 is the default UDP ECN value, a 0 here means "explicitly set a 0".)
k_ESteamNetworkingConfig_ECN = 999,
// Deleted, do not use
k_ESteamNetworkingConfig_DELETED_EnumerateDevVars = 35,

View File

@ -1,4 +1,4 @@
//========= Copyright 1996-2022, Valve LLC, All rights reserved. ============
//========= Copyright 1996-2022, Valve LLC, All rights reserved. ============
#ifndef STEAMTYPES_H
#define STEAMTYPES_H
@ -171,6 +171,7 @@ typedef uint64 SteamAPICall_t;
const SteamAPICall_t k_uAPICallInvalid = 0x0;
typedef uint32 AccountID_t;
const AccountID_t k_uAccountIdInvalid = 0;
typedef uint32 PartnerId_t;
const PartnerId_t k_uPartnerIdInvalid = 0;