diff --git a/Facepunch.Steamworks.Test/steam_api.dll b/Facepunch.Steamworks.Test/steam_api.dll index a3a661a..8fb32b4 100644 Binary files a/Facepunch.Steamworks.Test/steam_api.dll and b/Facepunch.Steamworks.Test/steam_api.dll differ diff --git a/Facepunch.Steamworks.Test/steam_api64.dll b/Facepunch.Steamworks.Test/steam_api64.dll index 2fc976a..c6e55cf 100644 Binary files a/Facepunch.Steamworks.Test/steam_api64.dll and b/Facepunch.Steamworks.Test/steam_api64.dll differ diff --git a/Facepunch.Steamworks/Generated/CustomEnums.cs b/Facepunch.Steamworks/Generated/CustomEnums.cs index ab2360a..6d85281 100644 --- a/Facepunch.Steamworks/Generated/CustomEnums.cs +++ b/Facepunch.Steamworks/Generated/CustomEnums.cs @@ -191,8 +191,6 @@ namespace Steamworks HTML_UpdateToolTip = 4525, HTML_HideToolTip = 4526, HTML_BrowserRestarted = 4527, - BroadcastUploadStart = 4604, - BroadcastUploadStop = 4605, GetVideoURLResult = 4611, GetOPFSettingsResult = 4624, SteamInventoryResultReady = 4700, @@ -403,8 +401,6 @@ namespace Steamworks { CallbackType.HTML_UpdateToolTip, typeof( HTML_UpdateToolTip_t )}, { CallbackType.HTML_HideToolTip, typeof( HTML_HideToolTip_t )}, { CallbackType.HTML_BrowserRestarted, typeof( HTML_BrowserRestarted_t )}, - { CallbackType.BroadcastUploadStart, typeof( BroadcastUploadStart_t )}, - { CallbackType.BroadcastUploadStop, typeof( BroadcastUploadStop_t )}, { CallbackType.GetVideoURLResult, typeof( GetVideoURLResult_t )}, { CallbackType.GetOPFSettingsResult, typeof( GetOPFSettingsResult_t )}, { CallbackType.SteamInventoryResultReady, typeof( SteamInventoryResultReady_t )}, diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamController.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamController.cs index 1ff01b2..d93dccf 100644 --- a/Facepunch.Steamworks/Generated/Interfaces/ISteamController.cs +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamController.cs @@ -15,9 +15,9 @@ namespace Steamworks SetupInterface( IsGameServer ); } - [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamController_v007", CallingConvention = Platform.CC)] - internal static extern IntPtr SteamAPI_SteamController_v007(); - public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamController_v007(); + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamController_v008", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamController_v008(); + public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamController_v008(); #region FunctionMeta diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamFriends.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamFriends.cs index 4cdd6d8..eb3538a 100644 --- a/Facepunch.Steamworks/Generated/Interfaces/ISteamFriends.cs +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamFriends.cs @@ -852,5 +852,15 @@ namespace Steamworks return returnValue; } + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_ActivateGameOverlayInviteDialogConnectString", CallingConvention = Platform.CC)] + private static extern void _ActivateGameOverlayInviteDialogConnectString( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchConnectString ); + + #endregion + internal void ActivateGameOverlayInviteDialogConnectString( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchConnectString ) + { + _ActivateGameOverlayInviteDialogConnectString( Self, pchConnectString ); + } + } } diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamInput.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamInput.cs index 02c1980..e2dac0d 100644 --- a/Facepunch.Steamworks/Generated/Interfaces/ISteamInput.cs +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamInput.cs @@ -15,9 +15,9 @@ namespace Steamworks SetupInterface( IsGameServer ); } - [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamInput_v001", CallingConvention = Platform.CC)] - internal static extern IntPtr SteamAPI_SteamInput_v001(); - public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamInput_v001(); + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamInput_v002", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamInput_v002(); + public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamInput_v002(); #region FunctionMeta diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamNetworkingMessages.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamNetworkingMessages.cs index 2033e5c..715c34a 100644 --- a/Facepunch.Steamworks/Generated/Interfaces/ISteamNetworkingMessages.cs +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamNetworkingMessages.cs @@ -15,12 +15,12 @@ namespace Steamworks SetupInterface( IsGameServer ); } - [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingMessages_v002", CallingConvention = Platform.CC)] - internal static extern IntPtr SteamAPI_SteamNetworkingMessages_v002(); - public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamNetworkingMessages_v002(); - [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameServerNetworkingMessages_v002", CallingConvention = Platform.CC)] - internal static extern IntPtr SteamAPI_SteamGameServerNetworkingMessages_v002(); - public override IntPtr GetServerInterfacePointer() => SteamAPI_SteamGameServerNetworkingMessages_v002(); + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingMessages_SteamAPI_v002", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamNetworkingMessages_SteamAPI_v002(); + public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamNetworkingMessages_SteamAPI_v002(); + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameServerNetworkingMessages_SteamAPI_v002", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamGameServerNetworkingMessages_SteamAPI_v002(); + public override IntPtr GetServerInterfacePointer() => SteamAPI_SteamGameServerNetworkingMessages_SteamAPI_v002(); #region FunctionMeta diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamNetworkingSockets.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamNetworkingSockets.cs index 61e402e..46e5b17 100644 --- a/Facepunch.Steamworks/Generated/Interfaces/ISteamNetworkingSockets.cs +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamNetworkingSockets.cs @@ -15,12 +15,12 @@ namespace Steamworks SetupInterface( IsGameServer ); } - [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingSockets_v009", CallingConvention = Platform.CC)] - internal static extern IntPtr SteamAPI_SteamNetworkingSockets_v009(); - public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamNetworkingSockets_v009(); - [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameServerNetworkingSockets_v009", CallingConvention = Platform.CC)] - internal static extern IntPtr SteamAPI_SteamGameServerNetworkingSockets_v009(); - public override IntPtr GetServerInterfacePointer() => SteamAPI_SteamGameServerNetworkingSockets_v009(); + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingSockets_SteamAPI_v009", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamNetworkingSockets_SteamAPI_v009(); + public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamNetworkingSockets_SteamAPI_v009(); + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameServerNetworkingSockets_SteamAPI_v009", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamGameServerNetworkingSockets_SteamAPI_v009(); + public override IntPtr GetServerInterfacePointer() => SteamAPI_SteamGameServerNetworkingSockets_SteamAPI_v009(); #region FunctionMeta diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamNetworkingUtils.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamNetworkingUtils.cs index 7251479..f1cd609 100644 --- a/Facepunch.Steamworks/Generated/Interfaces/ISteamNetworkingUtils.cs +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamNetworkingUtils.cs @@ -15,9 +15,9 @@ namespace Steamworks SetupInterface( IsGameServer ); } - [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingUtils_v003", CallingConvention = Platform.CC)] - internal static extern IntPtr SteamAPI_SteamNetworkingUtils_v003(); - public override IntPtr GetGlobalInterfacePointer() => SteamAPI_SteamNetworkingUtils_v003(); + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingUtils_SteamAPI_v003", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamNetworkingUtils_SteamAPI_v003(); + public override IntPtr GetGlobalInterfacePointer() => SteamAPI_SteamNetworkingUtils_SteamAPI_v003(); #region FunctionMeta diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamUGC.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamUGC.cs index ab3ece4..0a6d7c2 100644 --- a/Facepunch.Steamworks/Generated/Interfaces/ISteamUGC.cs +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamUGC.cs @@ -15,12 +15,12 @@ namespace Steamworks SetupInterface( IsGameServer ); } - [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamUGC_v014", CallingConvention = Platform.CC)] - internal static extern IntPtr SteamAPI_SteamUGC_v014(); - public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamUGC_v014(); - [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameServerUGC_v014", CallingConvention = Platform.CC)] - internal static extern IntPtr SteamAPI_SteamGameServerUGC_v014(); - public override IntPtr GetServerInterfacePointer() => SteamAPI_SteamGameServerUGC_v014(); + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamUGC_v015", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamUGC_v015(); + public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamUGC_v015(); + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameServerUGC_v015", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamGameServerUGC_v015(); + public override IntPtr GetServerInterfacePointer() => SteamAPI_SteamGameServerUGC_v015(); #region FunctionMeta @@ -90,6 +90,45 @@ namespace Steamworks return returnValue; } + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCNumTags", CallingConvention = Platform.CC)] + private static extern uint _GetQueryUGCNumTags( IntPtr self, UGCQueryHandle_t handle, uint index ); + + #endregion + internal uint GetQueryUGCNumTags( UGCQueryHandle_t handle, uint index ) + { + var returnValue = _GetQueryUGCNumTags( Self, handle, index ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCTag", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _GetQueryUGCTag( IntPtr self, UGCQueryHandle_t handle, uint index, uint indexTag, IntPtr pchValue, uint cchValueSize ); + + #endregion + internal bool GetQueryUGCTag( UGCQueryHandle_t handle, uint index, uint indexTag, out string pchValue ) + { + IntPtr mempchValue = Helpers.TakeMemory(); + var returnValue = _GetQueryUGCTag( Self, handle, index, indexTag, mempchValue, (1024 * 32) ); + pchValue = Helpers.MemoryToString( mempchValue ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCTagDisplayName", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _GetQueryUGCTagDisplayName( IntPtr self, UGCQueryHandle_t handle, uint index, uint indexTag, IntPtr pchValue, uint cchValueSize ); + + #endregion + internal bool GetQueryUGCTagDisplayName( UGCQueryHandle_t handle, uint index, uint indexTag, out string pchValue ) + { + IntPtr mempchValue = Helpers.TakeMemory(); + var returnValue = _GetQueryUGCTagDisplayName( Self, handle, index, indexTag, mempchValue, (1024 * 32) ); + pchValue = Helpers.MemoryToString( mempchValue ); + return returnValue; + } + #region FunctionMeta [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCPreviewURL", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamUtils.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamUtils.cs index 30b643e..b1a39b8 100644 --- a/Facepunch.Steamworks/Generated/Interfaces/ISteamUtils.cs +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamUtils.cs @@ -102,18 +102,6 @@ namespace Steamworks return returnValue; } - #region FunctionMeta - [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetCSERIPPort", CallingConvention = Platform.CC)] - [return: MarshalAs( UnmanagedType.I1 )] - private static extern bool _GetCSERIPPort( IntPtr self, ref uint unIP, ref ushort usPort ); - - #endregion - internal bool GetCSERIPPort( ref uint unIP, ref ushort usPort ) - { - var returnValue = _GetCSERIPPort( Self, ref unIP, ref usPort ); - return returnValue; - } - #region FunctionMeta [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetCurrentBatteryPower", CallingConvention = Platform.CC)] private static extern byte _GetCurrentBatteryPower( IntPtr self ); diff --git a/Facepunch.Steamworks/Generated/SteamCallbacks.cs b/Facepunch.Steamworks/Generated/SteamCallbacks.cs index 3e90e34..2275a42 100644 --- a/Facepunch.Steamworks/Generated/SteamCallbacks.cs +++ b/Facepunch.Steamworks/Generated/SteamCallbacks.cs @@ -6,31 +6,6 @@ using System.Threading.Tasks; namespace Steamworks.Data { - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct BroadcastUploadStart_t : ICallbackData - { - [MarshalAs(UnmanagedType.I1)] - internal bool IsRTMP; // m_bIsRTMP bool - - #region SteamCallback - public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(BroadcastUploadStart_t) ); - public int DataSize => _datasize; - public CallbackType CallbackType => CallbackType.BroadcastUploadStart; - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct BroadcastUploadStop_t : ICallbackData - { - internal BroadcastUploadResult Result; // m_eResult EBroadcastUploadResult - - #region SteamCallback - public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(BroadcastUploadStop_t) ); - public int DataSize => _datasize; - public CallbackType CallbackType => CallbackType.BroadcastUploadStop; - #endregion - } - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] internal struct SteamServersConnected_t : ICallbackData { diff --git a/Facepunch.Steamworks/Generated/SteamConstants.cs b/Facepunch.Steamworks/Generated/SteamConstants.cs index 9d03ac4..62c7a2d 100644 --- a/Facepunch.Steamworks/Generated/SteamConstants.cs +++ b/Facepunch.Steamworks/Generated/SteamConstants.cs @@ -97,13 +97,6 @@ namespace Steamworks.Data internal static readonly int k_nSteamNetworkingConfig_P2P_Transport_ICE_Enable_Public = 4; internal static readonly int k_nSteamNetworkingConfig_P2P_Transport_ICE_Enable_All = 0x7fffffff; internal static readonly SteamNetworkingPOPID k_SteamDatagramPOPID_dev = ( ( uint ) 'd' << 16 ) | ( ( uint ) 'e' << 8 ) | ( uint ) 'v'; - internal static readonly uint k_unServerFlagNone = 0x00; - internal static readonly uint k_unServerFlagActive = 0x01; - internal static readonly uint k_unServerFlagSecure = 0x02; - internal static readonly uint k_unServerFlagDedicated = 0x04; - internal static readonly uint k_unServerFlagLinux = 0x08; - internal static readonly uint k_unServerFlagPassworded = 0x10; - internal static readonly uint k_unServerFlagPrivate = 0x20; internal static readonly uint k_cbSteamDatagramMaxSerializedTicket = 512; internal static readonly uint k_cbMaxSteamDatagramGameCoordinatorServerLoginAppData = 2048; internal static readonly uint k_cbMaxSteamDatagramGameCoordinatorServerLoginSerialized = 4096; diff --git a/Facepunch.Steamworks/Generated/SteamEnums.cs b/Facepunch.Steamworks/Generated/SteamEnums.cs index c3fb41f..329672c 100644 --- a/Facepunch.Steamworks/Generated/SteamEnums.cs +++ b/Facepunch.Steamworks/Generated/SteamEnums.cs @@ -149,6 +149,9 @@ namespace Steamworks AccountDeleted = 114, ExistingUserCancelledLicense = 115, CommunityCooldown = 116, + NoLauncherSpecified = 117, + MustAgreeToSSA = 118, + LauncherMigrated = 119, } // @@ -316,7 +319,7 @@ namespace Steamworks Comic_UNUSED = 32768, Beta = 65536, Shortcut = 1073741824, - DepotOnly = -2147483648, + DepotOnly_DEPRECATED = -2147483648, } // @@ -489,6 +492,7 @@ namespace Steamworks MDType_HP_Unknown = 80, MDType_HP_WindowsMR = 81, MDType_HP_Reverb = 82, + MDType_HP_ReverbG2 = 1463, MDType_Samsung_Unknown = 90, MDType_Samsung_Odyssey = 91, MDType_Unannounced_Unknown = 100, @@ -1002,10 +1006,10 @@ namespace Steamworks public enum P2PSessionError : int { None = 0, - NotRunningApp = 1, NoRightsToApp = 2, - DestinationNotLoggedIn = 3, Timeout = 4, + NotRunningApp_DELETED = 1, + DestinationNotLoggedIn_DELETED = 3, Max = 5, } @@ -1404,7 +1408,82 @@ namespace Steamworks Switch_Reserved18 = 255, Switch_Reserved19 = 256, Switch_Reserved20 = 257, - Count = 258, + PS5_X = 258, + PS5_Circle = 259, + PS5_Triangle = 260, + PS5_Square = 261, + PS5_LeftBumper = 262, + PS5_RightBumper = 263, + PS5_Option = 264, + PS5_Create = 265, + PS5_Mute = 266, + PS5_LeftPad_Touch = 267, + PS5_LeftPad_Swipe = 268, + PS5_LeftPad_Click = 269, + PS5_LeftPad_DPadNorth = 270, + PS5_LeftPad_DPadSouth = 271, + PS5_LeftPad_DPadWest = 272, + PS5_LeftPad_DPadEast = 273, + PS5_RightPad_Touch = 274, + PS5_RightPad_Swipe = 275, + PS5_RightPad_Click = 276, + PS5_RightPad_DPadNorth = 277, + PS5_RightPad_DPadSouth = 278, + PS5_RightPad_DPadWest = 279, + PS5_RightPad_DPadEast = 280, + PS5_CenterPad_Touch = 281, + PS5_CenterPad_Swipe = 282, + PS5_CenterPad_Click = 283, + PS5_CenterPad_DPadNorth = 284, + PS5_CenterPad_DPadSouth = 285, + PS5_CenterPad_DPadWest = 286, + PS5_CenterPad_DPadEast = 287, + PS5_LeftTrigger_Pull = 288, + PS5_LeftTrigger_Click = 289, + PS5_RightTrigger_Pull = 290, + PS5_RightTrigger_Click = 291, + PS5_LeftStick_Move = 292, + PS5_LeftStick_Click = 293, + PS5_LeftStick_DPadNorth = 294, + PS5_LeftStick_DPadSouth = 295, + PS5_LeftStick_DPadWest = 296, + PS5_LeftStick_DPadEast = 297, + PS5_RightStick_Move = 298, + PS5_RightStick_Click = 299, + PS5_RightStick_DPadNorth = 300, + PS5_RightStick_DPadSouth = 301, + PS5_RightStick_DPadWest = 302, + PS5_RightStick_DPadEast = 303, + PS5_DPad_North = 304, + PS5_DPad_South = 305, + PS5_DPad_West = 306, + PS5_DPad_East = 307, + PS5_Gyro_Move = 308, + PS5_Gyro_Pitch = 309, + PS5_Gyro_Yaw = 310, + PS5_Gyro_Roll = 311, + PS5_DPad_Move = 312, + PS5_Reserved1 = 313, + PS5_Reserved2 = 314, + PS5_Reserved3 = 315, + PS5_Reserved4 = 316, + PS5_Reserved5 = 317, + PS5_Reserved6 = 318, + PS5_Reserved7 = 319, + PS5_Reserved8 = 320, + PS5_Reserved9 = 321, + PS5_Reserved10 = 322, + PS5_Reserved11 = 323, + PS5_Reserved12 = 324, + PS5_Reserved13 = 325, + PS5_Reserved14 = 326, + PS5_Reserved15 = 327, + PS5_Reserved16 = 328, + PS5_Reserved17 = 329, + PS5_Reserved18 = 330, + PS5_Reserved19 = 331, + PS5_Reserved20 = 332, + Count = 333, MaximumPossibleValue = 32767, } @@ -1471,7 +1550,8 @@ namespace Steamworks SwitchProController = 10, MobileTouch = 11, PS3Controller = 12, - Count = 13, + PS5Controller = 13, + Count = 14, MaximumPossibleValue = 255, } @@ -1734,7 +1814,62 @@ namespace Steamworks XBoxOne_DPad_Move = 242, XBox360_DPad_Move = 243, Switch_DPad_Move = 244, - Count = 245, + PS5_X = 245, + PS5_Circle = 246, + PS5_Triangle = 247, + PS5_Square = 248, + PS5_LeftBumper = 249, + PS5_RightBumper = 250, + PS5_Option = 251, + PS5_Create = 252, + PS5_Mute = 253, + PS5_LeftPad_Touch = 254, + PS5_LeftPad_Swipe = 255, + PS5_LeftPad_Click = 256, + PS5_LeftPad_DPadNorth = 257, + PS5_LeftPad_DPadSouth = 258, + PS5_LeftPad_DPadWest = 259, + PS5_LeftPad_DPadEast = 260, + PS5_RightPad_Touch = 261, + PS5_RightPad_Swipe = 262, + PS5_RightPad_Click = 263, + PS5_RightPad_DPadNorth = 264, + PS5_RightPad_DPadSouth = 265, + PS5_RightPad_DPadWest = 266, + PS5_RightPad_DPadEast = 267, + PS5_CenterPad_Touch = 268, + PS5_CenterPad_Swipe = 269, + PS5_CenterPad_Click = 270, + PS5_CenterPad_DPadNorth = 271, + PS5_CenterPad_DPadSouth = 272, + PS5_CenterPad_DPadWest = 273, + PS5_CenterPad_DPadEast = 274, + PS5_LeftTrigger_Pull = 275, + PS5_LeftTrigger_Click = 276, + PS5_RightTrigger_Pull = 277, + PS5_RightTrigger_Click = 278, + PS5_LeftStick_Move = 279, + PS5_LeftStick_Click = 280, + PS5_LeftStick_DPadNorth = 281, + PS5_LeftStick_DPadSouth = 282, + PS5_LeftStick_DPadWest = 283, + PS5_LeftStick_DPadEast = 284, + PS5_RightStick_Move = 285, + PS5_RightStick_Click = 286, + PS5_RightStick_DPadNorth = 287, + PS5_RightStick_DPadSouth = 288, + PS5_RightStick_DPadWest = 289, + PS5_RightStick_DPadEast = 290, + PS5_DPad_Move = 291, + PS5_DPad_North = 292, + PS5_DPad_South = 293, + PS5_DPad_West = 294, + PS5_DPad_East = 295, + PS5_Gyro_Move = 296, + PS5_Gyro_Pitch = 297, + PS5_Gyro_Yaw = 298, + PS5_Gyro_Roll = 299, + Count = 300, MaximumPossibleValue = 32767, } @@ -1953,6 +2088,8 @@ namespace Steamworks Invalid = 0, SteamID = 16, XboxPairwiseID = 17, + SonyPSN = 18, + GoogleStadia = 19, IPAddress = 1, GenericString = 2, GenericBytes = 3, @@ -2090,6 +2227,7 @@ namespace Steamworks Callback_RelayNetworkStatusChanged = 203, Callback_MessagesSessionRequest = 204, Callback_MessagesSessionFailed = 205, + Callback_CreateConnectionSignaling = 206, P2P_STUN_ServerList = 103, P2P_Transport_ICE_Enable = 104, P2P_Transport_ICE_Penalty = 105, diff --git a/Facepunch.Steamworks/Generated/SteamStructFunctions.cs b/Facepunch.Steamworks/Generated/SteamStructFunctions.cs index a1c1147..e816d4e 100644 --- a/Facepunch.Steamworks/Generated/SteamStructFunctions.cs +++ b/Facepunch.Steamworks/Generated/SteamStructFunctions.cs @@ -135,6 +135,18 @@ namespace Steamworks.Data [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIdentity_GetXboxPairwiseID", CallingConvention = Platform.CC)] internal static extern Utf8StringPointer InternalGetXboxPairwiseID( ref NetIdentity self ); + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIdentity_SetPSNID", CallingConvention = Platform.CC)] + internal static extern void InternalSetPSNID( ref NetIdentity self, ulong id ); + + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIdentity_GetPSNID", CallingConvention = Platform.CC)] + internal static extern ulong InternalGetPSNID( ref NetIdentity self ); + + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIdentity_SetStadiaID", CallingConvention = Platform.CC)] + internal static extern void InternalSetStadiaID( ref NetIdentity self, ulong id ); + + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIdentity_GetStadiaID", CallingConvention = Platform.CC)] + internal static extern ulong InternalGetStadiaID( ref NetIdentity self ); + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIdentity_SetIPAddr", CallingConvention = Platform.CC)] internal static extern void InternalSetIPAddr( ref NetIdentity self, ref NetAddress addr ); diff --git a/Facepunch.Steamworks/SteamVideo.cs b/Facepunch.Steamworks/SteamVideo.cs index c6eaf43..ac578d3 100644 --- a/Facepunch.Steamworks/SteamVideo.cs +++ b/Facepunch.Steamworks/SteamVideo.cs @@ -22,13 +22,8 @@ namespace Steamworks internal static void InstallEvents() { - Dispatch.Install( x => OnBroadcastStarted?.Invoke() ); - Dispatch.Install( x => OnBroadcastStopped?.Invoke( x.Result ) ); } - public static event Action OnBroadcastStarted; - public static event Action OnBroadcastStopped; - /// /// Return true if currently using Steam's live broadcasting /// diff --git a/Facepunch.Steamworks/steam_api.dll b/Facepunch.Steamworks/steam_api.dll index a3a661a..8fb32b4 100644 Binary files a/Facepunch.Steamworks/steam_api.dll and b/Facepunch.Steamworks/steam_api.dll differ diff --git a/Facepunch.Steamworks/steam_api64.dll b/Facepunch.Steamworks/steam_api64.dll index 2fc976a..c6e55cf 100644 Binary files a/Facepunch.Steamworks/steam_api64.dll and b/Facepunch.Steamworks/steam_api64.dll differ diff --git a/Generator/steam_sdk/isteamapplist.h b/Generator/steam_sdk/isteamapplist.h index 45441bb..ae018ad 100644 --- a/Generator/steam_sdk/isteamapplist.h +++ b/Generator/steam_sdk/isteamapplist.h @@ -50,7 +50,7 @@ STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamAppList *, SteamAppList, STEAMAPPLIS //--------------------------------------------------------------------------------- // Purpose: Sent when a new app is installed //--------------------------------------------------------------------------------- -STEAM_CALLBACK_BEGIN( SteamAppInstalled_t, k_iSteamAppListCallbacks + 1 ); +STEAM_CALLBACK_BEGIN( SteamAppInstalled_t, k_iSteamAppListCallbacks + 1 ) STEAM_CALLBACK_MEMBER( 0, AppId_t, m_nAppID ) // ID of the app that installs STEAM_CALLBACK_END(1) @@ -58,7 +58,7 @@ STEAM_CALLBACK_END(1) //--------------------------------------------------------------------------------- // Purpose: Sent when an app is uninstalled //--------------------------------------------------------------------------------- -STEAM_CALLBACK_BEGIN( SteamAppUninstalled_t, k_iSteamAppListCallbacks + 2 ); +STEAM_CALLBACK_BEGIN( SteamAppUninstalled_t, k_iSteamAppListCallbacks + 2 ) STEAM_CALLBACK_MEMBER( 0, AppId_t, m_nAppID ) // ID of the app that installs STEAM_CALLBACK_END(1) diff --git a/Generator/steam_sdk/isteamcontroller.h b/Generator/steam_sdk/isteamcontroller.h index c332749..2c5414b 100644 --- a/Generator/steam_sdk/isteamcontroller.h +++ b/Generator/steam_sdk/isteamcontroller.h @@ -310,6 +310,64 @@ enum EControllerActionOrigin k_EControllerActionOrigin_XBox360_DPad_Move, k_EControllerActionOrigin_Switch_DPad_Move, + // Added in SDK 1.51 + k_EControllerActionOrigin_PS5_X, + k_EControllerActionOrigin_PS5_Circle, + k_EControllerActionOrigin_PS5_Triangle, + k_EControllerActionOrigin_PS5_Square, + k_EControllerActionOrigin_PS5_LeftBumper, + k_EControllerActionOrigin_PS5_RightBumper, + k_EControllerActionOrigin_PS5_Option, //Start + k_EControllerActionOrigin_PS5_Create, //Back + k_EControllerActionOrigin_PS5_Mute, + k_EControllerActionOrigin_PS5_LeftPad_Touch, + k_EControllerActionOrigin_PS5_LeftPad_Swipe, + k_EControllerActionOrigin_PS5_LeftPad_Click, + k_EControllerActionOrigin_PS5_LeftPad_DPadNorth, + k_EControllerActionOrigin_PS5_LeftPad_DPadSouth, + k_EControllerActionOrigin_PS5_LeftPad_DPadWest, + k_EControllerActionOrigin_PS5_LeftPad_DPadEast, + k_EControllerActionOrigin_PS5_RightPad_Touch, + k_EControllerActionOrigin_PS5_RightPad_Swipe, + k_EControllerActionOrigin_PS5_RightPad_Click, + k_EControllerActionOrigin_PS5_RightPad_DPadNorth, + k_EControllerActionOrigin_PS5_RightPad_DPadSouth, + k_EControllerActionOrigin_PS5_RightPad_DPadWest, + k_EControllerActionOrigin_PS5_RightPad_DPadEast, + k_EControllerActionOrigin_PS5_CenterPad_Touch, + k_EControllerActionOrigin_PS5_CenterPad_Swipe, + k_EControllerActionOrigin_PS5_CenterPad_Click, + k_EControllerActionOrigin_PS5_CenterPad_DPadNorth, + k_EControllerActionOrigin_PS5_CenterPad_DPadSouth, + k_EControllerActionOrigin_PS5_CenterPad_DPadWest, + k_EControllerActionOrigin_PS5_CenterPad_DPadEast, + k_EControllerActionOrigin_PS5_LeftTrigger_Pull, + k_EControllerActionOrigin_PS5_LeftTrigger_Click, + k_EControllerActionOrigin_PS5_RightTrigger_Pull, + k_EControllerActionOrigin_PS5_RightTrigger_Click, + k_EControllerActionOrigin_PS5_LeftStick_Move, + k_EControllerActionOrigin_PS5_LeftStick_Click, + k_EControllerActionOrigin_PS5_LeftStick_DPadNorth, + k_EControllerActionOrigin_PS5_LeftStick_DPadSouth, + k_EControllerActionOrigin_PS5_LeftStick_DPadWest, + k_EControllerActionOrigin_PS5_LeftStick_DPadEast, + k_EControllerActionOrigin_PS5_RightStick_Move, + k_EControllerActionOrigin_PS5_RightStick_Click, + k_EControllerActionOrigin_PS5_RightStick_DPadNorth, + k_EControllerActionOrigin_PS5_RightStick_DPadSouth, + k_EControllerActionOrigin_PS5_RightStick_DPadWest, + k_EControllerActionOrigin_PS5_RightStick_DPadEast, + k_EControllerActionOrigin_PS5_DPad_Move, + k_EControllerActionOrigin_PS5_DPad_North, + k_EControllerActionOrigin_PS5_DPad_South, + k_EControllerActionOrigin_PS5_DPad_West, + k_EControllerActionOrigin_PS5_DPad_East, + k_EControllerActionOrigin_PS5_Gyro_Move, + k_EControllerActionOrigin_PS5_Gyro_Pitch, + k_EControllerActionOrigin_PS5_Gyro_Yaw, + k_EControllerActionOrigin_PS5_Gyro_Roll, + + k_EControllerActionOrigin_Count, // If Steam has added support for new controllers origins will go here. k_EControllerActionOrigin_MaximumPossibleValue = 32767, // Origins are currently a maximum of 16 bits. }; @@ -362,6 +420,7 @@ enum ESteamInputType k_ESteamInputType_SwitchProController, k_ESteamInputType_MobileTouch, // Steam Link App On-screen Virtual Controller k_ESteamInputType_PS3Controller, // Currently uses PS4 Origins + k_ESteamInputType_PS5Controller, // Added in SDK 151 k_ESteamInputType_Count, k_ESteamInputType_MaximumPossibleValue = 255, }; @@ -540,7 +599,8 @@ public: // If the user is not in Big Picture Mode it will open up the binding in a new window virtual bool ShowBindingPanel( ControllerHandle_t controllerHandle ) = 0; - // Returns the input type for a particular handle + // Returns the input type for a particular handle - unlike EControllerActionOrigin which update with Steam and may return unrecognized values + // ESteamInputType will remain static and only return valid values from your SDK version virtual ESteamInputType GetInputTypeForHandle( ControllerHandle_t controllerHandle ) = 0; // Returns the associated controller handle for the specified emulated gamepad - can be used with the above 2 functions @@ -567,7 +627,7 @@ public: virtual bool GetControllerBindingRevision( ControllerHandle_t controllerHandle, int *pMajor, int *pMinor ) = 0; }; -#define STEAMCONTROLLER_INTERFACE_VERSION "SteamController007" +#define STEAMCONTROLLER_INTERFACE_VERSION "SteamController008" // Global interface accessor inline ISteamController *SteamController(); diff --git a/Generator/steam_sdk/isteamfriends.h b/Generator/steam_sdk/isteamfriends.h index 520a67f..b7ebc73 100644 --- a/Generator/steam_sdk/isteamfriends.h +++ b/Generator/steam_sdk/isteamfriends.h @@ -358,7 +358,7 @@ public: // Rich invite support. // 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 your game so that it is passed on the command line instead. This is a deprecated path; ask us if you really need this.) virtual bool InviteUserToGame( CSteamID steamIDFriend, const char *pchConnectString ) = 0; // recently-played-with friends iteration @@ -419,6 +419,9 @@ public: // to your specified protocol (scheme) uris and instead dispatch a OverlayBrowserProtocolNavigation_t callback to your game. // ActivateGameOverlayToWebPage() must have been called with k_EActivateGameOverlayToWebPageMode_Modal virtual bool RegisterProtocolInOverlayBrowser( const char *pchProtocol ) = 0; + + // Activates the game overlay to open an invite dialog that will send the provided Rich Presence connect string to selected friends + virtual void ActivateGameOverlayInviteDialogConnectString( const char *pchConnectString ) = 0; }; #define STEAMFRIENDS_INTERFACE_VERSION "SteamFriends017" diff --git a/Generator/steam_sdk/isteamgameserver.h b/Generator/steam_sdk/isteamgameserver.h index 8fbd9da..612ef3d 100644 --- a/Generator/steam_sdk/isteamgameserver.h +++ b/Generator/steam_sdk/isteamgameserver.h @@ -12,8 +12,6 @@ #include "steam_api_common.h" -#define MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE ((uint16)-1) - //----------------------------------------------------------------------------- // Purpose: Functions for authenticating users via Steam to play on a game server //----------------------------------------------------------------------------- @@ -256,19 +254,6 @@ public: inline ISteamGameServer *SteamGameServer(); STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamGameServer *, SteamGameServer, STEAMGAMESERVER_INTERFACE_VERSION ); -// game server flags -const uint32 k_unServerFlagNone = 0x00; -const uint32 k_unServerFlagActive = 0x01; // server has users playing -const uint32 k_unServerFlagSecure = 0x02; // server wants to be secure -const uint32 k_unServerFlagDedicated = 0x04; // server is dedicated -const uint32 k_unServerFlagLinux = 0x08; // linux build -const uint32 k_unServerFlagPassworded = 0x10; // password protected -const uint32 k_unServerFlagPrivate = 0x20; // server shouldn't list on master server and - // won't enforce authentication of users that connect to the server. - // Useful when you run a server where the clients may not - // be connected to the internet but you want them to play (i.e LANs) - - // callbacks #if defined( VALVE_CALLBACK_PACK_SMALL ) #pragma pack( push, 4 ) diff --git a/Generator/steam_sdk/isteaminput.h b/Generator/steam_sdk/isteaminput.h index 84f1b14..66c385b 100644 --- a/Generator/steam_sdk/isteaminput.h +++ b/Generator/steam_sdk/isteaminput.h @@ -329,6 +329,83 @@ enum EInputActionOrigin k_EInputActionOrigin_Switch_Reserved18, k_EInputActionOrigin_Switch_Reserved19, k_EInputActionOrigin_Switch_Reserved20, + + // Added in SDK 1.51 + k_EInputActionOrigin_PS5_X, + k_EInputActionOrigin_PS5_Circle, + k_EInputActionOrigin_PS5_Triangle, + k_EInputActionOrigin_PS5_Square, + k_EInputActionOrigin_PS5_LeftBumper, + k_EInputActionOrigin_PS5_RightBumper, + k_EInputActionOrigin_PS5_Option, //Start + k_EInputActionOrigin_PS5_Create, //Back + k_EInputActionOrigin_PS5_Mute, + k_EInputActionOrigin_PS5_LeftPad_Touch, + k_EInputActionOrigin_PS5_LeftPad_Swipe, + k_EInputActionOrigin_PS5_LeftPad_Click, + k_EInputActionOrigin_PS5_LeftPad_DPadNorth, + k_EInputActionOrigin_PS5_LeftPad_DPadSouth, + k_EInputActionOrigin_PS5_LeftPad_DPadWest, + k_EInputActionOrigin_PS5_LeftPad_DPadEast, + k_EInputActionOrigin_PS5_RightPad_Touch, + k_EInputActionOrigin_PS5_RightPad_Swipe, + k_EInputActionOrigin_PS5_RightPad_Click, + k_EInputActionOrigin_PS5_RightPad_DPadNorth, + k_EInputActionOrigin_PS5_RightPad_DPadSouth, + k_EInputActionOrigin_PS5_RightPad_DPadWest, + k_EInputActionOrigin_PS5_RightPad_DPadEast, + k_EInputActionOrigin_PS5_CenterPad_Touch, + k_EInputActionOrigin_PS5_CenterPad_Swipe, + k_EInputActionOrigin_PS5_CenterPad_Click, + k_EInputActionOrigin_PS5_CenterPad_DPadNorth, + k_EInputActionOrigin_PS5_CenterPad_DPadSouth, + k_EInputActionOrigin_PS5_CenterPad_DPadWest, + k_EInputActionOrigin_PS5_CenterPad_DPadEast, + k_EInputActionOrigin_PS5_LeftTrigger_Pull, + k_EInputActionOrigin_PS5_LeftTrigger_Click, + k_EInputActionOrigin_PS5_RightTrigger_Pull, + k_EInputActionOrigin_PS5_RightTrigger_Click, + k_EInputActionOrigin_PS5_LeftStick_Move, + k_EInputActionOrigin_PS5_LeftStick_Click, + k_EInputActionOrigin_PS5_LeftStick_DPadNorth, + k_EInputActionOrigin_PS5_LeftStick_DPadSouth, + k_EInputActionOrigin_PS5_LeftStick_DPadWest, + k_EInputActionOrigin_PS5_LeftStick_DPadEast, + k_EInputActionOrigin_PS5_RightStick_Move, + k_EInputActionOrigin_PS5_RightStick_Click, + k_EInputActionOrigin_PS5_RightStick_DPadNorth, + k_EInputActionOrigin_PS5_RightStick_DPadSouth, + k_EInputActionOrigin_PS5_RightStick_DPadWest, + k_EInputActionOrigin_PS5_RightStick_DPadEast, + k_EInputActionOrigin_PS5_DPad_North, + k_EInputActionOrigin_PS5_DPad_South, + k_EInputActionOrigin_PS5_DPad_West, + k_EInputActionOrigin_PS5_DPad_East, + k_EInputActionOrigin_PS5_Gyro_Move, + k_EInputActionOrigin_PS5_Gyro_Pitch, + k_EInputActionOrigin_PS5_Gyro_Yaw, + k_EInputActionOrigin_PS5_Gyro_Roll, + k_EInputActionOrigin_PS5_DPad_Move, + k_EInputActionOrigin_PS5_Reserved1, + k_EInputActionOrigin_PS5_Reserved2, + k_EInputActionOrigin_PS5_Reserved3, + k_EInputActionOrigin_PS5_Reserved4, + k_EInputActionOrigin_PS5_Reserved5, + k_EInputActionOrigin_PS5_Reserved6, + k_EInputActionOrigin_PS5_Reserved7, + k_EInputActionOrigin_PS5_Reserved8, + k_EInputActionOrigin_PS5_Reserved9, + k_EInputActionOrigin_PS5_Reserved10, + k_EInputActionOrigin_PS5_Reserved11, + k_EInputActionOrigin_PS5_Reserved12, + k_EInputActionOrigin_PS5_Reserved13, + k_EInputActionOrigin_PS5_Reserved14, + k_EInputActionOrigin_PS5_Reserved15, + k_EInputActionOrigin_PS5_Reserved16, + k_EInputActionOrigin_PS5_Reserved17, + k_EInputActionOrigin_PS5_Reserved18, + k_EInputActionOrigin_PS5_Reserved19, + k_EInputActionOrigin_PS5_Reserved20, k_EInputActionOrigin_Count, // If Steam has added support for new controllers origins will go here. k_EInputActionOrigin_MaximumPossibleValue = 32767, // Origins are currently a maximum of 16 bits. @@ -388,6 +465,7 @@ enum ESteamInputType k_ESteamInputType_SwitchProController, k_ESteamInputType_MobileTouch, // Steam Link App On-screen Virtual Controller k_ESteamInputType_PS3Controller, // Currently uses PS4 Origins + k_ESteamInputType_PS5Controller, // Added in SDK 151 k_ESteamInputType_Count, k_ESteamInputType_MaximumPossibleValue = 255, }; @@ -567,7 +645,8 @@ public: // If the user is not in Big Picture Mode it will open up the binding in a new window virtual bool ShowBindingPanel( InputHandle_t inputHandle ) = 0; - // Returns the input type for a particular handle + // Returns the input type for a particular handle - unlike EInputActionOrigin which update with Steam and may return unrecognized values + // ESteamInputType will remain static and only return valid values from your SDK version virtual ESteamInputType GetInputTypeForHandle( InputHandle_t inputHandle ) = 0; // Returns the associated controller handle for the specified emulated gamepad - can be used with the above 2 functions @@ -600,10 +679,10 @@ public: virtual uint32 GetRemotePlaySessionID( InputHandle_t inputHandle ) = 0; }; -#define STEAMINPUT_INTERFACE_VERSION "SteamInput001" +#define STEAMINPUT_INTERFACE_VERSION "SteamInput002" // Global interface accessor inline ISteamInput *SteamInput(); STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamInput *, SteamInput, STEAMINPUT_INTERFACE_VERSION ); -#endif // ISTEAMINPUT_H +#endif // ISTEAMINPUT_H \ No newline at end of file diff --git a/Generator/steam_sdk/isteamnetworking.h b/Generator/steam_sdk/isteamnetworking.h index 2f14d27..b7e077a 100644 --- a/Generator/steam_sdk/isteamnetworking.h +++ b/Generator/steam_sdk/isteamnetworking.h @@ -17,12 +17,16 @@ enum EP2PSessionError { k_EP2PSessionErrorNone = 0, - k_EP2PSessionErrorNotRunningApp = 1, // target is not running the same game k_EP2PSessionErrorNoRightsToApp = 2, // local user doesn't own the app that is running - k_EP2PSessionErrorDestinationNotLoggedIn = 3, // target user isn't connected to Steam k_EP2PSessionErrorTimeout = 4, // target isn't responding, perhaps not calling AcceptP2PSessionWithUser() // corporate firewalls can also block this (NAT traversal is not firewall traversal) // make sure that UDP ports 3478, 4379, and 4380 are open in an outbound direction + + // The following error codes were removed and will never be sent. + // For privacy reasons, there is no reply if the user is offline or playing another game. + k_EP2PSessionErrorNotRunningApp_DELETED = 1, + k_EP2PSessionErrorDestinationNotLoggedIn_DELETED = 3, + k_EP2PSessionErrorMax = 5 }; diff --git a/Generator/steam_sdk/isteamnetworkingmessages.h b/Generator/steam_sdk/isteamnetworkingmessages.h index a23a386..a12a32f 100644 --- a/Generator/steam_sdk/isteamnetworkingmessages.h +++ b/Generator/steam_sdk/isteamnetworkingmessages.h @@ -5,6 +5,7 @@ #pragma once #include "steamnetworkingtypes.h" +#include "steam_api_common.h" //----------------------------------------------------------------------------- /// The non-connection-oriented interface to send and receive messages @@ -56,7 +57,7 @@ public: /// /// It is guaranteed that reliable messages to the same host on the same channel /// will be be received by the remote host (if they are received at all) exactly once, - /// and in the same order that they were send. + /// and in the same order that they were sent. /// /// NO other order guarantees exist! In particular, unreliable messages may be dropped, /// received out of order with respect to each other and with respect to reliable data, @@ -73,52 +74,55 @@ public: /// Returns: /// - k_EREsultOK on success. /// - k_EResultNoConnection will be returned if the session has failed or was closed by the peer, - /// and k_nSteamNetworkingSend_AutoRestartBrokwnSession is not used. (You can use + /// and k_nSteamNetworkingSend_AutoRestartBrokenSession is not used. (You can use /// GetSessionConnectionInfo to get the details.) In order to acknowledge the broken session /// and start a new one, you must call CloseSessionWithUser - /// - See SendMessageToConnection::SendMessageToConnection for more + /// - See ISteamNetworkingSockets::SendMessageToConnection for more possible return values virtual EResult SendMessageToUser( const SteamNetworkingIdentity &identityRemote, const void *pubData, uint32 cubData, int nSendFlags, int nRemoteChannel ) = 0; /// Reads the next message that has been sent from another user via SendMessageToUser() on the given channel. /// Returns number of messages returned into your list. (0 if no message are available on that channel.) /// - /// When you're done with the message object(s), make sure and call Release()! + /// When you're done with the message object(s), make sure and call SteamNetworkingMessage_t::Release()! virtual int ReceiveMessagesOnChannel( int nLocalChannel, SteamNetworkingMessage_t **ppOutMessages, int nMaxMessages ) = 0; - /// AcceptSessionWithUser() should only be called in response to a SteamP2PSessionRequest_t callback - /// SteamP2PSessionRequest_t will be posted if another user tries to send you a message, and you haven't - /// tried to talk to them. If you don't want to talk to them, just ignore the request. - /// If the user continues to send you messages, SteamP2PSessionRequest_t callbacks will continue to - /// be posted periodically. This may be called multiple times for a single user. + /// Call this in response to a SteamNetworkingMessagesSessionRequest_t callback. + /// SteamNetworkingMessagesSessionRequest_t are posted when a user tries to send you a message, + /// and you haven't tried to talk to them first. If you don't want to talk to them, just ignore + /// the request. If the user continues to send you messages, SteamNetworkingMessagesSessionRequest_t + /// callbacks will continue to be posted periodically. /// - /// Calling SendMessage() on the other user, this implicitly accepts any pending session request. + /// Returns false if there is no session with the user pending or otherwise. If there is an + /// existing active session, this function will return true, even if it is not pending. + /// + /// Calling SendMessageToUser() will implicitly accepts any pending session request to that user. virtual bool AcceptSessionWithUser( const SteamNetworkingIdentity &identityRemote ) = 0; /// Call this when you're done talking to a user to immediately free up resources under-the-hood. - /// If the remote user tries to send data to you again, another P2PSessionRequest_t callback will - /// be posted. + /// If the remote user tries to send data to you again, another SteamNetworkingMessagesSessionRequest_t + /// callback will be posted. /// /// Note that sessions that go unused for a few minutes are automatically timed out. virtual bool CloseSessionWithUser( const SteamNetworkingIdentity &identityRemote ) = 0; /// Call this when you're done talking to a user on a specific channel. Once all /// open channels to a user have been closed, the open session to the user will be - /// closed, and any new data from this user will trigger a SteamP2PSessionRequest_t - /// callback + /// closed, and any new data from this user will trigger a + /// SteamSteamNetworkingMessagesSessionRequest_t callback virtual bool CloseChannelWithUser( const SteamNetworkingIdentity &identityRemote, int nLocalChannel ) = 0; /// Returns information about the latest state of a connection, if any, with the given peer. /// Primarily intended for debugging purposes, but can also be used to get more detailed - /// failure information. (See SendMessageToUser and k_nSteamNetworkingSend_AutoRestartBrokwnSession.) + /// failure information. (See SendMessageToUser and k_nSteamNetworkingSend_AutoRestartBrokenSession.) /// /// Returns the value of SteamNetConnectionInfo_t::m_eState, or k_ESteamNetworkingConnectionState_None /// if no connection exists with specified peer. You may pass nullptr for either parameter if /// you do not need the corresponding details. Note that sessions time out after a while, - /// so if a connection fails, or SendMessageToUser returns SendMessageToUser, you cannot wait + /// so if a connection fails, or SendMessageToUser returns k_EResultNoConnection, you cannot wait /// indefinitely to obtain the reason for failure. virtual ESteamNetworkingConnectionState GetSessionConnectionInfo( const SteamNetworkingIdentity &identityRemote, SteamNetConnectionInfo_t *pConnectionInfo, SteamNetworkingQuickConnectionStatus *pQuickStatus ) = 0; }; -#define STEAMNETWORKINGMESSAGES_VERSION "SteamNetworkingMessages002" +#define STEAMNETWORKINGMESSAGES_INTERFACE_VERSION "SteamNetworkingMessages002" // // Callbacks @@ -139,7 +143,7 @@ struct SteamNetworkingMessagesSessionRequest_t /// SteamNetworkingMessages is primarily intended to make porting UDP code easy.) /// /// Remember: callbacks are asynchronous. See notes on SendMessageToUser, -/// and k_nSteamNetworkingSend_AutoRestartBrokwnSession in particular. +/// and k_nSteamNetworkingSend_AutoRestartBrokenSession in particular. /// /// Also, if a session times out due to inactivity, no callbacks will be posted. The only /// way to detect that this is happening is that querying the session state may return @@ -148,37 +152,48 @@ struct SteamNetworkingMessagesSessionFailed_t { enum { k_iCallback = k_iSteamNetworkingMessagesCallbacks + 2 }; - /// Detailed info about the connection. This will include the + /// Detailed info about the session that failed. + /// SteamNetConnectionInfo_t::m_identityRemote indicates who this session + /// was with. SteamNetConnectionInfo_t m_info; }; #pragma pack(pop) -// -// Global accessor -// +// Global accessors +// Using standalone lib +#ifdef STEAMNETWORKINGSOCKETS_STANDALONELIB -#if defined( STEAMNETWORKINGSOCKETS_PARTNER ) + // Standalone lib. + static_assert( STEAMNETWORKINGMESSAGES_INTERFACE_VERSION[25] == '2', "Version mismatch" ); + STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingMessages *SteamNetworkingMessages_LibV2(); + inline ISteamNetworkingMessages *SteamNetworkingMessages_Lib() { return SteamNetworkingMessages_LibV2(); } - // Standalone lib. Use different symbol name, so that we can dynamically switch between steamclient.dll - // and the standalone lib - STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingMessages *SteamNetworkingMessages_Lib(); - STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingMessages *SteamGameServerNetworkingMessages_Lib(); - inline ISteamNetworkingMessages *SteamNetworkingMessages() { return SteamNetworkingMessages_Lib(); } - inline ISteamNetworkingMessages *SteamGameServerNetworkingMessages() { return SteamGameServerNetworkingMessages_Lib(); } + // If running in context of steam, we also define a gameserver instance. + #ifdef STEAMNETWORKINGSOCKETS_STEAM + STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingMessages *SteamGameServerNetworkingMessages_LibV2(); + inline ISteamNetworkingMessages *SteamGameServerNetworkingMessages_Lib() { return SteamGameServerNetworkingMessages_LibV2(); } + #endif -#elif defined( STEAMNETWORKINGSOCKETS_OPENSOURCE ) + #ifndef STEAMNETWORKINGSOCKETS_STEAMAPI + inline ISteamNetworkingMessages *SteamNetworkingMessages() { return SteamNetworkingMessages_LibV2(); } + #ifdef STEAMNETWORKINGSOCKETS_STEAM + inline ISteamNetworkingMessages *SteamGameServerNetworkingMessages() { return SteamGameServerNetworkingMessages_LibV2(); } + #endif + #endif +#endif - // Opensource GameNetworkingSockets - STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingMessages *SteamNetworkingMessages(); - -#else +// Using Steamworks SDK +#ifdef STEAMNETWORKINGSOCKETS_STEAMAPI // Steamworks SDK - inline ISteamNetworkingMessages *SteamNetworkingMessages(); - STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamNetworkingMessages *, SteamNetworkingMessages, STEAMNETWORKINGMESSAGES_VERSION ); - inline ISteamNetworkingMessages *SteamGameServerNetworkingMessages(); - STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamNetworkingMessages *, SteamGameServerNetworkingMessages, STEAMNETWORKINGMESSAGES_VERSION ); + STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamNetworkingMessages *, SteamNetworkingMessages_SteamAPI, STEAMNETWORKINGMESSAGES_INTERFACE_VERSION ); + STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamNetworkingMessages *, SteamGameServerNetworkingMessages_SteamAPI, STEAMNETWORKINGMESSAGES_INTERFACE_VERSION ); + + #ifndef STEAMNETWORKINGSOCKETS_STANDALONELIB + inline ISteamNetworkingMessages *SteamNetworkingMessages() { return SteamNetworkingMessages_SteamAPI(); } + inline ISteamNetworkingMessages *SteamGameServerNetworkingMessages() { return SteamGameServerNetworkingMessages_SteamAPI(); } + #endif #endif #endif // ISTEAMNETWORKINGMESSAGES diff --git a/Generator/steam_sdk/isteamnetworkingsockets.h b/Generator/steam_sdk/isteamnetworkingsockets.h index 904ec4b..685edcd 100644 --- a/Generator/steam_sdk/isteamnetworkingsockets.h +++ b/Generator/steam_sdk/isteamnetworkingsockets.h @@ -2,15 +2,14 @@ #ifndef ISTEAMNETWORKINGSOCKETS #define ISTEAMNETWORKINGSOCKETS -#ifdef _WIN32 #pragma once -#endif #include "steamnetworkingtypes.h" +#include "steam_api_common.h" struct SteamNetAuthenticationStatus_t; -class ISteamNetworkingConnectionCustomSignaling; -class ISteamNetworkingCustomSignalingRecvContext; +class ISteamNetworkingConnectionSignaling; +class ISteamNetworkingSignalingRecvContext; //----------------------------------------------------------------------------- /// Lower level networking API. @@ -84,7 +83,7 @@ public: /// setting the options "immediately" after creation. virtual HSteamNetConnection ConnectByIPAddress( const SteamNetworkingIPAddr &address, int nOptions, const SteamNetworkingConfigValue_t *pOptions ) = 0; - /// Like CreateListenSocketIP, but clients will connect using ConnectP2P + /// Like CreateListenSocketIP, but clients will connect using ConnectP2P. /// /// nLocalVirtualPort specifies how clients can connect to this socket using /// ConnectP2P. It's very common for applications to only have one listening socket; @@ -93,7 +92,16 @@ public: /// integer (<1000) unique to each listen socket you create. /// /// If you use this, you probably want to call ISteamNetworkingUtils::InitRelayNetworkAccess() - /// when your app initializes + /// when your app initializes. + /// + /// If you are listening on a dedicated servers in known data center, + /// then you can listen using this function instead of CreateHostedDedicatedServerListenSocket, + /// to allow clients to connect without a ticket. Any user that owns + /// the app and is signed into Steam will be able to attempt to connect to + /// your server. Also, a connection attempt may require the client to + /// be connected to Steam, which is one more moving part that may fail. When + /// tickets are used, then once a ticket is obtained, a client can connect to + /// your server even if they got disconnected from Steam or Steam is offline. /// /// If you need to set any initial config options, pass them here. See /// SteamNetworkingConfigValue_t for more about why this is preferable to @@ -107,6 +115,10 @@ public: /// 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. + /// + /// To use your own signaling service, see: + /// - ConnectP2PCustomSignaling + /// - k_ESteamNetworkingConfig_Callback_CreateConnectionSignaling virtual HSteamNetConnection ConnectP2P( const SteamNetworkingIdentity &identityRemote, int nRemoteVirtualPort, int nOptions, const SteamNetworkingConfigValue_t *pOptions ) = 0; /// Accept an incoming connection that has been received on a listen socket. @@ -437,11 +449,11 @@ public: /// other connections.) virtual int ReceiveMessagesOnPollGroup( HSteamNetPollGroup hPollGroup, SteamNetworkingMessage_t **ppOutMessages, int nMaxMessages ) = 0; -#ifdef STEAMNETWORKINGSOCKETS_ENABLE_SDR - // // Clients connecting to dedicated servers hosted in a data center, - // using central-authority-granted tickets. + // using tickets issued by your game coordinator. If you are not + // issuing your own tickets to restrict who can attempt to connect + // to your server, then you won't use these functions. // /// Call this when you receive a ticket from your backend / matchmaking system. Puts the @@ -459,7 +471,10 @@ public: virtual int FindRelayAuthTicketForServer( const SteamNetworkingIdentity &identityGameServer, int nRemoteVirtualPort, SteamDatagramRelayAuthTicket *pOutParsedTicket ) = 0; /// Client call to connect to a server hosted in a Valve data center, on the specified virtual - /// port. You must have placed a ticket for this server into the cache, or else this connect attempt will fail! + /// port. You must have placed a ticket for this server into the cache, or else this connect + /// attempt will fail! If you are not issuing your own tickets, then to connect to a dedicated + /// server via SDR in auto-ticket mode, use ConnectP2P. (The server must be configured to allow + /// this type of connection by listening using CreateListenSocketP2P.) /// /// You may wonder why tickets are stored in a cache, instead of simply being passed as an argument /// here. The reason is to make reconnection to a gameserver robust, even if the client computer loses @@ -522,7 +537,11 @@ public: /// will be determined by the SDR_LISTEN_PORT environment variable. If a UDP port is not /// configured, this call will fail. /// - /// Note that this call MUST be made through the SteamGameServerNetworkingSockets() interface + /// This call MUST be made through the SteamGameServerNetworkingSockets() interface. + /// + /// This function should be used when you are using the ticket generator library + /// to issue your own tickets. Clients connecting to the server on this virtual + /// port will need a ticket, and they must connect using ConnectToHostedDedicatedServer. /// /// If you need to set any initial config options, pass them here. See /// SteamNetworkingConfigValue_t for more about why this is preferable to @@ -560,7 +579,6 @@ public: /// NOTE: The routing blob returned here is not encrypted. Send it to your backend /// and don't share it directly with clients. virtual EResult GetGameCoordinatorServerLogin( SteamDatagramGameCoordinatorServerLogin *pLoginInfo, int *pcbSignedBlob, void *pBlob ) = 0; -#endif // #ifndef STEAMNETWORKINGSOCKETS_ENABLE_SDR // @@ -585,10 +603,10 @@ public: /// 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. + /// ISteamNetworkingConnectionSignaling::SendSignal. /// /// When the remote peer accepts the connection (See - /// ISteamNetworkingCustomSignalingRecvContext::OnConnectRequest), + /// ISteamNetworkingSignalingRecvContext::OnConnectRequest), /// it will begin sending signaling messages. When these messages are received, /// you can pass them to the connection using ReceivedP2PCustomSignal. /// @@ -603,7 +621,7 @@ public: /// 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 nRemoteVirtualPort, int nOptions, const SteamNetworkingConfigValue_t *pOptions ) = 0; + virtual HSteamNetConnection ConnectP2PCustomSignaling( ISteamNetworkingConnectionSignaling *pSignaling, const SteamNetworkingIdentity *pPeerIdentity, int nRemoteVirtualPort, 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 @@ -614,7 +632,7 @@ public: /// /// - 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 + /// dispatched using the ISteamNetworkingConnectionSignaling /// associated with the connection. /// - If the message represents a connection request (and the request /// is not redundant for an existing connection), a new connection @@ -634,7 +652,7 @@ public: /// /// 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; + virtual bool ReceivedP2PCustomSignal( const void *pMsg, int cbMsg, ISteamNetworkingSignalingRecvContext *pContext ) = 0; // // Certificate provision by the application. On Steam, we normally handle all this automatically @@ -664,28 +682,40 @@ protected: }; #define STEAMNETWORKINGSOCKETS_INTERFACE_VERSION "SteamNetworkingSockets009" -// Global accessor. -#if defined( STEAMNETWORKINGSOCKETS_PARTNER ) +// Global accessors +// Using standalone lib +#ifdef STEAMNETWORKINGSOCKETS_STANDALONELIB - // Standalone lib. Use different symbol name, so that we can dynamically switch between steamclient.dll - // and the standalone lib - STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingSockets *SteamNetworkingSockets_Lib(); - STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingSockets *SteamGameServerNetworkingSockets_Lib(); - inline ISteamNetworkingSockets *SteamNetworkingSockets() { return SteamNetworkingSockets_Lib(); } - inline ISteamNetworkingSockets *SteamGameServerNetworkingSockets() { return SteamGameServerNetworkingSockets_Lib(); } + // Standalone lib. + static_assert( STEAMNETWORKINGSOCKETS_INTERFACE_VERSION[24] == '9', "Version mismatch" ); + STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingSockets *SteamNetworkingSockets_LibV9(); + inline ISteamNetworkingSockets *SteamNetworkingSockets_Lib() { return SteamNetworkingSockets_LibV9(); } -#elif defined( STEAMNETWORKINGSOCKETS_OPENSOURCE ) || defined( STEAMNETWORKINGSOCKETS_STREAMINGCLIENT ) + // If running in context of steam, we also define a gameserver instance. + #ifdef STEAMNETWORKINGSOCKETS_STEAM + STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingSockets *SteamGameServerNetworkingSockets_LibV9(); + inline ISteamNetworkingSockets *SteamGameServerNetworkingSockets_Lib() { return SteamGameServerNetworkingSockets_LibV9(); } + #endif - // Opensource GameNetworkingSockets - STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingSockets *SteamNetworkingSockets(); + #ifndef STEAMNETWORKINGSOCKETS_STEAMAPI + inline ISteamNetworkingSockets *SteamNetworkingSockets() { return SteamNetworkingSockets_LibV9(); } + #ifdef STEAMNETWORKINGSOCKETS_STEAM + inline ISteamNetworkingSockets *SteamGameServerNetworkingSockets() { return SteamGameServerNetworkingSockets_LibV9(); } + #endif + #endif +#endif -#else +// Using Steamworks SDK +#ifdef STEAMNETWORKINGSOCKETS_STEAMAPI // Steamworks SDK - inline ISteamNetworkingSockets *SteamNetworkingSockets(); - STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamNetworkingSockets *, SteamNetworkingSockets, STEAMNETWORKINGSOCKETS_INTERFACE_VERSION ); - inline ISteamNetworkingSockets *SteamGameServerNetworkingSockets(); - STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamNetworkingSockets *, SteamGameServerNetworkingSockets, STEAMNETWORKINGSOCKETS_INTERFACE_VERSION ); + STEAM_DEFINE_USER_INTERFACE_ACCESSOR( ISteamNetworkingSockets *, SteamNetworkingSockets_SteamAPI, STEAMNETWORKINGSOCKETS_INTERFACE_VERSION ); + STEAM_DEFINE_GAMESERVER_INTERFACE_ACCESSOR( ISteamNetworkingSockets *, SteamGameServerNetworkingSockets_SteamAPI, STEAMNETWORKINGSOCKETS_INTERFACE_VERSION ); + + #ifndef STEAMNETWORKINGSOCKETS_STANDALONELIB + inline ISteamNetworkingSockets *SteamNetworkingSockets() { return SteamNetworkingSockets_SteamAPI(); } + inline ISteamNetworkingSockets *SteamGameServerNetworkingSockets() { return SteamGameServerNetworkingSockets_SteamAPI(); } + #endif #endif /// Callback struct used to notify when a connection has changed state diff --git a/Generator/steam_sdk/isteamnetworkingutils.h b/Generator/steam_sdk/isteamnetworkingutils.h index 0f15f73..2161ec3 100644 --- a/Generator/steam_sdk/isteamnetworkingutils.h +++ b/Generator/steam_sdk/isteamnetworkingutils.h @@ -6,13 +6,11 @@ #ifndef ISTEAMNETWORKINGUTILS #define ISTEAMNETWORKINGUTILS -#ifdef _WIN32 #pragma once -#endif - -#include #include "steamnetworkingtypes.h" +#include "steam_api_common.h" + struct SteamDatagramRelayAuthTicket; struct SteamRelayNetworkStatus_t; @@ -46,8 +44,6 @@ public: // Access to Steam Datagram Relay (SDR) network // -#ifdef STEAMNETWORKINGSOCKETS_ENABLE_SDR - // // Initialization and status check // @@ -196,7 +192,6 @@ public: /// Get list of all POP IDs. Returns the number of entries that were filled into /// your list. virtual int GetPOPList( SteamNetworkingPOPID *list, int nListSz ) = 0; -#endif // #ifdef STEAMNETWORKINGSOCKETS_ENABLE_SDR // // Misc @@ -324,18 +319,23 @@ protected: }; #define STEAMNETWORKINGUTILS_INTERFACE_VERSION "SteamNetworkingUtils003" -// Global accessor. +// Global accessors +// Using standalone lib #ifdef STEAMNETWORKINGSOCKETS_STANDALONELIB // Standalone lib - STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingUtils *SteamNetworkingUtils_Lib(); - inline ISteamNetworkingUtils *SteamNetworkingUtils() { return SteamNetworkingUtils_Lib(); } + static_assert( STEAMNETWORKINGUTILS_INTERFACE_VERSION[22] == '3', "Version mismatch" ); + STEAMNETWORKINGSOCKETS_INTERFACE ISteamNetworkingUtils *SteamNetworkingUtils_LibV3(); + inline ISteamNetworkingUtils *SteamNetworkingUtils_Lib() { return SteamNetworkingUtils_LibV3(); } -#else + #ifndef STEAMNETWORKINGSOCKETS_STEAMAPI + inline ISteamNetworkingUtils *SteamNetworkingUtils() { return SteamNetworkingUtils_LibV3(); } + #endif +#endif - // Steamworks SDK - inline ISteamNetworkingUtils *SteamNetworkingUtils(); - STEAM_DEFINE_INTERFACE_ACCESSOR( ISteamNetworkingUtils *, SteamNetworkingUtils, +// Using Steamworks SDK +#ifdef STEAMNETWORKINGSOCKETS_STEAMAPI + STEAM_DEFINE_INTERFACE_ACCESSOR( ISteamNetworkingUtils *, SteamNetworkingUtils_SteamAPI, /* 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 ) ? @@ -344,6 +344,10 @@ protected: "global", STEAMNETWORKINGUTILS_INTERFACE_VERSION ) + + #ifndef STEAMNETWORKINGSOCKETS_STANDALONELIB + inline ISteamNetworkingUtils *SteamNetworkingUtils() { return SteamNetworkingUtils_SteamAPI(); } + #endif #endif /// A struct used to describe our readiness to use the relay network. @@ -404,10 +408,7 @@ private: // // Internal stuff -#ifdef STEAMNETWORKINGSOCKETS_ENABLE_SDR inline void ISteamNetworkingUtils::InitRelayNetworkAccess() { CheckPingDataUpToDate( 1e10f ); } -#endif - inline bool ISteamNetworkingUtils::SetGlobalConfigValueInt32( ESteamNetworkingConfigValue eValue, int32 val ) { return SetConfigValue( eValue, k_ESteamNetworkingConfig_Global, 0, k_ESteamNetworkingConfig_Int32, &val ); } inline bool ISteamNetworkingUtils::SetGlobalConfigValueFloat( ESteamNetworkingConfigValue eValue, float val ) { return SetConfigValue( eValue, k_ESteamNetworkingConfig_Global, 0, k_ESteamNetworkingConfig_Float, &val ); } inline bool ISteamNetworkingUtils::SetGlobalConfigValueString( ESteamNetworkingConfigValue eValue, const char *val ) { return SetConfigValue( eValue, k_ESteamNetworkingConfig_Global, 0, k_ESteamNetworkingConfig_String, val ); } @@ -431,11 +432,27 @@ inline bool ISteamNetworkingUtils::SetConfigValueStruct( const SteamNetworkingCo return SetConfigValue( opt.m_eValue, eScopeType, scopeObj, opt.m_eDataType, pVal ); } -#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 bool SteamNetworkingIPAddr::ParseString( const char *pszStr ) { return SteamNetworkingUtils()->SteamNetworkingIPAddr_ParseString( this, pszStr ); } -inline void SteamNetworkingIdentity::ToString( char *buf, size_t cbBuf ) const { SteamNetworkingUtils()->SteamNetworkingIdentity_ToString( *this, buf, cbBuf ); } -inline bool SteamNetworkingIdentity::ParseString( const char *pszStr ) { return SteamNetworkingUtils()->SteamNetworkingIdentity_ParseString( this, pszStr ); } +// How to get helper functions. +#if defined( STEAMNETWORKINGSOCKETS_STATIC_LINK ) || defined( STEAMNETWORKINGSOCKETS_STANDALONELIB ) + + // Call direct to static functions + STEAMNETWORKINGSOCKETS_INTERFACE void SteamNetworkingIPAddr_ToString( const SteamNetworkingIPAddr *pAddr, char *buf, size_t cbBuf, bool bWithPort ); + STEAMNETWORKINGSOCKETS_INTERFACE bool SteamNetworkingIPAddr_ParseString( SteamNetworkingIPAddr *pAddr, const char *pszStr ); + STEAMNETWORKINGSOCKETS_INTERFACE void SteamNetworkingIdentity_ToString( const SteamNetworkingIdentity *pIdentity, char *buf, size_t cbBuf ); + STEAMNETWORKINGSOCKETS_INTERFACE bool SteamNetworkingIdentity_ParseString( SteamNetworkingIdentity *pIdentity, size_t sizeofIdentity, const char *pszStr ); + inline void SteamNetworkingIPAddr::ToString( char *buf, size_t cbBuf, bool bWithPort ) const { SteamNetworkingIPAddr_ToString( this, buf, cbBuf, bWithPort ); } + inline bool SteamNetworkingIPAddr::ParseString( const char *pszStr ) { return SteamNetworkingIPAddr_ParseString( this, pszStr ); } + inline void SteamNetworkingIdentity::ToString( char *buf, size_t cbBuf ) const { SteamNetworkingIdentity_ToString( this, buf, cbBuf ); } + inline bool SteamNetworkingIdentity::ParseString( const char *pszStr ) { return SteamNetworkingIdentity_ParseString( this, sizeof(*this), pszStr ); } + +#elif defined( STEAMNETWORKINGSOCKETS_STEAMAPI ) + // Using steamworks SDK - go through SteamNetworkingUtils() + inline void SteamNetworkingIPAddr::ToString( char *buf, size_t cbBuf, bool bWithPort ) const { SteamNetworkingUtils()->SteamNetworkingIPAddr_ToString( *this, buf, cbBuf, bWithPort ); } + inline bool SteamNetworkingIPAddr::ParseString( const char *pszStr ) { return SteamNetworkingUtils()->SteamNetworkingIPAddr_ParseString( this, pszStr ); } + inline void SteamNetworkingIdentity::ToString( char *buf, size_t cbBuf ) const { SteamNetworkingUtils()->SteamNetworkingIdentity_ToString( *this, buf, cbBuf ); } + inline bool SteamNetworkingIdentity::ParseString( const char *pszStr ) { return SteamNetworkingUtils()->SteamNetworkingIdentity_ParseString( this, pszStr ); } +#else + #error "Invalid config" #endif #endif // ISTEAMNETWORKINGUTILS diff --git a/Generator/steam_sdk/isteamremotestorage.h b/Generator/steam_sdk/isteamremotestorage.h index f15d952..81fa2c8 100644 --- a/Generator/steam_sdk/isteamremotestorage.h +++ b/Generator/steam_sdk/isteamremotestorage.h @@ -241,7 +241,7 @@ class ISteamRemoteStorage // The following functions are only necessary on the Playstation 3. On PC & Mac, the Steam client will handle these operations for you // On Playstation 3, the game controls which files are stored in the cloud, via FilePersist, FileFetch, and FileForget. -#if defined(_PS3) || defined(_SERVER) +#if defined(_SERVER) // Connect to Steam and get a list of files in the Cloud - results in a RemoteStorageAppSyncStatusCheck_t callback virtual void GetFileListFromServer() = 0; // Indicate this file should be downloaded in the next sync diff --git a/Generator/steam_sdk/isteamugc.h b/Generator/steam_sdk/isteamugc.h index c86f197..e355d16 100644 --- a/Generator/steam_sdk/isteamugc.h +++ b/Generator/steam_sdk/isteamugc.h @@ -220,6 +220,9 @@ public: // Retrieve an individual result after receiving the callback for querying UGC virtual bool GetQueryUGCResult( UGCQueryHandle_t handle, uint32 index, SteamUGCDetails_t *pDetails ) = 0; + virtual uint32 GetQueryUGCNumTags( UGCQueryHandle_t handle, uint32 index ) = 0; + virtual bool GetQueryUGCTag( UGCQueryHandle_t handle, uint32 index, uint32 indexTag, STEAM_OUT_STRING_COUNT( cchValueSize ) char* pchValue, uint32 cchValueSize ) = 0; + virtual bool GetQueryUGCTagDisplayName( UGCQueryHandle_t handle, uint32 index, uint32 indexTag, STEAM_OUT_STRING_COUNT( cchValueSize ) char* pchValue, uint32 cchValueSize ) = 0; virtual bool GetQueryUGCPreviewURL( UGCQueryHandle_t handle, uint32 index, STEAM_OUT_STRING_COUNT(cchURLSize) char *pchURL, uint32 cchURLSize ) = 0; virtual bool GetQueryUGCMetadata( UGCQueryHandle_t handle, uint32 index, STEAM_OUT_STRING_COUNT(cchMetadatasize) char *pchMetadata, uint32 cchMetadatasize ) = 0; virtual bool GetQueryUGCChildren( UGCQueryHandle_t handle, uint32 index, PublishedFileId_t* pvecPublishedFileID, uint32 cMaxEntries ) = 0; @@ -227,7 +230,6 @@ public: virtual uint32 GetQueryUGCNumAdditionalPreviews( UGCQueryHandle_t handle, uint32 index ) = 0; virtual bool GetQueryUGCAdditionalPreview( UGCQueryHandle_t handle, uint32 index, uint32 previewIndex, STEAM_OUT_STRING_COUNT(cchURLSize) char *pchURLOrVideoID, uint32 cchURLSize, STEAM_OUT_STRING_COUNT(cchURLSize) char *pchOriginalFileName, uint32 cchOriginalFileNameSize, EItemPreviewType *pPreviewType ) = 0; virtual uint32 GetQueryUGCNumKeyValueTags( UGCQueryHandle_t handle, uint32 index ) = 0; - virtual bool GetQueryUGCKeyValueTag( UGCQueryHandle_t handle, uint32 index, uint32 keyValueTagIndex, STEAM_OUT_STRING_COUNT(cchKeySize) char *pchKey, uint32 cchKeySize, STEAM_OUT_STRING_COUNT(cchValueSize) char *pchValue, uint32 cchValueSize ) = 0; // Return the first value matching the pchKey. Note that a key may map to multiple values. Returns false if there was an error or no matching value was found. @@ -360,7 +362,7 @@ public: virtual SteamAPICall_t DeleteItem( PublishedFileId_t nPublishedFileID ) = 0; }; -#define STEAMUGC_INTERFACE_VERSION "STEAMUGC_INTERFACE_VERSION014" +#define STEAMUGC_INTERFACE_VERSION "STEAMUGC_INTERFACE_VERSION015" // Global interface accessor inline ISteamUGC *SteamUGC(); diff --git a/Generator/steam_sdk/isteamutils.h b/Generator/steam_sdk/isteamutils.h index b19526f..fe2cde4 100644 --- a/Generator/steam_sdk/isteamutils.h +++ b/Generator/steam_sdk/isteamutils.h @@ -86,8 +86,8 @@ public: // the destination buffer size should be 4 * height * width * sizeof(char) virtual bool GetImageRGBA( int iImage, uint8 *pubDest, int nDestBufferSize ) = 0; - // returns the IP of the reporting server for valve - currently only used in Source engine games - virtual bool GetCSERIPPort( uint32 *unIP, uint16 *usPort ) = 0; + // Deprecated. Do not call this. + STEAM_PRIVATE_API( virtual bool GetCSERIPPort( uint32 *unIP, uint16 *usPort ) = 0; ) // return the amount of battery power left in the current system in % [0..100], 255 for being on AC power virtual uint8 GetCurrentBatteryPower() = 0; @@ -183,9 +183,12 @@ public: // Returns whether this steam client is a Steam China specific client, vs the global client. virtual bool IsSteamChinaLauncher() = 0; - // Initializes text filtering. + // Initializes text filtering, loading dictionaries for the language the game is running in. // unFilterOptions are reserved for future use and should be set to 0 - // Returns false if filtering is unavailable for the language the user is currently running in. + // Returns false if filtering is unavailable for the game's language, in which case FilterText() will act as a passthrough. + // + // Users can customize the text filter behavior in their Steam Account preferences: + // https://store.steampowered.com/account/preferences#CommunityContentPreferences virtual bool InitFilterText( uint32 unFilterOptions = 0 ) = 0; // Filters the provided input message and places the filtered result into pchOutFilteredText, using legally required filtering and additional filtering based on the context and user settings diff --git a/Generator/steam_sdk/steam_api.json b/Generator/steam_sdk/steam_api.json index 6021585..29acc80 100644 --- a/Generator/steam_sdk/steam_api.json +++ b/Generator/steam_sdk/steam_api.json @@ -1,22 +1,5 @@ { "callback_structs": [ - - { - "callback_id": 4604, - "fields": [ - { "fieldname":"m_bIsRTMP", "fieldtype":"bool" } - ], - "struct": "BroadcastUploadStart_t" - }, - - { - "callback_id": 4605, - "fields": [ - { "fieldname":"m_eResult", "fieldtype":"EBroadcastUploadResult" } - ], - "struct": "BroadcastUploadStop_t" - }, - { "callback_id": 101, "fields": [], @@ -1908,13 +1891,6 @@ { "constname":"k_nSteamNetworkingConfig_P2P_Transport_ICE_Enable_Public", "consttype":"int", "constval":"4" }, { "constname":"k_nSteamNetworkingConfig_P2P_Transport_ICE_Enable_All", "consttype":"int", "constval":"0x7fffffff" }, { "constname":"k_SteamDatagramPOPID_dev", "consttype":"SteamNetworkingPOPID", "constval":"( ( uint32 ) 'd' << 16U ) | ( ( uint32 ) 'e' << 8U ) | ( uint32 ) 'v'" }, - { "constname":"k_unServerFlagNone", "consttype":"uint32", "constval":"0x00" }, - { "constname":"k_unServerFlagActive", "consttype":"uint32", "constval":"0x01" }, - { "constname":"k_unServerFlagSecure", "consttype":"uint32", "constval":"0x02" }, - { "constname":"k_unServerFlagDedicated", "consttype":"uint32", "constval":"0x04" }, - { "constname":"k_unServerFlagLinux", "consttype":"uint32", "constval":"0x08" }, - { "constname":"k_unServerFlagPassworded", "consttype":"uint32", "constval":"0x10" }, - { "constname":"k_unServerFlagPrivate", "consttype":"uint32", "constval":"0x20" }, { "constname":"k_cbSteamDatagramMaxSerializedTicket", "consttype":"uint32", "constval":"512" }, { "constname":"k_cbMaxSteamDatagramGameCoordinatorServerLoginAppData", "consttype":"uint32", "constval":"2048" }, { "constname":"k_cbMaxSteamDatagramGameCoordinatorServerLoginSerialized", "consttype":"uint32", "constval":"4096" } @@ -2056,7 +2032,10 @@ { "name":"k_EResultCantRemoveItem", "value":"113" }, { "name":"k_EResultAccountDeleted", "value":"114" }, { "name":"k_EResultExistingUserCancelledLicense", "value":"115" }, - { "name":"k_EResultCommunityCooldown", "value":"116" } + { "name":"k_EResultCommunityCooldown", "value":"116" }, + { "name":"k_EResultNoLauncherSpecified", "value":"117" }, + { "name":"k_EResultMustAgreeToSSA", "value":"118" }, + { "name":"k_EResultLauncherMigrated", "value":"119" } ] }, { @@ -2206,7 +2185,7 @@ { "name":"k_EAppType_Comic_UNUSED", "value":"32768" }, { "name":"k_EAppType_Beta", "value":"65536" }, { "name":"k_EAppType_Shortcut", "value":"1073741824" }, - { "name":"k_EAppType_DepotOnly", "value":"-2147483648" } + { "name":"k_EAppType_DepotOnly_DEPRECATED", "value":"-2147483648" } ] }, { @@ -2361,6 +2340,7 @@ { "name":"k_eEVRHMDType_HP_Unknown", "value":"80" }, { "name":"k_eEVRHMDType_HP_WindowsMR", "value":"81" }, { "name":"k_eEVRHMDType_HP_Reverb", "value":"82" }, + { "name":"k_eEVRHMDType_HP_ReverbG2", "value":"1463" }, { "name":"k_eEVRHMDType_Samsung_Unknown", "value":"90" }, { "name":"k_eEVRHMDType_Samsung_Odyssey", "value":"91" }, { "name":"k_eEVRHMDType_Unannounced_Unknown", "value":"100" }, @@ -2807,10 +2787,10 @@ "enumname": "EP2PSessionError", "values": [ { "name":"k_EP2PSessionErrorNone", "value":"0" }, - { "name":"k_EP2PSessionErrorNotRunningApp", "value":"1" }, { "name":"k_EP2PSessionErrorNoRightsToApp", "value":"2" }, - { "name":"k_EP2PSessionErrorDestinationNotLoggedIn", "value":"3" }, { "name":"k_EP2PSessionErrorTimeout", "value":"4" }, + { "name":"k_EP2PSessionErrorNotRunningApp_DELETED", "value":"1" }, + { "name":"k_EP2PSessionErrorDestinationNotLoggedIn_DELETED", "value":"3" }, { "name":"k_EP2PSessionErrorMax", "value":"5" } ] }, @@ -3213,7 +3193,82 @@ { "name":"k_EInputActionOrigin_Switch_Reserved18", "value":"255" }, { "name":"k_EInputActionOrigin_Switch_Reserved19", "value":"256" }, { "name":"k_EInputActionOrigin_Switch_Reserved20", "value":"257" }, - { "name":"k_EInputActionOrigin_Count", "value":"258" }, + { "name":"k_EInputActionOrigin_PS5_X", "value":"258" }, + { "name":"k_EInputActionOrigin_PS5_Circle", "value":"259" }, + { "name":"k_EInputActionOrigin_PS5_Triangle", "value":"260" }, + { "name":"k_EInputActionOrigin_PS5_Square", "value":"261" }, + { "name":"k_EInputActionOrigin_PS5_LeftBumper", "value":"262" }, + { "name":"k_EInputActionOrigin_PS5_RightBumper", "value":"263" }, + { "name":"k_EInputActionOrigin_PS5_Option", "value":"264" }, + { "name":"k_EInputActionOrigin_PS5_Create", "value":"265" }, + { "name":"k_EInputActionOrigin_PS5_Mute", "value":"266" }, + { "name":"k_EInputActionOrigin_PS5_LeftPad_Touch", "value":"267" }, + { "name":"k_EInputActionOrigin_PS5_LeftPad_Swipe", "value":"268" }, + { "name":"k_EInputActionOrigin_PS5_LeftPad_Click", "value":"269" }, + { "name":"k_EInputActionOrigin_PS5_LeftPad_DPadNorth", "value":"270" }, + { "name":"k_EInputActionOrigin_PS5_LeftPad_DPadSouth", "value":"271" }, + { "name":"k_EInputActionOrigin_PS5_LeftPad_DPadWest", "value":"272" }, + { "name":"k_EInputActionOrigin_PS5_LeftPad_DPadEast", "value":"273" }, + { "name":"k_EInputActionOrigin_PS5_RightPad_Touch", "value":"274" }, + { "name":"k_EInputActionOrigin_PS5_RightPad_Swipe", "value":"275" }, + { "name":"k_EInputActionOrigin_PS5_RightPad_Click", "value":"276" }, + { "name":"k_EInputActionOrigin_PS5_RightPad_DPadNorth", "value":"277" }, + { "name":"k_EInputActionOrigin_PS5_RightPad_DPadSouth", "value":"278" }, + { "name":"k_EInputActionOrigin_PS5_RightPad_DPadWest", "value":"279" }, + { "name":"k_EInputActionOrigin_PS5_RightPad_DPadEast", "value":"280" }, + { "name":"k_EInputActionOrigin_PS5_CenterPad_Touch", "value":"281" }, + { "name":"k_EInputActionOrigin_PS5_CenterPad_Swipe", "value":"282" }, + { "name":"k_EInputActionOrigin_PS5_CenterPad_Click", "value":"283" }, + { "name":"k_EInputActionOrigin_PS5_CenterPad_DPadNorth", "value":"284" }, + { "name":"k_EInputActionOrigin_PS5_CenterPad_DPadSouth", "value":"285" }, + { "name":"k_EInputActionOrigin_PS5_CenterPad_DPadWest", "value":"286" }, + { "name":"k_EInputActionOrigin_PS5_CenterPad_DPadEast", "value":"287" }, + { "name":"k_EInputActionOrigin_PS5_LeftTrigger_Pull", "value":"288" }, + { "name":"k_EInputActionOrigin_PS5_LeftTrigger_Click", "value":"289" }, + { "name":"k_EInputActionOrigin_PS5_RightTrigger_Pull", "value":"290" }, + { "name":"k_EInputActionOrigin_PS5_RightTrigger_Click", "value":"291" }, + { "name":"k_EInputActionOrigin_PS5_LeftStick_Move", "value":"292" }, + { "name":"k_EInputActionOrigin_PS5_LeftStick_Click", "value":"293" }, + { "name":"k_EInputActionOrigin_PS5_LeftStick_DPadNorth", "value":"294" }, + { "name":"k_EInputActionOrigin_PS5_LeftStick_DPadSouth", "value":"295" }, + { "name":"k_EInputActionOrigin_PS5_LeftStick_DPadWest", "value":"296" }, + { "name":"k_EInputActionOrigin_PS5_LeftStick_DPadEast", "value":"297" }, + { "name":"k_EInputActionOrigin_PS5_RightStick_Move", "value":"298" }, + { "name":"k_EInputActionOrigin_PS5_RightStick_Click", "value":"299" }, + { "name":"k_EInputActionOrigin_PS5_RightStick_DPadNorth", "value":"300" }, + { "name":"k_EInputActionOrigin_PS5_RightStick_DPadSouth", "value":"301" }, + { "name":"k_EInputActionOrigin_PS5_RightStick_DPadWest", "value":"302" }, + { "name":"k_EInputActionOrigin_PS5_RightStick_DPadEast", "value":"303" }, + { "name":"k_EInputActionOrigin_PS5_DPad_North", "value":"304" }, + { "name":"k_EInputActionOrigin_PS5_DPad_South", "value":"305" }, + { "name":"k_EInputActionOrigin_PS5_DPad_West", "value":"306" }, + { "name":"k_EInputActionOrigin_PS5_DPad_East", "value":"307" }, + { "name":"k_EInputActionOrigin_PS5_Gyro_Move", "value":"308" }, + { "name":"k_EInputActionOrigin_PS5_Gyro_Pitch", "value":"309" }, + { "name":"k_EInputActionOrigin_PS5_Gyro_Yaw", "value":"310" }, + { "name":"k_EInputActionOrigin_PS5_Gyro_Roll", "value":"311" }, + { "name":"k_EInputActionOrigin_PS5_DPad_Move", "value":"312" }, + { "name":"k_EInputActionOrigin_PS5_Reserved1", "value":"313" }, + { "name":"k_EInputActionOrigin_PS5_Reserved2", "value":"314" }, + { "name":"k_EInputActionOrigin_PS5_Reserved3", "value":"315" }, + { "name":"k_EInputActionOrigin_PS5_Reserved4", "value":"316" }, + { "name":"k_EInputActionOrigin_PS5_Reserved5", "value":"317" }, + { "name":"k_EInputActionOrigin_PS5_Reserved6", "value":"318" }, + { "name":"k_EInputActionOrigin_PS5_Reserved7", "value":"319" }, + { "name":"k_EInputActionOrigin_PS5_Reserved8", "value":"320" }, + { "name":"k_EInputActionOrigin_PS5_Reserved9", "value":"321" }, + { "name":"k_EInputActionOrigin_PS5_Reserved10", "value":"322" }, + { "name":"k_EInputActionOrigin_PS5_Reserved11", "value":"323" }, + { "name":"k_EInputActionOrigin_PS5_Reserved12", "value":"324" }, + { "name":"k_EInputActionOrigin_PS5_Reserved13", "value":"325" }, + { "name":"k_EInputActionOrigin_PS5_Reserved14", "value":"326" }, + { "name":"k_EInputActionOrigin_PS5_Reserved15", "value":"327" }, + { "name":"k_EInputActionOrigin_PS5_Reserved16", "value":"328" }, + { "name":"k_EInputActionOrigin_PS5_Reserved17", "value":"329" }, + { "name":"k_EInputActionOrigin_PS5_Reserved18", "value":"330" }, + { "name":"k_EInputActionOrigin_PS5_Reserved19", "value":"331" }, + { "name":"k_EInputActionOrigin_PS5_Reserved20", "value":"332" }, + { "name":"k_EInputActionOrigin_Count", "value":"333" }, { "name":"k_EInputActionOrigin_MaximumPossibleValue", "value":"32767" } ] }, @@ -3274,7 +3329,8 @@ { "name":"k_ESteamInputType_SwitchProController", "value":"10" }, { "name":"k_ESteamInputType_MobileTouch", "value":"11" }, { "name":"k_ESteamInputType_PS3Controller", "value":"12" }, - { "name":"k_ESteamInputType_Count", "value":"13" }, + { "name":"k_ESteamInputType_PS5Controller", "value":"13" }, + { "name":"k_ESteamInputType_Count", "value":"14" }, { "name":"k_ESteamInputType_MaximumPossibleValue", "value":"255" } ] }, @@ -3533,7 +3589,62 @@ { "name":"k_EControllerActionOrigin_XBoxOne_DPad_Move", "value":"242" }, { "name":"k_EControllerActionOrigin_XBox360_DPad_Move", "value":"243" }, { "name":"k_EControllerActionOrigin_Switch_DPad_Move", "value":"244" }, - { "name":"k_EControllerActionOrigin_Count", "value":"245" }, + { "name":"k_EControllerActionOrigin_PS5_X", "value":"245" }, + { "name":"k_EControllerActionOrigin_PS5_Circle", "value":"246" }, + { "name":"k_EControllerActionOrigin_PS5_Triangle", "value":"247" }, + { "name":"k_EControllerActionOrigin_PS5_Square", "value":"248" }, + { "name":"k_EControllerActionOrigin_PS5_LeftBumper", "value":"249" }, + { "name":"k_EControllerActionOrigin_PS5_RightBumper", "value":"250" }, + { "name":"k_EControllerActionOrigin_PS5_Option", "value":"251" }, + { "name":"k_EControllerActionOrigin_PS5_Create", "value":"252" }, + { "name":"k_EControllerActionOrigin_PS5_Mute", "value":"253" }, + { "name":"k_EControllerActionOrigin_PS5_LeftPad_Touch", "value":"254" }, + { "name":"k_EControllerActionOrigin_PS5_LeftPad_Swipe", "value":"255" }, + { "name":"k_EControllerActionOrigin_PS5_LeftPad_Click", "value":"256" }, + { "name":"k_EControllerActionOrigin_PS5_LeftPad_DPadNorth", "value":"257" }, + { "name":"k_EControllerActionOrigin_PS5_LeftPad_DPadSouth", "value":"258" }, + { "name":"k_EControllerActionOrigin_PS5_LeftPad_DPadWest", "value":"259" }, + { "name":"k_EControllerActionOrigin_PS5_LeftPad_DPadEast", "value":"260" }, + { "name":"k_EControllerActionOrigin_PS5_RightPad_Touch", "value":"261" }, + { "name":"k_EControllerActionOrigin_PS5_RightPad_Swipe", "value":"262" }, + { "name":"k_EControllerActionOrigin_PS5_RightPad_Click", "value":"263" }, + { "name":"k_EControllerActionOrigin_PS5_RightPad_DPadNorth", "value":"264" }, + { "name":"k_EControllerActionOrigin_PS5_RightPad_DPadSouth", "value":"265" }, + { "name":"k_EControllerActionOrigin_PS5_RightPad_DPadWest", "value":"266" }, + { "name":"k_EControllerActionOrigin_PS5_RightPad_DPadEast", "value":"267" }, + { "name":"k_EControllerActionOrigin_PS5_CenterPad_Touch", "value":"268" }, + { "name":"k_EControllerActionOrigin_PS5_CenterPad_Swipe", "value":"269" }, + { "name":"k_EControllerActionOrigin_PS5_CenterPad_Click", "value":"270" }, + { "name":"k_EControllerActionOrigin_PS5_CenterPad_DPadNorth", "value":"271" }, + { "name":"k_EControllerActionOrigin_PS5_CenterPad_DPadSouth", "value":"272" }, + { "name":"k_EControllerActionOrigin_PS5_CenterPad_DPadWest", "value":"273" }, + { "name":"k_EControllerActionOrigin_PS5_CenterPad_DPadEast", "value":"274" }, + { "name":"k_EControllerActionOrigin_PS5_LeftTrigger_Pull", "value":"275" }, + { "name":"k_EControllerActionOrigin_PS5_LeftTrigger_Click", "value":"276" }, + { "name":"k_EControllerActionOrigin_PS5_RightTrigger_Pull", "value":"277" }, + { "name":"k_EControllerActionOrigin_PS5_RightTrigger_Click", "value":"278" }, + { "name":"k_EControllerActionOrigin_PS5_LeftStick_Move", "value":"279" }, + { "name":"k_EControllerActionOrigin_PS5_LeftStick_Click", "value":"280" }, + { "name":"k_EControllerActionOrigin_PS5_LeftStick_DPadNorth", "value":"281" }, + { "name":"k_EControllerActionOrigin_PS5_LeftStick_DPadSouth", "value":"282" }, + { "name":"k_EControllerActionOrigin_PS5_LeftStick_DPadWest", "value":"283" }, + { "name":"k_EControllerActionOrigin_PS5_LeftStick_DPadEast", "value":"284" }, + { "name":"k_EControllerActionOrigin_PS5_RightStick_Move", "value":"285" }, + { "name":"k_EControllerActionOrigin_PS5_RightStick_Click", "value":"286" }, + { "name":"k_EControllerActionOrigin_PS5_RightStick_DPadNorth", "value":"287" }, + { "name":"k_EControllerActionOrigin_PS5_RightStick_DPadSouth", "value":"288" }, + { "name":"k_EControllerActionOrigin_PS5_RightStick_DPadWest", "value":"289" }, + { "name":"k_EControllerActionOrigin_PS5_RightStick_DPadEast", "value":"290" }, + { "name":"k_EControllerActionOrigin_PS5_DPad_Move", "value":"291" }, + { "name":"k_EControllerActionOrigin_PS5_DPad_North", "value":"292" }, + { "name":"k_EControllerActionOrigin_PS5_DPad_South", "value":"293" }, + { "name":"k_EControllerActionOrigin_PS5_DPad_West", "value":"294" }, + { "name":"k_EControllerActionOrigin_PS5_DPad_East", "value":"295" }, + { "name":"k_EControllerActionOrigin_PS5_Gyro_Move", "value":"296" }, + { "name":"k_EControllerActionOrigin_PS5_Gyro_Pitch", "value":"297" }, + { "name":"k_EControllerActionOrigin_PS5_Gyro_Yaw", "value":"298" }, + { "name":"k_EControllerActionOrigin_PS5_Gyro_Roll", "value":"299" }, + { "name":"k_EControllerActionOrigin_Count", "value":"300" }, { "name":"k_EControllerActionOrigin_MaximumPossibleValue", "value":"32767" } ] }, @@ -3724,6 +3835,8 @@ { "name":"k_ESteamNetworkingIdentityType_Invalid", "value":"0" }, { "name":"k_ESteamNetworkingIdentityType_SteamID", "value":"16" }, { "name":"k_ESteamNetworkingIdentityType_XboxPairwiseID", "value":"17" }, + { "name":"k_ESteamNetworkingIdentityType_SonyPSN", "value":"18" }, + { "name":"k_ESteamNetworkingIdentityType_GoogleStadia", "value":"19" }, { "name":"k_ESteamNetworkingIdentityType_IPAddress", "value":"1" }, { "name":"k_ESteamNetworkingIdentityType_GenericString", "value":"2" }, { "name":"k_ESteamNetworkingIdentityType_GenericBytes", "value":"3" }, @@ -3854,6 +3967,7 @@ { "name":"k_ESteamNetworkingConfig_Callback_RelayNetworkStatusChanged", "value":"203" }, { "name":"k_ESteamNetworkingConfig_Callback_MessagesSessionRequest", "value":"204" }, { "name":"k_ESteamNetworkingConfig_Callback_MessagesSessionFailed", "value":"205" }, + { "name":"k_ESteamNetworkingConfig_Callback_CreateConnectionSignaling", "value":"206" }, { "name":"k_ESteamNetworkingConfig_P2P_STUN_ServerList", "value":"103" }, { "name":"k_ESteamNetworkingConfig_P2P_Transport_ICE_Enable", "value":"104" }, { "name":"k_ESteamNetworkingConfig_P2P_Transport_ICE_Penalty", "value":"105" }, @@ -5197,6 +5311,14 @@ { "paramname":"pchProtocol", "paramtype":"const char *" } ], "returntype": "bool" + }, + { + "methodname": "ActivateGameOverlayInviteDialogConnectString", + "methodname_flat": "SteamAPI_ISteamFriends_ActivateGameOverlayInviteDialogConnectString", + "params": [ + { "paramname":"pchConnectString", "paramtype":"const char *" } + ], + "returntype": "void" } ], "version_string": "SteamFriends017" @@ -5267,15 +5389,6 @@ ], "returntype": "bool" }, - { - "methodname": "GetCSERIPPort", - "methodname_flat": "SteamAPI_ISteamUtils_GetCSERIPPort", - "params": [ - { "paramname":"unIP", "paramtype":"uint32 *" }, - { "paramname":"usPort", "paramtype":"uint16 *" } - ], - "returntype": "bool" - }, { "methodname": "GetCurrentBatteryPower", "methodname_flat": "SteamAPI_ISteamUtils_GetCurrentBatteryPower", @@ -8555,7 +8668,7 @@ { "kind": "user", "name": "SteamInput", - "name_flat": "SteamAPI_SteamInput_v001" + "name_flat": "SteamAPI_SteamInput_v002" } ], "classname": "ISteamInput", @@ -8886,14 +8999,14 @@ "returntype": "uint32" } ], - "version_string": "SteamInput001" + "version_string": "SteamInput002" }, { "accessors": [ { "kind": "user", "name": "SteamController", - "name_flat": "SteamAPI_SteamController_v007" + "name_flat": "SteamAPI_SteamController_v008" } ], "classname": "ISteamController", @@ -9216,19 +9329,19 @@ "returntype": "bool" } ], - "version_string": "SteamController007" + "version_string": "SteamController008" }, { "accessors": [ { "kind": "user", "name": "SteamUGC", - "name_flat": "SteamAPI_SteamUGC_v014" + "name_flat": "SteamAPI_SteamUGC_v015" }, { "kind": "gameserver", "name": "SteamGameServerUGC", - "name_flat": "SteamAPI_SteamGameServerUGC_v014" + "name_flat": "SteamAPI_SteamGameServerUGC_v015" } ], "classname": "ISteamUGC", @@ -9300,6 +9413,47 @@ ], "returntype": "bool" }, + { + "methodname": "GetQueryUGCNumTags", + "methodname_flat": "SteamAPI_ISteamUGC_GetQueryUGCNumTags", + "params": [ + { "paramname":"handle", "paramtype":"UGCQueryHandle_t" }, + { "paramname":"index", "paramtype":"uint32" } + ], + "returntype": "uint32" + }, + { + "methodname": "GetQueryUGCTag", + "methodname_flat": "SteamAPI_ISteamUGC_GetQueryUGCTag", + "params": [ + { "paramname":"handle", "paramtype":"UGCQueryHandle_t" }, + { "paramname":"index", "paramtype":"uint32" }, + { "paramname":"indexTag", "paramtype":"uint32" }, + { + "out_string_count": "cchValueSize", + "paramname": "pchValue", + "paramtype": "char *" + }, + { "paramname":"cchValueSize", "paramtype":"uint32" } + ], + "returntype": "bool" + }, + { + "methodname": "GetQueryUGCTagDisplayName", + "methodname_flat": "SteamAPI_ISteamUGC_GetQueryUGCTagDisplayName", + "params": [ + { "paramname":"handle", "paramtype":"UGCQueryHandle_t" }, + { "paramname":"index", "paramtype":"uint32" }, + { "paramname":"indexTag", "paramtype":"uint32" }, + { + "out_string_count": "cchValueSize", + "paramname": "pchValue", + "paramtype": "char *" + }, + { "paramname":"cchValueSize", "paramtype":"uint32" } + ], + "returntype": "bool" + }, { "methodname": "GetQueryUGCPreviewURL", "methodname_flat": "SteamAPI_ISteamUGC_GetQueryUGCPreviewURL", @@ -10025,7 +10179,7 @@ "returntype": "SteamAPICall_t" } ], - "version_string": "STEAMUGC_INTERFACE_VERSION014" + "version_string": "STEAMUGC_INTERFACE_VERSION015" }, { "accessors": [ @@ -11200,13 +11354,13 @@ "accessors": [ { "kind": "user", - "name": "SteamNetworkingMessages", - "name_flat": "SteamAPI_SteamNetworkingMessages_v002" + "name": "SteamNetworkingMessages_SteamAPI", + "name_flat": "SteamAPI_SteamNetworkingMessages_SteamAPI_v002" }, { "kind": "gameserver", - "name": "SteamGameServerNetworkingMessages", - "name_flat": "SteamAPI_SteamGameServerNetworkingMessages_v002" + "name": "SteamGameServerNetworkingMessages_SteamAPI", + "name_flat": "SteamAPI_SteamGameServerNetworkingMessages_SteamAPI_v002" } ], "classname": "ISteamNetworkingMessages", @@ -11276,13 +11430,13 @@ "accessors": [ { "kind": "user", - "name": "SteamNetworkingSockets", - "name_flat": "SteamAPI_SteamNetworkingSockets_v009" + "name": "SteamNetworkingSockets_SteamAPI", + "name_flat": "SteamAPI_SteamNetworkingSockets_SteamAPI_v009" }, { "kind": "gameserver", - "name": "SteamGameServerNetworkingSockets", - "name_flat": "SteamAPI_SteamGameServerNetworkingSockets_v009" + "name": "SteamGameServerNetworkingSockets_SteamAPI", + "name_flat": "SteamAPI_SteamGameServerNetworkingSockets_SteamAPI_v009" } ], "classname": "ISteamNetworkingSockets", @@ -11611,7 +11765,7 @@ "methodname": "ConnectP2PCustomSignaling", "methodname_flat": "SteamAPI_ISteamNetworkingSockets_ConnectP2PCustomSignaling", "params": [ - { "paramname":"pSignaling", "paramtype":"ISteamNetworkingConnectionCustomSignaling *" }, + { "paramname":"pSignaling", "paramtype":"ISteamNetworkingConnectionSignaling *" }, { "paramname":"pPeerIdentity", "paramtype":"const SteamNetworkingIdentity *" }, { "paramname":"nRemoteVirtualPort", "paramtype":"int" }, { "paramname":"nOptions", "paramtype":"int" }, @@ -11625,7 +11779,7 @@ "params": [ { "paramname":"pMsg", "paramtype":"const void *" }, { "paramname":"cbMsg", "paramtype":"int" }, - { "paramname":"pContext", "paramtype":"ISteamNetworkingCustomSignalingRecvContext *" } + { "paramname":"pContext", "paramtype":"ISteamNetworkingSignalingRecvContext *" } ], "returntype": "bool" }, @@ -11662,8 +11816,8 @@ "accessors": [ { "kind": "global", - "name": "SteamNetworkingUtils", - "name_flat": "SteamAPI_SteamNetworkingUtils_v003" + "name": "SteamNetworkingUtils_SteamAPI", + "name_flat": "SteamAPI_SteamNetworkingUtils_SteamAPI_v003" } ], "classname": "ISteamNetworkingUtils", @@ -12928,6 +13082,34 @@ "params": [], "returntype": "const char *" }, + { + "methodname": "SetPSNID", + "methodname_flat": "SteamAPI_SteamNetworkingIdentity_SetPSNID", + "params": [ + { "paramname":"id", "paramtype":"uint64" } + ], + "returntype": "void" + }, + { + "methodname": "GetPSNID", + "methodname_flat": "SteamAPI_SteamNetworkingIdentity_GetPSNID", + "params": [], + "returntype": "uint64" + }, + { + "methodname": "SetStadiaID", + "methodname_flat": "SteamAPI_SteamNetworkingIdentity_SetStadiaID", + "params": [ + { "paramname":"id", "paramtype":"uint64" } + ], + "returntype": "void" + }, + { + "methodname": "GetStadiaID", + "methodname_flat": "SteamAPI_SteamNetworkingIdentity_GetStadiaID", + "params": [], + "returntype": "uint64" + }, { "methodname": "SetIPAddr", "methodname_flat": "SteamAPI_SteamNetworkingIdentity_SetIPAddr", diff --git a/Generator/steam_sdk/steam_api_flat.h b/Generator/steam_sdk/steam_api_flat.h index 9c19f8c..c71e61c 100644 --- a/Generator/steam_sdk/steam_api_flat.h +++ b/Generator/steam_sdk/steam_api_flat.h @@ -167,6 +167,7 @@ S_API bool SteamAPI_ISteamFriends_IsClanOfficialGameGroup( ISteamFriends* self, S_API int SteamAPI_ISteamFriends_GetNumChatsWithUnreadPriorityMessages( ISteamFriends* self ); S_API void SteamAPI_ISteamFriends_ActivateGameOverlayRemotePlayTogetherInviteDialog( ISteamFriends* self, uint64_steamid steamIDLobby ); S_API bool SteamAPI_ISteamFriends_RegisterProtocolInOverlayBrowser( ISteamFriends* self, const char * pchProtocol ); +S_API void SteamAPI_ISteamFriends_ActivateGameOverlayInviteDialogConnectString( ISteamFriends* self, const char * pchConnectString ); // ISteamUtils S_API ISteamUtils *SteamAPI_SteamUtils_v010(); @@ -178,7 +179,6 @@ S_API uint32 SteamAPI_ISteamUtils_GetServerRealTime( ISteamUtils* self ); S_API const char * SteamAPI_ISteamUtils_GetIPCountry( ISteamUtils* self ); S_API bool SteamAPI_ISteamUtils_GetImageSize( ISteamUtils* self, int iImage, uint32 * pnWidth, uint32 * pnHeight ); S_API bool SteamAPI_ISteamUtils_GetImageRGBA( ISteamUtils* self, int iImage, uint8 * pubDest, int nDestBufferSize ); -S_API bool SteamAPI_ISteamUtils_GetCSERIPPort( ISteamUtils* self, uint32 * unIP, uint16 * usPort ); S_API uint8 SteamAPI_ISteamUtils_GetCurrentBatteryPower( ISteamUtils* self ); S_API uint32 SteamAPI_ISteamUtils_GetAppID( ISteamUtils* self ); S_API void SteamAPI_ISteamUtils_SetOverlayNotificationPosition( ISteamUtils* self, ENotificationPosition eNotificationPosition ); @@ -571,7 +571,7 @@ S_API bool SteamAPI_ISteamHTTP_SetHTTPRequestAbsoluteTimeoutMS( ISteamHTTP* self S_API bool SteamAPI_ISteamHTTP_GetHTTPRequestWasTimedOut( ISteamHTTP* self, HTTPRequestHandle hRequest, bool * pbWasTimedOut ); // ISteamInput -S_API ISteamInput *SteamAPI_SteamInput_v001(); +S_API ISteamInput *SteamAPI_SteamInput_v002(); S_API bool SteamAPI_ISteamInput_Init( ISteamInput* self ); S_API bool SteamAPI_ISteamInput_Shutdown( ISteamInput* self ); S_API void SteamAPI_ISteamInput_RunFrame( ISteamInput* self ); @@ -609,7 +609,7 @@ S_API bool SteamAPI_ISteamInput_GetDeviceBindingRevision( ISteamInput* self, Inp S_API uint32 SteamAPI_ISteamInput_GetRemotePlaySessionID( ISteamInput* self, InputHandle_t inputHandle ); // ISteamController -S_API ISteamController *SteamAPI_SteamController_v007(); +S_API ISteamController *SteamAPI_SteamController_v008(); S_API bool SteamAPI_ISteamController_Init( ISteamController* self ); S_API bool SteamAPI_ISteamController_Shutdown( ISteamController* self ); S_API void SteamAPI_ISteamController_RunFrame( ISteamController* self ); @@ -646,14 +646,17 @@ S_API EControllerActionOrigin SteamAPI_ISteamController_TranslateActionOrigin( I S_API bool SteamAPI_ISteamController_GetControllerBindingRevision( ISteamController* self, ControllerHandle_t controllerHandle, int * pMajor, int * pMinor ); // ISteamUGC -S_API ISteamUGC *SteamAPI_SteamUGC_v014(); -S_API ISteamUGC *SteamAPI_SteamGameServerUGC_v014(); +S_API ISteamUGC *SteamAPI_SteamUGC_v015(); +S_API ISteamUGC *SteamAPI_SteamGameServerUGC_v015(); S_API UGCQueryHandle_t SteamAPI_ISteamUGC_CreateQueryUserUGCRequest( ISteamUGC* self, AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage ); S_API UGCQueryHandle_t SteamAPI_ISteamUGC_CreateQueryAllUGCRequestPage( ISteamUGC* self, EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint32 unPage ); S_API UGCQueryHandle_t SteamAPI_ISteamUGC_CreateQueryAllUGCRequestCursor( ISteamUGC* self, EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, const char * pchCursor ); S_API UGCQueryHandle_t SteamAPI_ISteamUGC_CreateQueryUGCDetailsRequest( ISteamUGC* self, PublishedFileId_t * pvecPublishedFileID, uint32 unNumPublishedFileIDs ); S_API SteamAPICall_t SteamAPI_ISteamUGC_SendQueryUGCRequest( ISteamUGC* self, UGCQueryHandle_t handle ); S_API bool SteamAPI_ISteamUGC_GetQueryUGCResult( ISteamUGC* self, UGCQueryHandle_t handle, uint32 index, SteamUGCDetails_t * pDetails ); +S_API uint32 SteamAPI_ISteamUGC_GetQueryUGCNumTags( ISteamUGC* self, UGCQueryHandle_t handle, uint32 index ); +S_API bool SteamAPI_ISteamUGC_GetQueryUGCTag( ISteamUGC* self, UGCQueryHandle_t handle, uint32 index, uint32 indexTag, char * pchValue, uint32 cchValueSize ); +S_API bool SteamAPI_ISteamUGC_GetQueryUGCTagDisplayName( ISteamUGC* self, UGCQueryHandle_t handle, uint32 index, uint32 indexTag, char * pchValue, uint32 cchValueSize ); S_API bool SteamAPI_ISteamUGC_GetQueryUGCPreviewURL( ISteamUGC* self, UGCQueryHandle_t handle, uint32 index, char * pchURL, uint32 cchURLSize ); S_API bool SteamAPI_ISteamUGC_GetQueryUGCMetadata( ISteamUGC* self, UGCQueryHandle_t handle, uint32 index, char * pchMetadata, uint32 cchMetadatasize ); S_API bool SteamAPI_ISteamUGC_GetQueryUGCChildren( ISteamUGC* self, UGCQueryHandle_t handle, uint32 index, PublishedFileId_t * pvecPublishedFileID, uint32 cMaxEntries ); @@ -845,8 +848,8 @@ S_API bool SteamAPI_ISteamRemotePlay_BGetSessionClientResolution( ISteamRemotePl S_API bool SteamAPI_ISteamRemotePlay_BSendRemotePlayTogetherInvite( ISteamRemotePlay* self, uint64_steamid steamIDFriend ); // ISteamNetworkingMessages -S_API ISteamNetworkingMessages *SteamAPI_SteamNetworkingMessages_v002(); -S_API ISteamNetworkingMessages *SteamAPI_SteamGameServerNetworkingMessages_v002(); +S_API ISteamNetworkingMessages *SteamAPI_SteamNetworkingMessages_SteamAPI_v002(); +S_API ISteamNetworkingMessages *SteamAPI_SteamGameServerNetworkingMessages_SteamAPI_v002(); S_API EResult SteamAPI_ISteamNetworkingMessages_SendMessageToUser( ISteamNetworkingMessages* self, const SteamNetworkingIdentity & identityRemote, const void * pubData, uint32 cubData, int nSendFlags, int nRemoteChannel ); S_API int SteamAPI_ISteamNetworkingMessages_ReceiveMessagesOnChannel( ISteamNetworkingMessages* self, int nLocalChannel, SteamNetworkingMessage_t ** ppOutMessages, int nMaxMessages ); S_API bool SteamAPI_ISteamNetworkingMessages_AcceptSessionWithUser( ISteamNetworkingMessages* self, const SteamNetworkingIdentity & identityRemote ); @@ -855,8 +858,8 @@ S_API bool SteamAPI_ISteamNetworkingMessages_CloseChannelWithUser( ISteamNetwork S_API ESteamNetworkingConnectionState SteamAPI_ISteamNetworkingMessages_GetSessionConnectionInfo( ISteamNetworkingMessages* self, const SteamNetworkingIdentity & identityRemote, SteamNetConnectionInfo_t * pConnectionInfo, SteamNetworkingQuickConnectionStatus * pQuickStatus ); // ISteamNetworkingSockets -S_API ISteamNetworkingSockets *SteamAPI_SteamNetworkingSockets_v009(); -S_API ISteamNetworkingSockets *SteamAPI_SteamGameServerNetworkingSockets_v009(); +S_API ISteamNetworkingSockets *SteamAPI_SteamNetworkingSockets_SteamAPI_v009(); +S_API ISteamNetworkingSockets *SteamAPI_SteamGameServerNetworkingSockets_SteamAPI_v009(); S_API HSteamListenSocket SteamAPI_ISteamNetworkingSockets_CreateListenSocketIP( ISteamNetworkingSockets* self, const SteamNetworkingIPAddr & localAddress, int nOptions, const SteamNetworkingConfigValue_t * pOptions ); S_API HSteamNetConnection SteamAPI_ISteamNetworkingSockets_ConnectByIPAddress( ISteamNetworkingSockets* self, const SteamNetworkingIPAddr & address, int nOptions, const SteamNetworkingConfigValue_t * pOptions ); S_API HSteamListenSocket SteamAPI_ISteamNetworkingSockets_CreateListenSocketP2P( ISteamNetworkingSockets* self, int nLocalVirtualPort, int nOptions, const SteamNetworkingConfigValue_t * pOptions ); @@ -892,14 +895,14 @@ S_API SteamNetworkingPOPID SteamAPI_ISteamNetworkingSockets_GetHostedDedicatedSe S_API EResult SteamAPI_ISteamNetworkingSockets_GetHostedDedicatedServerAddress( ISteamNetworkingSockets* self, SteamDatagramHostedAddress * pRouting ); S_API HSteamListenSocket SteamAPI_ISteamNetworkingSockets_CreateHostedDedicatedServerListenSocket( ISteamNetworkingSockets* self, int nLocalVirtualPort, int nOptions, const SteamNetworkingConfigValue_t * pOptions ); S_API EResult SteamAPI_ISteamNetworkingSockets_GetGameCoordinatorServerLogin( ISteamNetworkingSockets* self, SteamDatagramGameCoordinatorServerLogin * pLoginInfo, int * pcbSignedBlob, void * pBlob ); -S_API HSteamNetConnection SteamAPI_ISteamNetworkingSockets_ConnectP2PCustomSignaling( ISteamNetworkingSockets* self, ISteamNetworkingConnectionCustomSignaling * pSignaling, const SteamNetworkingIdentity * pPeerIdentity, int nRemoteVirtualPort, int nOptions, const SteamNetworkingConfigValue_t * pOptions ); -S_API bool SteamAPI_ISteamNetworkingSockets_ReceivedP2PCustomSignal( ISteamNetworkingSockets* self, const void * pMsg, int cbMsg, ISteamNetworkingCustomSignalingRecvContext * pContext ); +S_API HSteamNetConnection SteamAPI_ISteamNetworkingSockets_ConnectP2PCustomSignaling( ISteamNetworkingSockets* self, ISteamNetworkingConnectionSignaling * pSignaling, const SteamNetworkingIdentity * pPeerIdentity, int nRemoteVirtualPort, int nOptions, const SteamNetworkingConfigValue_t * pOptions ); +S_API bool SteamAPI_ISteamNetworkingSockets_ReceivedP2PCustomSignal( ISteamNetworkingSockets* self, const void * pMsg, int cbMsg, ISteamNetworkingSignalingRecvContext * pContext ); S_API bool SteamAPI_ISteamNetworkingSockets_GetCertificateRequest( ISteamNetworkingSockets* self, int * pcbBlob, void * pBlob, SteamNetworkingErrMsg & errMsg ); S_API bool SteamAPI_ISteamNetworkingSockets_SetCertificate( ISteamNetworkingSockets* self, const void * pCertificate, int cbCertificate, SteamNetworkingErrMsg & errMsg ); S_API void SteamAPI_ISteamNetworkingSockets_RunCallbacks( ISteamNetworkingSockets* self ); // ISteamNetworkingUtils -S_API ISteamNetworkingUtils *SteamAPI_SteamNetworkingUtils_v003(); +S_API ISteamNetworkingUtils *SteamAPI_SteamNetworkingUtils_SteamAPI_v003(); S_API SteamNetworkingMessage_t * SteamAPI_ISteamNetworkingUtils_AllocateMessage( ISteamNetworkingUtils* self, int cbAllocateBuffer ); S_API void SteamAPI_ISteamNetworkingUtils_InitRelayNetworkAccess( ISteamNetworkingUtils* self ); S_API ESteamNetworkingAvailability SteamAPI_ISteamNetworkingUtils_GetRelayNetworkStatus( ISteamNetworkingUtils* self, SteamRelayNetworkStatus_t * pDetails ); @@ -1043,6 +1046,10 @@ S_API void SteamAPI_SteamNetworkingIdentity_SetSteamID64( SteamNetworkingIdentit S_API uint64 SteamAPI_SteamNetworkingIdentity_GetSteamID64( SteamNetworkingIdentity* self ); S_API bool SteamAPI_SteamNetworkingIdentity_SetXboxPairwiseID( SteamNetworkingIdentity* self, const char * pszString ); S_API const char * SteamAPI_SteamNetworkingIdentity_GetXboxPairwiseID( SteamNetworkingIdentity* self ); +S_API void SteamAPI_SteamNetworkingIdentity_SetPSNID( SteamNetworkingIdentity* self, uint64 id ); +S_API uint64 SteamAPI_SteamNetworkingIdentity_GetPSNID( SteamNetworkingIdentity* self ); +S_API void SteamAPI_SteamNetworkingIdentity_SetStadiaID( SteamNetworkingIdentity* self, uint64 id ); +S_API uint64 SteamAPI_SteamNetworkingIdentity_GetStadiaID( SteamNetworkingIdentity* self ); S_API void SteamAPI_SteamNetworkingIdentity_SetIPAddr( SteamNetworkingIdentity* self, const SteamNetworkingIPAddr & addr ); S_API const SteamNetworkingIPAddr * SteamAPI_SteamNetworkingIdentity_GetIPAddr( SteamNetworkingIdentity* self ); S_API void SteamAPI_SteamNetworkingIdentity_SetLocalHost( SteamNetworkingIdentity* self ); diff --git a/Generator/steam_sdk/steam_gameserver.h b/Generator/steam_sdk/steam_gameserver.h index bec600d..71f681e 100644 --- a/Generator/steam_sdk/steam_gameserver.h +++ b/Generator/steam_sdk/steam_gameserver.h @@ -22,25 +22,29 @@ enum EServerMode eServerModeAuthenticationAndSecure = 3, // Authenticate users, list on the server list and VAC protect clients }; +/// Pass to SteamGameServer_Init to indicate that the same UDP port will be used for game traffic +/// UDP queries. In this case, Steam will not open up a socket to handle server browser queries, +/// and you must use ISteamGameServer::HandleIncomingPacket and ISteamGameServer::GetNextOutgoingPacket +/// to handle packets related to server discovery on your socket. +#define MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE ((uint16)-1) + // Initialize SteamGameServer client and interface objects, and set server properties which may not be changed. // // After calling this function, you should set any additional server parameters, and then // call ISteamGameServer::LogOnAnonymous() or ISteamGameServer::LogOn() // -// - usSteamPort is the local port used to communicate with the steam servers. -// NOTE: unless you are using ver old Steam client binaries, this parameter is ignored, and -// you should pass 0. Gameservers now always use WebSockets to talk to Steam. -// This protocol is TCP-based and thus always uses an ephemeral local port. -// Older steam client binaries used UDP to talk to Steam, and this argument was useful. -// A future version of the SDK will remove this argument. -// - usGamePort is the port that clients will connect to for gameplay. +// - unIP will usually be zero. If you are on a machine with multiple IP addresses, you can pass a non-zero +// value here and the relevant sockets will be bound to that IP. This can be used to ensure that +// the IP you desire is the one used in the server browser. +// - usGamePort is the port that clients will connect to for gameplay. You will usually open up your +// own socket bound to this port. // - usQueryPort is the port that will manage server browser related duties and info // pings from clients. If you pass MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE for usQueryPort, then it // will use "GameSocketShare" mode, which means that the game is responsible for sending and receiving // UDP packets for the master server updater. See references to GameSocketShare in isteamgameserver.h. -// - The version string is usually in the form x.x.x.x, and is used by the master server to detect when the +// - The version string should be in the form x.x.x.x, and is used by the master server to detect when the // server is out of date. (Only servers with the latest version will be listed.) -inline bool SteamGameServer_Init( uint32 unIP, uint16 usSteamPort, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString ); +inline bool SteamGameServer_Init( uint32 unIP, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString ); // Shutdown SteamGameSeverXxx interfaces, log out, and free resources. S_API void SteamGameServer_Shutdown(); @@ -94,10 +98,10 @@ inline bool CSteamGameServerAPIContext::Init() } #endif -S_API bool S_CALLTYPE SteamInternal_GameServer_Init( uint32 unIP, uint16 usPort, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString ); -inline bool SteamGameServer_Init( uint32 unIP, uint16 usSteamPort, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString ) +S_API bool S_CALLTYPE SteamInternal_GameServer_Init( uint32 unIP, uint16 usLegacySteamPort, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString ); +inline bool SteamGameServer_Init( uint32 unIP, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString ) { - if ( !SteamInternal_GameServer_Init( unIP, usSteamPort, usGamePort, usQueryPort, eServerMode, pchVersionString ) ) + if ( !SteamInternal_GameServer_Init( unIP, 0, usGamePort, usQueryPort, eServerMode, pchVersionString ) ) return false; return true; diff --git a/Generator/steam_sdk/steamclientpublic.h b/Generator/steam_sdk/steamclientpublic.h index f744263..695bb9c 100644 --- a/Generator/steam_sdk/steamclientpublic.h +++ b/Generator/steam_sdk/steamclientpublic.h @@ -142,6 +142,9 @@ enum EResult k_EResultAccountDeleted = 114, // account has been deleted k_EResultExistingUserCancelledLicense = 115, // A license for this already exists, but cancelled k_EResultCommunityCooldown = 116, // access is denied because of a community cooldown (probably from support profile data resets) + k_EResultNoLauncherSpecified = 117, // No launcher was specified, but a launcher was needed to choose correct realm for operation. + k_EResultMustAgreeToSSA = 118, // User must agree to china SSA or global SSA before login + k_EResultLauncherMigrated = 119, // The specified launcher type is no longer supported; the user should be directed elsewhere }; // Error codes for use with the voice functions @@ -311,7 +314,7 @@ enum EAppType k_EAppType_Beta = 0x10000, // this is a beta version of a game k_EAppType_Shortcut = 0x40000000, // just a shortcut, client side only - k_EAppType_DepotOnly = 0x80000000, // placeholder since depots and apps share the same namespace + k_EAppType_DepotOnly_DEPRECATED = 0x80000000, // there shouldn't be any appinfo for depots }; @@ -556,6 +559,7 @@ enum EVRHMDType k_eEVRHMDType_HP_Unknown = 80, // HP unknown HMD k_eEVRHMDType_HP_WindowsMR = 81, // HP Windows MR headset k_eEVRHMDType_HP_Reverb = 82, // HP Reverb Windows MR headset + k_eEVRHMDType_HP_ReverbG2 = 1463, // HP Reverb G2 Windows MR headset k_eEVRHMDType_Samsung_Unknown = 90, // Samsung unknown HMD k_eEVRHMDType_Samsung_Odyssey = 91, // Samsung Odyssey Windows MR headset diff --git a/Generator/steam_sdk/steamnetworkingtypes.h b/Generator/steam_sdk/steamnetworkingtypes.h index 7a70add..5b35a4e 100644 --- a/Generator/steam_sdk/steamnetworkingtypes.h +++ b/Generator/steam_sdk/steamnetworkingtypes.h @@ -6,26 +6,40 @@ #ifndef STEAMNETWORKINGTYPES #define STEAMNETWORKINGTYPES -#ifdef _WIN32 #pragma once -#endif #include #include +#include "steamtypes.h" +#include "steamclientpublic.h" -//---------------------------------------- -// SteamNetworkingSockets library config -// Compiling in Steam public branch. -#define STEAMNETWORKINGSOCKETS_STEAM -#ifdef STEAMNETWORKINGSOCKETS_STATIC_LINK - #define STEAMNETWORKINGSOCKETS_INTERFACE extern +//----------------------------------------------------------------------------- +// SteamNetworkingSockets config. +//#define STEAMNETWORKINGSOCKETS_STANDALONELIB // Comment this in to support compiling/linking with the standalone library / gamenetworkingsockets opensource +#define STEAMNETWORKINGSOCKETS_STEAMAPI // Compiling/link with steam_api.h and Steamworks SDK +//----------------------------------------------------------------------------- + +#if !defined( STEAMNETWORKINGSOCKETS_OPENSOURCE ) && !defined( STEAMNETWORKINGSOCKETS_STREAMINGCLIENT ) + #define STEAMNETWORKINGSOCKETS_STEAM +#endif +#ifdef NN_NINTENDO_SDK // We always static link on Nintendo + #define STEAMNETWORKINGSOCKETS_STATIC_LINK +#endif +#if defined( STEAMNETWORKINGSOCKETS_STATIC_LINK ) + #define STEAMNETWORKINGSOCKETS_INTERFACE extern "C" +#elif defined( STEAMNETWORKINGSOCKETS_FOREXPORT ) + #ifdef _WIN32 + #define STEAMNETWORKINGSOCKETS_INTERFACE extern "C" __declspec( dllexport ) + #else + #define STEAMNETWORKINGSOCKETS_INTERFACE extern "C" __attribute__((visibility("default"))) + #endif +#else + #ifdef _WIN32 + #define STEAMNETWORKINGSOCKETS_INTERFACE extern "C" __declspec( dllimport ) + #else + #define STEAMNETWORKINGSOCKETS_INTERFACE extern "C" + #endif #endif -#define STEAMNETWORKINGSOCKETS_STEAMCLIENT -#define STEAMNETWORKINGSOCKETS_ENABLE_SDR -#include "steam_api_common.h" -// -//---------------------------------------- - #if defined( VALVE_CALLBACK_PACK_SMALL ) #pragma pack( push, 4 ) @@ -195,18 +209,18 @@ struct SteamNetworkingIPAddr /// (This means that you cannot tell if a zero port was explicitly specified.) inline bool ParseString( const char *pszStr ); + /// RFC4038, section 4.2 + struct IPv4MappedAddress { + uint64 m_8zeros; + uint16 m_0000; + uint16 m_ffff; + uint8 m_ip[ 4 ]; // NOTE: As bytes, i.e. network byte order + }; + union { uint8 m_ipv6[ 16 ]; - #ifndef API_GEN // API generator doesn't understand this. The bindings will just use the accessors - struct // IPv4 "mapped address" (rfc4038 section 4.2) - { - uint64 m_8zeros; - uint16 m_0000; - uint16 m_ffff; - uint8 m_ip[ 4 ]; // NOTE: As bytes, i.e. network byte order - } m_ipv4; - #endif + IPv4MappedAddress m_ipv4; }; uint16 m_port; // Host byte order @@ -659,6 +673,9 @@ struct SteamNetConnectionInfo_t /// connection type (and peer information), and any name /// given to the connection by the app. This string is used in various /// internal logging messages. + /// + /// Note that the connection ID *usually* matches the HSteamNetConnection + /// handle, but in certain cases with symmetric connections it might not. char m_szConnectionDescription[ k_cchSteamNetworkingMaxConnectionDescription ]; /// Internal stuff, room to change API easily @@ -1297,6 +1314,12 @@ enum ESteamNetworkingConfigValue /// See: ISteamNetworkingUtils::SetGlobalCallback_MessagesSessionFailed k_ESteamNetworkingConfig_Callback_MessagesSessionFailed = 205, + /// [global FnSteamNetworkingSocketsCreateConnectionSignaling] Callback that will + /// be invoked when we need to create a signaling object for a connection + /// initiated locally. See: ISteamNetworkingSockets::ConnectP2P, + /// ISteamNetworkingMessages. + k_ESteamNetworkingConfig_Callback_CreateConnectionSignaling = 206, + // // P2P settings // @@ -1600,17 +1623,6 @@ inline const uint8 *SteamNetworkingIdentity::GetGenericBytes( int &cbLen ) const inline bool SteamNetworkingIdentity::operator==(const SteamNetworkingIdentity &x ) const { return m_eType == x.m_eType && m_cbSize == x.m_cbSize && memcmp( m_genericBytes, x.m_genericBytes, m_cbSize ) == 0; } inline void SteamNetworkingMessage_t::Release() { (*m_pfnRelease)( this ); } -#if defined( STEAMNETWORKINGSOCKETS_STATIC_LINK ) || !defined( STEAMNETWORKINGSOCKETS_STEAMCLIENT ) -STEAMNETWORKINGSOCKETS_INTERFACE void SteamNetworkingIPAddr_ToString( const SteamNetworkingIPAddr *pAddr, char *buf, size_t cbBuf, bool bWithPort ); -STEAMNETWORKINGSOCKETS_INTERFACE bool SteamNetworkingIPAddr_ParseString( SteamNetworkingIPAddr *pAddr, const char *pszStr ); -STEAMNETWORKINGSOCKETS_INTERFACE void SteamNetworkingIdentity_ToString( const SteamNetworkingIdentity *pIdentity, char *buf, size_t cbBuf ); -STEAMNETWORKINGSOCKETS_INTERFACE bool SteamNetworkingIdentity_ParseString( SteamNetworkingIdentity *pIdentity, size_t sizeofIdentity, const char *pszStr ); -inline void SteamNetworkingIPAddr::ToString( char *buf, size_t cbBuf, bool bWithPort ) const { SteamNetworkingIPAddr_ToString( this, buf, cbBuf, bWithPort ); } -inline bool SteamNetworkingIPAddr::ParseString( const char *pszStr ) { return SteamNetworkingIPAddr_ParseString( this, pszStr ); } -inline void SteamNetworkingIdentity::ToString( char *buf, size_t cbBuf ) const { SteamNetworkingIdentity_ToString( this, buf, cbBuf ); } -inline bool SteamNetworkingIdentity::ParseString( const char *pszStr ) { return SteamNetworkingIdentity_ParseString( this, sizeof(*this), pszStr ); } -#endif - #endif // #ifndef API_GEN #endif // #ifndef STEAMNETWORKINGTYPES diff --git a/UnityPlugin/redistributable_bin/linux32/libsteam_api.so b/UnityPlugin/redistributable_bin/linux32/libsteam_api.so index 928c5ee..bb5d4fe 100644 Binary files a/UnityPlugin/redistributable_bin/linux32/libsteam_api.so and b/UnityPlugin/redistributable_bin/linux32/libsteam_api.so differ diff --git a/UnityPlugin/redistributable_bin/linux64/libsteam_api.so b/UnityPlugin/redistributable_bin/linux64/libsteam_api.so index 6a46811..4111712 100644 Binary files a/UnityPlugin/redistributable_bin/linux64/libsteam_api.so and b/UnityPlugin/redistributable_bin/linux64/libsteam_api.so differ diff --git a/UnityPlugin/redistributable_bin/osx/libsteam_api.bundle b/UnityPlugin/redistributable_bin/osx/libsteam_api.bundle index 75800db..d89750e 100644 Binary files a/UnityPlugin/redistributable_bin/osx/libsteam_api.bundle and b/UnityPlugin/redistributable_bin/osx/libsteam_api.bundle differ diff --git a/UnityPlugin/redistributable_bin/steam_api.dll b/UnityPlugin/redistributable_bin/steam_api.dll index a3a661a..8fb32b4 100644 Binary files a/UnityPlugin/redistributable_bin/steam_api.dll and b/UnityPlugin/redistributable_bin/steam_api.dll differ diff --git a/UnityPlugin/redistributable_bin/steam_api.lib b/UnityPlugin/redistributable_bin/steam_api.lib index 15da456..0f38061 100644 Binary files a/UnityPlugin/redistributable_bin/steam_api.lib and b/UnityPlugin/redistributable_bin/steam_api.lib differ diff --git a/UnityPlugin/redistributable_bin/win64/steam_api64.dll b/UnityPlugin/redistributable_bin/win64/steam_api64.dll index 2fc976a..c6e55cf 100644 Binary files a/UnityPlugin/redistributable_bin/win64/steam_api64.dll and b/UnityPlugin/redistributable_bin/win64/steam_api64.dll differ diff --git a/UnityPlugin/redistributable_bin/win64/steam_api64.lib b/UnityPlugin/redistributable_bin/win64/steam_api64.lib index afa69c5..a250a73 100644 Binary files a/UnityPlugin/redistributable_bin/win64/steam_api64.lib and b/UnityPlugin/redistributable_bin/win64/steam_api64.lib differ