This commit is contained in:
Riley Labrecque
2020-01-05 13:44:27 -08:00
parent 8642a18746
commit aadc619a55
49 changed files with 1054 additions and 194 deletions
+16
View File
@@ -8,6 +8,22 @@ Copyright
Welcome to the Steamworks SDK. For documentation please see our partner Welcome to the Steamworks SDK. For documentation please see our partner
website at: http://partner.steamgames.com website at: http://partner.steamgames.com
----------------------------------------------------------------
v1.47 3rd December 2019
----------------------------------------------------------------
macOS
* Updated steamcmd binaries to be 64-bit
ISteamNetworkingSockets
* Added API to set configuration options atomically, at time of creation of the listen socket or connection
* Added API to send multiple messages efficiently, without copying the message payload
* Added API for relayed P2P connections where signaling/rendezvous goes through your own custom backend instead of the Steam servers
ISteamRemotePlay
* Added a function to invite friends to play via Remote Play Together
---------------------------------------------------------------- ----------------------------------------------------------------
v1.46 26th July 2019 v1.46 26th July 2019
---------------------------------------------------------------- ----------------------------------------------------------------
+1 -1
View File
@@ -42,7 +42,7 @@ public:
uint32 unSessionCount = SteamRemotePlay()->GetSessionCount(); uint32 unSessionCount = SteamRemotePlay()->GetSessionCount();
for ( uint32 iIndex = 0; iIndex < unSessionCount; iIndex++ ) for ( uint32 iIndex = 0; iIndex < unSessionCount; iIndex++ )
{ {
uint32 unSessionID = SteamRemotePlay()->GetSessionID( iIndex ); RemotePlaySessionID_t unSessionID = SteamRemotePlay()->GetSessionID( iIndex );
if ( !unSessionID ) if ( !unSessionID )
{ {
continue; continue;
+72 -2
View File
@@ -1285,6 +1285,26 @@ void CSpaceWarClient::OnSteamServerConnectFailure( SteamServerConnectFailure_t *
} }
//-----------------------------------------------------------------------------
// Purpose: Do work that doesn't need to happen every frame
//-----------------------------------------------------------------------------
void CSpaceWarClient::RunOccasionally()
{
if ( SteamUtils()->IsSteamChinaLauncher() )
{
SteamAPICall_t hCallHandle = SteamUser()->GetDurationControl();
if ( hCallHandle != k_uAPICallInvalid )
{
m_SteamCallResultDurationControl.Set( hCallHandle, this, &CSpaceWarClient::OnDurationControlCallResult );
}
}
// Service stats and achievements
m_pStatsAndAchievements->RunFrame();
}
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Main frame function, updates the state of the world and performs rendering // Purpose: Main frame function, updates the state of the world and performs rendering
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -1317,8 +1337,14 @@ void CSpaceWarClient::RunFrame()
// Run Steam client callbacks // Run Steam client callbacks
SteamAPI_RunCallbacks(); SteamAPI_RunCallbacks();
// For now, run stats/achievements every frame // Do work that runs infrequently. we do this every second.
m_pStatsAndAchievements->RunFrame(); static time_t tLastCheck = 0;
time_t tNow = time( nullptr );
if ( tNow != tLastCheck )
{
tLastCheck = tNow;
RunOccasionally();
}
// if we just transitioned state, perform on change handlers // if we just transitioned state, perform on change handlers
if ( m_bTransitionedGameState ) if ( m_bTransitionedGameState )
@@ -2432,6 +2458,7 @@ void CSpaceWarClient::LoadItemsWithPrices()
m_SteamCallResultRequestPrices.Set( hSteamAPICall, this, &CSpaceWarClient::OnRequestPricesResult ); m_SteamCallResultRequestPrices.Set( hSteamAPICall, this, &CSpaceWarClient::OnRequestPricesResult );
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: new Workshop was installed, load it instantly // Purpose: new Workshop was installed, load it instantly
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -2441,6 +2468,49 @@ void CSpaceWarClient::OnWorkshopItemInstalled( ItemInstalled_t *pParam )
LoadWorkshopItem( pParam->m_nPublishedFileId ); LoadWorkshopItem( pParam->m_nPublishedFileId );
} }
//-----------------------------------------------------------------------------
// Purpose: duration control / anti indulgence callback notification for Steam China
// (this can run from an API call, or from an asynchronous callback. see OnDurationControlCallResult)
//-----------------------------------------------------------------------------
void CSpaceWarClient::OnDurationControl( DurationControl_t *pParam )
{
const char *szExitPrompt = nullptr;
switch ( pParam->m_progress )
{
default:
break;
case k_EDurationControl_ExitSoon_3h:
szExitPrompt = "3h playtime since last 5h break";
break;
case k_EDurationControl_ExitSoon_5h:
szExitPrompt = "5h playtime today";
break;
case k_EDurationControl_ExitSoon_Night:
szExitPrompt = "10PM-8AM";
break;
}
if ( szExitPrompt != nullptr )
{
char rgch[ 256 ];
sprintf_safe( rgch, "Duration control: %s (remaining time: %d)\n",
szExitPrompt, pParam->m_csecsRemaining );
OutputDebugString( rgch );
// perform a clean exit
OnMenuSelection( k_EClientGameExiting );
}
else if ( pParam->m_csecsRemaining < 30 )
{
// Player doesn't have much playtime left, warn them
OutputDebugString( "Duration control: Playtime remaining is short - exit soon!\n" );
}
}
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Request prices from the Steam Inventory Service // Purpose: Request prices from the Steam Inventory Service
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
+17
View File
@@ -143,6 +143,9 @@ public:
// Run a game frame // Run a game frame
void RunFrame(); void RunFrame();
// Service calls that need to happen less frequently than every frame (e.g. every second)
void RunOccasionally();
// Checks for any incoming network data, then dispatches it // Checks for any incoming network data, then dispatches it
void ReceiveNetworkData(); void ReceiveNetworkData();
@@ -453,6 +456,20 @@ private:
// callback when new Workshop item was installed // callback when new Workshop item was installed
STEAM_CALLBACK(CSpaceWarClient, OnWorkshopItemInstalled, ItemInstalled_t); STEAM_CALLBACK(CSpaceWarClient, OnWorkshopItemInstalled, ItemInstalled_t);
// Steam China support. duration control callback can be posted asynchronously, but we also
// call it directly.
STEAM_CALLBACK( CSpaceWarClient, OnDurationControl, DurationControl_t );
// callresult callback, handles io failure
void OnDurationControlCallResult( DurationControl_t *pParam, bool bIOFailure )
{
if ( !bIOFailure )
{
OnDurationControl( pParam );
}
}
CCallResult<CSpaceWarClient, DurationControl_t> m_SteamCallResultDurationControl;
// callback when we ask the Inventory Service for prices // callback when we ask the Inventory Service for prices
void OnRequestPricesResult( SteamInventoryRequestPricesResult_t *pParam, bool bIOFailure ); void OnRequestPricesResult( SteamInventoryRequestPricesResult_t *pParam, bool bIOFailure );
CCallResult<CSpaceWarClient, SteamInventoryRequestPricesResult_t> m_SteamCallResultRequestPrices; CCallResult<CSpaceWarClient, SteamInventoryRequestPricesResult_t> m_SteamCallResultRequestPrices;
+2 -1
View File
@@ -74,7 +74,8 @@ CStatsAndAchievements::CStatsAndAchievements( IGameEngine *pGameEngine )
#pragma warning( pop ) #pragma warning( pop )
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Run a frame for the CStatsAndAchievements // Purpose: Run a frame for the CStatsAndAchievements. does not need to run at
// full frame rate.
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void CStatsAndAchievements::RunFrame() void CStatsAndAchievements::RunFrame()
{ {
+1 -1
View File
@@ -40,7 +40,7 @@ public:
// Constructor // Constructor
CStatsAndAchievements( IGameEngine *pGameEngine ); CStatsAndAchievements( IGameEngine *pGameEngine );
// Run a frame // Run a frame. Does not need to run at full frame rate.
void RunFrame(); void RunFrame();
// Display the stats and achievements // Display the stats and achievements
+4 -2
View File
@@ -56,7 +56,7 @@ public:
// set the local IP and Port to bind to // set the local IP and Port to bind to
// this must be set before CreateLocalUser() // this must be set before CreateLocalUser()
virtual void SetLocalIPBinding( uint32 unIP, uint16 usPort ) = 0; virtual void SetLocalIPBinding( const SteamIPAddress_t &unIP, uint16 usPort ) = 0;
// returns the ISteamFriends interface // returns the ISteamFriends interface
virtual ISteamFriends *GetISteamFriends( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; virtual ISteamFriends *GetISteamFriends( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
@@ -159,8 +159,10 @@ public:
// Steam Remote Play interface // Steam Remote Play interface
virtual ISteamRemotePlay *GetISteamRemotePlay( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0; virtual ISteamRemotePlay *GetISteamRemotePlay( HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char *pchVersion ) = 0;
STEAM_PRIVATE_API( virtual void DestroyAllInterfaces() = 0; )
}; };
#define STEAMCLIENT_INTERFACE_VERSION "SteamClient019" #define STEAMCLIENT_INTERFACE_VERSION "SteamClient020"
#ifndef STEAM_API_EXPORTS #ifndef STEAM_API_EXPORTS
+7 -2
View File
@@ -344,9 +344,15 @@ public:
// Rich Presence data is automatically shared between friends who are in the same game // Rich Presence data is automatically shared between friends who are in the same game
// Each user has a set of Key/Value pairs // Each user has a set of Key/Value pairs
// Note the following limits: k_cchMaxRichPresenceKeys, k_cchMaxRichPresenceKeyLength, k_cchMaxRichPresenceValueLength // Note the following limits: k_cchMaxRichPresenceKeys, k_cchMaxRichPresenceKeyLength, k_cchMaxRichPresenceValueLength
// There are two magic keys: // There are five magic keys:
// "status" - a UTF-8 string that will show up in the 'view game info' dialog in the Steam friends list // "status" - a UTF-8 string that will show up in the 'view game info' dialog in the Steam friends list
// "connect" - a UTF-8 string that contains the command-line for how a friend can connect to a game // "connect" - a UTF-8 string that contains the command-line for how a friend can connect to a game
// "steam_display" - Names a rich presence localization token that will be displayed in the viewing user's selected language
// in the Steam client UI. For more info: https://partner.steamgames.com/doc/api/ISteamFriends#richpresencelocalization
// "steam_player_group" - When set, indicates to the Steam client that the player is a member of a particular group. Players in the same group
// may be organized together in various places in the Steam UI.
// "steam_player_group_size" - When set, indicates the total number of players in the steam_player_group. The Steam client may use this number to
// display additional information about a group when all of the members are not part of a user's friends list.
// GetFriendRichPresence() returns an empty string "" if no value is set // GetFriendRichPresence() returns an empty string "" if no value is set
// SetRichPresence() to a NULL or an empty string deletes the key // SetRichPresence() to a NULL or an empty string deletes the key
// You can iterate the current set of keys for a friend with GetFriendRichPresenceKeyCount() // You can iterate the current set of keys for a friend with GetFriendRichPresenceKeyCount()
@@ -362,7 +368,6 @@ public:
// Rich invite support. // Rich invite support.
// If the target accepts the invite, a GameRichPresenceJoinRequested_t callback is posted containing the connect string. // If the target accepts the invite, a GameRichPresenceJoinRequested_t callback is posted containing the connect string.
// (Or you can configure yout game so that it is passed on the command line instead. This is a deprecated path; ask us if you really need this.) // (Or you can configure yout game so that it is passed on the command line instead. This is a deprecated path; ask us if you really need this.)
// Invites can only be sent to friends.
virtual bool InviteUserToGame( CSteamID steamIDFriend, const char *pchConnectString ) = 0; virtual bool InviteUserToGame( CSteamID steamIDFriend, const char *pchConnectString ) = 0;
// recently-played-with friends iteration // recently-played-with friends iteration
+2 -2
View File
@@ -199,7 +199,7 @@ public:
// Returns the public IP of the server according to Steam, useful when the server is // Returns the public IP of the server according to Steam, useful when the server is
// behind NAT and you want to advertise its IP in a lobby for other clients to directly // behind NAT and you want to advertise its IP in a lobby for other clients to directly
// connect to // connect to
virtual uint32 GetPublicIP() = 0; virtual SteamIPAddress_t GetPublicIP() = 0;
// These are in GameSocketShare mode, where instead of ISteamGameServer creating its own // These are in GameSocketShare mode, where instead of ISteamGameServer creating its own
// socket to talk to the master server on, it lets the game use its socket to forward messages // socket to talk to the master server on, it lets the game use its socket to forward messages
@@ -250,7 +250,7 @@ public:
}; };
#define STEAMGAMESERVER_INTERFACE_VERSION "SteamGameServer012" #define STEAMGAMESERVER_INTERFACE_VERSION "SteamGameServer013"
// Global accessor // Global accessor
inline ISteamGameServer *SteamGameServer(); inline ISteamGameServer *SteamGameServer();
+5 -5
View File
@@ -209,14 +209,14 @@ public:
// pass in 0 if you just want the default local IP // pass in 0 if you just want the default local IP
// unPort is the port to use // unPort is the port to use
// pass in 0 if you don't want users to be able to connect via IP/Port, but expect to be always peer-to-peer connections only // pass in 0 if you don't want users to be able to connect via IP/Port, but expect to be always peer-to-peer connections only
virtual SNetListenSocket_t CreateListenSocket( int nVirtualP2PPort, uint32 nIP, uint16 nPort, bool bAllowUseOfPacketRelay ) = 0; virtual SNetListenSocket_t CreateListenSocket( int nVirtualP2PPort, SteamIPAddress_t nIP, uint16 nPort, bool bAllowUseOfPacketRelay ) = 0;
// creates a socket and begin connection to a remote destination // creates a socket and begin connection to a remote destination
// can connect via a known steamID (client or game server), or directly to an IP // can connect via a known steamID (client or game server), or directly to an IP
// on success will trigger a SocketStatusCallback_t callback // on success will trigger a SocketStatusCallback_t callback
// on failure or timeout will trigger a SocketStatusCallback_t callback with a failure code in m_eSNetSocketState // on failure or timeout will trigger a SocketStatusCallback_t callback with a failure code in m_eSNetSocketState
virtual SNetSocket_t CreateP2PConnectionSocket( CSteamID steamIDTarget, int nVirtualPort, int nTimeoutSec, bool bAllowUseOfPacketRelay ) = 0; virtual SNetSocket_t CreateP2PConnectionSocket( CSteamID steamIDTarget, int nVirtualPort, int nTimeoutSec, bool bAllowUseOfPacketRelay ) = 0;
virtual SNetSocket_t CreateConnectionSocket( uint32 nIP, uint16 nPort, int nTimeoutSec ) = 0; virtual SNetSocket_t CreateConnectionSocket( SteamIPAddress_t nIP, uint16 nPort, int nTimeoutSec ) = 0;
// disconnects the connection to the socket, if any, and invalidates the handle // disconnects the connection to the socket, if any, and invalidates the handle
// any unread data on the socket will be thrown away // any unread data on the socket will be thrown away
@@ -258,11 +258,11 @@ public:
virtual bool RetrieveData( SNetListenSocket_t hListenSocket, void *pubDest, uint32 cubDest, uint32 *pcubMsgSize, SNetSocket_t *phSocket ) = 0; virtual bool RetrieveData( SNetListenSocket_t hListenSocket, void *pubDest, uint32 cubDest, uint32 *pcubMsgSize, SNetSocket_t *phSocket ) = 0;
// returns information about the specified socket, filling out the contents of the pointers // returns information about the specified socket, filling out the contents of the pointers
virtual bool GetSocketInfo( SNetSocket_t hSocket, CSteamID *pSteamIDRemote, int *peSocketStatus, uint32 *punIPRemote, uint16 *punPortRemote ) = 0; virtual bool GetSocketInfo( SNetSocket_t hSocket, CSteamID *pSteamIDRemote, int *peSocketStatus, SteamIPAddress_t *punIPRemote, uint16 *punPortRemote ) = 0;
// returns which local port the listen socket is bound to // returns which local port the listen socket is bound to
// *pnIP and *pnPort will be 0 if the socket is set to listen for P2P connections only // *pnIP and *pnPort will be 0 if the socket is set to listen for P2P connections only
virtual bool GetListenSocketInfo( SNetListenSocket_t hListenSocket, uint32 *pnIP, uint16 *pnPort ) = 0; virtual bool GetListenSocketInfo( SNetListenSocket_t hListenSocket, SteamIPAddress_t *pnIP, uint16 *pnPort ) = 0;
// returns true to describe how the socket ended up connecting // returns true to describe how the socket ended up connecting
virtual ESNetSocketConnectionType GetSocketConnectionType( SNetSocket_t hSocket ) = 0; virtual ESNetSocketConnectionType GetSocketConnectionType( SNetSocket_t hSocket ) = 0;
@@ -270,7 +270,7 @@ public:
// max packet size, in bytes // max packet size, in bytes
virtual int GetMaxPacketSize( SNetSocket_t hSocket ) = 0; virtual int GetMaxPacketSize( SNetSocket_t hSocket ) = 0;
}; };
#define STEAMNETWORKING_INTERFACE_VERSION "SteamNetworking005" #define STEAMNETWORKING_INTERFACE_VERSION "SteamNetworking006"
// Global interface accessor // Global interface accessor
inline ISteamNetworking *SteamNetworking(); inline ISteamNetworking *SteamNetworking();
+255 -38
View File
@@ -22,6 +22,8 @@
class ISteamNetworkingSocketsCallbacks; class ISteamNetworkingSocketsCallbacks;
struct SteamNetAuthenticationStatus_t; struct SteamNetAuthenticationStatus_t;
class ISteamNetworkingConnectionCustomSignaling;
class ISteamNetworkingCustomSignalingRecvContext;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
/// Lower level networking interface that more closely mirrors the standard /// Lower level networking interface that more closely mirrors the standard
@@ -46,15 +48,20 @@ public:
/// You must select a specific local port to listen on and set it /// You must select a specific local port to listen on and set it
/// the port field of the local address. /// the port field of the local address.
/// ///
/// Usually you wil set the IP portion of the address to zero, (SteamNetworkingIPAddr::Clear()). /// Usually you will set the IP portion of the address to zero (SteamNetworkingIPAddr::Clear()).
/// This means that you will not bind to any particular local interface. In addition, /// This means that you will not bind to any particular local interface (i.e. the same
/// if possible the socket will be bound in "dual stack" mode, which means that it can /// as INADDR_ANY in plain socket code). Furthermore, if possible the socket will be bound
/// accept both IPv4 and IPv6 clients. If you wish to bind a particular interface, then /// in "dual stack" mode, which means that it can accept both IPv4 and IPv6 client connections.
/// set the local address to the appropriate IPv4 or IPv6 IP. /// If you really do wish to bind a particular interface, then set the local address to the
/// appropriate IPv4 or IPv6 IP.
///
/// If you need to set any initial config options, pass them here. See
/// SteamNetworkingConfigValue_t for more about why this is preferable to
/// setting the options "immediately" after creation.
/// ///
/// When a client attempts to connect, a SteamNetConnectionStatusChangedCallback_t /// When a client attempts to connect, a SteamNetConnectionStatusChangedCallback_t
/// will be posted. The connection will be in the connecting state. /// will be posted. The connection will be in the connecting state.
virtual HSteamListenSocket CreateListenSocketIP( const SteamNetworkingIPAddr &localAddress ) = 0; virtual HSteamListenSocket CreateListenSocketIP( const SteamNetworkingIPAddr &localAddress, int nOptions, const SteamNetworkingConfigValue_t *pOptions ) = 0;
/// Creates a connection and begins talking to a "server" over UDP at the /// Creates a connection and begins talking to a "server" over UDP at the
/// given IPv4 or IPv6 address. The remote host must be listening with a /// given IPv4 or IPv6 address. The remote host must be listening with a
@@ -74,7 +81,11 @@ public:
/// distributed through some other out-of-band mechanism), you don't have any /// distributed through some other out-of-band mechanism), you don't have any
/// way of knowing who is actually on the other end, and thus are vulnerable to /// way of knowing who is actually on the other end, and thus are vulnerable to
/// man-in-the-middle attacks. /// man-in-the-middle attacks.
virtual HSteamNetConnection ConnectByIPAddress( const SteamNetworkingIPAddr &address ) = 0; ///
/// If you need to set any initial config options, pass them here. See
/// SteamNetworkingConfigValue_t for more about why this is preferable to
/// setting the options "immediately" after creation.
virtual HSteamNetConnection ConnectByIPAddress( const SteamNetworkingIPAddr &address, int nOptions, const SteamNetworkingConfigValue_t *pOptions ) = 0;
#ifdef STEAMNETWORKINGSOCKETS_ENABLE_SDR #ifdef STEAMNETWORKINGSOCKETS_ENABLE_SDR
/// Like CreateListenSocketIP, but clients will connect using ConnectP2P /// Like CreateListenSocketIP, but clients will connect using ConnectP2P
@@ -87,20 +98,24 @@ public:
/// ///
/// If you use this, you probably want to call ISteamNetworkingUtils::InitRelayNetworkAccess() /// If you use this, you probably want to call ISteamNetworkingUtils::InitRelayNetworkAccess()
/// when your app initializes /// when your app initializes
virtual HSteamListenSocket CreateListenSocketP2P( int nVirtualPort ) = 0; ///
/// If you need to set any initial config options, pass them here. See
/// SteamNetworkingConfigValue_t for more about why this is preferable to
/// setting the options "immediately" after creation.
virtual HSteamListenSocket CreateListenSocketP2P( int nVirtualPort, int nOptions, const SteamNetworkingConfigValue_t *pOptions ) = 0;
/// Begin connecting to a server that is identified using a platform-specific identifier. /// Begin connecting to a server that is identified using a platform-specific identifier.
/// This requires some sort of third party rendezvous service, and will depend on the /// This uses the default rendezvous service, which depends on the platform and library
/// platform and what other libraries and services you are integrating with. /// configuration. (E.g. on Steam, it goes through the steam backend.) The traffic is relayed
/// /// over the Steam Datagram Relay network.
/// At the time of this writing, there is only one supported rendezvous service: Steam.
/// Set the SteamID (whether "user" or "gameserver") and Steam will determine if the
/// client is online and facilitate a relay connection. Note that all P2P connections on
/// Steam are currently relayed.
/// ///
/// If you use this, you probably want to call ISteamNetworkingUtils::InitRelayNetworkAccess() /// If you use this, you probably want to call ISteamNetworkingUtils::InitRelayNetworkAccess()
/// when your app initializes /// when your app initializes
virtual HSteamNetConnection ConnectP2P( const SteamNetworkingIdentity &identityRemote, int nVirtualPort ) = 0; ///
/// If you need to set any initial config options, pass them here. See
/// SteamNetworkingConfigValue_t for more about why this is preferable to
/// setting the options "immediately" after creation.
virtual HSteamNetConnection ConnectP2P( const SteamNetworkingIdentity &identityRemote, int nVirtualPort, int nOptions, const SteamNetworkingConfigValue_t *pOptions ) = 0;
#endif #endif
/// Accept an incoming connection that has been received on a listen socket. /// Accept an incoming connection that has been received on a listen socket.
@@ -136,6 +151,12 @@ public:
/// Returns k_EResultInvalidState if the connection is not in the appropriate state. /// Returns k_EResultInvalidState if the connection is not in the appropriate state.
/// (Remember that the connection state could change in between the time that the /// (Remember that the connection state could change in between the time that the
/// notification being posted to the queue and when it is received by the application.) /// notification being posted to the queue and when it is received by the application.)
///
/// A note about connection configuration options. If you need to set any configuration
/// options that are common to all connections accepted through a particular listen
/// socket, consider setting the options on the listen socket, since such options are
/// inherited automatically. If you really do need to set options that are connection
/// specific, it is safe to set them on the connection before accepting the connection.
virtual EResult AcceptConnection( HSteamNetConnection hConn ) = 0; virtual EResult AcceptConnection( HSteamNetConnection hConn ) = 0;
/// Disconnects from the remote host and invalidates the connection handle. /// Disconnects from the remote host and invalidates the connection handle.
@@ -208,6 +229,9 @@ public:
/// sockets that does not write excessively small chunks will /// sockets that does not write excessively small chunks will
/// work without any changes. /// work without any changes.
/// ///
/// The pOutMessageNumber is an optional pointer to receive the
/// message number assigned to the message, if sending was successful.
///
/// Returns: /// Returns:
/// - k_EResultInvalidParam: invalid connection handle, or the individual message is too big. /// - k_EResultInvalidParam: invalid connection handle, or the individual message is too big.
/// (See k_cbMaxSteamNetworkingSocketsMessageSizeSend) /// (See k_cbMaxSteamNetworkingSocketsMessageSizeSend)
@@ -217,7 +241,41 @@ public:
/// we were not ready to send it. /// we were not ready to send it.
/// - k_EResultLimitExceeded: there was already too much data queued to be sent. /// - k_EResultLimitExceeded: there was already too much data queued to be sent.
/// (See k_ESteamNetworkingConfig_SendBufferSize) /// (See k_ESteamNetworkingConfig_SendBufferSize)
virtual EResult SendMessageToConnection( HSteamNetConnection hConn, const void *pData, uint32 cbData, int nSendFlags ) = 0; virtual EResult SendMessageToConnection( HSteamNetConnection hConn, const void *pData, uint32 cbData, int nSendFlags, int64 *pOutMessageNumber ) = 0;
/// Send one or more messages without copying the message payload.
/// This is the most efficient way to send messages. To use this
/// function, you must first allocate a message object using
/// ISteamNetworkingUtils::AllocateMessage. (Do not declare one
/// on the stack or allocate your own.)
///
/// You should fill in the message payload. You can either let
/// it allocate the buffer for you and then fill in the payload,
/// or if you already have a buffer allocated, you can just point
/// m_pData at your buffer and set the callback to the appropriate function
/// to free it. Note that if you use your own buffer, it MUST remain valid
/// until the callback is executed. And also note that your callback can be
/// invoked at ant time from any thread (perhaps even before SendMessages
/// returns!), so it MUST be fast and threadsafe.
///
/// You MUST also fill in:
/// - m_conn - the handle of the connection to send the message to
/// - m_nFlags - bitmask of k_nSteamNetworkingSend_xxx flags.
///
/// All other fields are currently reserved and should not be modified.
///
/// The library will take ownership of the message structures. They may
/// be modified or become invalid at any time, so you must not read them
/// after passing them to this function.
///
/// pOutMessageNumberOrResult is an optional array that will receive,
/// for each message, the message number that was assigned to the message
/// if sending was successful. If sending failed, then a negative EResult
/// valid is placed into the array. For example, the array will hold
/// -k_EResultInvalidState if the connection was in an invalid state.
/// See ISteamNetworkingSockets::SendMessageToConnection for possible
/// failure codes.
virtual void SendMessages( int nMessages, SteamNetworkingMessage_t *const *pMessages, int64 *pOutMessageNumberOrResult ) = 0;
/// Flush any messages waiting on the Nagle timer and send them /// Flush any messages waiting on the Nagle timer and send them
/// at the next transmission opportunity (often that means right now). /// at the next transmission opportunity (often that means right now).
@@ -347,23 +405,6 @@ public:
/// details, pass non-NULL to receive them. /// details, pass non-NULL to receive them.
virtual ESteamNetworkingAvailability GetAuthenticationStatus( SteamNetAuthenticationStatus_t *pDetails ) = 0; virtual ESteamNetworkingAvailability GetAuthenticationStatus( SteamNetAuthenticationStatus_t *pDetails ) = 0;
/// Certificate provision by the application. (On Steam, Steam will handle all this automatically)
#ifndef STEAMNETWORKINGSOCKETS_STEAM
/// Get blob that describes a certificate request. You can send this to your game coordinator.
/// Upon entry, *pcbBlob should contain the size of the buffer. On successful exit, it will
/// return the number of bytes that were populated. You can pass pBlob=NULL to query for the required
/// size. (256 bytes is a very conservative estimate.)
///
/// Pass this blob to your game coordinator and call SteamDatagram_CreateCert.
virtual bool GetCertificateRequest( int *pcbBlob, void *pBlob, SteamNetworkingErrMsg &errMsg ) = 0;
/// Set the certificate. The certificate blob should be the output of
/// SteamDatagram_CreateCert.
virtual bool SetCertificate( const void *pCertificate, int cbCertificate, SteamNetworkingErrMsg &errMsg ) = 0;
#endif
#ifdef STEAMNETWORKINGSOCKETS_ENABLE_SDR #ifdef STEAMNETWORKINGSOCKETS_ENABLE_SDR
// //
@@ -394,7 +435,11 @@ public:
/// ///
/// If you use this, you probably want to call ISteamNetworkingUtils::InitRelayNetworkAccess() /// If you use this, you probably want to call ISteamNetworkingUtils::InitRelayNetworkAccess()
/// when your app initializes /// when your app initializes
virtual HSteamNetConnection ConnectToHostedDedicatedServer( const SteamNetworkingIdentity &identityTarget, int nVirtualPort ) = 0; ///
/// If you need to set any initial config options, pass them here. See
/// SteamNetworkingConfigValue_t for more about why this is preferable to
/// setting the options "immediately" after creation.
virtual HSteamNetConnection ConnectToHostedDedicatedServer( const SteamNetworkingIdentity &identityTarget, int nVirtualPort, int nOptions, const SteamNetworkingConfigValue_t *pOptions ) = 0;
// //
// Servers hosted in data centers known to the Valve relay network // Servers hosted in data centers known to the Valve relay network
@@ -446,7 +491,11 @@ public:
/// configured, this call will fail. /// configured, this call will fail.
/// ///
/// Note that this call MUST be made through the SteamGameServerNetworkingSockets() interface /// Note that this call MUST be made through the SteamGameServerNetworkingSockets() interface
virtual HSteamListenSocket CreateHostedDedicatedServerListenSocket( int nVirtualPort ) = 0; ///
/// If you need to set any initial config options, pass them here. See
/// SteamNetworkingConfigValue_t for more about why this is preferable to
/// setting the options "immediately" after creation.
virtual HSteamListenSocket CreateHostedDedicatedServerListenSocket( int nVirtualPort, int nOptions, const SteamNetworkingConfigValue_t *pOptions ) = 0;
/// Generate an authentication blob that can be used to securely login with /// Generate an authentication blob that can be used to securely login with
/// your backend, using SteamDatagram_ParseHostedServerLogin. (See /// your backend, using SteamDatagram_ParseHostedServerLogin. (See
@@ -480,8 +529,97 @@ public:
/// and don't share it directly with clients. /// and don't share it directly with clients.
virtual EResult GetGameCoordinatorServerLogin( SteamDatagramGameCoordinatorServerLogin *pLoginInfo, int *pcbSignedBlob, void *pBlob ) = 0; virtual EResult GetGameCoordinatorServerLogin( SteamDatagramGameCoordinatorServerLogin *pLoginInfo, int *pcbSignedBlob, void *pBlob ) = 0;
//
// Relayed connections using custom signaling protocol
//
// This is used if you have your own method of sending out-of-band
// signaling / rendezvous messages through a mutually trusted channel.
//
/// Create a P2P "client" connection that does signaling over a custom
/// rendezvous/signaling channel.
///
/// pSignaling points to a new object that you create just for this connection.
/// It must stay valid until Release() is called. Once you pass the
/// object to this function, it assumes ownership. Release() will be called
/// from within the function call if the call fails. Furthermore, until Release()
/// is called, you should be prepared for methods to be invoked on your
/// object from any thread! You need to make sure your object is threadsafe!
/// Furthermore, you should make sure that dispatching the methods is done
/// as quickly as possible.
///
/// This function will immediately construct a connection in the "connecting"
/// state. Soon after (perhaps before this function returns, perhaps in another thread),
/// the connection will begin sending signaling messages by calling
/// ISteamNetworkingConnectionCustomSignaling::SendSignal.
///
/// When the remote peer accepts the connection (See
/// ISteamNetworkingCustomSignalingRecvContext::OnConnectRequest),
/// it will begin sending signaling messages. When these messages are received,
/// you can pass them to the connection using ReceivedP2PCustomSignal.
///
/// If you know the identity of the peer that you expect to be on the other end,
/// you can pass their identity to improve debug output or just detect bugs.
/// If you don't know their identity yet, you can pass NULL, and their
/// identity will be established in the connection handshake.
///
/// If you use this, you probably want to call ISteamNetworkingUtils::InitRelayNetworkAccess()
/// when your app initializes
///
/// If you need to set any initial config options, pass them here. See
/// SteamNetworkingConfigValue_t for more about why this is preferable to
/// setting the options "immediately" after creation.
virtual HSteamNetConnection ConnectP2PCustomSignaling( ISteamNetworkingConnectionCustomSignaling *pSignaling, const SteamNetworkingIdentity *pPeerIdentity, int nOptions, const SteamNetworkingConfigValue_t *pOptions ) = 0;
/// Called when custom signaling has received a message. When your
/// signaling channel receives a message, it should save off whatever
/// routing information was in the envelope into the context object,
/// and then pass the payload to this function.
///
/// A few different things can happen next, depending on the message:
///
/// - If the signal is associated with existing connection, it is dealt
/// with immediately. If any replies need to be sent, they will be
/// dispatched using the ISteamNetworkingConnectionCustomSignaling
/// associated with the connection.
/// - If the message represents a connection request (and the request
/// is not redundant for an existing connection), a new connection
/// will be created, and ReceivedConnectRequest will be called on your
/// context object to determine how to proceed.
/// - Otherwise, the message is for a connection that does not
/// exist (anymore). In this case, we *may* call SendRejectionReply
/// on your context object.
///
/// In any case, we will not save off pContext or access it after this
/// function returns.
///
/// Returns true if the message was parsed and dispatched without anything
/// unusual or suspicious happening. Returns false if there was some problem
/// with the message that prevented ordinary handling. (Debug output will
/// usually have more information.)
///
/// If you expect to be using relayed connections, then you probably want
/// to call ISteamNetworkingUtils::InitRelayNetworkAccess() when your app initializes
virtual bool ReceivedP2PCustomSignal( const void *pMsg, int cbMsg, ISteamNetworkingCustomSignalingRecvContext *pContext ) = 0;
#endif // #ifndef STEAMNETWORKINGSOCKETS_ENABLE_SDR #endif // #ifndef STEAMNETWORKINGSOCKETS_ENABLE_SDR
/// Certificate provision by the application. (On Steam, Steam will handle all this automatically)
#ifndef STEAMNETWORKINGSOCKETS_STEAM
/// Get blob that describes a certificate request. You can send this to your game coordinator.
/// Upon entry, *pcbBlob should contain the size of the buffer. On successful exit, it will
/// return the number of bytes that were populated. You can pass pBlob=NULL to query for the required
/// size. (256 bytes is a very conservative estimate.)
///
/// Pass this blob to your game coordinator and call SteamDatagram_CreateCert.
virtual bool GetCertificateRequest( int *pcbBlob, void *pBlob, SteamNetworkingErrMsg &errMsg ) = 0;
/// Set the certificate. The certificate blob should be the output of
/// SteamDatagram_CreateCert.
virtual bool SetCertificate( const void *pCertificate, int cbCertificate, SteamNetworkingErrMsg &errMsg ) = 0;
#endif
// Invoke all callbacks queued for this interface. // Invoke all callbacks queued for this interface.
// On Steam, callbacks are dispatched via the ordinary Steamworks callbacks mechanism. // On Steam, callbacks are dispatched via the ordinary Steamworks callbacks mechanism.
// So if you have code that is also targeting Steam, you should call this at about the // So if you have code that is also targeting Steam, you should call this at about the
@@ -492,7 +630,84 @@ public:
protected: protected:
~ISteamNetworkingSockets(); // Silence some warnings ~ISteamNetworkingSockets(); // Silence some warnings
}; };
#define STEAMNETWORKINGSOCKETS_INTERFACE_VERSION "SteamNetworkingSockets004" #define STEAMNETWORKINGSOCKETS_INTERFACE_VERSION "SteamNetworkingSockets006"
/// Interface used to send signaling messages for a particular connection.
/// You will need to construct one of these per connection.
///
/// - For connections initiated locally, you will construct it and pass
/// it to ISteamNetworkingSockets::ConnectP2PCustomSignaling.
/// - For connections initiated remotely and "accepted" locally, you
/// will return it from ISteamNetworkingCustomSignalingRecvContext::OnConnectRequest
class ISteamNetworkingConnectionCustomSignaling
{
public:
/// Called to send a rendezvous message to the remote peer. This may be called
/// from any thread, at any time, so you need to be thread-safe! Don't take
/// any locks that might hold while calling into SteamNetworkingSockets functions,
/// because this could lead to deadlocks.
///
/// Note that when initiating a connection, we may not know the identity
/// of the peer, if you did not specify it in ConnectP2PCustomSignaling.
///
/// Return true if a best-effort attempt was made to deliver the message.
/// If you return false, it is assumed that the situation is fatal;
/// the connection will be closed, and Release() will be called
/// eventually.
///
/// Signaling objects will not be shared between connections.
/// You can assume that the same value of hConn will be used
/// every time.
virtual bool SendSignal( HSteamNetConnection hConn, const SteamNetConnectionInfo_t &info, const void *pMsg, int cbMsg ) = 0;
/// Called when the connection no longer needs to send signals.
/// Note that this happens eventually (but not immediately) after
/// the connection is closed. Signals may need to be sent for a brief
/// time after the connection is closed, to clean up the connection.
virtual void Release() = 0;
};
/// Interface used when a custom signal is received.
/// See ISteamNetworkingSockets::ReceivedP2PCustomSignal
class ISteamNetworkingCustomSignalingRecvContext
{
public:
/// Called when the signal represents a request for a new connection.
///
/// If you want to ignore the request, just return NULL. In this case,
/// the peer will NOT receive any reply. You should consider ignoring
/// requests rather than actively rejecting them, as a security measure.
/// If you actively reject requests, then this makes it possible to detect
/// if a user is online or not, just by sending them a request.
///
/// If you wish to send back a rejection, then use
/// ISteamNetworkingSockets::CloseConnection() and then return NULL.
/// We will marshal a properly formatted rejection signal and
/// call SendRejectionSignal() so you can send it to them.
///
/// If you return a signaling object, the connection is NOT immediately
/// accepted by default. Instead, it stays in the "connecting" state,
/// and the usual callback is posted, and your app can accept the
/// connection using ISteamNetworkingSockets::AcceptConnection. This
/// may be useful so that these sorts of connections can be more similar
/// to your application code as other types of connections accepted on
/// a listen socket. If this is not useful and you want to skip this
/// callback process and immediately accept the connection, call
/// ISteamNetworkingSockets::AcceptConnection before returning the
/// signaling object.
///
/// After accepting a connection (through either means), the connection
/// will transition into the "finding route" state.
virtual ISteamNetworkingConnectionCustomSignaling *OnConnectRequest( HSteamNetConnection hConn, const SteamNetworkingIdentity &identityPeer ) = 0;
/// This is called actively communication rejection or failure
/// to the incoming message. If you intend to ignore all incoming requests
/// that you do not wish to accept, then it's not strictly necessary to
/// implement this.
virtual void SendRejectionSignal( const SteamNetworkingIdentity &identityPeer, const void *pMsg, int cbMsg ) = 0;
};
extern "C" { extern "C" {
@@ -506,7 +721,7 @@ extern "C" {
inline ISteamNetworkingSockets *SteamNetworkingSockets() { return SteamNetworkingSockets_Lib(); } inline ISteamNetworkingSockets *SteamNetworkingSockets() { return SteamNetworkingSockets_Lib(); }
inline ISteamNetworkingSockets *SteamGameServerNetworkingSockets() { return SteamGameServerNetworkingSockets_Lib(); } inline ISteamNetworkingSockets *SteamGameServerNetworkingSockets() { return SteamGameServerNetworkingSockets_Lib(); }
#elif defined( STEAMNETWORKINGSOCKETS_OPENSOURCE ) #elif defined( STEAMNETWORKINGSOCKETS_OPENSOURCE ) || defined( STEAMNETWORKINGSOCKETS_STREAMINGCLIENT )
// Opensource GameNetworkingSockets // Opensource GameNetworkingSockets
STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingSockets *SteamNetworkingSockets(); STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingSockets *SteamNetworkingSockets();
@@ -584,6 +799,8 @@ struct SteamNetConnectionStatusChangedCallback_t
/// - The list of trusted CA certificates that might be relevant for this /// - The list of trusted CA certificates that might be relevant for this
/// app. /// app.
/// - A valid certificate issued by a CA. /// - A valid certificate issued by a CA.
///
/// This callback is posted whenever the state of our readiness changes.
struct SteamNetAuthenticationStatus_t struct SteamNetAuthenticationStatus_t
{ {
enum { k_iCallback = k_iSteamNetworkingSocketsCallbacks + 2 }; enum { k_iCallback = k_iSteamNetworkingSocketsCallbacks + 2 };
+57 -5
View File
@@ -22,6 +22,35 @@ struct SteamRelayNetworkStatus_t;
class ISteamNetworkingUtils class ISteamNetworkingUtils
{ {
public: public:
//
// Efficient message sending
//
/// Allocate and initialize a message object. Usually the reason
/// you call this is to pass it to ISteamNetworkingSockets::SendMessages.
/// The returned object will have all of the relevant fields cleared to zero.
///
/// Optionally you can also request that this system allocate space to
/// hold the payload itself. If cbAllocateBuffer is nonzero, the system
/// will allocate memory to hold a payload of at least cbAllocateBuffer bytes.
/// m_pData will point to the allocated buffer, m_cbSize will be set to the
/// size, and m_pfnFreeData will be set to the proper function to free up
/// the buffer.
///
/// If cbAllocateBuffer=0, then no buffer is allocated. m_pData will be NULL,
/// m_cbSize will be zero, and m_pfnFreeData will be NULL. You will need to
/// set each of these.
///
/// You can use SteamNetworkingMessage_t::Release to free up the message
/// bookkeeping object and any associated buffer. See
/// ISteamNetworkingSockets::SendMessages for details on reference
/// counting and ownership.
virtual SteamNetworkingMessage_t *AllocateMessage( int cbAllocateBuffer ) = 0;
//
// Access to Steam Datagram Relay (SDR) network
//
#ifdef STEAMNETWORKINGSOCKETS_ENABLE_SDR #ifdef STEAMNETWORKINGSOCKETS_ENABLE_SDR
// //
@@ -203,8 +232,9 @@ public:
/// ///
/// Except when debugging, you should only use k_ESteamNetworkingSocketsDebugOutputType_Msg /// Except when debugging, you should only use k_ESteamNetworkingSocketsDebugOutputType_Msg
/// or k_ESteamNetworkingSocketsDebugOutputType_Warning. For best performance, do NOT /// or k_ESteamNetworkingSocketsDebugOutputType_Warning. For best performance, do NOT
/// request a high detail level and then filter out messages in your callback. Instead, /// request a high detail level and then filter out messages in your callback. This incurs
/// call function function to adjust the desired level of detail. /// all of the expense of formatting the messages, which are then discarded. Setting a high
/// priority value (low numeric value) here allows the library to avoid doing this work.
/// ///
/// IMPORTANT: This may be called from a service thread, while we own a mutex, etc. /// IMPORTANT: This may be called from a service thread, while we own a mutex, etc.
/// Your output function must be threadsafe and fast! Do not make any other /// Your output function must be threadsafe and fast! Do not make any other
@@ -228,7 +258,7 @@ public:
/// - eScope: Onto what type of object are you applying the setting? /// - eScope: Onto what type of object are you applying the setting?
/// - scopeArg: Which object you want to change? (Ignored for global scope). E.g. connection handle, listen socket handle, interface pointer, etc. /// - scopeArg: Which object you want to change? (Ignored for global scope). E.g. connection handle, listen socket handle, interface pointer, etc.
/// - eDataType: What type of data is in the buffer at pValue? This must match the type of the variable exactly! /// - eDataType: What type of data is in the buffer at pValue? This must match the type of the variable exactly!
/// - pArg: Value to set it to. You can pass NULL to remove a non-global sett at this scope, /// - pArg: Value to set it to. You can pass NULL to remove a non-global setting at this scope,
/// causing the value for that object to use global defaults. Or at global scope, passing NULL /// causing the value for that object to use global defaults. Or at global scope, passing NULL
/// will reset any custom value and restore it to the system default. /// will reset any custom value and restore it to the system default.
/// NOTE: When setting callback functions, do not pass the function pointer directly. /// NOTE: When setting callback functions, do not pass the function pointer directly.
@@ -236,6 +266,12 @@ public:
virtual bool SetConfigValue( ESteamNetworkingConfigValue eValue, ESteamNetworkingConfigScope eScopeType, intptr_t scopeObj, virtual bool SetConfigValue( ESteamNetworkingConfigValue eValue, ESteamNetworkingConfigScope eScopeType, intptr_t scopeObj,
ESteamNetworkingConfigDataType eDataType, const void *pArg ) = 0; ESteamNetworkingConfigDataType eDataType, const void *pArg ) = 0;
/// Set a configuration value, using a struct to pass the value.
/// (This is just a convenience shortcut; see below for the implementation and
/// a little insight into how SteamNetworkingConfigValue_t is used when
/// setting config options during listen socket and connection creation.)
bool SetConfigValueStruct( const SteamNetworkingConfigValue_t &opt, ESteamNetworkingConfigScope eScopeType, intptr_t scopeObj );
/// Get a configuration value. /// Get a configuration value.
/// - eValue: which value to fetch /// - eValue: which value to fetch
/// - eScopeType: query setting on what type of object /// - eScopeType: query setting on what type of object
@@ -250,6 +286,9 @@ public:
/// pOutNextValue can be used to iterate through all of the known configuration values. /// pOutNextValue can be used to iterate through all of the known configuration values.
/// (Use GetFirstConfigValue() to begin the iteration, will be k_ESteamNetworkingConfig_Invalid on the last value) /// (Use GetFirstConfigValue() to begin the iteration, will be k_ESteamNetworkingConfig_Invalid on the last value)
/// Any of the output parameters can be NULL if you do not need that information. /// Any of the output parameters can be NULL if you do not need that information.
///
/// See k_ESteamNetworkingConfig_EnumerateDevVars for some more info about "dev" variables,
/// which are usually excluded from the set of variables enumerated using this function.
virtual bool GetConfigValueInfo( ESteamNetworkingConfigValue eValue, const char **pOutName, ESteamNetworkingConfigDataType *pOutDataType, ESteamNetworkingConfigScope *pOutScope, ESteamNetworkingConfigValue *pOutNextValue ) = 0; virtual bool GetConfigValueInfo( ESteamNetworkingConfigValue eValue, const char **pOutName, ESteamNetworkingConfigDataType *pOutDataType, ESteamNetworkingConfigScope *pOutScope, ESteamNetworkingConfigValue *pOutNextValue ) = 0;
/// Return the lowest numbered configuration value available in the current environment. /// Return the lowest numbered configuration value available in the current environment.
@@ -265,7 +304,7 @@ public:
protected: protected:
~ISteamNetworkingUtils(); // Silence some warnings ~ISteamNetworkingUtils(); // Silence some warnings
}; };
#define STEAMNETWORKINGUTILS_INTERFACE_VERSION "SteamNetworkingUtils002" #define STEAMNETWORKINGUTILS_INTERFACE_VERSION "SteamNetworkingUtils003"
// Global accessor. // Global accessor.
#ifdef STEAMNETWORKINGSOCKETS_STANDALONELIB #ifdef STEAMNETWORKINGSOCKETS_STANDALONELIB
@@ -278,7 +317,13 @@ protected:
// Steamworks SDK // Steamworks SDK
inline ISteamNetworkingUtils *SteamNetworkingUtils(); inline ISteamNetworkingUtils *SteamNetworkingUtils();
STEAM_DEFINE_INTERFACE_ACCESSOR( ISteamNetworkingUtils *, SteamNetworkingUtils, SteamInternal_FindOrCreateUserInterface( 0, STEAMNETWORKINGUTILS_INTERFACE_VERSION ) ); STEAM_DEFINE_INTERFACE_ACCESSOR( ISteamNetworkingUtils *, SteamNetworkingUtils,
/* Prefer user version of the interface. But if it isn't found, then use
gameserver one. Yes, this is a completely terrible hack */
SteamInternal_FindOrCreateUserInterface( 0, STEAMNETWORKINGUTILS_INTERFACE_VERSION ) ?
SteamInternal_FindOrCreateUserInterface( 0, STEAMNETWORKINGUTILS_INTERFACE_VERSION ) :
SteamInternal_FindOrCreateGameServerInterface( 0, STEAMNETWORKINGUTILS_INTERFACE_VERSION )
)
#endif #endif
/// A struct used to describe our readiness to use the relay network. /// A struct used to describe our readiness to use the relay network.
@@ -331,6 +376,13 @@ inline bool ISteamNetworkingUtils::SetGlobalConfigValueString( ESteamNetworkingC
inline bool ISteamNetworkingUtils::SetConnectionConfigValueInt32( HSteamNetConnection hConn, ESteamNetworkingConfigValue eValue, int32 val ) { return SetConfigValue( eValue, k_ESteamNetworkingConfig_Connection, hConn, k_ESteamNetworkingConfig_Int32, &val ); } inline bool ISteamNetworkingUtils::SetConnectionConfigValueInt32( HSteamNetConnection hConn, ESteamNetworkingConfigValue eValue, int32 val ) { return SetConfigValue( eValue, k_ESteamNetworkingConfig_Connection, hConn, k_ESteamNetworkingConfig_Int32, &val ); }
inline bool ISteamNetworkingUtils::SetConnectionConfigValueFloat( HSteamNetConnection hConn, ESteamNetworkingConfigValue eValue, float val ) { return SetConfigValue( eValue, k_ESteamNetworkingConfig_Connection, hConn, k_ESteamNetworkingConfig_Float, &val ); } inline bool ISteamNetworkingUtils::SetConnectionConfigValueFloat( HSteamNetConnection hConn, ESteamNetworkingConfigValue eValue, float val ) { return SetConfigValue( eValue, k_ESteamNetworkingConfig_Connection, hConn, k_ESteamNetworkingConfig_Float, &val ); }
inline bool ISteamNetworkingUtils::SetConnectionConfigValueString( HSteamNetConnection hConn, ESteamNetworkingConfigValue eValue, const char *val ) { return SetConfigValue( eValue, k_ESteamNetworkingConfig_Connection, hConn, k_ESteamNetworkingConfig_String, val ); } inline bool ISteamNetworkingUtils::SetConnectionConfigValueString( HSteamNetConnection hConn, ESteamNetworkingConfigValue eValue, const char *val ) { return SetConfigValue( eValue, k_ESteamNetworkingConfig_Connection, hConn, k_ESteamNetworkingConfig_String, val ); }
inline bool ISteamNetworkingUtils::SetConfigValueStruct( const SteamNetworkingConfigValue_t &opt, ESteamNetworkingConfigScope eScopeType, intptr_t scopeObj )
{
// Locate the argument. Strings are a special case, since the
// "value" (the whole string buffer) doesn't fit in the struct
const void *pVal = ( opt.m_eDataType == k_ESteamNetworkingConfig_String ) ? (const void *)opt.m_val.m_string : (const void *)&opt.m_val;
return SetConfigValue( opt.m_eValue, eScopeType, scopeObj, opt.m_eDataType, pVal );
}
#if !defined( STEAMNETWORKINGSOCKETS_STATIC_LINK ) && defined( STEAMNETWORKINGSOCKETS_STEAMCLIENT ) #if !defined( STEAMNETWORKINGSOCKETS_STATIC_LINK ) && defined( STEAMNETWORKINGSOCKETS_STEAMCLIENT )
inline void SteamNetworkingIPAddr::ToString( char *buf, size_t cbBuf, bool bWithPort ) const { SteamNetworkingUtils()->SteamNetworkingIPAddr_ToString( *this, buf, cbBuf, bWithPort ); } inline void SteamNetworkingIPAddr::ToString( char *buf, size_t cbBuf, bool bWithPort ) const { SteamNetworkingUtils()->SteamNetworkingIPAddr_ToString( *this, buf, cbBuf, bWithPort ); }
+19 -12
View File
@@ -14,13 +14,16 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
enum ESteamDeviceFormFactor enum ESteamDeviceFormFactor
{ {
k_ESteamDeviceFormFactorUnknown, k_ESteamDeviceFormFactorUnknown = 0,
k_ESteamDeviceFormFactorPhone, k_ESteamDeviceFormFactorPhone = 1,
k_ESteamDeviceFormFactorTablet, k_ESteamDeviceFormFactorTablet = 2,
k_ESteamDeviceFormFactorComputer, k_ESteamDeviceFormFactorComputer = 3,
k_ESteamDeviceFormFactorTV, k_ESteamDeviceFormFactorTV = 4,
}; };
// Steam Remote Play session ID
typedef uint32 RemotePlaySessionID_t;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: Functions to provide information about Steam Remote Play sessions // Purpose: Functions to provide information about Steam Remote Play sessions
@@ -32,21 +35,25 @@ public:
virtual uint32 GetSessionCount() = 0; virtual uint32 GetSessionCount() = 0;
// Get the currently connected Steam Remote Play session ID at the specified index. Returns zero if index is out of bounds. // Get the currently connected Steam Remote Play session ID at the specified index. Returns zero if index is out of bounds.
virtual uint32 GetSessionID( int iSessionIndex ) = 0; virtual RemotePlaySessionID_t GetSessionID( int iSessionIndex ) = 0;
// Get the SteamID of the connected user // Get the SteamID of the connected user
virtual CSteamID GetSessionSteamID( uint32 unSessionID ) = 0; virtual CSteamID GetSessionSteamID( RemotePlaySessionID_t unSessionID ) = 0;
// Get the name of the session client device // Get the name of the session client device
// This returns NULL if the sessionID is not valid // This returns NULL if the sessionID is not valid
virtual const char *GetSessionClientName( uint32 unSessionID ) = 0; virtual const char *GetSessionClientName( RemotePlaySessionID_t unSessionID ) = 0;
// Get the form factor of the session client device // Get the form factor of the session client device
virtual ESteamDeviceFormFactor GetSessionClientFormFactor( uint32 unSessionID ) = 0; virtual ESteamDeviceFormFactor GetSessionClientFormFactor( RemotePlaySessionID_t unSessionID ) = 0;
// Get the resolution, in pixels, of the session client device // Get the resolution, in pixels, of the session client device
// This is set to 0x0 if the resolution is not available // This is set to 0x0 if the resolution is not available
virtual bool BGetSessionClientResolution( uint32 unSessionID, int *pnResolutionX, int *pnResolutionY ) = 0; virtual bool BGetSessionClientResolution( RemotePlaySessionID_t unSessionID, int *pnResolutionX, int *pnResolutionY ) = 0;
// Invite a friend to Remote Play Together
// This returns false if the invite can't be sent
virtual bool BSendRemotePlayTogetherInvite( CSteamID steamIDFriend ) = 0;
}; };
#define STEAMREMOTEPLAY_INTERFACE_VERSION "STEAMREMOTEPLAY_INTERFACE_VERSION001" #define STEAMREMOTEPLAY_INTERFACE_VERSION "STEAMREMOTEPLAY_INTERFACE_VERSION001"
@@ -66,12 +73,12 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamRemotePlay *, SteamRemotePlay, STEAM
STEAM_CALLBACK_BEGIN( SteamRemotePlaySessionConnected_t, k_iSteamRemotePlayCallbacks + 1 ) STEAM_CALLBACK_BEGIN( SteamRemotePlaySessionConnected_t, k_iSteamRemotePlayCallbacks + 1 )
STEAM_CALLBACK_MEMBER( 0, uint32, m_unSessionID ) STEAM_CALLBACK_MEMBER( 0, RemotePlaySessionID_t, m_unSessionID )
STEAM_CALLBACK_END( 0 ) STEAM_CALLBACK_END( 0 )
STEAM_CALLBACK_BEGIN( SteamRemotePlaySessionDisconnected_t, k_iSteamRemotePlayCallbacks + 2 ) STEAM_CALLBACK_BEGIN( SteamRemotePlaySessionDisconnected_t, k_iSteamRemotePlayCallbacks + 2 )
STEAM_CALLBACK_MEMBER( 0, uint32, m_unSessionID ) STEAM_CALLBACK_MEMBER( 0, RemotePlaySessionID_t, m_unSessionID )
STEAM_CALLBACK_END( 0 ) STEAM_CALLBACK_END( 0 )
+2 -1
View File
@@ -65,9 +65,10 @@ enum ERemoteStoragePlatform
k_ERemoteStoragePlatformOSX = (1 << 1), k_ERemoteStoragePlatformOSX = (1 << 1),
k_ERemoteStoragePlatformPS3 = (1 << 2), k_ERemoteStoragePlatformPS3 = (1 << 2),
k_ERemoteStoragePlatformLinux = (1 << 3), k_ERemoteStoragePlatformLinux = (1 << 3),
k_ERemoteStoragePlatformReserved2 = (1 << 4), k_ERemoteStoragePlatformSwitch = (1 << 4),
k_ERemoteStoragePlatformAndroid = (1 << 5), k_ERemoteStoragePlatformAndroid = (1 << 5),
k_ERemoteStoragePlatformIOS = (1 << 6), k_ERemoteStoragePlatformIOS = (1 << 6),
// NB we get one more before we need to widen some things
k_ERemoteStoragePlatformAll = 0xffffffff k_ERemoteStoragePlatformAll = 0xffffffff
}; };
+3 -2
View File
@@ -47,7 +47,7 @@ enum EUGCMatchingUGCType
k_EUGCMatchingUGCType_UsableInGame = 10, // ready-to-use items and integrated guides k_EUGCMatchingUGCType_UsableInGame = 10, // ready-to-use items and integrated guides
k_EUGCMatchingUGCType_ControllerBindings = 11, k_EUGCMatchingUGCType_ControllerBindings = 11,
k_EUGCMatchingUGCType_GameManagedItems = 12, // game managed items (not managed by users) k_EUGCMatchingUGCType_GameManagedItems = 12, // game managed items (not managed by users)
k_EUGCMatchingUGCType_All = ~0, // return everything k_EUGCMatchingUGCType_All = ~0, // @note: will only be valid for CreateQueryUserUGCRequest requests
}; };
// Different lists of published UGC for a user. // Different lists of published UGC for a user.
@@ -234,6 +234,7 @@ public:
// Options to set for querying UGC // Options to set for querying UGC
virtual bool AddRequiredTag( UGCQueryHandle_t handle, const char *pTagName ) = 0; virtual bool AddRequiredTag( UGCQueryHandle_t handle, const char *pTagName ) = 0;
virtual bool AddRequiredTagGroup( UGCQueryHandle_t handle, const SteamParamStringArray_t *pTagGroups ) = 0; // match any of the tags in this group
virtual bool AddExcludedTag( UGCQueryHandle_t handle, const char *pTagName ) = 0; virtual bool AddExcludedTag( UGCQueryHandle_t handle, const char *pTagName ) = 0;
virtual bool SetReturnOnlyIDs( UGCQueryHandle_t handle, bool bReturnOnlyIDs ) = 0; virtual bool SetReturnOnlyIDs( UGCQueryHandle_t handle, bool bReturnOnlyIDs ) = 0;
virtual bool SetReturnKeyValueTags( UGCQueryHandle_t handle, bool bReturnKeyValueTags ) = 0; virtual bool SetReturnKeyValueTags( UGCQueryHandle_t handle, bool bReturnKeyValueTags ) = 0;
@@ -353,7 +354,7 @@ public:
virtual SteamAPICall_t DeleteItem( PublishedFileId_t nPublishedFileID ) = 0; virtual SteamAPICall_t DeleteItem( PublishedFileId_t nPublishedFileID ) = 0;
}; };
#define STEAMUGC_INTERFACE_VERSION "STEAMUGC_INTERFACE_VERSION013" #define STEAMUGC_INTERFACE_VERSION "STEAMUGC_INTERFACE_VERSION014"
// Global interface accessor // Global interface accessor
inline ISteamUGC *SteamUGC(); inline ISteamUGC *SteamUGC();
+14 -5
View File
@@ -168,7 +168,12 @@ public:
STEAM_CALL_RESULT( EncryptedAppTicketResponse_t ) STEAM_CALL_RESULT( EncryptedAppTicketResponse_t )
virtual SteamAPICall_t RequestEncryptedAppTicket( void *pDataToInclude, int cbDataToInclude ) = 0; virtual SteamAPICall_t RequestEncryptedAppTicket( void *pDataToInclude, int cbDataToInclude ) = 0;
// retrieve a finished ticket // 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; virtual bool GetEncryptedAppTicket( void *pTicket, int cbMaxTicket, uint32 *pcbTicket ) = 0;
// Trading Card badges data access // Trading Card badges data access
@@ -390,8 +395,8 @@ struct MarketEligibilityResponse_t
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Purpose: sent for games with enabled anti indulgence / duration control, for // Purpose: sent for games with enabled anti indulgence / duration control, for
// enabled users. Lets the game know whether persistent rewards or XP should be // enabled users. Lets the game know whether the user can keep playing or
// granted at normal rate, half rate, or zero rate. // whether the game should exit, and returns info about remaining gameplay time.
// //
// This callback is fired asynchronously in response to timers triggering. // This callback is fired asynchronously in response to timers triggering.
// It is also fired in response to calls to GetDurationControl(). // It is also fired in response to calls to GetDurationControl().
@@ -404,9 +409,13 @@ struct DurationControl_t
AppId_t m_appid; // appid generating playtime AppId_t m_appid; // appid generating playtime
bool m_bApplicable; // is duration control applicable to user + game combination bool m_bApplicable; // is duration control applicable to user + game combination
int32 m_csecsLast5h; // playtime in trailing 5 hour window plus current session, in seconds int32 m_csecsLast5h; // playtime since most recent 5 hour gap in playtime, only counting up to regulatory limit of playtime, in seconds
EDurationControlProgress m_progress; // recommended progress
EDurationControlProgress m_progress; // recommended progress (either everything is fine, or please exit game)
EDurationControlNotification m_notification; // notification to show, if any (always k_EDurationControlNotification_None for API calls) EDurationControlNotification m_notification; // notification to show, if any (always k_EDurationControlNotification_None for API calls)
int32 m_csecsToday; // playtime on current calendar day
int32 m_csecsRemaining; // playtime remaining until the user hits a regulatory limit
}; };
+6 -3
View File
@@ -41,7 +41,6 @@ enum EGamepadTextInputLineMode
k_EGamepadTextInputLineModeMultipleLines = 1 k_EGamepadTextInputLineModeMultipleLines = 1
}; };
// function prototype for warning message hook // function prototype for warning message hook
#if defined( POSIX ) #if defined( POSIX )
#define __cdecl #define __cdecl
@@ -160,10 +159,10 @@ public:
// ask SteamUI to create and render its OpenVR dashboard // ask SteamUI to create and render its OpenVR dashboard
virtual void StartVRDashboard() = 0; virtual void StartVRDashboard() = 0;
// Returns true if the HMD content will be streamed via Steam In-Home Streaming // Returns true if the HMD content will be streamed via Steam Remote Play
virtual bool IsVRHeadsetStreamingEnabled() = 0; virtual bool IsVRHeadsetStreamingEnabled() = 0;
// Set whether the HMD content will be streamed via Steam In-Home Streaming // Set whether the HMD content will be streamed via Steam Remote Play
// If this is set to true, then the scene in the HMD headset will be streamed, and remote input will not be allowed. // If this is set to true, then the scene in the HMD headset will be streamed, and remote input will not be allowed.
// If this is set to false, then the application window will be streamed instead, and remote input will be allowed. // If this is set to false, then the application window will be streamed instead, and remote input will be allowed.
// The default is true unless "VRHeadsetStreaming" "0" is in the extended appinfo for a game. // The default is true unless "VRHeadsetStreaming" "0" is in the extended appinfo for a game.
@@ -184,6 +183,10 @@ public:
// bLegalOnly should be false if you want profanity and legally required filtering (where required) and true if you want legally required filtering only // bLegalOnly should be false if you want profanity and legally required filtering (where required) and true if you want legally required filtering only
// Returns the number of characters (not bytes) filtered. // Returns the number of characters (not bytes) filtered.
virtual int FilterText( char* pchOutFilteredText, uint32 nByteSizeOutFilteredText, const char * pchInputMessage, bool bLegalOnly ) = 0; virtual int FilterText( char* pchOutFilteredText, uint32 nByteSizeOutFilteredText, const char * pchInputMessage, bool bLegalOnly ) = 0;
// Return what we believe your current ipv6 connectivity to "the internet" is on the specified protocol.
// This does NOT tell you if the Steam client is currently connected to Steam via ipv6.
virtual ESteamIPv6ConnectivityState GetIPv6ConnectivityState( ESteamIPv6ConnectivityProtocol eProtocol ) = 0;
}; };
#define STEAMUTILS_INTERFACE_VERSION "SteamUtils009" #define STEAMUTILS_INTERFACE_VERSION "SteamUtils009"
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+78 -20
View File
@@ -73,9 +73,14 @@
,{"typedef": "SteamItemDef_t","type": "int32"} ,{"typedef": "SteamItemDef_t","type": "int32"}
,{"typedef": "SteamInventoryResult_t","type": "int32"} ,{"typedef": "SteamInventoryResult_t","type": "int32"}
,{"typedef": "SteamInventoryUpdateHandle_t","type": "uint64"} ,{"typedef": "SteamInventoryUpdateHandle_t","type": "uint64"}
,{"typedef": "RemotePlaySessionID_t","type": "uint32"}
], ],
"enums":[ "enums":[
{"enumname": "EUniverse","values": [ {"enumname": "ESteamIPType","values": [
{"name": "k_ESteamIPTypeIPv4","value": "0"}
,{"name": "k_ESteamIPTypeIPv6","value": "1"}
]}
, {"enumname": "EUniverse","values": [
{"name": "k_EUniverseInvalid","value": "0"} {"name": "k_EUniverseInvalid","value": "0"}
,{"name": "k_EUniversePublic","value": "1"} ,{"name": "k_EUniversePublic","value": "1"}
,{"name": "k_EUniverseBeta","value": "2"} ,{"name": "k_EUniverseBeta","value": "2"}
@@ -84,7 +89,8 @@
,{"name": "k_EUniverseMax","value": "5"} ,{"name": "k_EUniverseMax","value": "5"}
]} ]}
, {"enumname": "EResult","values": [ , {"enumname": "EResult","values": [
{"name": "k_EResultOK","value": "1"} {"name": "k_EResultNone","value": "0"}
,{"name": "k_EResultOK","value": "1"}
,{"name": "k_EResultFail","value": "2"} ,{"name": "k_EResultFail","value": "2"}
,{"name": "k_EResultNoConnection","value": "3"} ,{"name": "k_EResultNoConnection","value": "3"}
,{"name": "k_EResultInvalidPassword","value": "5"} ,{"name": "k_EResultInvalidPassword","value": "5"}
@@ -294,6 +300,8 @@
,{"name": "k_EAppOwnershipFlags_RentalNotActivated","value": "65536"} ,{"name": "k_EAppOwnershipFlags_RentalNotActivated","value": "65536"}
,{"name": "k_EAppOwnershipFlags_Rental","value": "131072"} ,{"name": "k_EAppOwnershipFlags_Rental","value": "131072"}
,{"name": "k_EAppOwnershipFlags_SiteLicense","value": "262144"} ,{"name": "k_EAppOwnershipFlags_SiteLicense","value": "262144"}
,{"name": "k_EAppOwnershipFlags_LegacyFreeSub","value": "524288"}
,{"name": "k_EAppOwnershipFlags_InvalidOSType","value": "1048576"}
]} ]}
, {"enumname": "EAppType","values": [ , {"enumname": "EAppType","values": [
{"name": "k_EAppType_Invalid","value": "0"} {"name": "k_EAppType_Invalid","value": "0"}
@@ -310,9 +318,9 @@
,{"name": "k_EAppType_Franchise","value": "1024"} ,{"name": "k_EAppType_Franchise","value": "1024"}
,{"name": "k_EAppType_Video","value": "2048"} ,{"name": "k_EAppType_Video","value": "2048"}
,{"name": "k_EAppType_Plugin","value": "4096"} ,{"name": "k_EAppType_Plugin","value": "4096"}
,{"name": "k_EAppType_Music","value": "8192"} ,{"name": "k_EAppType_MusicAlbum","value": "8192"}
,{"name": "k_EAppType_Series","value": "16384"} ,{"name": "k_EAppType_Series","value": "16384"}
,{"name": "k_EAppType_Comic","value": "32768"} ,{"name": "k_EAppType_Comic_UNUSED","value": "32768"}
,{"name": "k_EAppType_Beta","value": "65536"} ,{"name": "k_EAppType_Beta","value": "65536"}
,{"name": "k_EAppType_Shortcut","value": "1073741824"} ,{"name": "k_EAppType_Shortcut","value": "1073741824"}
,{"name": "k_EAppType_DepotOnly","value": "-2147483648"} ,{"name": "k_EAppType_DepotOnly","value": "-2147483648"}
@@ -441,6 +449,7 @@
,{"name": "k_eEVRHMDType_Lenovo_Explorer","value": "71"} ,{"name": "k_eEVRHMDType_Lenovo_Explorer","value": "71"}
,{"name": "k_eEVRHMDType_HP_Unknown","value": "80"} ,{"name": "k_eEVRHMDType_HP_Unknown","value": "80"}
,{"name": "k_eEVRHMDType_HP_WindowsMR","value": "81"} ,{"name": "k_eEVRHMDType_HP_WindowsMR","value": "81"}
,{"name": "k_eEVRHMDType_HP_Reverb","value": "82"}
,{"name": "k_eEVRHMDType_Samsung_Unknown","value": "90"} ,{"name": "k_eEVRHMDType_Samsung_Unknown","value": "90"}
,{"name": "k_eEVRHMDType_Samsung_Odyssey","value": "91"} ,{"name": "k_eEVRHMDType_Samsung_Odyssey","value": "91"}
,{"name": "k_eEVRHMDType_Unannounced_Unknown","value": "100"} ,{"name": "k_eEVRHMDType_Unannounced_Unknown","value": "100"}
@@ -475,6 +484,9 @@
{"name": "k_EDurationControlProgress_Full","value": "0"} {"name": "k_EDurationControlProgress_Full","value": "0"}
,{"name": "k_EDurationControlProgress_Half","value": "1"} ,{"name": "k_EDurationControlProgress_Half","value": "1"}
,{"name": "k_EDurationControlProgress_None","value": "2"} ,{"name": "k_EDurationControlProgress_None","value": "2"}
,{"name": "k_EDurationControl_ExitSoon_3h","value": "3"}
,{"name": "k_EDurationControl_ExitSoon_5h","value": "4"}
,{"name": "k_EDurationControl_ExitSoon_Night","value": "5"}
]} ]}
, {"enumname": "EDurationControlNotification","values": [ , {"enumname": "EDurationControlNotification","values": [
{"name": "k_EDurationControlNotification_None","value": "0"} {"name": "k_EDurationControlNotification_None","value": "0"}
@@ -482,6 +494,9 @@
,{"name": "k_EDurationControlNotification_3Hours","value": "2"} ,{"name": "k_EDurationControlNotification_3Hours","value": "2"}
,{"name": "k_EDurationControlNotification_HalfProgress","value": "3"} ,{"name": "k_EDurationControlNotification_HalfProgress","value": "3"}
,{"name": "k_EDurationControlNotification_NoProgress","value": "4"} ,{"name": "k_EDurationControlNotification_NoProgress","value": "4"}
,{"name": "k_EDurationControlNotification_ExitSoon_3h","value": "5"}
,{"name": "k_EDurationControlNotification_ExitSoon_5h","value": "6"}
,{"name": "k_EDurationControlNotification_ExitSoon_Night","value": "7"}
]} ]}
, {"enumname": "CGameID::EGameIDType","values": [ , {"enumname": "CGameID::EGameIDType","values": [
{"name": "k_EGameIDTypeApp","value": "0"} {"name": "k_EGameIDTypeApp","value": "0"}
@@ -507,6 +522,16 @@
,{"name": "k_EPlayerResultIncomplete","value": "4"} ,{"name": "k_EPlayerResultIncomplete","value": "4"}
,{"name": "k_EPlayerResultCompleted","value": "5"} ,{"name": "k_EPlayerResultCompleted","value": "5"}
]} ]}
, {"enumname": "ESteamIPv6ConnectivityProtocol","values": [
{"name": "k_ESteamIPv6ConnectivityProtocol_Invalid","value": "0"}
,{"name": "k_ESteamIPv6ConnectivityProtocol_HTTP","value": "1"}
,{"name": "k_ESteamIPv6ConnectivityProtocol_UDP","value": "2"}
]}
, {"enumname": "ESteamIPv6ConnectivityState","values": [
{"name": "k_ESteamIPv6ConnectivityState_Unknown","value": "0"}
,{"name": "k_ESteamIPv6ConnectivityState_Good","value": "1"}
,{"name": "k_ESteamIPv6ConnectivityState_Bad","value": "2"}
]}
, {"enumname": "IPCFailure_t::EFailureType","values": [ , {"enumname": "IPCFailure_t::EFailureType","values": [
{"name": "k_EFailureFlushedCallbackQueue","value": "0"} {"name": "k_EFailureFlushedCallbackQueue","value": "0"}
,{"name": "k_EFailurePipeFail","value": "1"} ,{"name": "k_EFailurePipeFail","value": "1"}
@@ -661,7 +686,7 @@
,{"name": "k_ERemoteStoragePlatformOSX","value": "2"} ,{"name": "k_ERemoteStoragePlatformOSX","value": "2"}
,{"name": "k_ERemoteStoragePlatformPS3","value": "4"} ,{"name": "k_ERemoteStoragePlatformPS3","value": "4"}
,{"name": "k_ERemoteStoragePlatformLinux","value": "8"} ,{"name": "k_ERemoteStoragePlatformLinux","value": "8"}
,{"name": "k_ERemoteStoragePlatformReserved2","value": "16"} ,{"name": "k_ERemoteStoragePlatformSwitch","value": "16"}
,{"name": "k_ERemoteStoragePlatformAndroid","value": "32"} ,{"name": "k_ERemoteStoragePlatformAndroid","value": "32"}
,{"name": "k_ERemoteStoragePlatformIOS","value": "64"} ,{"name": "k_ERemoteStoragePlatformIOS","value": "64"}
,{"name": "k_ERemoteStoragePlatformAll","value": "-1"} ,{"name": "k_ERemoteStoragePlatformAll","value": "-1"}
@@ -1829,7 +1854,13 @@
,{ ,{
"constname": "k_cchBroadcastGameDataMax","consttype": "int", "constval": "8192"} "constname": "k_cchBroadcastGameDataMax","consttype": "int", "constval": "8192"}
], ],
"structs":[{"struct": "CSteamID","fields": [ "structs":[{"struct": "SteamIPAddress_t","fields": [
{ "fieldname": "m_eType", "fieldtype": "enum ESteamIPType"}]}
,{"struct": "SteamIPAddress_t::(anonymous)","fields": [
{ "fieldname": "m_unIPv4", "fieldtype": "uint32"},
{ "fieldname": "m_rgubIPv6", "fieldtype": "uint8 [16]"},
{ "fieldname": "m_ipv6Qword", "fieldtype": "uint64 [2]"}]}
,{"struct": "CSteamID","fields": [
{ "fieldname": "m_steamid", "fieldtype": "union SteamID_t"}]} { "fieldname": "m_steamid", "fieldtype": "union SteamID_t"}]}
,{"struct": "CSteamID::SteamID_t","fields": [ ,{"struct": "CSteamID::SteamID_t","fields": [
{ "fieldname": "m_comp", "fieldtype": "struct SteamIDComponent_t"}, { "fieldname": "m_comp", "fieldtype": "struct SteamIDComponent_t"},
@@ -1941,7 +1972,9 @@
{ "fieldname": "m_bApplicable", "fieldtype": "_Bool"}, { "fieldname": "m_bApplicable", "fieldtype": "_Bool"},
{ "fieldname": "m_csecsLast5h", "fieldtype": "int32"}, { "fieldname": "m_csecsLast5h", "fieldtype": "int32"},
{ "fieldname": "m_progress", "fieldtype": "enum EDurationControlProgress"}, { "fieldname": "m_progress", "fieldtype": "enum EDurationControlProgress"},
{ "fieldname": "m_notification", "fieldtype": "enum EDurationControlNotification"}]} { "fieldname": "m_notification", "fieldtype": "enum EDurationControlNotification"},
{ "fieldname": "m_csecsToday", "fieldtype": "int32"},
{ "fieldname": "m_csecsRemaining", "fieldtype": "int32"}]}
,{"struct": "FriendGameInfo_t","fields": [ ,{"struct": "FriendGameInfo_t","fields": [
{ "fieldname": "m_gameID", "fieldtype": "class CGameID"}, { "fieldname": "m_gameID", "fieldtype": "class CGameID"},
{ "fieldname": "m_unGameIP", "fieldtype": "uint32"}, { "fieldname": "m_unGameIP", "fieldtype": "uint32"},
@@ -2658,9 +2691,9 @@
,{"struct": "BroadcastUploadStop_t","fields": [ ,{"struct": "BroadcastUploadStop_t","fields": [
{ "fieldname": "m_eResult", "fieldtype": "enum EBroadcastUploadResult"}]} { "fieldname": "m_eResult", "fieldtype": "enum EBroadcastUploadResult"}]}
,{"struct": "SteamRemotePlaySessionConnected_t","fields": [ ,{"struct": "SteamRemotePlaySessionConnected_t","fields": [
{ "fieldname": "m_unSessionID", "fieldtype": "uint32"}]} { "fieldname": "m_unSessionID", "fieldtype": "RemotePlaySessionID_t"}]}
,{"struct": "SteamRemotePlaySessionDisconnected_t","fields": [ ,{"struct": "SteamRemotePlaySessionDisconnected_t","fields": [
{ "fieldname": "m_unSessionID", "fieldtype": "uint32"}]} { "fieldname": "m_unSessionID", "fieldtype": "RemotePlaySessionID_t"}]}
,{"struct": "GSClientApprove_t","fields": [ ,{"struct": "GSClientApprove_t","fields": [
{ "fieldname": "m_SteamID", "fieldtype": "class CSteamID"}, { "fieldname": "m_SteamID", "fieldtype": "class CSteamID"},
{ "fieldname": "m_OwnerSteamID", "fieldtype": "class CSteamID"}]} { "fieldname": "m_OwnerSteamID", "fieldtype": "class CSteamID"}]}
@@ -2776,7 +2809,7 @@
"methodname": "SetLocalIPBinding", "methodname": "SetLocalIPBinding",
"returntype": "void", "returntype": "void",
"params": [ "params": [
{ "paramname": "unIP" ,"paramtype": "uint32"}, { "paramname": "unIP" ,"paramtype": "const struct SteamIPAddress_t &"},
{ "paramname": "usPort" ,"paramtype": "uint16"} { "paramname": "usPort" ,"paramtype": "uint16"}
] ]
} }
@@ -4104,6 +4137,14 @@
{ "paramname": "bLegalOnly" ,"paramtype": "bool"} { "paramname": "bLegalOnly" ,"paramtype": "bool"}
] ]
} }
,{
"classname": "ISteamUtils",
"methodname": "GetIPv6ConnectivityState",
"returntype": "ESteamIPv6ConnectivityState",
"params": [
{ "paramname": "eProtocol" ,"paramtype": "ESteamIPv6ConnectivityProtocol"}
]
}
,{ ,{
"classname": "ISteamMatchmaking", "classname": "ISteamMatchmaking",
"methodname": "GetFavoriteGameCount", "methodname": "GetFavoriteGameCount",
@@ -6065,7 +6106,7 @@
"returntype": "SNetListenSocket_t", "returntype": "SNetListenSocket_t",
"params": [ "params": [
{ "paramname": "nVirtualP2PPort" ,"paramtype": "int"}, { "paramname": "nVirtualP2PPort" ,"paramtype": "int"},
{ "paramname": "nIP" ,"paramtype": "uint32"}, { "paramname": "nIP" ,"paramtype": "struct SteamIPAddress_t"},
{ "paramname": "nPort" ,"paramtype": "uint16"}, { "paramname": "nPort" ,"paramtype": "uint16"},
{ "paramname": "bAllowUseOfPacketRelay" ,"paramtype": "bool"} { "paramname": "bAllowUseOfPacketRelay" ,"paramtype": "bool"}
] ]
@@ -6086,7 +6127,7 @@
"methodname": "CreateConnectionSocket", "methodname": "CreateConnectionSocket",
"returntype": "SNetSocket_t", "returntype": "SNetSocket_t",
"params": [ "params": [
{ "paramname": "nIP" ,"paramtype": "uint32"}, { "paramname": "nIP" ,"paramtype": "struct SteamIPAddress_t"},
{ "paramname": "nPort" ,"paramtype": "uint16"}, { "paramname": "nPort" ,"paramtype": "uint16"},
{ "paramname": "nTimeoutSec" ,"paramtype": "int"} { "paramname": "nTimeoutSec" ,"paramtype": "int"}
] ]
@@ -6170,7 +6211,7 @@
{ "paramname": "hSocket" ,"paramtype": "SNetSocket_t"}, { "paramname": "hSocket" ,"paramtype": "SNetSocket_t"},
{ "paramname": "pSteamIDRemote" ,"paramtype": "class CSteamID *"}, { "paramname": "pSteamIDRemote" ,"paramtype": "class CSteamID *"},
{ "paramname": "peSocketStatus" ,"paramtype": "int *"}, { "paramname": "peSocketStatus" ,"paramtype": "int *"},
{ "paramname": "punIPRemote" ,"paramtype": "uint32 *"}, { "paramname": "punIPRemote" ,"paramtype": "struct SteamIPAddress_t *"},
{ "paramname": "punPortRemote" ,"paramtype": "uint16 *"} { "paramname": "punPortRemote" ,"paramtype": "uint16 *"}
] ]
} }
@@ -6180,7 +6221,7 @@
"returntype": "bool", "returntype": "bool",
"params": [ "params": [
{ "paramname": "hListenSocket" ,"paramtype": "SNetListenSocket_t"}, { "paramname": "hListenSocket" ,"paramtype": "SNetListenSocket_t"},
{ "paramname": "pnIP" ,"paramtype": "uint32 *"}, { "paramname": "pnIP" ,"paramtype": "struct SteamIPAddress_t *"},
{ "paramname": "pnPort" ,"paramtype": "uint16 *"} { "paramname": "pnPort" ,"paramtype": "uint16 *"}
] ]
} }
@@ -7568,6 +7609,15 @@
{ "paramname": "pTagName" ,"paramtype": "const char *"} { "paramname": "pTagName" ,"paramtype": "const char *"}
] ]
} }
,{
"classname": "ISteamUGC",
"methodname": "AddRequiredTagGroup",
"returntype": "bool",
"params": [
{ "paramname": "handle" ,"paramtype": "UGCQueryHandle_t"},
{ "paramname": "pTagGroups" ,"paramtype": "const struct SteamParamStringArray_t *"}
]
}
,{ ,{
"classname": "ISteamUGC", "classname": "ISteamUGC",
"methodname": "AddExcludedTag", "methodname": "AddExcludedTag",
@@ -8975,7 +9025,7 @@
,{ ,{
"classname": "ISteamRemotePlay", "classname": "ISteamRemotePlay",
"methodname": "GetSessionID", "methodname": "GetSessionID",
"returntype": "uint32", "returntype": "RemotePlaySessionID_t",
"params": [ "params": [
{ "paramname": "iSessionIndex" ,"paramtype": "int"} { "paramname": "iSessionIndex" ,"paramtype": "int"}
] ]
@@ -8985,7 +9035,7 @@
"methodname": "GetSessionSteamID", "methodname": "GetSessionSteamID",
"returntype": "class CSteamID", "returntype": "class CSteamID",
"params": [ "params": [
{ "paramname": "unSessionID" ,"paramtype": "uint32"} { "paramname": "unSessionID" ,"paramtype": "RemotePlaySessionID_t"}
] ]
} }
,{ ,{
@@ -8993,7 +9043,7 @@
"methodname": "GetSessionClientName", "methodname": "GetSessionClientName",
"returntype": "const char *", "returntype": "const char *",
"params": [ "params": [
{ "paramname": "unSessionID" ,"paramtype": "uint32"} { "paramname": "unSessionID" ,"paramtype": "RemotePlaySessionID_t"}
] ]
} }
,{ ,{
@@ -9001,7 +9051,7 @@
"methodname": "GetSessionClientFormFactor", "methodname": "GetSessionClientFormFactor",
"returntype": "ESteamDeviceFormFactor", "returntype": "ESteamDeviceFormFactor",
"params": [ "params": [
{ "paramname": "unSessionID" ,"paramtype": "uint32"} { "paramname": "unSessionID" ,"paramtype": "RemotePlaySessionID_t"}
] ]
} }
,{ ,{
@@ -9009,11 +9059,19 @@
"methodname": "BGetSessionClientResolution", "methodname": "BGetSessionClientResolution",
"returntype": "bool", "returntype": "bool",
"params": [ "params": [
{ "paramname": "unSessionID" ,"paramtype": "uint32"}, { "paramname": "unSessionID" ,"paramtype": "RemotePlaySessionID_t"},
{ "paramname": "pnResolutionX" ,"paramtype": "int *"}, { "paramname": "pnResolutionX" ,"paramtype": "int *"},
{ "paramname": "pnResolutionY" ,"paramtype": "int *"} { "paramname": "pnResolutionY" ,"paramtype": "int *"}
] ]
} }
,{
"classname": "ISteamRemotePlay",
"methodname": "BSendRemotePlayTogetherInvite",
"returntype": "bool",
"params": [
{ "paramname": "steamIDFriend" ,"paramtype": "class CSteamID"}
]
}
,{ ,{
"classname": "ISteamGameServer", "classname": "ISteamGameServer",
"methodname": "InitGameServer", "methodname": "InitGameServer",
@@ -9292,7 +9350,7 @@
,{ ,{
"classname": "ISteamGameServer", "classname": "ISteamGameServer",
"methodname": "GetPublicIP", "methodname": "GetPublicIP",
"returntype": "uint32" "returntype": "struct SteamIPAddress_t"
} }
,{ ,{
"classname": "ISteamGameServer", "classname": "ISteamGameServer",
+15 -11
View File
@@ -78,6 +78,7 @@ typedef uint64 SteamItemInstanceID_t;
typedef int32 SteamItemDef_t; typedef int32 SteamItemDef_t;
typedef int32 SteamInventoryResult_t; typedef int32 SteamInventoryResult_t;
typedef uint64 SteamInventoryUpdateHandle_t; typedef uint64 SteamInventoryUpdateHandle_t;
typedef uint32 RemotePlaySessionID_t;
// OpenVR Constants // OpenVR Constants
int const_k_iSteamUserCallbacks = 100; int const_k_iSteamUserCallbacks = 100;
int const_k_iSteamGameServerCallbacks = 200; int const_k_iSteamGameServerCallbacks = 200;
@@ -165,7 +166,7 @@ S_API HSteamUser SteamAPI_ISteamClient_CreateLocalUser(intptr_t instancePtr, HSt
S_API void SteamAPI_ISteamClient_ReleaseUser(intptr_t instancePtr, HSteamPipe hSteamPipe, HSteamUser hUser); S_API void SteamAPI_ISteamClient_ReleaseUser(intptr_t instancePtr, HSteamPipe hSteamPipe, HSteamUser hUser);
S_API class ISteamUser * SteamAPI_ISteamClient_GetISteamUser(intptr_t instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion); S_API class ISteamUser * SteamAPI_ISteamClient_GetISteamUser(intptr_t instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion);
S_API class ISteamGameServer * SteamAPI_ISteamClient_GetISteamGameServer(intptr_t instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion); S_API class ISteamGameServer * SteamAPI_ISteamClient_GetISteamGameServer(intptr_t instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion);
S_API void SteamAPI_ISteamClient_SetLocalIPBinding(intptr_t instancePtr, uint32 unIP, uint16 usPort); S_API void SteamAPI_ISteamClient_SetLocalIPBinding(intptr_t instancePtr, const struct SteamIPAddress_t & unIP, uint16 usPort);
S_API class ISteamFriends * SteamAPI_ISteamClient_GetISteamFriends(intptr_t instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion); S_API class ISteamFriends * SteamAPI_ISteamClient_GetISteamFriends(intptr_t instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion);
S_API class ISteamUtils * SteamAPI_ISteamClient_GetISteamUtils(intptr_t instancePtr, HSteamPipe hSteamPipe, const char * pchVersion); S_API class ISteamUtils * SteamAPI_ISteamClient_GetISteamUtils(intptr_t instancePtr, HSteamPipe hSteamPipe, const char * pchVersion);
S_API class ISteamMatchmaking * SteamAPI_ISteamClient_GetISteamMatchmaking(intptr_t instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion); S_API class ISteamMatchmaking * SteamAPI_ISteamClient_GetISteamMatchmaking(intptr_t instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, const char * pchVersion);
@@ -330,6 +331,7 @@ S_API void SteamAPI_ISteamUtils_SetVRHeadsetStreamingEnabled(intptr_t instancePt
S_API bool SteamAPI_ISteamUtils_IsSteamChinaLauncher(intptr_t instancePtr); S_API bool SteamAPI_ISteamUtils_IsSteamChinaLauncher(intptr_t instancePtr);
S_API bool SteamAPI_ISteamUtils_InitFilterText(intptr_t instancePtr); S_API bool SteamAPI_ISteamUtils_InitFilterText(intptr_t instancePtr);
S_API int SteamAPI_ISteamUtils_FilterText(intptr_t instancePtr, char * pchOutFilteredText, uint32 nByteSizeOutFilteredText, const char * pchInputMessage, bool bLegalOnly); S_API int SteamAPI_ISteamUtils_FilterText(intptr_t instancePtr, char * pchOutFilteredText, uint32 nByteSizeOutFilteredText, const char * pchInputMessage, bool bLegalOnly);
S_API ESteamIPv6ConnectivityState SteamAPI_ISteamUtils_GetIPv6ConnectivityState(intptr_t instancePtr, ESteamIPv6ConnectivityProtocol eProtocol);
S_API int SteamAPI_ISteamMatchmaking_GetFavoriteGameCount(intptr_t instancePtr); S_API int SteamAPI_ISteamMatchmaking_GetFavoriteGameCount(intptr_t instancePtr);
S_API bool SteamAPI_ISteamMatchmaking_GetFavoriteGame(intptr_t instancePtr, int iGame, AppId_t * pnAppID, uint32 * pnIP, uint16 * pnConnPort, uint16 * pnQueryPort, uint32 * punFlags, uint32 * pRTime32LastPlayedOnServer); S_API bool SteamAPI_ISteamMatchmaking_GetFavoriteGame(intptr_t instancePtr, int iGame, AppId_t * pnAppID, uint32 * pnIP, uint16 * pnConnPort, uint16 * pnQueryPort, uint32 * punFlags, uint32 * pRTime32LastPlayedOnServer);
S_API int SteamAPI_ISteamMatchmaking_AddFavoriteGame(intptr_t instancePtr, AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags, uint32 rTime32LastPlayedOnServer); S_API int SteamAPI_ISteamMatchmaking_AddFavoriteGame(intptr_t instancePtr, AppId_t nAppID, uint32 nIP, uint16 nConnPort, uint16 nQueryPort, uint32 unFlags, uint32 rTime32LastPlayedOnServer);
@@ -556,9 +558,9 @@ S_API bool SteamAPI_ISteamNetworking_CloseP2PSessionWithUser(intptr_t instancePt
S_API bool SteamAPI_ISteamNetworking_CloseP2PChannelWithUser(intptr_t instancePtr, class CSteamID steamIDRemote, int nChannel); S_API bool SteamAPI_ISteamNetworking_CloseP2PChannelWithUser(intptr_t instancePtr, class CSteamID steamIDRemote, int nChannel);
S_API bool SteamAPI_ISteamNetworking_GetP2PSessionState(intptr_t instancePtr, class CSteamID steamIDRemote, struct P2PSessionState_t * pConnectionState); S_API bool SteamAPI_ISteamNetworking_GetP2PSessionState(intptr_t instancePtr, class CSteamID steamIDRemote, struct P2PSessionState_t * pConnectionState);
S_API bool SteamAPI_ISteamNetworking_AllowP2PPacketRelay(intptr_t instancePtr, bool bAllow); S_API bool SteamAPI_ISteamNetworking_AllowP2PPacketRelay(intptr_t instancePtr, bool bAllow);
S_API SNetListenSocket_t SteamAPI_ISteamNetworking_CreateListenSocket(intptr_t instancePtr, int nVirtualP2PPort, uint32 nIP, uint16 nPort, bool bAllowUseOfPacketRelay); S_API SNetListenSocket_t SteamAPI_ISteamNetworking_CreateListenSocket(intptr_t instancePtr, int nVirtualP2PPort, struct SteamIPAddress_t nIP, uint16 nPort, bool bAllowUseOfPacketRelay);
S_API SNetSocket_t SteamAPI_ISteamNetworking_CreateP2PConnectionSocket(intptr_t instancePtr, class CSteamID steamIDTarget, int nVirtualPort, int nTimeoutSec, bool bAllowUseOfPacketRelay); S_API SNetSocket_t SteamAPI_ISteamNetworking_CreateP2PConnectionSocket(intptr_t instancePtr, class CSteamID steamIDTarget, int nVirtualPort, int nTimeoutSec, bool bAllowUseOfPacketRelay);
S_API SNetSocket_t SteamAPI_ISteamNetworking_CreateConnectionSocket(intptr_t instancePtr, uint32 nIP, uint16 nPort, int nTimeoutSec); S_API SNetSocket_t SteamAPI_ISteamNetworking_CreateConnectionSocket(intptr_t instancePtr, struct SteamIPAddress_t nIP, uint16 nPort, int nTimeoutSec);
S_API bool SteamAPI_ISteamNetworking_DestroySocket(intptr_t instancePtr, SNetSocket_t hSocket, bool bNotifyRemoteEnd); S_API bool SteamAPI_ISteamNetworking_DestroySocket(intptr_t instancePtr, SNetSocket_t hSocket, bool bNotifyRemoteEnd);
S_API bool SteamAPI_ISteamNetworking_DestroyListenSocket(intptr_t instancePtr, SNetListenSocket_t hSocket, bool bNotifyRemoteEnd); S_API bool SteamAPI_ISteamNetworking_DestroyListenSocket(intptr_t instancePtr, SNetListenSocket_t hSocket, bool bNotifyRemoteEnd);
S_API bool SteamAPI_ISteamNetworking_SendDataOnSocket(intptr_t instancePtr, SNetSocket_t hSocket, void * pubData, uint32 cubData, bool bReliable); S_API bool SteamAPI_ISteamNetworking_SendDataOnSocket(intptr_t instancePtr, SNetSocket_t hSocket, void * pubData, uint32 cubData, bool bReliable);
@@ -566,8 +568,8 @@ S_API bool SteamAPI_ISteamNetworking_IsDataAvailableOnSocket(intptr_t instancePt
S_API bool SteamAPI_ISteamNetworking_RetrieveDataFromSocket(intptr_t instancePtr, SNetSocket_t hSocket, void * pubDest, uint32 cubDest, uint32 * pcubMsgSize); S_API bool SteamAPI_ISteamNetworking_RetrieveDataFromSocket(intptr_t instancePtr, SNetSocket_t hSocket, void * pubDest, uint32 cubDest, uint32 * pcubMsgSize);
S_API bool SteamAPI_ISteamNetworking_IsDataAvailable(intptr_t instancePtr, SNetListenSocket_t hListenSocket, uint32 * pcubMsgSize, SNetSocket_t * phSocket); S_API bool SteamAPI_ISteamNetworking_IsDataAvailable(intptr_t instancePtr, SNetListenSocket_t hListenSocket, uint32 * pcubMsgSize, SNetSocket_t * phSocket);
S_API bool SteamAPI_ISteamNetworking_RetrieveData(intptr_t instancePtr, SNetListenSocket_t hListenSocket, void * pubDest, uint32 cubDest, uint32 * pcubMsgSize, SNetSocket_t * phSocket); S_API bool SteamAPI_ISteamNetworking_RetrieveData(intptr_t instancePtr, SNetListenSocket_t hListenSocket, void * pubDest, uint32 cubDest, uint32 * pcubMsgSize, SNetSocket_t * phSocket);
S_API bool SteamAPI_ISteamNetworking_GetSocketInfo(intptr_t instancePtr, SNetSocket_t hSocket, class CSteamID * pSteamIDRemote, int * peSocketStatus, uint32 * punIPRemote, uint16 * punPortRemote); S_API bool SteamAPI_ISteamNetworking_GetSocketInfo(intptr_t instancePtr, SNetSocket_t hSocket, class CSteamID * pSteamIDRemote, int * peSocketStatus, struct SteamIPAddress_t * punIPRemote, uint16 * punPortRemote);
S_API bool SteamAPI_ISteamNetworking_GetListenSocketInfo(intptr_t instancePtr, SNetListenSocket_t hListenSocket, uint32 * pnIP, uint16 * pnPort); S_API bool SteamAPI_ISteamNetworking_GetListenSocketInfo(intptr_t instancePtr, SNetListenSocket_t hListenSocket, struct SteamIPAddress_t * pnIP, uint16 * pnPort);
S_API ESNetSocketConnectionType SteamAPI_ISteamNetworking_GetSocketConnectionType(intptr_t instancePtr, SNetSocket_t hSocket); S_API ESNetSocketConnectionType SteamAPI_ISteamNetworking_GetSocketConnectionType(intptr_t instancePtr, SNetSocket_t hSocket);
S_API int SteamAPI_ISteamNetworking_GetMaxPacketSize(intptr_t instancePtr, SNetSocket_t hSocket); S_API int SteamAPI_ISteamNetworking_GetMaxPacketSize(intptr_t instancePtr, SNetSocket_t hSocket);
S_API ScreenshotHandle SteamAPI_ISteamScreenshots_WriteScreenshot(intptr_t instancePtr, void * pubRGB, uint32 cubRGB, int nWidth, int nHeight); S_API ScreenshotHandle SteamAPI_ISteamScreenshots_WriteScreenshot(intptr_t instancePtr, void * pubRGB, uint32 cubRGB, int nWidth, int nHeight);
@@ -731,6 +733,7 @@ S_API bool SteamAPI_ISteamUGC_GetQueryUGCKeyValueTag(intptr_t instancePtr, UGCQu
S_API bool SteamAPI_ISteamUGC_GetQueryUGCKeyValueTag0(intptr_t instancePtr, UGCQueryHandle_t handle, uint32 index, const char * pchKey, char * pchValue, uint32 cchValueSize); S_API bool SteamAPI_ISteamUGC_GetQueryUGCKeyValueTag0(intptr_t instancePtr, UGCQueryHandle_t handle, uint32 index, const char * pchKey, char * pchValue, uint32 cchValueSize);
S_API bool SteamAPI_ISteamUGC_ReleaseQueryUGCRequest(intptr_t instancePtr, UGCQueryHandle_t handle); S_API bool SteamAPI_ISteamUGC_ReleaseQueryUGCRequest(intptr_t instancePtr, UGCQueryHandle_t handle);
S_API bool SteamAPI_ISteamUGC_AddRequiredTag(intptr_t instancePtr, UGCQueryHandle_t handle, const char * pTagName); S_API bool SteamAPI_ISteamUGC_AddRequiredTag(intptr_t instancePtr, UGCQueryHandle_t handle, const char * pTagName);
S_API bool SteamAPI_ISteamUGC_AddRequiredTagGroup(intptr_t instancePtr, UGCQueryHandle_t handle, const struct SteamParamStringArray_t * pTagGroups);
S_API bool SteamAPI_ISteamUGC_AddExcludedTag(intptr_t instancePtr, UGCQueryHandle_t handle, const char * pTagName); S_API bool SteamAPI_ISteamUGC_AddExcludedTag(intptr_t instancePtr, UGCQueryHandle_t handle, const char * pTagName);
S_API bool SteamAPI_ISteamUGC_SetReturnOnlyIDs(intptr_t instancePtr, UGCQueryHandle_t handle, bool bReturnOnlyIDs); S_API bool SteamAPI_ISteamUGC_SetReturnOnlyIDs(intptr_t instancePtr, UGCQueryHandle_t handle, bool bReturnOnlyIDs);
S_API bool SteamAPI_ISteamUGC_SetReturnKeyValueTags(intptr_t instancePtr, UGCQueryHandle_t handle, bool bReturnKeyValueTags); S_API bool SteamAPI_ISteamUGC_SetReturnKeyValueTags(intptr_t instancePtr, UGCQueryHandle_t handle, bool bReturnKeyValueTags);
@@ -889,11 +892,12 @@ S_API bool SteamAPI_ISteamParentalSettings_BIsAppInBlockList(intptr_t instancePt
S_API bool SteamAPI_ISteamParentalSettings_BIsFeatureBlocked(intptr_t instancePtr, EParentalFeature eFeature); S_API bool SteamAPI_ISteamParentalSettings_BIsFeatureBlocked(intptr_t instancePtr, EParentalFeature eFeature);
S_API bool SteamAPI_ISteamParentalSettings_BIsFeatureInBlockList(intptr_t instancePtr, EParentalFeature eFeature); S_API bool SteamAPI_ISteamParentalSettings_BIsFeatureInBlockList(intptr_t instancePtr, EParentalFeature eFeature);
S_API uint32 SteamAPI_ISteamRemotePlay_GetSessionCount(intptr_t instancePtr); S_API uint32 SteamAPI_ISteamRemotePlay_GetSessionCount(intptr_t instancePtr);
S_API uint32 SteamAPI_ISteamRemotePlay_GetSessionID(intptr_t instancePtr, int iSessionIndex); S_API RemotePlaySessionID_t SteamAPI_ISteamRemotePlay_GetSessionID(intptr_t instancePtr, int iSessionIndex);
S_API uint64 SteamAPI_ISteamRemotePlay_GetSessionSteamID(intptr_t instancePtr, uint32 unSessionID); S_API uint64 SteamAPI_ISteamRemotePlay_GetSessionSteamID(intptr_t instancePtr, RemotePlaySessionID_t unSessionID);
S_API const char * SteamAPI_ISteamRemotePlay_GetSessionClientName(intptr_t instancePtr, uint32 unSessionID); S_API const char * SteamAPI_ISteamRemotePlay_GetSessionClientName(intptr_t instancePtr, RemotePlaySessionID_t unSessionID);
S_API ESteamDeviceFormFactor SteamAPI_ISteamRemotePlay_GetSessionClientFormFactor(intptr_t instancePtr, uint32 unSessionID); S_API ESteamDeviceFormFactor SteamAPI_ISteamRemotePlay_GetSessionClientFormFactor(intptr_t instancePtr, RemotePlaySessionID_t unSessionID);
S_API bool SteamAPI_ISteamRemotePlay_BGetSessionClientResolution(intptr_t instancePtr, uint32 unSessionID, int * pnResolutionX, int * pnResolutionY); S_API bool SteamAPI_ISteamRemotePlay_BGetSessionClientResolution(intptr_t instancePtr, RemotePlaySessionID_t unSessionID, int * pnResolutionX, int * pnResolutionY);
S_API bool SteamAPI_ISteamRemotePlay_BSendRemotePlayTogetherInvite(intptr_t instancePtr, class CSteamID steamIDFriend);
S_API bool SteamAPI_ISteamGameServer_InitGameServer(intptr_t instancePtr, uint32 unIP, uint16 usGamePort, uint16 usQueryPort, uint32 unFlags, AppId_t nGameAppId, const char * pchVersionString); S_API bool SteamAPI_ISteamGameServer_InitGameServer(intptr_t instancePtr, uint32 unIP, uint16 usGamePort, uint16 usQueryPort, uint32 unFlags, AppId_t nGameAppId, const char * pchVersionString);
S_API void SteamAPI_ISteamGameServer_SetProduct(intptr_t instancePtr, const char * pszProduct); S_API void SteamAPI_ISteamGameServer_SetProduct(intptr_t instancePtr, const char * pszProduct);
S_API void SteamAPI_ISteamGameServer_SetGameDescription(intptr_t instancePtr, const char * pszGameDescription); S_API void SteamAPI_ISteamGameServer_SetGameDescription(intptr_t instancePtr, const char * pszGameDescription);
@@ -930,7 +934,7 @@ S_API EUserHasLicenseForAppResult SteamAPI_ISteamGameServer_UserHasLicenseForApp
S_API bool SteamAPI_ISteamGameServer_RequestUserGroupStatus(intptr_t instancePtr, class CSteamID steamIDUser, class CSteamID steamIDGroup); S_API bool SteamAPI_ISteamGameServer_RequestUserGroupStatus(intptr_t instancePtr, class CSteamID steamIDUser, class CSteamID steamIDGroup);
S_API void SteamAPI_ISteamGameServer_GetGameplayStats(intptr_t instancePtr); S_API void SteamAPI_ISteamGameServer_GetGameplayStats(intptr_t instancePtr);
S_API SteamAPICall_t SteamAPI_ISteamGameServer_GetServerReputation(intptr_t instancePtr); S_API SteamAPICall_t SteamAPI_ISteamGameServer_GetServerReputation(intptr_t instancePtr);
S_API uint32 SteamAPI_ISteamGameServer_GetPublicIP(intptr_t instancePtr); S_API struct SteamIPAddress_t SteamAPI_ISteamGameServer_GetPublicIP(intptr_t instancePtr);
S_API bool SteamAPI_ISteamGameServer_HandleIncomingPacket(intptr_t instancePtr, const void * pData, int cbData, uint32 srcIP, uint16 srcPort); S_API bool SteamAPI_ISteamGameServer_HandleIncomingPacket(intptr_t instancePtr, const void * pData, int cbData, uint32 srcIP, uint16 srcPort);
S_API int SteamAPI_ISteamGameServer_GetNextOutgoingPacket(intptr_t instancePtr, void * pOut, int cbMaxOut, uint32 * pNetAdr, uint16 * pPort); S_API int SteamAPI_ISteamGameServer_GetNextOutgoingPacket(intptr_t instancePtr, void * pOut, int cbMaxOut, uint32 * pNetAdr, uint16 * pPort);
S_API void SteamAPI_ISteamGameServer_EnableHeartbeats(intptr_t instancePtr, bool bActive); S_API void SteamAPI_ISteamGameServer_EnableHeartbeats(intptr_t instancePtr, bool bActive);
+82 -24
View File
@@ -32,7 +32,7 @@ internal static extern IntPtr SteamAPI_ISteamClient_GetISteamUser(IntPtr instanc
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamClient_GetISteamGameServer")] [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamClient_GetISteamGameServer")]
internal static extern IntPtr SteamAPI_ISteamClient_GetISteamGameServer(IntPtr instancePtr, uint hSteamUser, uint hSteamPipe, string pchVersion); internal static extern IntPtr SteamAPI_ISteamClient_GetISteamGameServer(IntPtr instancePtr, uint hSteamUser, uint hSteamPipe, string pchVersion);
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamClient_SetLocalIPBinding")] [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamClient_SetLocalIPBinding")]
internal static extern void SteamAPI_ISteamClient_SetLocalIPBinding(IntPtr instancePtr, uint unIP, char usPort); internal static extern void SteamAPI_ISteamClient_SetLocalIPBinding(IntPtr instancePtr, IntPtr unIP, char usPort);
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamClient_GetISteamFriends")] [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamClient_GetISteamFriends")]
internal static extern IntPtr SteamAPI_ISteamClient_GetISteamFriends(IntPtr instancePtr, uint hSteamUser, uint hSteamPipe, string pchVersion); internal static extern IntPtr SteamAPI_ISteamClient_GetISteamFriends(IntPtr instancePtr, uint hSteamUser, uint hSteamPipe, string pchVersion);
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamClient_GetISteamUtils")] [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamClient_GetISteamUtils")]
@@ -361,6 +361,8 @@ internal static extern bool SteamAPI_ISteamUtils_IsSteamChinaLauncher(IntPtr ins
internal static extern bool SteamAPI_ISteamUtils_InitFilterText(IntPtr instancePtr); internal static extern bool SteamAPI_ISteamUtils_InitFilterText(IntPtr instancePtr);
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamUtils_FilterText")] [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamUtils_FilterText")]
internal static extern int SteamAPI_ISteamUtils_FilterText(IntPtr instancePtr, string pchOutFilteredText, uint nByteSizeOutFilteredText, string pchInputMessage, bool bLegalOnly); internal static extern int SteamAPI_ISteamUtils_FilterText(IntPtr instancePtr, string pchOutFilteredText, uint nByteSizeOutFilteredText, string pchInputMessage, bool bLegalOnly);
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamUtils_GetIPv6ConnectivityState")]
internal static extern uint SteamAPI_ISteamUtils_GetIPv6ConnectivityState(IntPtr instancePtr, uint eProtocol);
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamMatchmaking_GetFavoriteGameCount")] [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamMatchmaking_GetFavoriteGameCount")]
internal static extern int SteamAPI_ISteamMatchmaking_GetFavoriteGameCount(IntPtr instancePtr); internal static extern int SteamAPI_ISteamMatchmaking_GetFavoriteGameCount(IntPtr instancePtr);
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamMatchmaking_GetFavoriteGame")] [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamMatchmaking_GetFavoriteGame")]
@@ -814,11 +816,11 @@ internal static extern bool SteamAPI_ISteamNetworking_GetP2PSessionState(IntPtr
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamNetworking_AllowP2PPacketRelay")] [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamNetworking_AllowP2PPacketRelay")]
internal static extern bool SteamAPI_ISteamNetworking_AllowP2PPacketRelay(IntPtr instancePtr, bool bAllow); internal static extern bool SteamAPI_ISteamNetworking_AllowP2PPacketRelay(IntPtr instancePtr, bool bAllow);
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamNetworking_CreateListenSocket")] [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamNetworking_CreateListenSocket")]
internal static extern uint SteamAPI_ISteamNetworking_CreateListenSocket(IntPtr instancePtr, int nVirtualP2PPort, uint nIP, char nPort, bool bAllowUseOfPacketRelay); internal static extern uint SteamAPI_ISteamNetworking_CreateListenSocket(IntPtr instancePtr, int nVirtualP2PPort, SteamIPAddress_t nIP, char nPort, bool bAllowUseOfPacketRelay);
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamNetworking_CreateP2PConnectionSocket")] [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamNetworking_CreateP2PConnectionSocket")]
internal static extern uint SteamAPI_ISteamNetworking_CreateP2PConnectionSocket(IntPtr instancePtr, ulong steamIDTarget, int nVirtualPort, int nTimeoutSec, bool bAllowUseOfPacketRelay); internal static extern uint SteamAPI_ISteamNetworking_CreateP2PConnectionSocket(IntPtr instancePtr, ulong steamIDTarget, int nVirtualPort, int nTimeoutSec, bool bAllowUseOfPacketRelay);
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamNetworking_CreateConnectionSocket")] [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamNetworking_CreateConnectionSocket")]
internal static extern uint SteamAPI_ISteamNetworking_CreateConnectionSocket(IntPtr instancePtr, uint nIP, char nPort, int nTimeoutSec); internal static extern uint SteamAPI_ISteamNetworking_CreateConnectionSocket(IntPtr instancePtr, SteamIPAddress_t nIP, char nPort, int nTimeoutSec);
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamNetworking_DestroySocket")] [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamNetworking_DestroySocket")]
internal static extern bool SteamAPI_ISteamNetworking_DestroySocket(IntPtr instancePtr, uint hSocket, bool bNotifyRemoteEnd); internal static extern bool SteamAPI_ISteamNetworking_DestroySocket(IntPtr instancePtr, uint hSocket, bool bNotifyRemoteEnd);
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamNetworking_DestroyListenSocket")] [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamNetworking_DestroyListenSocket")]
@@ -834,9 +836,9 @@ internal static extern bool SteamAPI_ISteamNetworking_IsDataAvailable(IntPtr ins
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamNetworking_RetrieveData")] [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamNetworking_RetrieveData")]
internal static extern bool SteamAPI_ISteamNetworking_RetrieveData(IntPtr instancePtr, uint hListenSocket, IntPtr pubDest, uint cubDest, ref uint pcubMsgSize, ref uint phSocket); internal static extern bool SteamAPI_ISteamNetworking_RetrieveData(IntPtr instancePtr, uint hListenSocket, IntPtr pubDest, uint cubDest, ref uint pcubMsgSize, ref uint phSocket);
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamNetworking_GetSocketInfo")] [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamNetworking_GetSocketInfo")]
internal static extern bool SteamAPI_ISteamNetworking_GetSocketInfo(IntPtr instancePtr, uint hSocket, ref CSteamID pSteamIDRemote, ref int peSocketStatus, ref uint punIPRemote, ref char punPortRemote); internal static extern bool SteamAPI_ISteamNetworking_GetSocketInfo(IntPtr instancePtr, uint hSocket, ref CSteamID pSteamIDRemote, ref int peSocketStatus, ref SteamIPAddress_t punIPRemote, ref char punPortRemote);
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamNetworking_GetListenSocketInfo")] [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamNetworking_GetListenSocketInfo")]
internal static extern bool SteamAPI_ISteamNetworking_GetListenSocketInfo(IntPtr instancePtr, uint hListenSocket, ref uint pnIP, ref char pnPort); internal static extern bool SteamAPI_ISteamNetworking_GetListenSocketInfo(IntPtr instancePtr, uint hListenSocket, ref SteamIPAddress_t pnIP, ref char pnPort);
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamNetworking_GetSocketConnectionType")] [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamNetworking_GetSocketConnectionType")]
internal static extern uint SteamAPI_ISteamNetworking_GetSocketConnectionType(IntPtr instancePtr, uint hSocket); internal static extern uint SteamAPI_ISteamNetworking_GetSocketConnectionType(IntPtr instancePtr, uint hSocket);
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamNetworking_GetMaxPacketSize")] [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamNetworking_GetMaxPacketSize")]
@@ -1163,6 +1165,8 @@ internal static extern bool SteamAPI_ISteamUGC_GetQueryUGCKeyValueTag0(IntPtr in
internal static extern bool SteamAPI_ISteamUGC_ReleaseQueryUGCRequest(IntPtr instancePtr, ulong handle); internal static extern bool SteamAPI_ISteamUGC_ReleaseQueryUGCRequest(IntPtr instancePtr, ulong handle);
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamUGC_AddRequiredTag")] [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamUGC_AddRequiredTag")]
internal static extern bool SteamAPI_ISteamUGC_AddRequiredTag(IntPtr instancePtr, ulong handle, string pTagName); internal static extern bool SteamAPI_ISteamUGC_AddRequiredTag(IntPtr instancePtr, ulong handle, string pTagName);
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamUGC_AddRequiredTagGroup")]
internal static extern bool SteamAPI_ISteamUGC_AddRequiredTagGroup(IntPtr instancePtr, ulong handle, ref SteamParamStringArray_t pTagGroups);
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamUGC_AddExcludedTag")] [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamUGC_AddExcludedTag")]
internal static extern bool SteamAPI_ISteamUGC_AddExcludedTag(IntPtr instancePtr, ulong handle, string pTagName); internal static extern bool SteamAPI_ISteamUGC_AddExcludedTag(IntPtr instancePtr, ulong handle, string pTagName);
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamUGC_SetReturnOnlyIDs")] [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamUGC_SetReturnOnlyIDs")]
@@ -1489,6 +1493,8 @@ internal static extern IntPtr SteamAPI_ISteamRemotePlay_GetSessionClientName(Int
internal static extern uint SteamAPI_ISteamRemotePlay_GetSessionClientFormFactor(IntPtr instancePtr, uint unSessionID); internal static extern uint SteamAPI_ISteamRemotePlay_GetSessionClientFormFactor(IntPtr instancePtr, uint unSessionID);
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamRemotePlay_BGetSessionClientResolution")] [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamRemotePlay_BGetSessionClientResolution")]
internal static extern bool SteamAPI_ISteamRemotePlay_BGetSessionClientResolution(IntPtr instancePtr, uint unSessionID, ref int pnResolutionX, ref int pnResolutionY); internal static extern bool SteamAPI_ISteamRemotePlay_BGetSessionClientResolution(IntPtr instancePtr, uint unSessionID, ref int pnResolutionX, ref int pnResolutionY);
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamRemotePlay_BSendRemotePlayTogetherInvite")]
internal static extern bool SteamAPI_ISteamRemotePlay_BSendRemotePlayTogetherInvite(IntPtr instancePtr, ulong steamIDFriend);
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamGameServer_InitGameServer")] [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamGameServer_InitGameServer")]
internal static extern bool SteamAPI_ISteamGameServer_InitGameServer(IntPtr instancePtr, uint unIP, char usGamePort, char usQueryPort, uint unFlags, uint nGameAppId, string pchVersionString); internal static extern bool SteamAPI_ISteamGameServer_InitGameServer(IntPtr instancePtr, uint unIP, char usGamePort, char usQueryPort, uint unFlags, uint nGameAppId, string pchVersionString);
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamGameServer_SetProduct")] [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamGameServer_SetProduct")]
@@ -1562,7 +1568,7 @@ internal static extern void SteamAPI_ISteamGameServer_GetGameplayStats(IntPtr in
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamGameServer_GetServerReputation")] [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamGameServer_GetServerReputation")]
internal static extern ulong SteamAPI_ISteamGameServer_GetServerReputation(IntPtr instancePtr); internal static extern ulong SteamAPI_ISteamGameServer_GetServerReputation(IntPtr instancePtr);
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamGameServer_GetPublicIP")] [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamGameServer_GetPublicIP")]
internal static extern uint SteamAPI_ISteamGameServer_GetPublicIP(IntPtr instancePtr); internal static extern SteamIPAddress_t SteamAPI_ISteamGameServer_GetPublicIP(IntPtr instancePtr);
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamGameServer_HandleIncomingPacket")] [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamGameServer_HandleIncomingPacket")]
internal static extern bool SteamAPI_ISteamGameServer_HandleIncomingPacket(IntPtr instancePtr, IntPtr pData, int cbData, uint srcIP, char srcPort); internal static extern bool SteamAPI_ISteamGameServer_HandleIncomingPacket(IntPtr instancePtr, IntPtr pData, int cbData, uint srcIP, char srcPort);
[DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamGameServer_GetNextOutgoingPacket")] [DllImportAttribute("Steam_api", EntryPoint = "SteamAPI_ISteamGameServer_GetNextOutgoingPacket")]
@@ -1955,7 +1961,7 @@ namespace Valve.Steamworks
public abstract void ReleaseUser(uint hSteamPipe,uint hUser); public abstract void ReleaseUser(uint hSteamPipe,uint hUser);
public abstract ISteamUser GetISteamUser(uint hSteamUser,uint hSteamPipe,string pchVersion); public abstract ISteamUser GetISteamUser(uint hSteamUser,uint hSteamPipe,string pchVersion);
public abstract ISteamGameServer GetISteamGameServer(uint hSteamUser,uint hSteamPipe,string pchVersion); public abstract ISteamGameServer GetISteamGameServer(uint hSteamUser,uint hSteamPipe,string pchVersion);
public abstract void SetLocalIPBinding(uint unIP,char usPort); public abstract void SetLocalIPBinding(IntPtr unIP,char usPort);
public abstract ISteamFriends GetISteamFriends(uint hSteamUser,uint hSteamPipe,string pchVersion); public abstract ISteamFriends GetISteamFriends(uint hSteamUser,uint hSteamPipe,string pchVersion);
public abstract ISteamUtils GetISteamUtils(uint hSteamPipe,string pchVersion); public abstract ISteamUtils GetISteamUtils(uint hSteamPipe,string pchVersion);
public abstract ISteamMatchmaking GetISteamMatchmaking(uint hSteamUser,uint hSteamPipe,string pchVersion); public abstract ISteamMatchmaking GetISteamMatchmaking(uint hSteamUser,uint hSteamPipe,string pchVersion);
@@ -2138,6 +2144,7 @@ namespace Valve.Steamworks
public abstract bool IsSteamChinaLauncher(); public abstract bool IsSteamChinaLauncher();
public abstract bool InitFilterText(); public abstract bool InitFilterText();
public abstract int FilterText(string pchOutFilteredText,uint nByteSizeOutFilteredText,string pchInputMessage,bool bLegalOnly); public abstract int FilterText(string pchOutFilteredText,uint nByteSizeOutFilteredText,string pchInputMessage,bool bLegalOnly);
public abstract uint GetIPv6ConnectivityState(uint eProtocol);
} }
@@ -2436,9 +2443,9 @@ namespace Valve.Steamworks
public abstract bool CloseP2PChannelWithUser(ulong steamIDRemote,int nChannel); public abstract bool CloseP2PChannelWithUser(ulong steamIDRemote,int nChannel);
public abstract bool GetP2PSessionState(ulong steamIDRemote,ref P2PSessionState_t pConnectionState); public abstract bool GetP2PSessionState(ulong steamIDRemote,ref P2PSessionState_t pConnectionState);
public abstract bool AllowP2PPacketRelay(bool bAllow); public abstract bool AllowP2PPacketRelay(bool bAllow);
public abstract uint CreateListenSocket(int nVirtualP2PPort,uint nIP,char nPort,bool bAllowUseOfPacketRelay); public abstract uint CreateListenSocket(int nVirtualP2PPort,SteamIPAddress_t nIP,char nPort,bool bAllowUseOfPacketRelay);
public abstract uint CreateP2PConnectionSocket(ulong steamIDTarget,int nVirtualPort,int nTimeoutSec,bool bAllowUseOfPacketRelay); public abstract uint CreateP2PConnectionSocket(ulong steamIDTarget,int nVirtualPort,int nTimeoutSec,bool bAllowUseOfPacketRelay);
public abstract uint CreateConnectionSocket(uint nIP,char nPort,int nTimeoutSec); public abstract uint CreateConnectionSocket(SteamIPAddress_t nIP,char nPort,int nTimeoutSec);
public abstract bool DestroySocket(uint hSocket,bool bNotifyRemoteEnd); public abstract bool DestroySocket(uint hSocket,bool bNotifyRemoteEnd);
public abstract bool DestroyListenSocket(uint hSocket,bool bNotifyRemoteEnd); public abstract bool DestroyListenSocket(uint hSocket,bool bNotifyRemoteEnd);
public abstract bool SendDataOnSocket(uint hSocket,IntPtr pubData,uint cubData,bool bReliable); public abstract bool SendDataOnSocket(uint hSocket,IntPtr pubData,uint cubData,bool bReliable);
@@ -2446,8 +2453,8 @@ namespace Valve.Steamworks
public abstract bool RetrieveDataFromSocket(uint hSocket,IntPtr pubDest,uint cubDest,ref uint pcubMsgSize); public abstract bool RetrieveDataFromSocket(uint hSocket,IntPtr pubDest,uint cubDest,ref uint pcubMsgSize);
public abstract bool IsDataAvailable(uint hListenSocket,ref uint pcubMsgSize,ref uint phSocket); public abstract bool IsDataAvailable(uint hListenSocket,ref uint pcubMsgSize,ref uint phSocket);
public abstract bool RetrieveData(uint hListenSocket,IntPtr pubDest,uint cubDest,ref uint pcubMsgSize,ref uint phSocket); public abstract bool RetrieveData(uint hListenSocket,IntPtr pubDest,uint cubDest,ref uint pcubMsgSize,ref uint phSocket);
public abstract bool GetSocketInfo(uint hSocket,ref CSteamID pSteamIDRemote,ref int peSocketStatus,ref uint punIPRemote,ref char punPortRemote); public abstract bool GetSocketInfo(uint hSocket,ref CSteamID pSteamIDRemote,ref int peSocketStatus,ref SteamIPAddress_t punIPRemote,ref char punPortRemote);
public abstract bool GetListenSocketInfo(uint hListenSocket,ref uint pnIP,ref char pnPort); public abstract bool GetListenSocketInfo(uint hListenSocket,ref SteamIPAddress_t pnIP,ref char pnPort);
public abstract uint GetSocketConnectionType(uint hSocket); public abstract uint GetSocketConnectionType(uint hSocket);
public abstract int GetMaxPacketSize(uint hSocket); public abstract int GetMaxPacketSize(uint hSocket);
} }
@@ -2653,6 +2660,7 @@ namespace Valve.Steamworks
public abstract bool GetQueryUGCKeyValueTag0(ulong handle,uint index,string pchKey,out string pchValue); public abstract bool GetQueryUGCKeyValueTag0(ulong handle,uint index,string pchKey,out string pchValue);
public abstract bool ReleaseQueryUGCRequest(ulong handle); public abstract bool ReleaseQueryUGCRequest(ulong handle);
public abstract bool AddRequiredTag(ulong handle,string pTagName); public abstract bool AddRequiredTag(ulong handle,string pTagName);
public abstract bool AddRequiredTagGroup(ulong handle,ref SteamParamStringArray_t pTagGroups);
public abstract bool AddExcludedTag(ulong handle,string pTagName); public abstract bool AddExcludedTag(ulong handle,string pTagName);
public abstract bool SetReturnOnlyIDs(ulong handle,bool bReturnOnlyIDs); public abstract bool SetReturnOnlyIDs(ulong handle,bool bReturnOnlyIDs);
public abstract bool SetReturnKeyValueTags(ulong handle,bool bReturnKeyValueTags); public abstract bool SetReturnKeyValueTags(ulong handle,bool bReturnKeyValueTags);
@@ -2858,6 +2866,7 @@ namespace Valve.Steamworks
public abstract string GetSessionClientName(uint unSessionID); public abstract string GetSessionClientName(uint unSessionID);
public abstract uint GetSessionClientFormFactor(uint unSessionID); public abstract uint GetSessionClientFormFactor(uint unSessionID);
public abstract bool BGetSessionClientResolution(uint unSessionID,ref int pnResolutionX,ref int pnResolutionY); public abstract bool BGetSessionClientResolution(uint unSessionID,ref int pnResolutionX,ref int pnResolutionY);
public abstract bool BSendRemotePlayTogetherInvite(ulong steamIDFriend);
} }
@@ -2900,7 +2909,7 @@ namespace Valve.Steamworks
public abstract bool RequestUserGroupStatus(ulong steamIDUser,ulong steamIDGroup); public abstract bool RequestUserGroupStatus(ulong steamIDUser,ulong steamIDGroup);
public abstract void GetGameplayStats(); public abstract void GetGameplayStats();
public abstract ulong GetServerReputation(); public abstract ulong GetServerReputation();
public abstract uint GetPublicIP(); public abstract SteamIPAddress_t GetPublicIP();
public abstract bool HandleIncomingPacket(IntPtr pData,int cbData,uint srcIP,char srcPort); public abstract bool HandleIncomingPacket(IntPtr pData,int cbData,uint srcIP,char srcPort);
public abstract int GetNextOutgoingPacket(IntPtr pOut,int cbMaxOut,ref uint pNetAdr,ref char pPort); public abstract int GetNextOutgoingPacket(IntPtr pOut,int cbMaxOut,ref uint pNetAdr,ref char pPort);
public abstract void EnableHeartbeats(bool bActive); public abstract void EnableHeartbeats(bool bActive);
@@ -2986,7 +2995,7 @@ public override ISteamGameServer GetISteamGameServer(uint hSteamUser,uint hSteam
IntPtr result = NativeEntrypoints.SteamAPI_ISteamClient_GetISteamGameServer(m_pSteamClient,hSteamUser,hSteamPipe,pchVersion); IntPtr result = NativeEntrypoints.SteamAPI_ISteamClient_GetISteamGameServer(m_pSteamClient,hSteamUser,hSteamPipe,pchVersion);
return (ISteamGameServer) Marshal.PtrToStructure(result, typeof(ISteamGameServer)); return (ISteamGameServer) Marshal.PtrToStructure(result, typeof(ISteamGameServer));
} }
public override void SetLocalIPBinding(uint unIP,char usPort) public override void SetLocalIPBinding(IntPtr unIP,char usPort)
{ {
CheckIfUsable(); CheckIfUsable();
NativeEntrypoints.SteamAPI_ISteamClient_SetLocalIPBinding(m_pSteamClient,unIP,usPort); NativeEntrypoints.SteamAPI_ISteamClient_SetLocalIPBinding(m_pSteamClient,unIP,usPort);
@@ -4034,6 +4043,12 @@ public override int FilterText(string pchOutFilteredText,uint nByteSizeOutFilter
int result = NativeEntrypoints.SteamAPI_ISteamUtils_FilterText(m_pSteamUtils,pchOutFilteredText,nByteSizeOutFilteredText,pchInputMessage,bLegalOnly); int result = NativeEntrypoints.SteamAPI_ISteamUtils_FilterText(m_pSteamUtils,pchOutFilteredText,nByteSizeOutFilteredText,pchInputMessage,bLegalOnly);
return result; return result;
} }
public override uint GetIPv6ConnectivityState(uint eProtocol)
{
CheckIfUsable();
uint result = NativeEntrypoints.SteamAPI_ISteamUtils_GetIPv6ConnectivityState(m_pSteamUtils,eProtocol);
return result;
}
} }
@@ -5652,7 +5667,7 @@ public override bool AllowP2PPacketRelay(bool bAllow)
bool result = NativeEntrypoints.SteamAPI_ISteamNetworking_AllowP2PPacketRelay(m_pSteamNetworking,bAllow); bool result = NativeEntrypoints.SteamAPI_ISteamNetworking_AllowP2PPacketRelay(m_pSteamNetworking,bAllow);
return result; return result;
} }
public override uint CreateListenSocket(int nVirtualP2PPort,uint nIP,char nPort,bool bAllowUseOfPacketRelay) public override uint CreateListenSocket(int nVirtualP2PPort,SteamIPAddress_t nIP,char nPort,bool bAllowUseOfPacketRelay)
{ {
CheckIfUsable(); CheckIfUsable();
uint result = NativeEntrypoints.SteamAPI_ISteamNetworking_CreateListenSocket(m_pSteamNetworking,nVirtualP2PPort,nIP,nPort,bAllowUseOfPacketRelay); uint result = NativeEntrypoints.SteamAPI_ISteamNetworking_CreateListenSocket(m_pSteamNetworking,nVirtualP2PPort,nIP,nPort,bAllowUseOfPacketRelay);
@@ -5664,7 +5679,7 @@ public override uint CreateP2PConnectionSocket(ulong steamIDTarget,int nVirtualP
uint result = NativeEntrypoints.SteamAPI_ISteamNetworking_CreateP2PConnectionSocket(m_pSteamNetworking,steamIDTarget,nVirtualPort,nTimeoutSec,bAllowUseOfPacketRelay); uint result = NativeEntrypoints.SteamAPI_ISteamNetworking_CreateP2PConnectionSocket(m_pSteamNetworking,steamIDTarget,nVirtualPort,nTimeoutSec,bAllowUseOfPacketRelay);
return result; return result;
} }
public override uint CreateConnectionSocket(uint nIP,char nPort,int nTimeoutSec) public override uint CreateConnectionSocket(SteamIPAddress_t nIP,char nPort,int nTimeoutSec)
{ {
CheckIfUsable(); CheckIfUsable();
uint result = NativeEntrypoints.SteamAPI_ISteamNetworking_CreateConnectionSocket(m_pSteamNetworking,nIP,nPort,nTimeoutSec); uint result = NativeEntrypoints.SteamAPI_ISteamNetworking_CreateConnectionSocket(m_pSteamNetworking,nIP,nPort,nTimeoutSec);
@@ -5718,19 +5733,17 @@ public override bool RetrieveData(uint hListenSocket,IntPtr pubDest,uint cubDest
bool result = NativeEntrypoints.SteamAPI_ISteamNetworking_RetrieveData(m_pSteamNetworking,hListenSocket,pubDest,cubDest,ref pcubMsgSize,ref phSocket); bool result = NativeEntrypoints.SteamAPI_ISteamNetworking_RetrieveData(m_pSteamNetworking,hListenSocket,pubDest,cubDest,ref pcubMsgSize,ref phSocket);
return result; return result;
} }
public override bool GetSocketInfo(uint hSocket,ref CSteamID pSteamIDRemote,ref int peSocketStatus,ref uint punIPRemote,ref char punPortRemote) public override bool GetSocketInfo(uint hSocket,ref CSteamID pSteamIDRemote,ref int peSocketStatus,ref SteamIPAddress_t punIPRemote,ref char punPortRemote)
{ {
CheckIfUsable(); CheckIfUsable();
peSocketStatus = 0; peSocketStatus = 0;
punIPRemote = 0;
punPortRemote = (char) 0; punPortRemote = (char) 0;
bool result = NativeEntrypoints.SteamAPI_ISteamNetworking_GetSocketInfo(m_pSteamNetworking,hSocket,ref pSteamIDRemote,ref peSocketStatus,ref punIPRemote,ref punPortRemote); bool result = NativeEntrypoints.SteamAPI_ISteamNetworking_GetSocketInfo(m_pSteamNetworking,hSocket,ref pSteamIDRemote,ref peSocketStatus,ref punIPRemote,ref punPortRemote);
return result; return result;
} }
public override bool GetListenSocketInfo(uint hListenSocket,ref uint pnIP,ref char pnPort) public override bool GetListenSocketInfo(uint hListenSocket,ref SteamIPAddress_t pnIP,ref char pnPort)
{ {
CheckIfUsable(); CheckIfUsable();
pnIP = 0;
pnPort = (char) 0; pnPort = (char) 0;
bool result = NativeEntrypoints.SteamAPI_ISteamNetworking_GetListenSocketInfo(m_pSteamNetworking,hListenSocket,ref pnIP,ref pnPort); bool result = NativeEntrypoints.SteamAPI_ISteamNetworking_GetListenSocketInfo(m_pSteamNetworking,hListenSocket,ref pnIP,ref pnPort);
return result; return result;
@@ -6878,6 +6891,12 @@ public override bool AddRequiredTag(ulong handle,string pTagName)
bool result = NativeEntrypoints.SteamAPI_ISteamUGC_AddRequiredTag(m_pSteamUGC,handle,pTagName); bool result = NativeEntrypoints.SteamAPI_ISteamUGC_AddRequiredTag(m_pSteamUGC,handle,pTagName);
return result; return result;
} }
public override bool AddRequiredTagGroup(ulong handle,ref SteamParamStringArray_t pTagGroups)
{
CheckIfUsable();
bool result = NativeEntrypoints.SteamAPI_ISteamUGC_AddRequiredTagGroup(m_pSteamUGC,handle,ref pTagGroups);
return result;
}
public override bool AddExcludedTag(ulong handle,string pTagName) public override bool AddExcludedTag(ulong handle,string pTagName)
{ {
CheckIfUsable(); CheckIfUsable();
@@ -8009,6 +8028,12 @@ public override bool BGetSessionClientResolution(uint unSessionID,ref int pnReso
bool result = NativeEntrypoints.SteamAPI_ISteamRemotePlay_BGetSessionClientResolution(m_pSteamRemotePlay,unSessionID,ref pnResolutionX,ref pnResolutionY); bool result = NativeEntrypoints.SteamAPI_ISteamRemotePlay_BGetSessionClientResolution(m_pSteamRemotePlay,unSessionID,ref pnResolutionX,ref pnResolutionY);
return result; return result;
} }
public override bool BSendRemotePlayTogetherInvite(ulong steamIDFriend)
{
CheckIfUsable();
bool result = NativeEntrypoints.SteamAPI_ISteamRemotePlay_BSendRemotePlayTogetherInvite(m_pSteamRemotePlay,steamIDFriend);
return result;
}
} }
@@ -8223,10 +8248,10 @@ public override ulong GetServerReputation()
ulong result = NativeEntrypoints.SteamAPI_ISteamGameServer_GetServerReputation(m_pSteamGameServer); ulong result = NativeEntrypoints.SteamAPI_ISteamGameServer_GetServerReputation(m_pSteamGameServer);
return result; return result;
} }
public override uint GetPublicIP() public override SteamIPAddress_t GetPublicIP()
{ {
CheckIfUsable(); CheckIfUsable();
uint result = NativeEntrypoints.SteamAPI_ISteamGameServer_GetPublicIP(m_pSteamGameServer); SteamIPAddress_t result = NativeEntrypoints.SteamAPI_ISteamGameServer_GetPublicIP(m_pSteamGameServer);
return result; return result;
} }
public override bool HandleIncomingPacket(IntPtr pData,int cbData,uint srcIP,char srcPort) public override bool HandleIncomingPacket(IntPtr pData,int cbData,uint srcIP,char srcPort)
@@ -9795,6 +9820,11 @@ internal static extern IntPtr SteamGameServerStats();
} }
public enum ESteamIPType
{
k_ESteamIPTypeIPv4 = 0,
k_ESteamIPTypeIPv6 = 1,
}
public enum EUniverse public enum EUniverse
{ {
k_EUniverseInvalid = 0, k_EUniverseInvalid = 0,
@@ -9806,6 +9836,7 @@ public enum EUniverse
} }
public enum EResult public enum EResult
{ {
k_EResultNone = 0,
k_EResultOK = 1, k_EResultOK = 1,
k_EResultFail = 2, k_EResultFail = 2,
k_EResultNoConnection = 3, k_EResultNoConnection = 3,
@@ -10024,6 +10055,8 @@ public enum EAppOwnershipFlags
k_EAppOwnershipFlags_RentalNotActivated = 65536, k_EAppOwnershipFlags_RentalNotActivated = 65536,
k_EAppOwnershipFlags_Rental = 131072, k_EAppOwnershipFlags_Rental = 131072,
k_EAppOwnershipFlags_SiteLicense = 262144, k_EAppOwnershipFlags_SiteLicense = 262144,
k_EAppOwnershipFlags_LegacyFreeSub = 524288,
k_EAppOwnershipFlags_InvalidOSType = 1048576,
} }
public enum EAppType public enum EAppType
{ {
@@ -10041,9 +10074,9 @@ public enum EAppType
k_EAppType_Franchise = 1024, k_EAppType_Franchise = 1024,
k_EAppType_Video = 2048, k_EAppType_Video = 2048,
k_EAppType_Plugin = 4096, k_EAppType_Plugin = 4096,
k_EAppType_Music = 8192, k_EAppType_MusicAlbum = 8192,
k_EAppType_Series = 16384, k_EAppType_Series = 16384,
k_EAppType_Comic = 32768, k_EAppType_Comic_UNUSED = 32768,
k_EAppType_Beta = 65536, k_EAppType_Beta = 65536,
k_EAppType_Shortcut = 1073741824, k_EAppType_Shortcut = 1073741824,
k_EAppType_DepotOnly = -2147483648, k_EAppType_DepotOnly = -2147483648,
@@ -10181,6 +10214,7 @@ public enum EVRHMDType
k_eEVRHMDType_Lenovo_Explorer = 71, k_eEVRHMDType_Lenovo_Explorer = 71,
k_eEVRHMDType_HP_Unknown = 80, k_eEVRHMDType_HP_Unknown = 80,
k_eEVRHMDType_HP_WindowsMR = 81, k_eEVRHMDType_HP_WindowsMR = 81,
k_eEVRHMDType_HP_Reverb = 82,
k_eEVRHMDType_Samsung_Unknown = 90, k_eEVRHMDType_Samsung_Unknown = 90,
k_eEVRHMDType_Samsung_Odyssey = 91, k_eEVRHMDType_Samsung_Odyssey = 91,
k_eEVRHMDType_Unannounced_Unknown = 100, k_eEVRHMDType_Unannounced_Unknown = 100,
@@ -10217,6 +10251,9 @@ public enum EDurationControlProgress
k_EDurationControlProgress_Full = 0, k_EDurationControlProgress_Full = 0,
k_EDurationControlProgress_Half = 1, k_EDurationControlProgress_Half = 1,
k_EDurationControlProgress_None = 2, k_EDurationControlProgress_None = 2,
k_EDurationControl_ExitSoon_3h = 3,
k_EDurationControl_ExitSoon_5h = 4,
k_EDurationControl_ExitSoon_Night = 5,
} }
public enum EDurationControlNotification public enum EDurationControlNotification
{ {
@@ -10225,6 +10262,9 @@ public enum EDurationControlNotification
k_EDurationControlNotification_3Hours = 2, k_EDurationControlNotification_3Hours = 2,
k_EDurationControlNotification_HalfProgress = 3, k_EDurationControlNotification_HalfProgress = 3,
k_EDurationControlNotification_NoProgress = 4, k_EDurationControlNotification_NoProgress = 4,
k_EDurationControlNotification_ExitSoon_3h = 5,
k_EDurationControlNotification_ExitSoon_5h = 6,
k_EDurationControlNotification_ExitSoon_Night = 7,
} }
public enum EGameSearchErrorCode_t public enum EGameSearchErrorCode_t
{ {
@@ -10246,6 +10286,18 @@ public enum EPlayerResult_t
k_EPlayerResultIncomplete = 4, k_EPlayerResultIncomplete = 4,
k_EPlayerResultCompleted = 5, k_EPlayerResultCompleted = 5,
} }
public enum ESteamIPv6ConnectivityProtocol
{
k_ESteamIPv6ConnectivityProtocol_Invalid = 0,
k_ESteamIPv6ConnectivityProtocol_HTTP = 1,
k_ESteamIPv6ConnectivityProtocol_UDP = 2,
}
public enum ESteamIPv6ConnectivityState
{
k_ESteamIPv6ConnectivityState_Unknown = 0,
k_ESteamIPv6ConnectivityState_Good = 1,
k_ESteamIPv6ConnectivityState_Bad = 2,
}
public enum EFailureType public enum EFailureType
{ {
k_EFailureFlushedCallbackQueue = 0, k_EFailureFlushedCallbackQueue = 0,
@@ -10415,7 +10467,7 @@ public enum ERemoteStoragePlatform
k_ERemoteStoragePlatformOSX = 2, k_ERemoteStoragePlatformOSX = 2,
k_ERemoteStoragePlatformPS3 = 4, k_ERemoteStoragePlatformPS3 = 4,
k_ERemoteStoragePlatformLinux = 8, k_ERemoteStoragePlatformLinux = 8,
k_ERemoteStoragePlatformReserved2 = 16, k_ERemoteStoragePlatformSwitch = 16,
k_ERemoteStoragePlatformAndroid = 32, k_ERemoteStoragePlatformAndroid = 32,
k_ERemoteStoragePlatformIOS = 64, k_ERemoteStoragePlatformIOS = 64,
k_ERemoteStoragePlatformAll = -1, k_ERemoteStoragePlatformAll = -1,
@@ -11485,6 +11537,10 @@ public enum ESteamDeviceFormFactor
k_ESteamDeviceFormFactorComputer = 3, k_ESteamDeviceFormFactorComputer = 3,
k_ESteamDeviceFormFactorTV = 4, k_ESteamDeviceFormFactorTV = 4,
} }
[StructLayout(LayoutKind.Sequential)] public struct SteamIPAddress_t
{
public ESteamIPType m_eType;
}
[StructLayout(LayoutKind.Sequential)] public struct CSteamID [StructLayout(LayoutKind.Sequential)] public struct CSteamID
{ {
public SteamID_t m_steamid; public SteamID_t m_steamid;
@@ -11643,6 +11699,8 @@ public enum ESteamDeviceFormFactor
public int m_csecsLast5h; public int m_csecsLast5h;
public EDurationControlProgress m_progress; public EDurationControlProgress m_progress;
public EDurationControlNotification m_notification; public EDurationControlNotification m_notification;
public int m_csecsToday;
public int m_csecsRemaining;
} }
[StructLayout(LayoutKind.Sequential)] public struct FriendGameInfo_t [StructLayout(LayoutKind.Sequential)] public struct FriendGameInfo_t
{ {
+61 -23
View File
@@ -25,6 +25,7 @@
// General result codes // General result codes
enum EResult enum EResult
{ {
k_EResultNone = 0, // no result
k_EResultOK = 1, // success k_EResultOK = 1, // success
k_EResultFail = 2, // generic failure k_EResultFail = 2, // generic failure
k_EResultNoConnection = 3, // no/failed network connection k_EResultNoConnection = 3, // no/failed network connection
@@ -275,6 +276,8 @@ enum EAppOwnershipFlags
k_EAppOwnershipFlags_RentalNotActivated = 0x10000, // Rental hasn't been activated yet k_EAppOwnershipFlags_RentalNotActivated = 0x10000, // Rental hasn't been activated yet
k_EAppOwnershipFlags_Rental = 0x20000, // Is a rental k_EAppOwnershipFlags_Rental = 0x20000, // Is a rental
k_EAppOwnershipFlags_SiteLicense = 0x40000, // Is from a site license 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.
}; };
@@ -298,9 +301,9 @@ enum EAppType
k_EAppType_Franchise = 0x400, // A hub for collections of multiple apps, eg films, series, games k_EAppType_Franchise = 0x400, // A hub for collections of multiple apps, eg films, series, games
k_EAppType_Video = 0x800, // A video component of either a Film or TVSeries (may be the feature, an episode, preview, making-of, etc) k_EAppType_Video = 0x800, // A video component of either a Film or TVSeries (may be the feature, an episode, preview, making-of, etc)
k_EAppType_Plugin = 0x1000, // Plug-in types for other Apps k_EAppType_Plugin = 0x1000, // Plug-in types for other Apps
k_EAppType_Music = 0x2000, // Music files k_EAppType_MusicAlbum = 0x2000, // "Video game soundtrack album"
k_EAppType_Series = 0x4000, // Container app for video series k_EAppType_Series = 0x4000, // Container app for video series
k_EAppType_Comic = 0x8000, // Comic Book k_EAppType_Comic_UNUSED = 0x8000, // Comic Book
k_EAppType_Beta = 0x10000, // this is a beta version of a game k_EAppType_Beta = 0x10000, // this is a beta version of a game
k_EAppType_Shortcut = 0x40000000, // just a shortcut, client side only k_EAppType_Shortcut = 0x40000000, // just a shortcut, client side only
@@ -380,10 +383,7 @@ typedef bool (*PFNLegacyKeyInstalled)();
const unsigned int k_unSteamAccountIDMask = 0xFFFFFFFF; const unsigned int k_unSteamAccountIDMask = 0xFFFFFFFF;
const unsigned int k_unSteamAccountInstanceMask = 0x000FFFFF; const unsigned int k_unSteamAccountInstanceMask = 0x000FFFFF;
// we allow 3 simultaneous user account instances right now, 1= desktop, 2 = console, 4 = web, 0 = all const unsigned int k_unSteamUserDefaultInstance = 1; // fixed instance for all individual users
const unsigned int k_unSteamUserDesktopInstance = 1;
const unsigned int k_unSteamUserConsoleInstance = 2;
const unsigned int k_unSteamUserWebInstance = 4;
// Special flags for Chat accounts - they go in the top 8 bits // Special flags for Chat accounts - they go in the top 8 bits
// of the steam ID's "instance", leaving 12 for the actual instances // of the steam ID's "instance", leaving 12 for the actual instances
@@ -413,8 +413,8 @@ enum EMarketingMessageFlags
//aggregate flags //aggregate flags
k_EMarketingMessageFlagsPlatformRestrictions = k_EMarketingMessageFlagsPlatformRestrictions =
k_EMarketingMessageFlagsPlatformWindows | k_EMarketingMessageFlagsPlatformWindows |
k_EMarketingMessageFlagsPlatformMac | k_EMarketingMessageFlagsPlatformMac |
k_EMarketingMessageFlagsPlatformLinux, k_EMarketingMessageFlagsPlatformLinux,
}; };
@@ -538,6 +538,7 @@ enum EVRHMDType
k_eEVRHMDType_HP_Unknown = 80, // HP unknown HMD k_eEVRHMDType_HP_Unknown = 80, // HP unknown HMD
k_eEVRHMDType_HP_WindowsMR = 81, // HP Windows MR headset k_eEVRHMDType_HP_WindowsMR = 81, // HP Windows MR headset
k_eEVRHMDType_HP_Reverb = 82, // HP Reverb Windows MR headset
k_eEVRHMDType_Samsung_Unknown = 90, // Samsung unknown HMD k_eEVRHMDType_Samsung_Unknown = 90, // Samsung unknown HMD
k_eEVRHMDType_Samsung_Odyssey = 91, // Samsung Odyssey Windows MR headset k_eEVRHMDType_Samsung_Odyssey = 91, // Samsung Odyssey Windows MR headset
@@ -657,24 +658,35 @@ enum EMarketNotAllowedReasonFlags
// describes XP / progress restrictions to apply for games with duration control / // describes XP / progress restrictions to apply for games with duration control /
// anti-indulgence enabled for minor Steam China users. // anti-indulgence enabled for minor Steam China users.
// //
// WARNING: DO NOT RENUMBER
enum EDurationControlProgress enum EDurationControlProgress
{ {
k_EDurationControlProgress_Full, // Full progress k_EDurationControlProgress_Full = 0, // Full progress
k_EDurationControlProgress_Half, // XP or persistent rewards should be halved k_EDurationControlProgress_Half = 1, // deprecated - XP or persistent rewards should be halved
k_EDurationControlProgress_None, // XP or persistent rewards should be stopped k_EDurationControlProgress_None = 2, // deprecated - XP or persistent rewards should be stopped
k_EDurationControl_ExitSoon_3h = 3, // allowed 3h time since 5h gap/break has elapsed, game should exit - steam will terminate the game soon
k_EDurationControl_ExitSoon_5h = 4, // allowed 5h time in calendar day has elapsed, game should exit - steam will terminate the game soon
k_EDurationControl_ExitSoon_Night = 5, // game running after day period, game should exit - steam will terminate the game soon
}; };
// //
// describes which notification timer has expired, for steam china duration control feature // describes which notification timer has expired, for steam china duration control feature
// //
// WARNING: DO NOT RENUMBER
enum EDurationControlNotification enum EDurationControlNotification
{ {
k_EDurationControlNotification_None, // just informing you about progress, no notification to show k_EDurationControlNotification_None = 0, // just informing you about progress, no notification to show
k_EDurationControlNotification_1Hour, // "you've been playing for an hour" k_EDurationControlNotification_1Hour = 1, // "you've been playing for N hours"
k_EDurationControlNotification_3Hours, // "you've been playing for 3 hours; take a break"
k_EDurationControlNotification_HalfProgress, // "your XP / progress is half normal" k_EDurationControlNotification_3Hours = 2, // deprecated - "you've been playing for 3 hours; take a break"
k_EDurationControlNotification_NoProgress, // "your XP / progress is zero" k_EDurationControlNotification_HalfProgress = 3,// deprecated - "your XP / progress is half normal"
k_EDurationControlNotification_NoProgress = 4, // deprecated - "your XP / progress is zero"
k_EDurationControlNotification_ExitSoon_3h = 5, // allowed 3h time since 5h gap/break has elapsed, game should exit - steam will terminate the game soon
k_EDurationControlNotification_ExitSoon_5h = 6, // allowed 5h time in calendar day has elapsed, game should exit - steam will terminate the game soon
k_EDurationControlNotification_ExitSoon_Night = 7,// game running after day period, game should exit - steam will terminate the game soon
}; };
@@ -721,7 +733,7 @@ public:
CSteamID( uint32 unAccountID, unsigned int unAccountInstance, EUniverse eUniverse, EAccountType eAccountType ) CSteamID( uint32 unAccountID, unsigned int unAccountInstance, EUniverse eUniverse, EAccountType eAccountType )
{ {
#if defined(_SERVER) && defined(Assert) #if defined(_SERVER) && defined(Assert)
Assert( ! ( ( k_EAccountTypeIndividual == eAccountType ) && ( unAccountInstance > k_unSteamUserWebInstance ) ) ); // enforce that for individual accounts, instance is always 1 Assert( ( k_EAccountTypeIndividual != eAccountType ) || ( unAccountInstance == k_unSteamUserDefaultInstance ) ); // enforce that for individual accounts, instance is always 1
#endif // _SERVER #endif // _SERVER
InstancedSet( unAccountID, unAccountInstance, eUniverse, eAccountType ); InstancedSet( unAccountID, unAccountInstance, eUniverse, eAccountType );
} }
@@ -763,8 +775,7 @@ public:
} }
else else
{ {
// by default we pick the desktop instance m_steamid.m_comp.m_unAccountInstance = k_unSteamUserDefaultInstance;
m_steamid.m_comp.m_unAccountInstance = k_unSteamUserDesktopInstance;
} }
} }
@@ -831,7 +842,7 @@ public:
pTSteamGlobalUserID->m_SteamLocalUserID.Split.High32bits; pTSteamGlobalUserID->m_SteamLocalUserID.Split.High32bits;
m_steamid.m_comp.m_EUniverse = eUniverse; // set the universe m_steamid.m_comp.m_EUniverse = eUniverse; // set the universe
m_steamid.m_comp.m_EAccountType = k_EAccountTypeIndividual; // Steam 2 accounts always map to account type of individual m_steamid.m_comp.m_EAccountType = k_EAccountTypeIndividual; // Steam 2 accounts always map to account type of individual
m_steamid.m_comp.m_unAccountInstance = k_unSteamUserDesktopInstance; // Steam2 only knew desktop instances m_steamid.m_comp.m_unAccountInstance = k_unSteamUserDefaultInstance; // Steam2 only knew one instance
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -1000,8 +1011,7 @@ public:
// simple accessors // simple accessors
void SetAccountID( uint32 unAccountID ) { m_steamid.m_comp.m_unAccountID = unAccountID; } void SetAccountID( uint32 unAccountID ) { m_steamid.m_comp.m_unAccountID = unAccountID; }
void SetAccountInstance( uint32 unInstance ){ m_steamid.m_comp.m_unAccountInstance = unInstance; } void SetAccountInstance( uint32 unInstance ){ m_steamid.m_comp.m_unAccountInstance = unInstance; }
void ClearIndividualInstance() { if ( BIndividualAccount() ) m_steamid.m_comp.m_unAccountInstance = 0; }
bool HasNoIndividualInstance() const { return BIndividualAccount() && (m_steamid.m_comp.m_unAccountInstance==0); }
AccountID_t GetAccountID() const { return m_steamid.m_comp.m_unAccountID; } AccountID_t GetAccountID() const { return m_steamid.m_comp.m_unAccountID; }
uint32 GetUnAccountInstance() const { return m_steamid.m_comp.m_unAccountInstance; } uint32 GetUnAccountInstance() const { return m_steamid.m_comp.m_unAccountInstance; }
EAccountType GetEAccountType() const { return ( EAccountType ) m_steamid.m_comp.m_EAccountType; } EAccountType GetEAccountType() const { return ( EAccountType ) m_steamid.m_comp.m_EAccountType; }
@@ -1071,7 +1081,7 @@ inline bool CSteamID::IsValid() const
if ( m_steamid.m_comp.m_EAccountType == k_EAccountTypeIndividual ) if ( m_steamid.m_comp.m_EAccountType == k_EAccountTypeIndividual )
{ {
if ( m_steamid.m_comp.m_unAccountID == 0 || m_steamid.m_comp.m_unAccountInstance > k_unSteamUserWebInstance ) if ( m_steamid.m_comp.m_unAccountID == 0 || m_steamid.m_comp.m_unAccountInstance != k_unSteamUserDefaultInstance )
return false; return false;
} }
@@ -1166,6 +1176,17 @@ public:
m_gameID.m_nType = k_EGameIDTypeGameMod; m_gameID.m_nType = k_EGameIDTypeGameMod;
} }
CGameID( const CGameID &that )
{
m_ulGameID = that.m_ulGameID;
}
CGameID& operator=( const CGameID & that )
{
m_ulGameID = that.m_ulGameID;
return *this;
}
// Hidden functions used only by Steam // Hidden functions used only by Steam
explicit CGameID( const char *pchGameID ); explicit CGameID( const char *pchGameID );
const char *Render() const; // render this Game ID to string const char *Render() const; // render this Game ID to string
@@ -1404,6 +1425,23 @@ enum EPlayerResult_t
k_EPlayerResultCompleted = 5, // player completed game k_EPlayerResultCompleted = 5, // player completed game
}; };
enum ESteamIPv6ConnectivityProtocol
{
k_ESteamIPv6ConnectivityProtocol_Invalid = 0,
k_ESteamIPv6ConnectivityProtocol_HTTP = 1, // because a proxy may make this different than other protocols
k_ESteamIPv6ConnectivityProtocol_UDP = 2, // test UDP connectivity. Uses a port that is commonly needed for other Steam stuff. If UDP works, TCP probably works.
};
// For the above transport protocol, what do we think the local machine's connectivity to the internet over ipv6 is like
enum ESteamIPv6ConnectivityState
{
k_ESteamIPv6ConnectivityState_Unknown = 0, // We haven't run a test yet
k_ESteamIPv6ConnectivityState_Good = 1, // We have recently been able to make a request on ipv6 for the given protocol
k_ESteamIPv6ConnectivityState_Bad = 2, // We failed to make a request, either because this machine has no ipv6 address assigned, or it has no upstream connectivity
};
// Define compile time assert macros to let us validate the structure sizes. // Define compile time assert macros to let us validate the structure sizes.
#define VALVE_COMPILE_TIME_ASSERT( pred ) typedef char compile_time_assert_type[(pred) ? 1 : -1]; #define VALVE_COMPILE_TIME_ASSERT( pred ) typedef char compile_time_assert_type[(pred) ? 1 : -1];
+2
View File
@@ -29,6 +29,8 @@ S_API bool SteamEncryptedAppTicket_BUserOwnsAppInTicket( uint8 *rgubTicketDecryp
S_API bool SteamEncryptedAppTicket_BUserIsVacBanned( uint8 *rgubTicketDecrypted, uint32 cubTicketDecrypted ); S_API bool SteamEncryptedAppTicket_BUserIsVacBanned( uint8 *rgubTicketDecrypted, uint32 cubTicketDecrypted );
S_API bool SteamEncryptedAppTicket_BGetAppDefinedValue( uint8 *rgubTicketDecrypted, uint32 cubTicketDecrypted, uint32 *pValue );
S_API const uint8 *SteamEncryptedAppTicket_GetUserVariableData( uint8 *rgubTicketDecrypted, uint32 cubTicketDecrypted, uint32 *pcubUserData ); 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_BIsTicketSigned( uint8 *rgubTicketDecrypted, uint32 cubTicketDecrypted, const uint8 *pubRSAKey, uint32 cubRSAKey );
+113
View File
@@ -0,0 +1,113 @@
//====== Copyright Valve Corporation, All rights reserved. ====================
//
// Kludge adapter that's used for the transition standalone library.
// This is not the opensource code, or the one in the Steamworks SDK.
//
//=============================================================================
#ifndef STEAMNETWORKINGSOCKETS
#define STEAMNETWORKINGSOCKETS
#ifdef _WIN32
#pragma once
#endif
#include "isteamnetworkingsockets.h"
struct SteamRelayNetworkStatus_t;
struct P2PSessionRequest_t;
struct P2PSessionConnectFail_t;
#if !defined( STEAMNETWORKINGSOCKETS_PARTNER ) && !defined( STEAMNETWORKINGSOCKETS_STREAMINGCLIENT )
#error "Shouldn't be including this!"
#endif
#ifdef STEAMNETWORKINGSOCKETS_STEAM
// #KLUDGE! So we don't have to link with steam_api.lib
#include <steam/steam_api.h>
#include <steam/steam_gameserver.h>
/////////////////////////////////////////////////////////////////////////////
// Temp internal gross stuff you should ignore
typedef void * ( S_CALLTYPE *FSteamInternal_CreateInterface )( const char *);
typedef void ( S_CALLTYPE *FSteamAPI_RegisterCallback)( class CCallbackBase *pCallback, int iCallback );
typedef void ( S_CALLTYPE *FSteamAPI_UnregisterCallback)( class CCallbackBase *pCallback );
typedef void ( S_CALLTYPE *FSteamAPI_RegisterCallResult)( class CCallbackBase *pCallback, SteamAPICall_t hAPICall );
typedef void ( S_CALLTYPE *FSteamAPI_UnregisterCallResult)( class CCallbackBase *pCallback, SteamAPICall_t hAPICall );
STEAMNETWORKINGSOCKETS_INTERFACE void SteamDatagramClient_SetLauncher( const char *pszLauncher ); // Call this before SteamDatagramClient_Init
STEAMNETWORKINGSOCKETS_INTERFACE void SteamDatagramClient_SetUniverse( EUniverse eUniverse ); // Call this before SteamDatagramClient_Init, to run without steam support
STEAMNETWORKINGSOCKETS_INTERFACE void SteamDatagramClient_Internal_SteamAPIKludge( FSteamAPI_RegisterCallback fnRegisterCallback, FSteamAPI_UnregisterCallback fnUnregisterCallback, FSteamAPI_RegisterCallResult fnRegisterCallResult, FSteamAPI_UnregisterCallResult fnUnregisterCallResult );
STEAMNETWORKINGSOCKETS_INTERFACE bool SteamDatagramClient_Init_InternalV9( bool bNoSteamSupport, SteamNetworkingErrMsg &errMsg, FSteamInternal_CreateInterface fnCreateInterface, HSteamUser hSteamUser, HSteamPipe hSteamPipe );
STEAMNETWORKINGSOCKETS_INTERFACE bool SteamDatagramServer_Init_InternalV2( bool bNoSteamSupport, SteamNetworkingErrMsg &errMsg, FSteamInternal_CreateInterface fnCreateInterface, HSteamUser hSteamUser, HSteamPipe hSteamPipe );
/////////////////////////////////////////////////////////////////////////////
/// Initialize the user interface.
inline bool SteamDatagramClient_Init( bool bNoSteamSupport, SteamNetworkingErrMsg &errMsg )
{
SteamDatagramClient_Internal_SteamAPIKludge( &::SteamAPI_RegisterCallback, &::SteamAPI_UnregisterCallback, &::SteamAPI_RegisterCallResult, &::SteamAPI_UnregisterCallResult );
return SteamDatagramClient_Init_InternalV9( bNoSteamSupport, errMsg, ::SteamInternal_CreateInterface, ::SteamAPI_GetHSteamUser(), ::SteamAPI_GetHSteamPipe() );
}
/// Initialize the game server interface
inline bool SteamDatagramServer_Init( bool bNoSteamSupport, SteamNetworkingErrMsg &errMsg )
{
SteamDatagramClient_Internal_SteamAPIKludge( &::SteamAPI_RegisterCallback, &::SteamAPI_UnregisterCallback, &::SteamAPI_RegisterCallResult, &::SteamAPI_UnregisterCallResult );
return SteamDatagramServer_Init_InternalV2( bNoSteamSupport, errMsg, &SteamInternal_CreateInterface, ::SteamGameServer_GetHSteamUser(), ::SteamGameServer_GetHSteamPipe() );
}
#else // #ifdef STEAMNETWORKINGSOCKETS_STEAM
/// Initialize client interface
STEAMNETWORKINGSOCKETS_INTERFACE bool SteamDatagramClient_Init( bool /* ignored */, SteamNetworkingErrMsg &errMsg );
/// Initialize gameserver interface
STEAMNETWORKINGSOCKETS_INTERFACE bool SteamDatagramServer_Init( bool /* ignored */, SteamNetworkingErrMsg &errMsg );
#endif
/// Shutdown the client interface
STEAMNETWORKINGSOCKETS_INTERFACE void SteamDatagramClient_Kill();
/// Shutdown the game server interface
STEAMNETWORKINGSOCKETS_INTERFACE void SteamDatagramServer_Kill();
/// Call before initializing the library, to set the AppID. This is only needed
/// when running without Steam support. (Either on other platforms, or when
/// intentionally not using steam client.)
STEAMNETWORKINGSOCKETS_INTERFACE void SteamDatagramClient_SetAppID( AppId_t nAppID );
/// Manual polling mode. You should call this before initialize the lib.
/// This will prevent the library from opening up its own service thread,
/// allowing you to pump sockets and stuff from your own thread.
STEAMNETWORKINGSOCKETS_INTERFACE void SteamNetworkingSockets_SetManualPollMode( bool bFlag );
/// If you call SteamNetworkingSockets_SetManualPollMode, then you need to
/// call this frequently. Any time spent between calls is essentially
/// guaranteed to delay time-sensitive processing, so whatever you are
/// doing, make it quick. If you pass a nonzero wait time, then this
/// function will sleep efficiently, waiting for incoming packets,
/// up to the maximum time you specify. It may return prematurely
/// if packets arrive earlier than your timeout.
STEAMNETWORKINGSOCKETS_INTERFACE void SteamNetworkingSockets_Poll( int msMaxWaitTime );
/// TEMP callback dispatch mechanism.
/// You'll override this guy and hook any callbacks you are interested in,
/// and then use ISteamNetworkingSockets::RunCallbacks. Eventually this will go away,
/// and you will register for the callbacks you want using the normal SteamWorks callback
/// mechanisms, and they will get dispatched along with other Steamworks callbacks
/// when you call SteamAPI_RunCallbacks and SteamGameServer_RunCallbacks.
class ISteamNetworkingSocketsCallbacks
{
public:
inline ISteamNetworkingSocketsCallbacks() {}
virtual void OnSteamNetConnectionStatusChanged( SteamNetConnectionStatusChangedCallback_t * ) {}
virtual void OnP2PSessionRequest( P2PSessionRequest_t * ) {}
virtual void OnP2PSessionConnectFail( P2PSessionConnectFail_t * ) {}
virtual void OnAuthenticationStatusChanged( SteamNetAuthenticationStatus_t * ) {}
virtual void OnRelayNetworkStatusChanged( SteamRelayNetworkStatus_t * ) {}
protected:
inline ~ISteamNetworkingSocketsCallbacks() {}
};
#endif // ISTEAMNETWORKINGSOCKETS
+142 -32
View File
@@ -11,6 +11,7 @@
#endif #endif
#include <string.h> #include <string.h>
#include <stdint.h>
//---------------------------------------- //----------------------------------------
// SteamNetworkingSockets library config // SteamNetworkingSockets library config
@@ -195,7 +196,11 @@ struct SteamNetworkingIPAddr
bool operator==(const SteamNetworkingIPAddr &x ) const; bool operator==(const SteamNetworkingIPAddr &x ) const;
}; };
/// An abstract way to represent the identity of a network host /// An abstract way to represent the identity of a network host. All identities can
/// be represented as simple string. Furthermore, this string representation is actually
/// used on the wire in several places, even though it is less efficient, in order to
/// facilitate forward compatibility. (Old client code can handle an identity type that
/// it doesn't understand.)
struct SteamNetworkingIdentity struct SteamNetworkingIdentity
{ {
/// Type of identity. /// Type of identity.
@@ -236,7 +241,11 @@ struct SteamNetworkingIdentity
/// k_cchMaxString bytes big to avoid truncation. /// k_cchMaxString bytes big to avoid truncation.
void ToString( char *buf, size_t cbBuf ) const; void ToString( char *buf, size_t cbBuf ) const;
/// Parse back a string that was generated using ToString /// 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
/// k_ESteamNetworkingIdentityType_UnknownType. false will only be returned if the string
/// looks invalid.
bool ParseString( const char *pszStr ); bool ParseString( const char *pszStr );
// Max sizes // Max sizes
@@ -624,7 +633,7 @@ struct SteamNetworkingQuickConnectionStatus
/// but has now been scheduled for re-transmission. Thus, it's possible to /// but has now been scheduled for re-transmission. Thus, it's possible to
/// observe m_cbPendingReliable increasing between two checks, even if no /// observe m_cbPendingReliable increasing between two checks, even if no
/// calls were made to send reliable data between the checks. Data that is /// calls were made to send reliable data between the checks. Data that is
/// awaiting the nagle delay will appear in these numbers. /// awaiting the Nagle delay will appear in these numbers.
int m_cbPendingUnreliable; int m_cbPendingUnreliable;
int m_cbPendingReliable; int m_cbPendingReliable;
@@ -672,7 +681,7 @@ struct SteamNetworkingQuickConnectionStatus
/// and our peer might, too. /// and our peer might, too.
const int k_cbMaxSteamNetworkingSocketsMessageSizeSend = 512 * 1024; const int k_cbMaxSteamNetworkingSocketsMessageSizeSend = 512 * 1024;
/// A message that has been received /// A message that has been received.
struct SteamNetworkingMessage_t struct SteamNetworkingMessage_t
{ {
@@ -680,15 +689,20 @@ struct SteamNetworkingMessage_t
void *m_pData; void *m_pData;
/// Size of the payload. /// Size of the payload.
uint32 m_cbSize; int m_cbSize;
/// The connection this came from. (Not used when using the ISteamMessages interface) /// For messages received on connections: what connection did this come from?
/// For outgoing messages: what connection to send it to?
/// Not used when using the ISteamNetworkingMessages interface
HSteamNetConnection m_conn; HSteamNetConnection m_conn;
/// Who sent this to us? /// For inbound messages: Who sent this to us?
SteamNetworkingIdentity m_sender; /// For outbound messages on connections: not used.
/// For outbound messages on the ad-hoc ISteamNetworkingMessages interface: who should we send this to?
SteamNetworkingIdentity m_identityPeer;
/// The user data associated with the connection. /// For messages received on connections, this is the user data
/// associated with the connection.
/// ///
/// This is *usually* the same as calling GetConnection() and then /// This is *usually* the same as calling GetConnection() and then
/// fetching the user data associated with that connection, but for /// fetching the user data associated with that connection, but for
@@ -701,12 +715,16 @@ struct SteamNetworkingMessage_t
/// - This is an inline call, so it's *much* faster. /// - This is an inline call, so it's *much* faster.
/// - You might have closed the connection, so fetching the user data /// - You might have closed the connection, so fetching the user data
/// would not be possible. /// would not be possible.
///
/// Not used when sending messages,
int64 m_nConnUserData; int64 m_nConnUserData;
/// Local timestamps when it was received /// Local timestamp when the message was received
/// Not used for outbound messages.
SteamNetworkingMicroseconds m_usecTimeReceived; SteamNetworkingMicroseconds m_usecTimeReceived;
/// Message number assigned by the sender /// Message number assigned by the sender.
/// This is not used for outbound messages
int64 m_nMessageNumber; int64 m_nMessageNumber;
/// Function used to free up m_pData. This mechanism exists so that /// Function used to free up m_pData. This mechanism exists so that
@@ -717,33 +735,46 @@ struct SteamNetworkingMessage_t
/// free( pMsg->m_pData ); /// free( pMsg->m_pData );
void (*m_pfnFreeData)( SteamNetworkingMessage_t *pMsg ); void (*m_pfnFreeData)( SteamNetworkingMessage_t *pMsg );
/// Function to used to decrement reference count and, if it's zero, release /// Function to used to decrement the internal reference count and, if
/// the message. You should not normally need to access this directly. /// it's zero, release the message. You should not set this function pointer,
/// (Use Release(), and don't set this.) /// or need to access this directly! Use the Release() function instead!
void (*m_pfnRelease)( SteamNetworkingMessage_t *pMsg ); void (*m_pfnRelease)( SteamNetworkingMessage_t *pMsg );
/// The channel number the message was received on. /// When using ISteamNetworkingMessages, the channel number the message was received on
/// (Not used for messages received on "connections") /// (Not used for messages sent or received on "connections")
int m_nChannel; int m_nChannel;
/// Pad to multiple of 8 bytes /// Bitmask of k_nSteamNetworkingSend_xxx flags.
int m___nPadDummy; /// For received messages, only the k_nSteamNetworkingSend_Reliable bit is valid.
/// For outbound messages, all bits are relevant
int m_nFlags;
#ifdef __cplusplus /// Arbitrary user data that you can use when sending messages using
/// ISteamNetworkingUtils::AllocateMessage and ISteamNetworkingSockets::SendMessage.
/// (The callback you set in m_pfnFreeData might use this field.)
///
/// Not used for received messages.
int64 m_nUserData;
/// You MUST call this when you're done with the object, /// You MUST call this when you're done with the object,
/// to free up memory, etc. /// to free up memory, etc.
inline void Release(); inline void Release();
// For code compatibility, some accessors // For code compatibility, some accessors
inline uint32 GetSize() const { return m_cbSize; } inline uint32 GetSize() const { return m_cbSize; }
inline const void *GetData() const { return m_pData; } inline const void *GetData() const { return m_pData; }
inline int GetChannel() const { return m_nChannel; } inline int GetChannel() const { return m_nChannel; }
inline HSteamNetConnection GetConnection() const { return m_conn; } inline HSteamNetConnection GetConnection() const { return m_conn; }
inline int64 GetConnectionUserData() const { return m_nConnUserData; } inline int64 GetConnectionUserData() const { return m_nConnUserData; }
inline SteamNetworkingMicroseconds GetTimeReceived() const { return m_usecTimeReceived; } inline SteamNetworkingMicroseconds GetTimeReceived() const { return m_usecTimeReceived; }
inline int64 GetMessageNumber() const { return m_nMessageNumber; } inline int64 GetMessageNumber() const { return m_nMessageNumber; }
#endif protected:
// Declare destructor protected. You should never need to declare a message
// object on the stack or create one yourself.
// - You will receive a pointer to a message object when you receive messages (e.g. ISteamNetworkingSockets::ReceiveMessagesOnConnection)
// - You can allocate a message object for efficient sending using ISteamNetworkingUtils::AllocateMessage
// - Call Release() to free the object
inline ~SteamNetworkingMessage_t() {}
}; };
// //
@@ -802,7 +833,7 @@ const int k_nSteamNetworkingSend_NoDelay = 4;
// - there is a sufficiently large number of messages queued up already such that the current message // - there is a sufficiently large number of messages queued up already such that the current message
// will not be placed on the wire in the next ~200ms or so. // will not be placed on the wire in the next ~200ms or so.
// //
// if a message is dropped for these reasons, k_EResultIgnored will be returned. // If a message is dropped for these reasons, k_EResultIgnored will be returned.
const int k_nSteamNetworkingSend_UnreliableNoDelay = k_nSteamNetworkingSend_Unreliable|k_nSteamNetworkingSend_NoDelay|k_nSteamNetworkingSend_NoNagle; const int k_nSteamNetworkingSend_UnreliableNoDelay = k_nSteamNetworkingSend_Unreliable|k_nSteamNetworkingSend_NoDelay|k_nSteamNetworkingSend_NoNagle;
// Reliable message send. Can send up to k_cbMaxSteamNetworkingSocketsMessageSizeSend bytes in a single message. // Reliable message send. Can send up to k_cbMaxSteamNetworkingSocketsMessageSizeSend bytes in a single message.
@@ -821,6 +852,21 @@ const int k_nSteamNetworkingSend_Reliable = 8;
// Migration note: This is equivalent to k_EP2PSendReliable // Migration note: This is equivalent to k_EP2PSendReliable
const int k_nSteamNetworkingSend_ReliableNoNagle = k_nSteamNetworkingSend_Reliable|k_nSteamNetworkingSend_NoNagle; const int k_nSteamNetworkingSend_ReliableNoNagle = k_nSteamNetworkingSend_Reliable|k_nSteamNetworkingSend_NoNagle;
// By default, message sending is queued, and the work of encryption and talking to
// the operating system sockets, etc is done on a service thread. This is usually a
// a performance win when messages are sent from the "main thread". However, if this
// flag is set, and data is ready to be sent immediately (either from this message
// or earlier queued data), then that work will be done in the current thread, before
// the current call returns. If data is not ready to be sent (due to rate limiting
// or Nagle), then this flag has no effect.
//
// This is an advanced flag used to control performance at a very low level. For
// most applications running on modern hardware with more than one CPU core, doing
// the work of sending on a service thread will yield the best performance. Only
// use this flag if you have a really good reason and understand what you are doing.
// Otherwise you will probably just make performance worse.
const int k_nSteamNetworkingSend_UseCurrentThread = 16;
// //
// Ping location / measurement // Ping location / measurement
// //
@@ -960,6 +1006,9 @@ enum ESteamNetworkingConfigValue
/// we don't know our identity or can't get a cert. On the server, it means that /// we don't know our identity or can't get a cert. On the server, it means that
/// we won't automatically reject a connection due to a failure to authenticate. /// we won't automatically reject a connection due to a failure to authenticate.
/// (You can examine the incoming connection and decide whether to accept it.) /// (You can examine the incoming connection and decide whether to accept it.)
///
/// This is a dev configuration value, and you should not let users modify it in
/// production.
k_ESteamNetworkingConfig_IP_AllowWithoutAuth = 23, k_ESteamNetworkingConfig_IP_AllowWithoutAuth = 23,
/// [connection int32] Do not send UDP packets with a payload of /// [connection int32] Do not send UDP packets with a payload of
@@ -971,6 +1020,30 @@ enum ESteamNetworkingConfigValue
/// will not fragment, based on k_ESteamNetworkingConfig_MTU_PacketSize /// will not fragment, based on k_ESteamNetworkingConfig_MTU_PacketSize
k_ESteamNetworkingConfig_MTU_DataSize = 33, k_ESteamNetworkingConfig_MTU_DataSize = 33,
/// [connection int32] Allow unencrypted (and unauthenticated) communication.
/// 0: Not allowed (the default)
/// 1: Allowed, but prefer encrypted
/// 2: Allowed, and preferred
/// 3: Required. (Fail the connection if the peer requires encryption.)
///
/// This is a dev configuration value, since its purpose is to disable encryption.
/// You should not let users modify it in production. (But note that it requires
/// the peer to also modify their value in order for encryption to be disabled.)
k_ESteamNetworkingConfig_Unencrypted = 34,
/// [global int32] 0 or 1. Some variables are "dev" variables. They are useful
/// for debugging, but should not be adjusted in production. When this flag is false (the default),
/// such variables will not be enumerated by the ISteamnetworkingUtils::GetFirstConfigValue
/// ISteamNetworkingUtils::GetConfigValueInfo functions. The idea here is that you
/// can use those functions to provide a generic mechanism to set any configuration
/// value from a console or configuration file, looking up the variable by name. Depending
/// on your game, modifying other configuration values may also have negative effects, and
/// you may wish to further lock down which variables are allowed to be modified by the user.
/// (Maybe no variables!) Or maybe you use a whitelist or blacklist approach.
///
/// (This flag is itself a dev variable.)
k_ESteamNetworkingConfig_EnumerateDevVars = 35,
// //
// Settings for SDR relayed connections // Settings for SDR relayed connections
// //
@@ -1013,6 +1086,13 @@ enum ESteamNetworkingConfigValue
/// this set (maybe just one). Comma-separated list. /// this set (maybe just one). Comma-separated list.
k_ESteamNetworkingConfig_SDRClient_ForceProxyAddr = 31, k_ESteamNetworkingConfig_SDRClient_ForceProxyAddr = 31,
/// [global string] For debugging. Force ping times to clusters to be the specified
/// values. A comma separated list of <cluster>=<ms> values. E.g. "sto=32,iad=100"
///
/// This is a dev configuration value, you probably should not let users modify it
/// in production.
k_ESteamNetworkingConfig_SDRClient_FakeClusterPing = 36,
// //
// Log levels for debuging information. A higher priority // Log levels for debuging information. A higher priority
// (lower numeric value) will cause more stuff to be printed. // (lower numeric value) will cause more stuff to be printed.
@@ -1027,6 +1107,36 @@ enum ESteamNetworkingConfigValue
k_ESteamNetworkingConfigValue__Force32Bit = 0x7fffffff k_ESteamNetworkingConfigValue__Force32Bit = 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
/// completely, because network packets could be received between the time the object is created and
/// when the options are applied. To set options at creation time in a reliable way, they must be
/// passed to the creation function. This structure is used to pass those options.
///
/// For the meaning of these fields, see ISteamNetworkingUtils::SetConfigValue. Basically
/// when the object is created, we just iterate over the list of options and call
/// ISteamNetworkingUtils::SetConfigValueStruct, where the scope arguments are supplied by the
/// object being created.
struct SteamNetworkingConfigValue_t
{
/// Which option is being set
ESteamNetworkingConfigValue m_eValue;
/// Which field below did you fill in?
ESteamNetworkingConfigDataType m_eDataType;
/// Option value
union
{
int32_t m_int32;
int64_t m_int64;
float m_float;
const char *m_string; // Points to your '\0'-terminated buffer
void *m_functionPtr;
} m_val;
};
/// Return value of ISteamNetworkintgUtils::GetConfigValue /// Return value of ISteamNetworkintgUtils::GetConfigValue
enum ESteamNetworkingGetConfigValueResult enum ESteamNetworkingGetConfigValueResult
{ {
+76
View File
@@ -183,4 +183,80 @@ const SiteId_t k_ulSiteIdInvalid = 0;
typedef uint64 PartyBeaconID_t; typedef uint64 PartyBeaconID_t;
const PartyBeaconID_t k_ulPartyBeaconIdInvalid = 0; const PartyBeaconID_t k_ulPartyBeaconIdInvalid = 0;
enum ESteamIPType
{
k_ESteamIPTypeIPv4 = 0,
k_ESteamIPTypeIPv6 = 1,
};
#pragma pack( push, 1 )
struct SteamIPAddress_t
{
union {
uint32 m_unIPv4; // Host order
uint8 m_rgubIPv6[16]; // Network order! Same as inaddr_in6. (0011:2233:4455:6677:8899:aabb:ccdd:eeff)
// Internal use only
uint64 m_ipv6Qword[2]; // big endian
};
ESteamIPType m_eType;
bool IsSet() const
{
if ( k_ESteamIPTypeIPv4 == m_eType )
{
return m_unIPv4 != 0;
}
else
{
return m_ipv6Qword[0] !=0 || m_ipv6Qword[1] != 0;
}
}
static SteamIPAddress_t IPv4Any()
{
SteamIPAddress_t ipOut;
ipOut.m_eType = k_ESteamIPTypeIPv4;
ipOut.m_unIPv4 = 0;
return ipOut;
}
static SteamIPAddress_t IPv6Any()
{
SteamIPAddress_t ipOut;
ipOut.m_eType = k_ESteamIPTypeIPv6;
ipOut.m_ipv6Qword[0] = 0;
ipOut.m_ipv6Qword[1] = 0;
return ipOut;
}
static SteamIPAddress_t IPv4Loopback()
{
SteamIPAddress_t ipOut;
ipOut.m_eType = k_ESteamIPTypeIPv4;
ipOut.m_unIPv4 = 0x7f000001;
return ipOut;
}
static SteamIPAddress_t IPv6Loopback()
{
SteamIPAddress_t ipOut;
ipOut.m_eType = k_ESteamIPTypeIPv6;
ipOut.m_ipv6Qword[0] = 0;
ipOut.m_ipv6Qword[1] = 0;
ipOut.m_rgubIPv6[15] = 1;
return ipOut;
}
};
#pragma pack( pop )
#endif // STEAMTYPES_H #endif // STEAMTYPES_H
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+2 -2
View File
@@ -8,8 +8,8 @@ if [ "$UNAME" == "Linux" ]; then
PLATFORM=linux32 PLATFORM=linux32
export LD_LIBRARY_PATH="$STEAMROOT/$PLATFORM:$LD_LIBRARY_PATH" export LD_LIBRARY_PATH="$STEAMROOT/$PLATFORM:$LD_LIBRARY_PATH"
else # if [ "$UNAME" == "Darwin" ]; then else # if [ "$UNAME" == "Darwin" ]; then
PLATFORM=osx32 PLATFORM=osx
export DYLD_LIBRARY_PATH="$STEAMROOT/$PLATFORM:$DYLD_LIBRARY_PATH" export DYLD_LIBRARY_PATH="$STEAMROOT/$PLATFORM:$DYLD_LIBRARY_PATH"
fi fi
ulimit -n 2048 ulimit -n 2048
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.