diff options
author | chai <215380520@qq.com> | 2023-11-25 18:39:02 +0800 |
---|---|---|
committer | chai <215380520@qq.com> | 2023-11-25 18:39:02 +0800 |
commit | 0e63c4a2c6dec8dfa260501fb7d73750261ea7b7 (patch) | |
tree | f6f2291be65d195d6082b523a56183c332715240 /Assembly_Firstpass |
+ init
Diffstat (limited to 'Assembly_Firstpass')
445 files changed, 22854 insertions, 0 deletions
diff --git a/Assembly_Firstpass/Properties/AssemblyInfo.cs b/Assembly_Firstpass/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..bbd7eef --- /dev/null +++ b/Assembly_Firstpass/Properties/AssemblyInfo.cs @@ -0,0 +1,5 @@ +using System.Diagnostics; +using System.Reflection; +using System.Runtime.CompilerServices; + +[assembly: AssemblyVersion("0.0.0.0")] diff --git a/Assembly_Firstpass/RogueTower-firstpass.csproj b/Assembly_Firstpass/RogueTower-firstpass.csproj new file mode 100644 index 0000000..6e51b18 --- /dev/null +++ b/Assembly_Firstpass/RogueTower-firstpass.csproj @@ -0,0 +1,18 @@ +<Project Sdk="Microsoft.NET.Sdk"> + <PropertyGroup> + <AssemblyName>Assembly-CSharp-firstpass</AssemblyName> + <GenerateAssemblyInfo>False</GenerateAssemblyInfo> + <TargetFramework>netstandard2.0</TargetFramework> + </PropertyGroup> + <PropertyGroup> + <LangVersion>11.0</LangVersion> + <AllowUnsafeBlocks>True</AllowUnsafeBlocks> + </PropertyGroup> + <PropertyGroup /> + <ItemGroup /> + <ItemGroup> + <Reference Include="UnityEngine.CoreModule"> + <HintPath>..\..\Rogue Tower_Data\Managed\UnityEngine.CoreModule.dll</HintPath> + </Reference> + </ItemGroup> +</Project>
\ No newline at end of file diff --git a/Assembly_Firstpass/Steamworks/AccountID_t.cs b/Assembly_Firstpass/Steamworks/AccountID_t.cs new file mode 100644 index 0000000..8dfd298 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/AccountID_t.cs @@ -0,0 +1,63 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct AccountID_t : IEquatable<AccountID_t>, IComparable<AccountID_t> +{ + public uint m_AccountID; + + public AccountID_t(uint value) + { + m_AccountID = value; + } + + public override string ToString() + { + return m_AccountID.ToString(); + } + + public override bool Equals(object other) + { + if (other is AccountID_t) + { + return this == (AccountID_t)other; + } + return false; + } + + public override int GetHashCode() + { + return m_AccountID.GetHashCode(); + } + + public static bool operator ==(AccountID_t x, AccountID_t y) + { + return x.m_AccountID == y.m_AccountID; + } + + public static bool operator !=(AccountID_t x, AccountID_t y) + { + return !(x == y); + } + + public static explicit operator AccountID_t(uint value) + { + return new AccountID_t(value); + } + + public static explicit operator uint(AccountID_t that) + { + return that.m_AccountID; + } + + public bool Equals(AccountID_t other) + { + return m_AccountID == other.m_AccountID; + } + + public int CompareTo(AccountID_t other) + { + return m_AccountID.CompareTo(other.m_AccountID); + } +} diff --git a/Assembly_Firstpass/Steamworks/ActiveBeaconsUpdated_t.cs b/Assembly_Firstpass/Steamworks/ActiveBeaconsUpdated_t.cs new file mode 100644 index 0000000..7830322 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ActiveBeaconsUpdated_t.cs @@ -0,0 +1,10 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8, Size = 1)] +[CallbackIdentity(5306)] +public struct ActiveBeaconsUpdated_t +{ + public const int k_iCallback = 5306; +} diff --git a/Assembly_Firstpass/Steamworks/AddAppDependencyResult_t.cs b/Assembly_Firstpass/Steamworks/AddAppDependencyResult_t.cs new file mode 100644 index 0000000..819047f --- /dev/null +++ b/Assembly_Firstpass/Steamworks/AddAppDependencyResult_t.cs @@ -0,0 +1,16 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(3414)] +public struct AddAppDependencyResult_t +{ + public const int k_iCallback = 3414; + + public EResult m_eResult; + + public PublishedFileId_t m_nPublishedFileId; + + public AppId_t m_nAppID; +} diff --git a/Assembly_Firstpass/Steamworks/AddUGCDependencyResult_t.cs b/Assembly_Firstpass/Steamworks/AddUGCDependencyResult_t.cs new file mode 100644 index 0000000..d4f2824 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/AddUGCDependencyResult_t.cs @@ -0,0 +1,16 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(3412)] +public struct AddUGCDependencyResult_t +{ + public const int k_iCallback = 3412; + + public EResult m_eResult; + + public PublishedFileId_t m_nPublishedFileId; + + public PublishedFileId_t m_nChildPublishedFileId; +} diff --git a/Assembly_Firstpass/Steamworks/AppId_t.cs b/Assembly_Firstpass/Steamworks/AppId_t.cs new file mode 100644 index 0000000..c78e9f8 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/AppId_t.cs @@ -0,0 +1,65 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct AppId_t : IEquatable<AppId_t>, IComparable<AppId_t> +{ + public static readonly AppId_t Invalid = new AppId_t(0u); + + public uint m_AppId; + + public AppId_t(uint value) + { + m_AppId = value; + } + + public override string ToString() + { + return m_AppId.ToString(); + } + + public override bool Equals(object other) + { + if (other is AppId_t) + { + return this == (AppId_t)other; + } + return false; + } + + public override int GetHashCode() + { + return m_AppId.GetHashCode(); + } + + public static bool operator ==(AppId_t x, AppId_t y) + { + return x.m_AppId == y.m_AppId; + } + + public static bool operator !=(AppId_t x, AppId_t y) + { + return !(x == y); + } + + public static explicit operator AppId_t(uint value) + { + return new AppId_t(value); + } + + public static explicit operator uint(AppId_t that) + { + return that.m_AppId; + } + + public bool Equals(AppId_t other) + { + return m_AppId == other.m_AppId; + } + + public int CompareTo(AppId_t other) + { + return m_AppId.CompareTo(other.m_AppId); + } +} diff --git a/Assembly_Firstpass/Steamworks/AppProofOfPurchaseKeyResponse_t.cs b/Assembly_Firstpass/Steamworks/AppProofOfPurchaseKeyResponse_t.cs new file mode 100644 index 0000000..d5be422 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/AppProofOfPurchaseKeyResponse_t.cs @@ -0,0 +1,31 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1021)] +public struct AppProofOfPurchaseKeyResponse_t +{ + public const int k_iCallback = 1021; + + public EResult m_eResult; + + public uint m_nAppID; + + public uint m_cchKeyLength; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 240)] + private byte[] m_rgchKey_; + + public string m_rgchKey + { + get + { + return InteropHelp.ByteArrayToStringUTF8(m_rgchKey_); + } + set + { + InteropHelp.StringToByteArrayUTF8(value, m_rgchKey_, 240); + } + } +} diff --git a/Assembly_Firstpass/Steamworks/AssociateWithClanResult_t.cs b/Assembly_Firstpass/Steamworks/AssociateWithClanResult_t.cs new file mode 100644 index 0000000..2f02d14 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/AssociateWithClanResult_t.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(210)] +public struct AssociateWithClanResult_t +{ + public const int k_iCallback = 210; + + public EResult m_eResult; +} diff --git a/Assembly_Firstpass/Steamworks/AudioPlayback_Status.cs b/Assembly_Firstpass/Steamworks/AudioPlayback_Status.cs new file mode 100644 index 0000000..b3a266c --- /dev/null +++ b/Assembly_Firstpass/Steamworks/AudioPlayback_Status.cs @@ -0,0 +1,9 @@ +namespace Steamworks; + +public enum AudioPlayback_Status +{ + AudioPlayback_Undefined, + AudioPlayback_Playing, + AudioPlayback_Paused, + AudioPlayback_Idle +} diff --git a/Assembly_Firstpass/Steamworks/AvailableBeaconLocationsUpdated_t.cs b/Assembly_Firstpass/Steamworks/AvailableBeaconLocationsUpdated_t.cs new file mode 100644 index 0000000..db4456f --- /dev/null +++ b/Assembly_Firstpass/Steamworks/AvailableBeaconLocationsUpdated_t.cs @@ -0,0 +1,10 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8, Size = 1)] +[CallbackIdentity(5305)] +public struct AvailableBeaconLocationsUpdated_t +{ + public const int k_iCallback = 5305; +} diff --git a/Assembly_Firstpass/Steamworks/AvatarImageLoaded_t.cs b/Assembly_Firstpass/Steamworks/AvatarImageLoaded_t.cs new file mode 100644 index 0000000..4d6e4b6 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/AvatarImageLoaded_t.cs @@ -0,0 +1,18 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 4)] +[CallbackIdentity(334)] +public struct AvatarImageLoaded_t +{ + public const int k_iCallback = 334; + + public CSteamID m_steamID; + + public int m_iImage; + + public int m_iWide; + + public int m_iTall; +} diff --git a/Assembly_Firstpass/Steamworks/CGameID.cs b/Assembly_Firstpass/Steamworks/CGameID.cs new file mode 100644 index 0000000..7e8063e --- /dev/null +++ b/Assembly_Firstpass/Steamworks/CGameID.cs @@ -0,0 +1,170 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct CGameID : IEquatable<CGameID>, IComparable<CGameID> +{ + public enum EGameIDType + { + k_EGameIDTypeApp, + k_EGameIDTypeGameMod, + k_EGameIDTypeShortcut, + k_EGameIDTypeP2P + } + + public ulong m_GameID; + + public CGameID(ulong GameID) + { + m_GameID = GameID; + } + + public CGameID(AppId_t nAppID) + { + m_GameID = 0uL; + SetAppID(nAppID); + } + + public CGameID(AppId_t nAppID, uint nModID) + { + m_GameID = 0uL; + SetAppID(nAppID); + SetType(EGameIDType.k_EGameIDTypeGameMod); + SetModID(nModID); + } + + public bool IsSteamApp() + { + return Type() == EGameIDType.k_EGameIDTypeApp; + } + + public bool IsMod() + { + return Type() == EGameIDType.k_EGameIDTypeGameMod; + } + + public bool IsShortcut() + { + return Type() == EGameIDType.k_EGameIDTypeShortcut; + } + + public bool IsP2PFile() + { + return Type() == EGameIDType.k_EGameIDTypeP2P; + } + + public AppId_t AppID() + { + return new AppId_t((uint)(m_GameID & 0xFFFFFF)); + } + + public EGameIDType Type() + { + return (EGameIDType)((m_GameID >> 24) & 0xFF); + } + + public uint ModID() + { + return (uint)((m_GameID >> 32) & 0xFFFFFFFFu); + } + + public bool IsValid() + { + switch (Type()) + { + case EGameIDType.k_EGameIDTypeApp: + return AppID() != AppId_t.Invalid; + case EGameIDType.k_EGameIDTypeGameMod: + if (AppID() != AppId_t.Invalid) + { + return (ModID() & 0x80000000u) != 0; + } + return false; + case EGameIDType.k_EGameIDTypeShortcut: + return (ModID() & 0x80000000u) != 0; + case EGameIDType.k_EGameIDTypeP2P: + if (AppID() == AppId_t.Invalid) + { + return (ModID() & 0x80000000u) != 0; + } + return false; + default: + return false; + } + } + + public void Reset() + { + m_GameID = 0uL; + } + + public void Set(ulong GameID) + { + m_GameID = GameID; + } + + private void SetAppID(AppId_t other) + { + m_GameID = (m_GameID & 0xFFFFFFFFFF000000uL) | ((ulong)(uint)other & 0xFFFFFFuL); + } + + private void SetType(EGameIDType other) + { + m_GameID = (m_GameID & 0xFFFFFFFF00FFFFFFuL) | (((ulong)other & 0xFFuL) << 24); + } + + private void SetModID(uint other) + { + m_GameID = (m_GameID & 0xFFFFFFFFu) | (((ulong)other & 0xFFFFFFFFuL) << 32); + } + + public override string ToString() + { + return m_GameID.ToString(); + } + + public override bool Equals(object other) + { + if (other is CGameID) + { + return this == (CGameID)other; + } + return false; + } + + public override int GetHashCode() + { + return m_GameID.GetHashCode(); + } + + public static bool operator ==(CGameID x, CGameID y) + { + return x.m_GameID == y.m_GameID; + } + + public static bool operator !=(CGameID x, CGameID y) + { + return !(x == y); + } + + public static explicit operator CGameID(ulong value) + { + return new CGameID(value); + } + + public static explicit operator ulong(CGameID that) + { + return that.m_GameID; + } + + public bool Equals(CGameID other) + { + return m_GameID == other.m_GameID; + } + + public int CompareTo(CGameID other) + { + return m_GameID.CompareTo(other.m_GameID); + } +} diff --git a/Assembly_Firstpass/Steamworks/CSteamAPIContext.cs b/Assembly_Firstpass/Steamworks/CSteamAPIContext.cs new file mode 100644 index 0000000..67fc461 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/CSteamAPIContext.cs @@ -0,0 +1,393 @@ +using System; + +namespace Steamworks; + +internal static class CSteamAPIContext +{ + private static IntPtr m_pSteamClient; + + private static IntPtr m_pSteamUser; + + private static IntPtr m_pSteamFriends; + + private static IntPtr m_pSteamUtils; + + private static IntPtr m_pSteamMatchmaking; + + private static IntPtr m_pSteamUserStats; + + private static IntPtr m_pSteamApps; + + private static IntPtr m_pSteamMatchmakingServers; + + private static IntPtr m_pSteamNetworking; + + private static IntPtr m_pSteamRemoteStorage; + + private static IntPtr m_pSteamScreenshots; + + private static IntPtr m_pSteamGameSearch; + + private static IntPtr m_pSteamHTTP; + + private static IntPtr m_pController; + + private static IntPtr m_pSteamUGC; + + private static IntPtr m_pSteamAppList; + + private static IntPtr m_pSteamMusic; + + private static IntPtr m_pSteamMusicRemote; + + private static IntPtr m_pSteamHTMLSurface; + + private static IntPtr m_pSteamInventory; + + private static IntPtr m_pSteamVideo; + + private static IntPtr m_pSteamParentalSettings; + + private static IntPtr m_pSteamInput; + + private static IntPtr m_pSteamParties; + + private static IntPtr m_pSteamRemotePlay; + + private static IntPtr m_pSteamNetworkingUtils; + + private static IntPtr m_pSteamNetworkingSockets; + + private static IntPtr m_pSteamNetworkingMessages; + + internal static void Clear() + { + m_pSteamClient = IntPtr.Zero; + m_pSteamUser = IntPtr.Zero; + m_pSteamFriends = IntPtr.Zero; + m_pSteamUtils = IntPtr.Zero; + m_pSteamMatchmaking = IntPtr.Zero; + m_pSteamUserStats = IntPtr.Zero; + m_pSteamApps = IntPtr.Zero; + m_pSteamMatchmakingServers = IntPtr.Zero; + m_pSteamNetworking = IntPtr.Zero; + m_pSteamRemoteStorage = IntPtr.Zero; + m_pSteamHTTP = IntPtr.Zero; + m_pSteamScreenshots = IntPtr.Zero; + m_pSteamGameSearch = IntPtr.Zero; + m_pSteamMusic = IntPtr.Zero; + m_pController = IntPtr.Zero; + m_pSteamUGC = IntPtr.Zero; + m_pSteamAppList = IntPtr.Zero; + m_pSteamMusic = IntPtr.Zero; + m_pSteamMusicRemote = IntPtr.Zero; + m_pSteamHTMLSurface = IntPtr.Zero; + m_pSteamInventory = IntPtr.Zero; + m_pSteamVideo = IntPtr.Zero; + m_pSteamParentalSettings = IntPtr.Zero; + m_pSteamInput = IntPtr.Zero; + m_pSteamParties = IntPtr.Zero; + m_pSteamRemotePlay = IntPtr.Zero; + m_pSteamNetworkingUtils = IntPtr.Zero; + m_pSteamNetworkingSockets = IntPtr.Zero; + m_pSteamNetworkingMessages = IntPtr.Zero; + } + + internal static bool Init() + { + HSteamUser hSteamUser = SteamAPI.GetHSteamUser(); + HSteamPipe hSteamPipe = SteamAPI.GetHSteamPipe(); + if (hSteamPipe == (HSteamPipe)0) + { + return false; + } + using (InteropHelp.UTF8StringHandle ver = new InteropHelp.UTF8StringHandle("SteamClient020")) + { + m_pSteamClient = NativeMethods.SteamInternal_CreateInterface(ver); + } + if (m_pSteamClient == IntPtr.Zero) + { + return false; + } + m_pSteamUser = SteamClient.GetISteamUser(hSteamUser, hSteamPipe, "SteamUser021"); + if (m_pSteamUser == IntPtr.Zero) + { + return false; + } + m_pSteamFriends = SteamClient.GetISteamFriends(hSteamUser, hSteamPipe, "SteamFriends017"); + if (m_pSteamFriends == IntPtr.Zero) + { + return false; + } + m_pSteamUtils = SteamClient.GetISteamUtils(hSteamPipe, "SteamUtils010"); + if (m_pSteamUtils == IntPtr.Zero) + { + return false; + } + m_pSteamMatchmaking = SteamClient.GetISteamMatchmaking(hSteamUser, hSteamPipe, "SteamMatchMaking009"); + if (m_pSteamMatchmaking == IntPtr.Zero) + { + return false; + } + m_pSteamMatchmakingServers = SteamClient.GetISteamMatchmakingServers(hSteamUser, hSteamPipe, "SteamMatchMakingServers002"); + if (m_pSteamMatchmakingServers == IntPtr.Zero) + { + return false; + } + m_pSteamUserStats = SteamClient.GetISteamUserStats(hSteamUser, hSteamPipe, "STEAMUSERSTATS_INTERFACE_VERSION012"); + if (m_pSteamUserStats == IntPtr.Zero) + { + return false; + } + m_pSteamApps = SteamClient.GetISteamApps(hSteamUser, hSteamPipe, "STEAMAPPS_INTERFACE_VERSION008"); + if (m_pSteamApps == IntPtr.Zero) + { + return false; + } + m_pSteamNetworking = SteamClient.GetISteamNetworking(hSteamUser, hSteamPipe, "SteamNetworking006"); + if (m_pSteamNetworking == IntPtr.Zero) + { + return false; + } + m_pSteamRemoteStorage = SteamClient.GetISteamRemoteStorage(hSteamUser, hSteamPipe, "STEAMREMOTESTORAGE_INTERFACE_VERSION014"); + if (m_pSteamRemoteStorage == IntPtr.Zero) + { + return false; + } + m_pSteamScreenshots = SteamClient.GetISteamScreenshots(hSteamUser, hSteamPipe, "STEAMSCREENSHOTS_INTERFACE_VERSION003"); + if (m_pSteamScreenshots == IntPtr.Zero) + { + return false; + } + m_pSteamGameSearch = SteamClient.GetISteamGameSearch(hSteamUser, hSteamPipe, "SteamMatchGameSearch001"); + if (m_pSteamGameSearch == IntPtr.Zero) + { + return false; + } + m_pSteamHTTP = SteamClient.GetISteamHTTP(hSteamUser, hSteamPipe, "STEAMHTTP_INTERFACE_VERSION003"); + if (m_pSteamHTTP == IntPtr.Zero) + { + return false; + } + m_pSteamUGC = SteamClient.GetISteamUGC(hSteamUser, hSteamPipe, "STEAMUGC_INTERFACE_VERSION015"); + if (m_pSteamUGC == IntPtr.Zero) + { + return false; + } + m_pSteamAppList = SteamClient.GetISteamAppList(hSteamUser, hSteamPipe, "STEAMAPPLIST_INTERFACE_VERSION001"); + if (m_pSteamAppList == IntPtr.Zero) + { + return false; + } + m_pSteamMusic = SteamClient.GetISteamMusic(hSteamUser, hSteamPipe, "STEAMMUSIC_INTERFACE_VERSION001"); + if (m_pSteamMusic == IntPtr.Zero) + { + return false; + } + m_pSteamMusicRemote = SteamClient.GetISteamMusicRemote(hSteamUser, hSteamPipe, "STEAMMUSICREMOTE_INTERFACE_VERSION001"); + if (m_pSteamMusicRemote == IntPtr.Zero) + { + return false; + } + m_pSteamHTMLSurface = SteamClient.GetISteamHTMLSurface(hSteamUser, hSteamPipe, "STEAMHTMLSURFACE_INTERFACE_VERSION_005"); + if (m_pSteamHTMLSurface == IntPtr.Zero) + { + return false; + } + m_pSteamInventory = SteamClient.GetISteamInventory(hSteamUser, hSteamPipe, "STEAMINVENTORY_INTERFACE_V003"); + if (m_pSteamInventory == IntPtr.Zero) + { + return false; + } + m_pSteamVideo = SteamClient.GetISteamVideo(hSteamUser, hSteamPipe, "STEAMVIDEO_INTERFACE_V002"); + if (m_pSteamVideo == IntPtr.Zero) + { + return false; + } + m_pSteamParentalSettings = SteamClient.GetISteamParentalSettings(hSteamUser, hSteamPipe, "STEAMPARENTALSETTINGS_INTERFACE_VERSION001"); + if (m_pSteamParentalSettings == IntPtr.Zero) + { + return false; + } + m_pSteamInput = SteamClient.GetISteamInput(hSteamUser, hSteamPipe, "SteamInput002"); + if (m_pSteamInput == IntPtr.Zero) + { + return false; + } + m_pSteamParties = SteamClient.GetISteamParties(hSteamUser, hSteamPipe, "SteamParties002"); + if (m_pSteamParties == IntPtr.Zero) + { + return false; + } + m_pSteamRemotePlay = SteamClient.GetISteamRemotePlay(hSteamUser, hSteamPipe, "STEAMREMOTEPLAY_INTERFACE_VERSION001"); + if (m_pSteamRemotePlay == IntPtr.Zero) + { + return false; + } + using (InteropHelp.UTF8StringHandle pszVersion = new InteropHelp.UTF8StringHandle("SteamNetworkingUtils003")) + { + m_pSteamNetworkingUtils = ((NativeMethods.SteamInternal_FindOrCreateUserInterface(hSteamUser, pszVersion) != IntPtr.Zero) ? NativeMethods.SteamInternal_FindOrCreateUserInterface(hSteamUser, pszVersion) : NativeMethods.SteamInternal_FindOrCreateGameServerInterface(hSteamUser, pszVersion)); + } + if (m_pSteamNetworkingUtils == IntPtr.Zero) + { + return false; + } + using (InteropHelp.UTF8StringHandle pszVersion2 = new InteropHelp.UTF8StringHandle("SteamNetworkingSockets009")) + { + m_pSteamNetworkingSockets = NativeMethods.SteamInternal_FindOrCreateUserInterface(hSteamUser, pszVersion2); + } + if (m_pSteamNetworkingSockets == IntPtr.Zero) + { + return false; + } + using (InteropHelp.UTF8StringHandle pszVersion3 = new InteropHelp.UTF8StringHandle("SteamNetworkingMessages002")) + { + m_pSteamNetworkingMessages = NativeMethods.SteamInternal_FindOrCreateUserInterface(hSteamUser, pszVersion3); + } + if (m_pSteamNetworkingMessages == IntPtr.Zero) + { + return false; + } + return true; + } + + internal static IntPtr GetSteamClient() + { + return m_pSteamClient; + } + + internal static IntPtr GetSteamUser() + { + return m_pSteamUser; + } + + internal static IntPtr GetSteamFriends() + { + return m_pSteamFriends; + } + + internal static IntPtr GetSteamUtils() + { + return m_pSteamUtils; + } + + internal static IntPtr GetSteamMatchmaking() + { + return m_pSteamMatchmaking; + } + + internal static IntPtr GetSteamUserStats() + { + return m_pSteamUserStats; + } + + internal static IntPtr GetSteamApps() + { + return m_pSteamApps; + } + + internal static IntPtr GetSteamMatchmakingServers() + { + return m_pSteamMatchmakingServers; + } + + internal static IntPtr GetSteamNetworking() + { + return m_pSteamNetworking; + } + + internal static IntPtr GetSteamRemoteStorage() + { + return m_pSteamRemoteStorage; + } + + internal static IntPtr GetSteamScreenshots() + { + return m_pSteamScreenshots; + } + + internal static IntPtr GetSteamGameSearch() + { + return m_pSteamGameSearch; + } + + internal static IntPtr GetSteamHTTP() + { + return m_pSteamHTTP; + } + + internal static IntPtr GetSteamController() + { + return m_pController; + } + + internal static IntPtr GetSteamUGC() + { + return m_pSteamUGC; + } + + internal static IntPtr GetSteamAppList() + { + return m_pSteamAppList; + } + + internal static IntPtr GetSteamMusic() + { + return m_pSteamMusic; + } + + internal static IntPtr GetSteamMusicRemote() + { + return m_pSteamMusicRemote; + } + + internal static IntPtr GetSteamHTMLSurface() + { + return m_pSteamHTMLSurface; + } + + internal static IntPtr GetSteamInventory() + { + return m_pSteamInventory; + } + + internal static IntPtr GetSteamVideo() + { + return m_pSteamVideo; + } + + internal static IntPtr GetSteamParentalSettings() + { + return m_pSteamParentalSettings; + } + + internal static IntPtr GetSteamInput() + { + return m_pSteamInput; + } + + internal static IntPtr GetSteamParties() + { + return m_pSteamParties; + } + + internal static IntPtr GetSteamRemotePlay() + { + return m_pSteamRemotePlay; + } + + internal static IntPtr GetSteamNetworkingUtils() + { + return m_pSteamNetworkingUtils; + } + + internal static IntPtr GetSteamNetworkingSockets() + { + return m_pSteamNetworkingSockets; + } + + internal static IntPtr GetSteamNetworkingMessages() + { + return m_pSteamNetworkingMessages; + } +} diff --git a/Assembly_Firstpass/Steamworks/CSteamGameServerAPIContext.cs b/Assembly_Firstpass/Steamworks/CSteamGameServerAPIContext.cs new file mode 100644 index 0000000..7d08aad --- /dev/null +++ b/Assembly_Firstpass/Steamworks/CSteamGameServerAPIContext.cs @@ -0,0 +1,189 @@ +using System; + +namespace Steamworks; + +internal static class CSteamGameServerAPIContext +{ + private static IntPtr m_pSteamClient; + + private static IntPtr m_pSteamGameServer; + + private static IntPtr m_pSteamUtils; + + private static IntPtr m_pSteamNetworking; + + private static IntPtr m_pSteamGameServerStats; + + private static IntPtr m_pSteamHTTP; + + private static IntPtr m_pSteamInventory; + + private static IntPtr m_pSteamUGC; + + private static IntPtr m_pSteamApps; + + private static IntPtr m_pSteamNetworkingUtils; + + private static IntPtr m_pSteamNetworkingSockets; + + private static IntPtr m_pSteamNetworkingMessages; + + internal static void Clear() + { + m_pSteamClient = IntPtr.Zero; + m_pSteamGameServer = IntPtr.Zero; + m_pSteamUtils = IntPtr.Zero; + m_pSteamNetworking = IntPtr.Zero; + m_pSteamGameServerStats = IntPtr.Zero; + m_pSteamHTTP = IntPtr.Zero; + m_pSteamInventory = IntPtr.Zero; + m_pSteamUGC = IntPtr.Zero; + m_pSteamApps = IntPtr.Zero; + m_pSteamNetworkingUtils = IntPtr.Zero; + m_pSteamNetworkingSockets = IntPtr.Zero; + m_pSteamNetworkingMessages = IntPtr.Zero; + } + + internal static bool Init() + { + HSteamUser hSteamUser = GameServer.GetHSteamUser(); + HSteamPipe hSteamPipe = GameServer.GetHSteamPipe(); + if (hSteamPipe == (HSteamPipe)0) + { + return false; + } + using (InteropHelp.UTF8StringHandle ver = new InteropHelp.UTF8StringHandle("SteamClient020")) + { + m_pSteamClient = NativeMethods.SteamInternal_CreateInterface(ver); + } + if (m_pSteamClient == IntPtr.Zero) + { + return false; + } + m_pSteamGameServer = SteamGameServerClient.GetISteamGameServer(hSteamUser, hSteamPipe, "SteamGameServer013"); + if (m_pSteamGameServer == IntPtr.Zero) + { + return false; + } + m_pSteamUtils = SteamGameServerClient.GetISteamUtils(hSteamPipe, "SteamUtils010"); + if (m_pSteamUtils == IntPtr.Zero) + { + return false; + } + m_pSteamNetworking = SteamGameServerClient.GetISteamNetworking(hSteamUser, hSteamPipe, "SteamNetworking006"); + if (m_pSteamNetworking == IntPtr.Zero) + { + return false; + } + m_pSteamGameServerStats = SteamGameServerClient.GetISteamGameServerStats(hSteamUser, hSteamPipe, "SteamGameServerStats001"); + if (m_pSteamGameServerStats == IntPtr.Zero) + { + return false; + } + m_pSteamHTTP = SteamGameServerClient.GetISteamHTTP(hSteamUser, hSteamPipe, "STEAMHTTP_INTERFACE_VERSION003"); + if (m_pSteamHTTP == IntPtr.Zero) + { + return false; + } + m_pSteamInventory = SteamGameServerClient.GetISteamInventory(hSteamUser, hSteamPipe, "STEAMINVENTORY_INTERFACE_V003"); + if (m_pSteamInventory == IntPtr.Zero) + { + return false; + } + m_pSteamUGC = SteamGameServerClient.GetISteamUGC(hSteamUser, hSteamPipe, "STEAMUGC_INTERFACE_VERSION015"); + if (m_pSteamUGC == IntPtr.Zero) + { + return false; + } + m_pSteamApps = SteamGameServerClient.GetISteamApps(hSteamUser, hSteamPipe, "STEAMAPPS_INTERFACE_VERSION008"); + if (m_pSteamApps == IntPtr.Zero) + { + return false; + } + using (InteropHelp.UTF8StringHandle pszVersion = new InteropHelp.UTF8StringHandle("SteamNetworkingUtils003")) + { + m_pSteamNetworkingUtils = ((NativeMethods.SteamInternal_FindOrCreateUserInterface(hSteamUser, pszVersion) != IntPtr.Zero) ? NativeMethods.SteamInternal_FindOrCreateUserInterface(hSteamUser, pszVersion) : NativeMethods.SteamInternal_FindOrCreateGameServerInterface(hSteamUser, pszVersion)); + } + if (m_pSteamNetworkingUtils == IntPtr.Zero) + { + return false; + } + using (InteropHelp.UTF8StringHandle pszVersion2 = new InteropHelp.UTF8StringHandle("SteamNetworkingSockets009")) + { + m_pSteamNetworkingSockets = NativeMethods.SteamInternal_FindOrCreateGameServerInterface(hSteamUser, pszVersion2); + } + if (m_pSteamNetworkingSockets == IntPtr.Zero) + { + return false; + } + using (InteropHelp.UTF8StringHandle pszVersion3 = new InteropHelp.UTF8StringHandle("SteamNetworkingMessages002")) + { + m_pSteamNetworkingMessages = NativeMethods.SteamInternal_FindOrCreateGameServerInterface(hSteamUser, pszVersion3); + } + if (m_pSteamNetworkingMessages == IntPtr.Zero) + { + return false; + } + return true; + } + + internal static IntPtr GetSteamClient() + { + return m_pSteamClient; + } + + internal static IntPtr GetSteamGameServer() + { + return m_pSteamGameServer; + } + + internal static IntPtr GetSteamUtils() + { + return m_pSteamUtils; + } + + internal static IntPtr GetSteamNetworking() + { + return m_pSteamNetworking; + } + + internal static IntPtr GetSteamGameServerStats() + { + return m_pSteamGameServerStats; + } + + internal static IntPtr GetSteamHTTP() + { + return m_pSteamHTTP; + } + + internal static IntPtr GetSteamInventory() + { + return m_pSteamInventory; + } + + internal static IntPtr GetSteamUGC() + { + return m_pSteamUGC; + } + + internal static IntPtr GetSteamApps() + { + return m_pSteamApps; + } + + internal static IntPtr GetSteamNetworkingUtils() + { + return m_pSteamNetworkingUtils; + } + + internal static IntPtr GetSteamNetworkingSockets() + { + return m_pSteamNetworkingSockets; + } + + internal static IntPtr GetSteamNetworkingMessages() + { + return m_pSteamNetworkingMessages; + } +} diff --git a/Assembly_Firstpass/Steamworks/CSteamID.cs b/Assembly_Firstpass/Steamworks/CSteamID.cs new file mode 100644 index 0000000..5d6adb9 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/CSteamID.cs @@ -0,0 +1,276 @@ +using System; +using System.Runtime.InteropServices; + +namespace Steamworks; + +[Serializable] +[StructLayout(LayoutKind.Sequential, Pack = 4)] +public struct CSteamID : IEquatable<CSteamID>, IComparable<CSteamID> +{ + public static readonly CSteamID Nil = default(CSteamID); + + public static readonly CSteamID OutofDateGS = new CSteamID(new AccountID_t(0u), 0u, EUniverse.k_EUniverseInvalid, EAccountType.k_EAccountTypeInvalid); + + public static readonly CSteamID LanModeGS = new CSteamID(new AccountID_t(0u), 0u, EUniverse.k_EUniversePublic, EAccountType.k_EAccountTypeInvalid); + + public static readonly CSteamID NotInitYetGS = new CSteamID(new AccountID_t(1u), 0u, EUniverse.k_EUniverseInvalid, EAccountType.k_EAccountTypeInvalid); + + public static readonly CSteamID NonSteamGS = new CSteamID(new AccountID_t(2u), 0u, EUniverse.k_EUniverseInvalid, EAccountType.k_EAccountTypeInvalid); + + public ulong m_SteamID; + + public CSteamID(AccountID_t unAccountID, EUniverse eUniverse, EAccountType eAccountType) + { + m_SteamID = 0uL; + Set(unAccountID, eUniverse, eAccountType); + } + + public CSteamID(AccountID_t unAccountID, uint unAccountInstance, EUniverse eUniverse, EAccountType eAccountType) + { + m_SteamID = 0uL; + InstancedSet(unAccountID, unAccountInstance, eUniverse, eAccountType); + } + + public CSteamID(ulong ulSteamID) + { + m_SteamID = ulSteamID; + } + + public void Set(AccountID_t unAccountID, EUniverse eUniverse, EAccountType eAccountType) + { + SetAccountID(unAccountID); + SetEUniverse(eUniverse); + SetEAccountType(eAccountType); + if (eAccountType == EAccountType.k_EAccountTypeClan || eAccountType == EAccountType.k_EAccountTypeGameServer) + { + SetAccountInstance(0u); + } + else + { + SetAccountInstance(1u); + } + } + + public void InstancedSet(AccountID_t unAccountID, uint unInstance, EUniverse eUniverse, EAccountType eAccountType) + { + SetAccountID(unAccountID); + SetEUniverse(eUniverse); + SetEAccountType(eAccountType); + SetAccountInstance(unInstance); + } + + public void Clear() + { + m_SteamID = 0uL; + } + + public void CreateBlankAnonLogon(EUniverse eUniverse) + { + SetAccountID(new AccountID_t(0u)); + SetEUniverse(eUniverse); + SetEAccountType(EAccountType.k_EAccountTypeAnonGameServer); + SetAccountInstance(0u); + } + + public void CreateBlankAnonUserLogon(EUniverse eUniverse) + { + SetAccountID(new AccountID_t(0u)); + SetEUniverse(eUniverse); + SetEAccountType(EAccountType.k_EAccountTypeAnonUser); + SetAccountInstance(0u); + } + + public bool BBlankAnonAccount() + { + if (GetAccountID() == new AccountID_t(0u) && BAnonAccount()) + { + return GetUnAccountInstance() == 0; + } + return false; + } + + public bool BGameServerAccount() + { + if (GetEAccountType() != EAccountType.k_EAccountTypeGameServer) + { + return GetEAccountType() == EAccountType.k_EAccountTypeAnonGameServer; + } + return true; + } + + public bool BPersistentGameServerAccount() + { + return GetEAccountType() == EAccountType.k_EAccountTypeGameServer; + } + + public bool BAnonGameServerAccount() + { + return GetEAccountType() == EAccountType.k_EAccountTypeAnonGameServer; + } + + public bool BContentServerAccount() + { + return GetEAccountType() == EAccountType.k_EAccountTypeContentServer; + } + + public bool BClanAccount() + { + return GetEAccountType() == EAccountType.k_EAccountTypeClan; + } + + public bool BChatAccount() + { + return GetEAccountType() == EAccountType.k_EAccountTypeChat; + } + + public bool IsLobby() + { + if (GetEAccountType() == EAccountType.k_EAccountTypeChat) + { + return (GetUnAccountInstance() & 0x40000) != 0; + } + return false; + } + + public bool BIndividualAccount() + { + if (GetEAccountType() != EAccountType.k_EAccountTypeIndividual) + { + return GetEAccountType() == EAccountType.k_EAccountTypeConsoleUser; + } + return true; + } + + public bool BAnonAccount() + { + if (GetEAccountType() != EAccountType.k_EAccountTypeAnonUser) + { + return GetEAccountType() == EAccountType.k_EAccountTypeAnonGameServer; + } + return true; + } + + public bool BAnonUserAccount() + { + return GetEAccountType() == EAccountType.k_EAccountTypeAnonUser; + } + + public bool BConsoleUserAccount() + { + return GetEAccountType() == EAccountType.k_EAccountTypeConsoleUser; + } + + public void SetAccountID(AccountID_t other) + { + m_SteamID = (m_SteamID & 0xFFFFFFFF00000000uL) | ((ulong)(uint)other & 0xFFFFFFFFuL); + } + + public void SetAccountInstance(uint other) + { + m_SteamID = (m_SteamID & 0xFFF00000FFFFFFFFuL) | (((ulong)other & 0xFFFFFuL) << 32); + } + + public void SetEAccountType(EAccountType other) + { + m_SteamID = (m_SteamID & 0xFF0FFFFFFFFFFFFFuL) | (((ulong)other & 0xFuL) << 52); + } + + public void SetEUniverse(EUniverse other) + { + m_SteamID = (m_SteamID & 0xFFFFFFFFFFFFFFuL) | (((ulong)other & 0xFFuL) << 56); + } + + public AccountID_t GetAccountID() + { + return new AccountID_t((uint)(m_SteamID & 0xFFFFFFFFu)); + } + + public uint GetUnAccountInstance() + { + return (uint)((m_SteamID >> 32) & 0xFFFFF); + } + + public EAccountType GetEAccountType() + { + return (EAccountType)((m_SteamID >> 52) & 0xF); + } + + public EUniverse GetEUniverse() + { + return (EUniverse)((m_SteamID >> 56) & 0xFF); + } + + public bool IsValid() + { + if (GetEAccountType() <= EAccountType.k_EAccountTypeInvalid || GetEAccountType() >= EAccountType.k_EAccountTypeMax) + { + return false; + } + if (GetEUniverse() <= EUniverse.k_EUniverseInvalid || GetEUniverse() >= EUniverse.k_EUniverseMax) + { + return false; + } + if (GetEAccountType() == EAccountType.k_EAccountTypeIndividual && (GetAccountID() == new AccountID_t(0u) || GetUnAccountInstance() > 1)) + { + return false; + } + if (GetEAccountType() == EAccountType.k_EAccountTypeClan && (GetAccountID() == new AccountID_t(0u) || GetUnAccountInstance() != 0)) + { + return false; + } + if (GetEAccountType() == EAccountType.k_EAccountTypeGameServer && GetAccountID() == new AccountID_t(0u)) + { + return false; + } + return true; + } + + public override string ToString() + { + return m_SteamID.ToString(); + } + + public override bool Equals(object other) + { + if (other is CSteamID) + { + return this == (CSteamID)other; + } + return false; + } + + public override int GetHashCode() + { + return m_SteamID.GetHashCode(); + } + + public static bool operator ==(CSteamID x, CSteamID y) + { + return x.m_SteamID == y.m_SteamID; + } + + public static bool operator !=(CSteamID x, CSteamID y) + { + return !(x == y); + } + + public static explicit operator CSteamID(ulong value) + { + return new CSteamID(value); + } + + public static explicit operator ulong(CSteamID that) + { + return that.m_SteamID; + } + + public bool Equals(CSteamID other) + { + return m_SteamID == other.m_SteamID; + } + + public int CompareTo(CSteamID other) + { + return m_SteamID.CompareTo(other.m_SteamID); + } +} diff --git a/Assembly_Firstpass/Steamworks/CallResult.cs b/Assembly_Firstpass/Steamworks/CallResult.cs new file mode 100644 index 0000000..648f12b --- /dev/null +++ b/Assembly_Firstpass/Steamworks/CallResult.cs @@ -0,0 +1,109 @@ +using System; +using System.Runtime.InteropServices; + +namespace Steamworks; + +public abstract class CallResult +{ + internal abstract Type GetCallbackType(); + + internal abstract void OnRunCallResult(IntPtr pvParam, bool bFailed, ulong hSteamAPICall); + + internal abstract void SetUnregistered(); +} +public sealed class CallResult<T> : CallResult, IDisposable +{ + public delegate void APIDispatchDelegate(T param, bool bIOFailure); + + private SteamAPICall_t m_hAPICall = SteamAPICall_t.Invalid; + + private bool m_bDisposed; + + public SteamAPICall_t Handle => m_hAPICall; + + private event APIDispatchDelegate m_Func; + + public static CallResult<T> Create(APIDispatchDelegate func = null) + { + return new CallResult<T>(func); + } + + public CallResult(APIDispatchDelegate func = null) + { + this.m_Func = func; + } + + ~CallResult() + { + Dispose(); + } + + public void Dispose() + { + if (!m_bDisposed) + { + GC.SuppressFinalize(this); + Cancel(); + m_bDisposed = true; + } + } + + public void Set(SteamAPICall_t hAPICall, APIDispatchDelegate func = null) + { + if (func != null) + { + this.m_Func = func; + } + if (this.m_Func == null) + { + throw new Exception("CallResult function was null, you must either set it in the CallResult Constructor or via Set()"); + } + if (m_hAPICall != SteamAPICall_t.Invalid) + { + CallbackDispatcher.Unregister(m_hAPICall, this); + } + m_hAPICall = hAPICall; + if (hAPICall != SteamAPICall_t.Invalid) + { + CallbackDispatcher.Register(hAPICall, this); + } + } + + public bool IsActive() + { + return m_hAPICall != SteamAPICall_t.Invalid; + } + + public void Cancel() + { + if (IsActive()) + { + CallbackDispatcher.Unregister(m_hAPICall, this); + } + } + + internal override Type GetCallbackType() + { + return typeof(T); + } + + internal override void OnRunCallResult(IntPtr pvParam, bool bFailed, ulong hSteamAPICall_) + { + if ((SteamAPICall_t)hSteamAPICall_ == m_hAPICall) + { + try + { + this.m_Func((T)Marshal.PtrToStructure(pvParam, typeof(T)), bFailed); + } + catch (Exception e) + { + CallbackDispatcher.ExceptionHandler(e); + } + } + } + + internal override void SetUnregistered() + { + m_hAPICall = SteamAPICall_t.Invalid; + } +} diff --git a/Assembly_Firstpass/Steamworks/Callback.cs b/Assembly_Firstpass/Steamworks/Callback.cs new file mode 100644 index 0000000..fd7d84e --- /dev/null +++ b/Assembly_Firstpass/Steamworks/Callback.cs @@ -0,0 +1,106 @@ +using System; +using System.Runtime.InteropServices; + +namespace Steamworks; + +public abstract class Callback +{ + public abstract bool IsGameServer { get; } + + internal abstract Type GetCallbackType(); + + internal abstract void OnRunCallback(IntPtr pvParam); + + internal abstract void SetUnregistered(); +} +public sealed class Callback<T> : Callback, IDisposable +{ + public delegate void DispatchDelegate(T param); + + private bool m_bGameServer; + + private bool m_bIsRegistered; + + private bool m_bDisposed; + + public override bool IsGameServer => m_bGameServer; + + private event DispatchDelegate m_Func; + + public static Callback<T> Create(DispatchDelegate func) + { + return new Callback<T>(func); + } + + public static Callback<T> CreateGameServer(DispatchDelegate func) + { + return new Callback<T>(func, bGameServer: true); + } + + public Callback(DispatchDelegate func, bool bGameServer = false) + { + m_bGameServer = bGameServer; + Register(func); + } + + ~Callback() + { + Dispose(); + } + + public void Dispose() + { + if (!m_bDisposed) + { + GC.SuppressFinalize(this); + if (m_bIsRegistered) + { + Unregister(); + } + m_bDisposed = true; + } + } + + public void Register(DispatchDelegate func) + { + if (func == null) + { + throw new Exception("Callback function must not be null."); + } + if (m_bIsRegistered) + { + Unregister(); + } + this.m_Func = func; + CallbackDispatcher.Register(this); + m_bIsRegistered = true; + } + + public void Unregister() + { + CallbackDispatcher.Unregister(this); + m_bIsRegistered = false; + } + + internal override Type GetCallbackType() + { + return typeof(T); + } + + internal override void OnRunCallback(IntPtr pvParam) + { + try + { + this.m_Func((T)Marshal.PtrToStructure(pvParam, typeof(T))); + } + catch (Exception e) + { + CallbackDispatcher.ExceptionHandler(e); + } + } + + internal override void SetUnregistered() + { + m_bIsRegistered = false; + } +} diff --git a/Assembly_Firstpass/Steamworks/CallbackDispatcher.cs b/Assembly_Firstpass/Steamworks/CallbackDispatcher.cs new file mode 100644 index 0000000..d2814fb --- /dev/null +++ b/Assembly_Firstpass/Steamworks/CallbackDispatcher.cs @@ -0,0 +1,211 @@ +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using UnityEngine; + +namespace Steamworks; + +public static class CallbackDispatcher +{ + private static Dictionary<int, List<Callback>> m_registeredCallbacks = new Dictionary<int, List<Callback>>(); + + private static Dictionary<int, List<Callback>> m_registeredGameServerCallbacks = new Dictionary<int, List<Callback>>(); + + private static Dictionary<ulong, List<CallResult>> m_registeredCallResults = new Dictionary<ulong, List<CallResult>>(); + + private static object m_sync = new object(); + + private static IntPtr m_pCallbackMsg; + + private static int m_initCount; + + public static bool IsInitialized => m_initCount > 0; + + public static void ExceptionHandler(Exception e) + { + Debug.LogException(e); + } + + internal static void Initialize() + { + lock (m_sync) + { + if (m_initCount == 0) + { + NativeMethods.SteamAPI_ManualDispatch_Init(); + m_pCallbackMsg = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(CallbackMsg_t))); + } + m_initCount++; + } + } + + internal static void Shutdown() + { + lock (m_sync) + { + m_initCount--; + if (m_initCount == 0) + { + UnregisterAll(); + Marshal.FreeHGlobal(m_pCallbackMsg); + m_pCallbackMsg = IntPtr.Zero; + } + } + } + + internal static void Register(Callback cb) + { + int callbackIdentity = CallbackIdentities.GetCallbackIdentity(cb.GetCallbackType()); + Dictionary<int, List<Callback>> dictionary = (cb.IsGameServer ? m_registeredGameServerCallbacks : m_registeredCallbacks); + lock (m_sync) + { + if (!dictionary.TryGetValue(callbackIdentity, out var value)) + { + value = new List<Callback>(); + dictionary.Add(callbackIdentity, value); + } + value.Add(cb); + } + } + + internal static void Register(SteamAPICall_t asyncCall, CallResult cr) + { + lock (m_sync) + { + if (!m_registeredCallResults.TryGetValue((ulong)asyncCall, out var value)) + { + value = new List<CallResult>(); + m_registeredCallResults.Add((ulong)asyncCall, value); + } + value.Add(cr); + } + } + + internal static void Unregister(Callback cb) + { + int callbackIdentity = CallbackIdentities.GetCallbackIdentity(cb.GetCallbackType()); + Dictionary<int, List<Callback>> dictionary = (cb.IsGameServer ? m_registeredGameServerCallbacks : m_registeredCallbacks); + lock (m_sync) + { + if (dictionary.TryGetValue(callbackIdentity, out var value)) + { + value.Remove(cb); + if (value.Count == 0) + { + dictionary.Remove(callbackIdentity); + } + } + } + } + + internal static void Unregister(SteamAPICall_t asyncCall, CallResult cr) + { + lock (m_sync) + { + if (m_registeredCallResults.TryGetValue((ulong)asyncCall, out var value)) + { + value.Remove(cr); + if (value.Count == 0) + { + m_registeredCallResults.Remove((ulong)asyncCall); + } + } + } + } + + private static void UnregisterAll() + { + List<Callback> list = new List<Callback>(); + List<CallResult> list2 = new List<CallResult>(); + lock (m_sync) + { + foreach (KeyValuePair<int, List<Callback>> registeredCallback in m_registeredCallbacks) + { + list.AddRange(registeredCallback.Value); + } + m_registeredCallbacks.Clear(); + foreach (KeyValuePair<int, List<Callback>> registeredGameServerCallback in m_registeredGameServerCallbacks) + { + list.AddRange(registeredGameServerCallback.Value); + } + m_registeredGameServerCallbacks.Clear(); + foreach (KeyValuePair<ulong, List<CallResult>> registeredCallResult in m_registeredCallResults) + { + list2.AddRange(registeredCallResult.Value); + } + m_registeredCallResults.Clear(); + foreach (Callback item in list) + { + item.SetUnregistered(); + } + foreach (CallResult item2 in list2) + { + item2.SetUnregistered(); + } + } + } + + internal static void RunFrame(bool isGameServer) + { + if (!IsInitialized) + { + throw new InvalidOperationException("Callback dispatcher is not initialized."); + } + HSteamPipe hSteamPipe = (HSteamPipe)(isGameServer ? NativeMethods.SteamGameServer_GetHSteamPipe() : NativeMethods.SteamAPI_GetHSteamPipe()); + NativeMethods.SteamAPI_ManualDispatch_RunFrame(hSteamPipe); + Dictionary<int, List<Callback>> dictionary = (isGameServer ? m_registeredGameServerCallbacks : m_registeredCallbacks); + while (NativeMethods.SteamAPI_ManualDispatch_GetNextCallback(hSteamPipe, m_pCallbackMsg)) + { + CallbackMsg_t callbackMsg_t = (CallbackMsg_t)Marshal.PtrToStructure(m_pCallbackMsg, typeof(CallbackMsg_t)); + try + { + if (callbackMsg_t.m_iCallback == 703) + { + SteamAPICallCompleted_t steamAPICallCompleted_t = (SteamAPICallCompleted_t)Marshal.PtrToStructure(callbackMsg_t.m_pubParam, typeof(SteamAPICallCompleted_t)); + IntPtr intPtr = Marshal.AllocHGlobal((int)steamAPICallCompleted_t.m_cubParam); + if (NativeMethods.SteamAPI_ManualDispatch_GetAPICallResult(hSteamPipe, steamAPICallCompleted_t.m_hAsyncCall, intPtr, (int)steamAPICallCompleted_t.m_cubParam, steamAPICallCompleted_t.m_iCallback, out var pbFailed)) + { + lock (m_sync) + { + if (m_registeredCallResults.TryGetValue((ulong)steamAPICallCompleted_t.m_hAsyncCall, out var value)) + { + m_registeredCallResults.Remove((ulong)steamAPICallCompleted_t.m_hAsyncCall); + foreach (CallResult item in value) + { + item.OnRunCallResult(intPtr, pbFailed, (ulong)steamAPICallCompleted_t.m_hAsyncCall); + item.SetUnregistered(); + } + } + } + } + Marshal.FreeHGlobal(intPtr); + } + else + { + if (!dictionary.TryGetValue(callbackMsg_t.m_iCallback, out var value2)) + { + continue; + } + List<Callback> list; + lock (m_sync) + { + list = new List<Callback>(value2); + } + foreach (Callback item2 in list) + { + item2.OnRunCallback(callbackMsg_t.m_pubParam); + } + continue; + } + } + catch (Exception e) + { + ExceptionHandler(e); + } + finally + { + NativeMethods.SteamAPI_ManualDispatch_FreeLastCallback(hSteamPipe); + } + } + } +} diff --git a/Assembly_Firstpass/Steamworks/CallbackIdentities.cs b/Assembly_Firstpass/Steamworks/CallbackIdentities.cs new file mode 100644 index 0000000..5914c44 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/CallbackIdentities.cs @@ -0,0 +1,17 @@ +using System; + +namespace Steamworks; + +internal class CallbackIdentities +{ + public static int GetCallbackIdentity(Type callbackStruct) + { + object[] customAttributes = callbackStruct.GetCustomAttributes(typeof(CallbackIdentityAttribute), inherit: false); + int num = 0; + if (num < customAttributes.Length) + { + return ((CallbackIdentityAttribute)customAttributes[num]).Identity; + } + throw new Exception("Callback number not found for struct " + callbackStruct); + } +} diff --git a/Assembly_Firstpass/Steamworks/CallbackIdentityAttribute.cs b/Assembly_Firstpass/Steamworks/CallbackIdentityAttribute.cs new file mode 100644 index 0000000..76fbb25 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/CallbackIdentityAttribute.cs @@ -0,0 +1,14 @@ +using System; + +namespace Steamworks; + +[AttributeUsage(AttributeTargets.Struct, AllowMultiple = false)] +internal class CallbackIdentityAttribute : Attribute +{ + public int Identity { get; set; } + + public CallbackIdentityAttribute(int callbackNum) + { + Identity = callbackNum; + } +} diff --git a/Assembly_Firstpass/Steamworks/CallbackMsg_t.cs b/Assembly_Firstpass/Steamworks/CallbackMsg_t.cs new file mode 100644 index 0000000..8895c8a --- /dev/null +++ b/Assembly_Firstpass/Steamworks/CallbackMsg_t.cs @@ -0,0 +1,16 @@ +using System; +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +public struct CallbackMsg_t +{ + public int m_hSteamUser; + + public int m_iCallback; + + public IntPtr m_pubParam; + + public int m_cubParam; +} diff --git a/Assembly_Firstpass/Steamworks/ChangeNumOpenSlotsCallback_t.cs b/Assembly_Firstpass/Steamworks/ChangeNumOpenSlotsCallback_t.cs new file mode 100644 index 0000000..fdbf8b7 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ChangeNumOpenSlotsCallback_t.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(5304)] +public struct ChangeNumOpenSlotsCallback_t +{ + public const int k_iCallback = 5304; + + public EResult m_eResult; +} diff --git a/Assembly_Firstpass/Steamworks/CheckFileSignature_t.cs b/Assembly_Firstpass/Steamworks/CheckFileSignature_t.cs new file mode 100644 index 0000000..7904ac4 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/CheckFileSignature_t.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(705)] +public struct CheckFileSignature_t +{ + public const int k_iCallback = 705; + + public ECheckFileSignature m_eCheckFileSignature; +} diff --git a/Assembly_Firstpass/Steamworks/ClanOfficerListResponse_t.cs b/Assembly_Firstpass/Steamworks/ClanOfficerListResponse_t.cs new file mode 100644 index 0000000..08440d4 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ClanOfficerListResponse_t.cs @@ -0,0 +1,16 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(335)] +public struct ClanOfficerListResponse_t +{ + public const int k_iCallback = 335; + + public CSteamID m_steamIDClan; + + public int m_cOfficers; + + public byte m_bSuccess; +} diff --git a/Assembly_Firstpass/Steamworks/ClientGameServerDeny_t.cs b/Assembly_Firstpass/Steamworks/ClientGameServerDeny_t.cs new file mode 100644 index 0000000..e749406 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ClientGameServerDeny_t.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(113)] +public struct ClientGameServerDeny_t +{ + public const int k_iCallback = 113; + + public uint m_uAppID; + + public uint m_unGameServerIP; + + public ushort m_usGameServerPort; + + public ushort m_bSecure; + + public uint m_uReason; +} diff --git a/Assembly_Firstpass/Steamworks/ComputeNewPlayerCompatibilityResult_t.cs b/Assembly_Firstpass/Steamworks/ComputeNewPlayerCompatibilityResult_t.cs new file mode 100644 index 0000000..f1edbbb --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ComputeNewPlayerCompatibilityResult_t.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(211)] +public struct ComputeNewPlayerCompatibilityResult_t +{ + public const int k_iCallback = 211; + + public EResult m_eResult; + + public int m_cPlayersThatDontLikeCandidate; + + public int m_cPlayersThatCandidateDoesntLike; + + public int m_cClanPlayersThatDontLikeCandidate; + + public CSteamID m_SteamIDCandidate; +} diff --git a/Assembly_Firstpass/Steamworks/Constants.cs b/Assembly_Firstpass/Steamworks/Constants.cs new file mode 100644 index 0000000..a7fd8dd --- /dev/null +++ b/Assembly_Firstpass/Steamworks/Constants.cs @@ -0,0 +1,374 @@ +namespace Steamworks; + +public static class Constants +{ + public const string STEAMAPPLIST_INTERFACE_VERSION = "STEAMAPPLIST_INTERFACE_VERSION001"; + + public const string STEAMAPPS_INTERFACE_VERSION = "STEAMAPPS_INTERFACE_VERSION008"; + + public const string STEAMAPPTICKET_INTERFACE_VERSION = "STEAMAPPTICKET_INTERFACE_VERSION001"; + + public const string STEAMCLIENT_INTERFACE_VERSION = "SteamClient020"; + + public const string STEAMFRIENDS_INTERFACE_VERSION = "SteamFriends017"; + + public const string STEAMGAMECOORDINATOR_INTERFACE_VERSION = "SteamGameCoordinator001"; + + public const string STEAMGAMESERVER_INTERFACE_VERSION = "SteamGameServer013"; + + public const string STEAMGAMESERVERSTATS_INTERFACE_VERSION = "SteamGameServerStats001"; + + public const string STEAMHTMLSURFACE_INTERFACE_VERSION = "STEAMHTMLSURFACE_INTERFACE_VERSION_005"; + + public const string STEAMHTTP_INTERFACE_VERSION = "STEAMHTTP_INTERFACE_VERSION003"; + + public const string STEAMINPUT_INTERFACE_VERSION = "SteamInput002"; + + public const string STEAMINVENTORY_INTERFACE_VERSION = "STEAMINVENTORY_INTERFACE_V003"; + + public const string STEAMMATCHMAKING_INTERFACE_VERSION = "SteamMatchMaking009"; + + public const string STEAMMATCHMAKINGSERVERS_INTERFACE_VERSION = "SteamMatchMakingServers002"; + + public const string STEAMGAMESEARCH_INTERFACE_VERSION = "SteamMatchGameSearch001"; + + public const string STEAMPARTIES_INTERFACE_VERSION = "SteamParties002"; + + public const string STEAMMUSIC_INTERFACE_VERSION = "STEAMMUSIC_INTERFACE_VERSION001"; + + public const string STEAMMUSICREMOTE_INTERFACE_VERSION = "STEAMMUSICREMOTE_INTERFACE_VERSION001"; + + public const string STEAMNETWORKING_INTERFACE_VERSION = "SteamNetworking006"; + + public const string STEAMNETWORKINGMESSAGES_INTERFACE_VERSION = "SteamNetworkingMessages002"; + + public const string STEAMNETWORKINGSOCKETS_INTERFACE_VERSION = "SteamNetworkingSockets009"; + + public const string STEAMNETWORKINGUTILS_INTERFACE_VERSION = "SteamNetworkingUtils003"; + + public const string STEAMPARENTALSETTINGS_INTERFACE_VERSION = "STEAMPARENTALSETTINGS_INTERFACE_VERSION001"; + + public const string STEAMREMOTEPLAY_INTERFACE_VERSION = "STEAMREMOTEPLAY_INTERFACE_VERSION001"; + + public const string STEAMREMOTESTORAGE_INTERFACE_VERSION = "STEAMREMOTESTORAGE_INTERFACE_VERSION014"; + + public const string STEAMSCREENSHOTS_INTERFACE_VERSION = "STEAMSCREENSHOTS_INTERFACE_VERSION003"; + + public const string STEAMUGC_INTERFACE_VERSION = "STEAMUGC_INTERFACE_VERSION015"; + + public const string STEAMUSER_INTERFACE_VERSION = "SteamUser021"; + + public const string STEAMUSERSTATS_INTERFACE_VERSION = "STEAMUSERSTATS_INTERFACE_VERSION012"; + + public const string STEAMUTILS_INTERFACE_VERSION = "SteamUtils010"; + + public const string STEAMVIDEO_INTERFACE_VERSION = "STEAMVIDEO_INTERFACE_V002"; + + public const int k_cubAppProofOfPurchaseKeyMax = 240; + + public const int k_cchMaxFriendsGroupName = 64; + + public const int k_cFriendsGroupLimit = 100; + + public const int k_cEnumerateFollowersMax = 50; + + public const int k_cchPersonaNameMax = 128; + + public const int k_cwchPersonaNameMax = 32; + + public const int k_cubChatMetadataMax = 8192; + + public const int k_cchMaxRichPresenceKeys = 30; + + public const int k_cchMaxRichPresenceKeyLength = 64; + + public const int k_cchMaxRichPresenceValueLength = 256; + + public const int k_unFavoriteFlagNone = 0; + + public const int k_unFavoriteFlagFavorite = 1; + + public const int k_unFavoriteFlagHistory = 2; + + public const int k_unMaxCloudFileChunkSize = 104857600; + + public const int k_cchPublishedDocumentTitleMax = 129; + + public const int k_cchPublishedDocumentDescriptionMax = 8000; + + public const int k_cchPublishedDocumentChangeDescriptionMax = 8000; + + public const int k_unEnumeratePublishedFilesMaxResults = 50; + + public const int k_cchTagListMax = 1025; + + public const int k_cchFilenameMax = 260; + + public const int k_cchPublishedFileURLMax = 256; + + public const int k_nScreenshotMaxTaggedUsers = 32; + + public const int k_nScreenshotMaxTaggedPublishedFiles = 32; + + public const int k_cubUFSTagTypeMax = 255; + + public const int k_cubUFSTagValueMax = 255; + + public const int k_ScreenshotThumbWidth = 200; + + public const int kNumUGCResultsPerPage = 50; + + public const int k_cchDeveloperMetadataMax = 5000; + + public const int k_cchStatNameMax = 128; + + public const int k_cchLeaderboardNameMax = 128; + + public const int k_cLeaderboardDetailsMax = 64; + + public const int k_cbMaxGameServerGameDir = 32; + + public const int k_cbMaxGameServerMapName = 32; + + public const int k_cbMaxGameServerGameDescription = 64; + + public const int k_cbMaxGameServerName = 64; + + public const int k_cbMaxGameServerTags = 128; + + public const int k_cbMaxGameServerGameData = 2048; + + public const int k_iSteamUserCallbacks = 100; + + public const int k_iSteamGameServerCallbacks = 200; + + public const int k_iSteamFriendsCallbacks = 300; + + public const int k_iSteamBillingCallbacks = 400; + + public const int k_iSteamMatchmakingCallbacks = 500; + + public const int k_iSteamContentServerCallbacks = 600; + + public const int k_iSteamUtilsCallbacks = 700; + + public const int k_iClientFriendsCallbacks = 800; + + public const int k_iClientUserCallbacks = 900; + + public const int k_iSteamAppsCallbacks = 1000; + + public const int k_iSteamUserStatsCallbacks = 1100; + + public const int k_iSteamNetworkingCallbacks = 1200; + + public const int k_iSteamNetworkingSocketsCallbacks = 1220; + + public const int k_iSteamNetworkingMessagesCallbacks = 1250; + + public const int k_iSteamNetworkingUtilsCallbacks = 1280; + + public const int k_iClientRemoteStorageCallbacks = 1300; + + public const int k_iClientDepotBuilderCallbacks = 1400; + + public const int k_iSteamGameServerItemsCallbacks = 1500; + + public const int k_iClientUtilsCallbacks = 1600; + + public const int k_iSteamGameCoordinatorCallbacks = 1700; + + public const int k_iSteamGameServerStatsCallbacks = 1800; + + public const int k_iSteam2AsyncCallbacks = 1900; + + public const int k_iSteamGameStatsCallbacks = 2000; + + public const int k_iClientHTTPCallbacks = 2100; + + public const int k_iClientScreenshotsCallbacks = 2200; + + public const int k_iSteamScreenshotsCallbacks = 2300; + + public const int k_iClientAudioCallbacks = 2400; + + public const int k_iClientUnifiedMessagesCallbacks = 2500; + + public const int k_iSteamStreamLauncherCallbacks = 2600; + + public const int k_iClientControllerCallbacks = 2700; + + public const int k_iSteamControllerCallbacks = 2800; + + public const int k_iClientParentalSettingsCallbacks = 2900; + + public const int k_iClientDeviceAuthCallbacks = 3000; + + public const int k_iClientNetworkDeviceManagerCallbacks = 3100; + + public const int k_iClientMusicCallbacks = 3200; + + public const int k_iClientRemoteClientManagerCallbacks = 3300; + + public const int k_iClientUGCCallbacks = 3400; + + public const int k_iSteamStreamClientCallbacks = 3500; + + public const int k_IClientProductBuilderCallbacks = 3600; + + public const int k_iClientShortcutsCallbacks = 3700; + + public const int k_iClientRemoteControlManagerCallbacks = 3800; + + public const int k_iSteamAppListCallbacks = 3900; + + public const int k_iSteamMusicCallbacks = 4000; + + public const int k_iSteamMusicRemoteCallbacks = 4100; + + public const int k_iClientVRCallbacks = 4200; + + public const int k_iClientGameNotificationCallbacks = 4300; + + public const int k_iSteamGameNotificationCallbacks = 4400; + + public const int k_iSteamHTMLSurfaceCallbacks = 4500; + + public const int k_iClientVideoCallbacks = 4600; + + public const int k_iClientInventoryCallbacks = 4700; + + public const int k_iClientBluetoothManagerCallbacks = 4800; + + public const int k_iClientSharedConnectionCallbacks = 4900; + + public const int k_ISteamParentalSettingsCallbacks = 5000; + + public const int k_iClientShaderCallbacks = 5100; + + public const int k_iSteamGameSearchCallbacks = 5200; + + public const int k_iSteamPartiesCallbacks = 5300; + + public const int k_iClientPartiesCallbacks = 5400; + + public const int k_iSteamSTARCallbacks = 5500; + + public const int k_iClientSTARCallbacks = 5600; + + public const int k_iSteamRemotePlayCallbacks = 5700; + + public const int k_iClientCompatCallbacks = 5800; + + public const int k_iSteamChatCallbacks = 5900; + + public const int k_unSteamAccountIDMask = -1; + + public const int k_unSteamAccountInstanceMask = 1048575; + + public const int k_unSteamUserDefaultInstance = 1; + + public const int k_cchGameExtraInfoMax = 64; + + public const int k_cbSteamDatagramMaxSerializedTicket = 512; + + public const int k_cbMaxSteamDatagramGameCoordinatorServerLoginAppData = 2048; + + public const int k_cbMaxSteamDatagramGameCoordinatorServerLoginSerialized = 4096; + + public const int k_nSteamEncryptedAppTicketSymmetricKeyLen = 32; + + public const int k_cchMaxSteamNetworkingErrMsg = 1024; + + public const int k_cchSteamNetworkingMaxConnectionCloseReason = 128; + + public const int k_cchSteamNetworkingMaxConnectionDescription = 128; + + public const int k_cbMaxSteamNetworkingSocketsMessageSizeSend = 524288; + + public const int k_nSteamNetworkingSend_Unreliable = 0; + + public const int k_nSteamNetworkingSend_NoNagle = 1; + + public const int k_nSteamNetworkingSend_UnreliableNoNagle = 1; + + public const int k_nSteamNetworkingSend_NoDelay = 4; + + public const int k_nSteamNetworkingSend_UnreliableNoDelay = 5; + + public const int k_nSteamNetworkingSend_Reliable = 8; + + public const int k_nSteamNetworkingSend_ReliableNoNagle = 9; + + public const int k_nSteamNetworkingSend_UseCurrentThread = 16; + + public const int k_nSteamNetworkingSend_AutoRestartBrokenSession = 32; + + public const int k_cchMaxSteamNetworkingPingLocationString = 1024; + + public const int k_nSteamNetworkingPing_Failed = -1; + + public const int k_nSteamNetworkingPing_Unknown = -2; + + public const int k_nSteamNetworkingConfig_P2P_Transport_ICE_Enable_Default = -1; + + public const int k_nSteamNetworkingConfig_P2P_Transport_ICE_Enable_Disable = 0; + + public const int k_nSteamNetworkingConfig_P2P_Transport_ICE_Enable_Relay = 1; + + public const int k_nSteamNetworkingConfig_P2P_Transport_ICE_Enable_Private = 2; + + public const int k_nSteamNetworkingConfig_P2P_Transport_ICE_Enable_Public = 4; + + public const int k_nSteamNetworkingConfig_P2P_Transport_ICE_Enable_All = int.MaxValue; + + public const int k_cubSaltSize = 8; + + public const ulong k_GIDNil = ulong.MaxValue; + + public const ulong k_TxnIDNil = ulong.MaxValue; + + public const ulong k_TxnIDUnknown = 0uL; + + public const int k_uPackageIdInvalid = -1; + + public const ulong k_ulAssetClassIdInvalid = 0uL; + + public const int k_uPhysicalItemIdInvalid = 0; + + public const int k_uCellIDInvalid = -1; + + public const int k_uPartnerIdInvalid = 0; + + public const ulong k_ulPartyBeaconIdInvalid = 0uL; + + public const int INVALID_HTTPREQUEST_HANDLE = 0; + + public const int STEAM_INPUT_MAX_COUNT = 16; + + public const int STEAM_INPUT_MAX_ANALOG_ACTIONS = 16; + + public const int STEAM_INPUT_MAX_DIGITAL_ACTIONS = 128; + + public const int STEAM_INPUT_MAX_ORIGINS = 8; + + public const int STEAM_INPUT_MAX_ACTIVE_LAYERS = 16; + + public const ulong STEAM_INPUT_HANDLE_ALL_CONTROLLERS = ulong.MaxValue; + + public const float STEAM_INPUT_MIN_ANALOG_ACTION_DATA = -1f; + + public const float STEAM_INPUT_MAX_ANALOG_ACTION_DATA = 1f; + + public const byte k_nMaxLobbyKeyLength = byte.MaxValue; + + public const int k_SteamMusicNameMaxLength = 255; + + public const int k_SteamMusicPNGMaxLength = 65535; + + public const ushort MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE = ushort.MaxValue; + + public const int QUERY_PORT_NOT_INITIALIZED = 65535; + + public const int QUERY_PORT_ERROR = 65534; +} diff --git a/Assembly_Firstpass/Steamworks/CreateBeaconCallback_t.cs b/Assembly_Firstpass/Steamworks/CreateBeaconCallback_t.cs new file mode 100644 index 0000000..e9e2156 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/CreateBeaconCallback_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(5302)] +public struct CreateBeaconCallback_t +{ + public const int k_iCallback = 5302; + + public EResult m_eResult; + + public PartyBeaconID_t m_ulBeaconID; +} diff --git a/Assembly_Firstpass/Steamworks/CreateItemResult_t.cs b/Assembly_Firstpass/Steamworks/CreateItemResult_t.cs new file mode 100644 index 0000000..036cf45 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/CreateItemResult_t.cs @@ -0,0 +1,17 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(3403)] +public struct CreateItemResult_t +{ + public const int k_iCallback = 3403; + + public EResult m_eResult; + + public PublishedFileId_t m_nPublishedFileId; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bUserNeedsToAcceptWorkshopLegalAgreement; +} diff --git a/Assembly_Firstpass/Steamworks/DeleteItemResult_t.cs b/Assembly_Firstpass/Steamworks/DeleteItemResult_t.cs new file mode 100644 index 0000000..4784653 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/DeleteItemResult_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(3417)] +public struct DeleteItemResult_t +{ + public const int k_iCallback = 3417; + + public EResult m_eResult; + + public PublishedFileId_t m_nPublishedFileId; +} diff --git a/Assembly_Firstpass/Steamworks/DepotId_t.cs b/Assembly_Firstpass/Steamworks/DepotId_t.cs new file mode 100644 index 0000000..153afa5 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/DepotId_t.cs @@ -0,0 +1,65 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct DepotId_t : IEquatable<DepotId_t>, IComparable<DepotId_t> +{ + public static readonly DepotId_t Invalid = new DepotId_t(0u); + + public uint m_DepotId; + + public DepotId_t(uint value) + { + m_DepotId = value; + } + + public override string ToString() + { + return m_DepotId.ToString(); + } + + public override bool Equals(object other) + { + if (other is DepotId_t) + { + return this == (DepotId_t)other; + } + return false; + } + + public override int GetHashCode() + { + return m_DepotId.GetHashCode(); + } + + public static bool operator ==(DepotId_t x, DepotId_t y) + { + return x.m_DepotId == y.m_DepotId; + } + + public static bool operator !=(DepotId_t x, DepotId_t y) + { + return !(x == y); + } + + public static explicit operator DepotId_t(uint value) + { + return new DepotId_t(value); + } + + public static explicit operator uint(DepotId_t that) + { + return that.m_DepotId; + } + + public bool Equals(DepotId_t other) + { + return m_DepotId == other.m_DepotId; + } + + public int CompareTo(DepotId_t other) + { + return m_DepotId.CompareTo(other.m_DepotId); + } +} diff --git a/Assembly_Firstpass/Steamworks/DlcInstalled_t.cs b/Assembly_Firstpass/Steamworks/DlcInstalled_t.cs new file mode 100644 index 0000000..11e6147 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/DlcInstalled_t.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1005)] +public struct DlcInstalled_t +{ + public const int k_iCallback = 1005; + + public AppId_t m_nAppID; +} diff --git a/Assembly_Firstpass/Steamworks/DllCheck.cs b/Assembly_Firstpass/Steamworks/DllCheck.cs new file mode 100644 index 0000000..7bfe898 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/DllCheck.cs @@ -0,0 +1,9 @@ +namespace Steamworks; + +public class DllCheck +{ + public static bool Test() + { + return true; + } +} diff --git a/Assembly_Firstpass/Steamworks/DownloadClanActivityCountsResult_t.cs b/Assembly_Firstpass/Steamworks/DownloadClanActivityCountsResult_t.cs new file mode 100644 index 0000000..a05f321 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/DownloadClanActivityCountsResult_t.cs @@ -0,0 +1,13 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(341)] +public struct DownloadClanActivityCountsResult_t +{ + public const int k_iCallback = 341; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bSuccess; +} diff --git a/Assembly_Firstpass/Steamworks/DownloadItemResult_t.cs b/Assembly_Firstpass/Steamworks/DownloadItemResult_t.cs new file mode 100644 index 0000000..d1d73cf --- /dev/null +++ b/Assembly_Firstpass/Steamworks/DownloadItemResult_t.cs @@ -0,0 +1,16 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(3406)] +public struct DownloadItemResult_t +{ + public const int k_iCallback = 3406; + + public AppId_t m_unAppID; + + public PublishedFileId_t m_nPublishedFileId; + + public EResult m_eResult; +} diff --git a/Assembly_Firstpass/Steamworks/DurationControl_t.cs b/Assembly_Firstpass/Steamworks/DurationControl_t.cs new file mode 100644 index 0000000..b2d6e62 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/DurationControl_t.cs @@ -0,0 +1,27 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(167)] +public struct DurationControl_t +{ + public const int k_iCallback = 167; + + public EResult m_eResult; + + public AppId_t m_appid; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bApplicable; + + public int m_csecsLast5h; + + public EDurationControlProgress m_progress; + + public EDurationControlNotification m_notification; + + public int m_csecsToday; + + public int m_csecsRemaining; +} diff --git a/Assembly_Firstpass/Steamworks/EAccountType.cs b/Assembly_Firstpass/Steamworks/EAccountType.cs new file mode 100644 index 0000000..3609922 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EAccountType.cs @@ -0,0 +1,17 @@ +namespace Steamworks; + +public enum EAccountType +{ + k_EAccountTypeInvalid, + k_EAccountTypeIndividual, + k_EAccountTypeMultiseat, + k_EAccountTypeGameServer, + k_EAccountTypeAnonGameServer, + k_EAccountTypePending, + k_EAccountTypeContentServer, + k_EAccountTypeClan, + k_EAccountTypeChat, + k_EAccountTypeConsoleUser, + k_EAccountTypeAnonUser, + k_EAccountTypeMax +} diff --git a/Assembly_Firstpass/Steamworks/EActivateGameOverlayToWebPageMode.cs b/Assembly_Firstpass/Steamworks/EActivateGameOverlayToWebPageMode.cs new file mode 100644 index 0000000..08b7692 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EActivateGameOverlayToWebPageMode.cs @@ -0,0 +1,7 @@ +namespace Steamworks; + +public enum EActivateGameOverlayToWebPageMode +{ + k_EActivateGameOverlayToWebPageMode_Default, + k_EActivateGameOverlayToWebPageMode_Modal +} diff --git a/Assembly_Firstpass/Steamworks/EAppOwnershipFlags.cs b/Assembly_Firstpass/Steamworks/EAppOwnershipFlags.cs new file mode 100644 index 0000000..79150d5 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EAppOwnershipFlags.cs @@ -0,0 +1,31 @@ +using System; + +namespace Steamworks; + +[Flags] +public enum EAppOwnershipFlags +{ + k_EAppOwnershipFlags_None = 0, + k_EAppOwnershipFlags_OwnsLicense = 1, + k_EAppOwnershipFlags_FreeLicense = 2, + k_EAppOwnershipFlags_RegionRestricted = 4, + k_EAppOwnershipFlags_LowViolence = 8, + k_EAppOwnershipFlags_InvalidPlatform = 0x10, + k_EAppOwnershipFlags_SharedLicense = 0x20, + k_EAppOwnershipFlags_FreeWeekend = 0x40, + k_EAppOwnershipFlags_RetailLicense = 0x80, + k_EAppOwnershipFlags_LicenseLocked = 0x100, + k_EAppOwnershipFlags_LicensePending = 0x200, + k_EAppOwnershipFlags_LicenseExpired = 0x400, + k_EAppOwnershipFlags_LicensePermanent = 0x800, + k_EAppOwnershipFlags_LicenseRecurring = 0x1000, + k_EAppOwnershipFlags_LicenseCanceled = 0x2000, + k_EAppOwnershipFlags_AutoGrant = 0x4000, + k_EAppOwnershipFlags_PendingGift = 0x8000, + k_EAppOwnershipFlags_RentalNotActivated = 0x10000, + k_EAppOwnershipFlags_Rental = 0x20000, + k_EAppOwnershipFlags_SiteLicense = 0x40000, + k_EAppOwnershipFlags_LegacyFreeSub = 0x80000, + k_EAppOwnershipFlags_InvalidOSType = 0x100000, + k_EAppOwnershipFlags_TimedTrial = 0x200000 +} diff --git a/Assembly_Firstpass/Steamworks/EAppReleaseState.cs b/Assembly_Firstpass/Steamworks/EAppReleaseState.cs new file mode 100644 index 0000000..822f3cc --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EAppReleaseState.cs @@ -0,0 +1,10 @@ +namespace Steamworks; + +public enum EAppReleaseState +{ + k_EAppReleaseState_Unknown, + k_EAppReleaseState_Unavailable, + k_EAppReleaseState_Prerelease, + k_EAppReleaseState_PreloadOnly, + k_EAppReleaseState_Released +} diff --git a/Assembly_Firstpass/Steamworks/EAppType.cs b/Assembly_Firstpass/Steamworks/EAppType.cs new file mode 100644 index 0000000..e9b46c6 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EAppType.cs @@ -0,0 +1,28 @@ +using System; + +namespace Steamworks; + +[Flags] +public enum EAppType +{ + k_EAppType_Invalid = 0, + k_EAppType_Game = 1, + k_EAppType_Application = 2, + k_EAppType_Tool = 4, + k_EAppType_Demo = 8, + k_EAppType_Media_DEPRECATED = 0x10, + k_EAppType_DLC = 0x20, + k_EAppType_Guide = 0x40, + k_EAppType_Driver = 0x80, + k_EAppType_Config = 0x100, + k_EAppType_Hardware = 0x200, + k_EAppType_Franchise = 0x400, + k_EAppType_Video = 0x800, + k_EAppType_Plugin = 0x1000, + k_EAppType_MusicAlbum = 0x2000, + k_EAppType_Series = 0x4000, + k_EAppType_Comic_UNUSED = 0x8000, + k_EAppType_Beta = 0x10000, + k_EAppType_Shortcut = 0x40000000, + k_EAppType_DepotOnly_DEPRECATED = -2147483647 +} diff --git a/Assembly_Firstpass/Steamworks/EAuthSessionResponse.cs b/Assembly_Firstpass/Steamworks/EAuthSessionResponse.cs new file mode 100644 index 0000000..0c27eaf --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EAuthSessionResponse.cs @@ -0,0 +1,15 @@ +namespace Steamworks; + +public enum EAuthSessionResponse +{ + k_EAuthSessionResponseOK, + k_EAuthSessionResponseUserNotConnectedToSteam, + k_EAuthSessionResponseNoLicenseOrExpired, + k_EAuthSessionResponseVACBanned, + k_EAuthSessionResponseLoggedInElseWhere, + k_EAuthSessionResponseVACCheckTimedOut, + k_EAuthSessionResponseAuthTicketCanceled, + k_EAuthSessionResponseAuthTicketInvalidAlreadyUsed, + k_EAuthSessionResponseAuthTicketInvalid, + k_EAuthSessionResponsePublisherIssuedBan +} diff --git a/Assembly_Firstpass/Steamworks/EBeginAuthSessionResult.cs b/Assembly_Firstpass/Steamworks/EBeginAuthSessionResult.cs new file mode 100644 index 0000000..b217fb9 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EBeginAuthSessionResult.cs @@ -0,0 +1,11 @@ +namespace Steamworks; + +public enum EBeginAuthSessionResult +{ + k_EBeginAuthSessionResultOK, + k_EBeginAuthSessionResultInvalidTicket, + k_EBeginAuthSessionResultDuplicateRequest, + k_EBeginAuthSessionResultInvalidVersion, + k_EBeginAuthSessionResultGameMismatch, + k_EBeginAuthSessionResultExpiredTicket +} diff --git a/Assembly_Firstpass/Steamworks/EBroadcastUploadResult.cs b/Assembly_Firstpass/Steamworks/EBroadcastUploadResult.cs new file mode 100644 index 0000000..0d8cb65 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EBroadcastUploadResult.cs @@ -0,0 +1,29 @@ +namespace Steamworks; + +public enum EBroadcastUploadResult +{ + k_EBroadcastUploadResultNone, + k_EBroadcastUploadResultOK, + k_EBroadcastUploadResultInitFailed, + k_EBroadcastUploadResultFrameFailed, + k_EBroadcastUploadResultTimeout, + k_EBroadcastUploadResultBandwidthExceeded, + k_EBroadcastUploadResultLowFPS, + k_EBroadcastUploadResultMissingKeyFrames, + k_EBroadcastUploadResultNoConnection, + k_EBroadcastUploadResultRelayFailed, + k_EBroadcastUploadResultSettingsChanged, + k_EBroadcastUploadResultMissingAudio, + k_EBroadcastUploadResultTooFarBehind, + k_EBroadcastUploadResultTranscodeBehind, + k_EBroadcastUploadResultNotAllowedToPlay, + k_EBroadcastUploadResultBusy, + k_EBroadcastUploadResultBanned, + k_EBroadcastUploadResultAlreadyActive, + k_EBroadcastUploadResultForcedOff, + k_EBroadcastUploadResultAudioBehind, + k_EBroadcastUploadResultShutdown, + k_EBroadcastUploadResultDisconnect, + k_EBroadcastUploadResultVideoInitFailed, + k_EBroadcastUploadResultAudioInitFailed +} diff --git a/Assembly_Firstpass/Steamworks/EChatEntryType.cs b/Assembly_Firstpass/Steamworks/EChatEntryType.cs new file mode 100644 index 0000000..cec67f7 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EChatEntryType.cs @@ -0,0 +1,17 @@ +namespace Steamworks; + +public enum EChatEntryType +{ + k_EChatEntryTypeInvalid = 0, + k_EChatEntryTypeChatMsg = 1, + k_EChatEntryTypeTyping = 2, + k_EChatEntryTypeInviteGame = 3, + k_EChatEntryTypeEmote = 4, + k_EChatEntryTypeLeftConversation = 6, + k_EChatEntryTypeEntered = 7, + k_EChatEntryTypeWasKicked = 8, + k_EChatEntryTypeWasBanned = 9, + k_EChatEntryTypeDisconnected = 10, + k_EChatEntryTypeHistoricalChat = 11, + k_EChatEntryTypeLinkBlocked = 14 +} diff --git a/Assembly_Firstpass/Steamworks/EChatMemberStateChange.cs b/Assembly_Firstpass/Steamworks/EChatMemberStateChange.cs new file mode 100644 index 0000000..1d46b6f --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EChatMemberStateChange.cs @@ -0,0 +1,13 @@ +using System; + +namespace Steamworks; + +[Flags] +public enum EChatMemberStateChange +{ + k_EChatMemberStateChangeEntered = 1, + k_EChatMemberStateChangeLeft = 2, + k_EChatMemberStateChangeDisconnected = 4, + k_EChatMemberStateChangeKicked = 8, + k_EChatMemberStateChangeBanned = 0x10 +} diff --git a/Assembly_Firstpass/Steamworks/EChatRoomEnterResponse.cs b/Assembly_Firstpass/Steamworks/EChatRoomEnterResponse.cs new file mode 100644 index 0000000..246eba4 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EChatRoomEnterResponse.cs @@ -0,0 +1,17 @@ +namespace Steamworks; + +public enum EChatRoomEnterResponse +{ + k_EChatRoomEnterResponseSuccess = 1, + k_EChatRoomEnterResponseDoesntExist = 2, + k_EChatRoomEnterResponseNotAllowed = 3, + k_EChatRoomEnterResponseFull = 4, + k_EChatRoomEnterResponseError = 5, + k_EChatRoomEnterResponseBanned = 6, + k_EChatRoomEnterResponseLimited = 7, + k_EChatRoomEnterResponseClanDisabled = 8, + k_EChatRoomEnterResponseCommunityBan = 9, + k_EChatRoomEnterResponseMemberBlockedYou = 10, + k_EChatRoomEnterResponseYouBlockedMember = 11, + k_EChatRoomEnterResponseRatelimitExceeded = 15 +} diff --git a/Assembly_Firstpass/Steamworks/EChatSteamIDInstanceFlags.cs b/Assembly_Firstpass/Steamworks/EChatSteamIDInstanceFlags.cs new file mode 100644 index 0000000..3f30b7f --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EChatSteamIDInstanceFlags.cs @@ -0,0 +1,12 @@ +using System; + +namespace Steamworks; + +[Flags] +public enum EChatSteamIDInstanceFlags +{ + k_EChatAccountInstanceMask = 0xFFF, + k_EChatInstanceFlagClan = 0x80000, + k_EChatInstanceFlagLobby = 0x40000, + k_EChatInstanceFlagMMSLobby = 0x20000 +} diff --git a/Assembly_Firstpass/Steamworks/ECheckFileSignature.cs b/Assembly_Firstpass/Steamworks/ECheckFileSignature.cs new file mode 100644 index 0000000..3db69be --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ECheckFileSignature.cs @@ -0,0 +1,10 @@ +namespace Steamworks; + +public enum ECheckFileSignature +{ + k_ECheckFileSignatureInvalidSignature, + k_ECheckFileSignatureValidSignature, + k_ECheckFileSignatureFileNotFound, + k_ECheckFileSignatureNoSignaturesFoundForThisApp, + k_ECheckFileSignatureNoSignaturesFoundForThisFile +} diff --git a/Assembly_Firstpass/Steamworks/EDenyReason.cs b/Assembly_Firstpass/Steamworks/EDenyReason.cs new file mode 100644 index 0000000..1b71231 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EDenyReason.cs @@ -0,0 +1,21 @@ +namespace Steamworks; + +public enum EDenyReason +{ + k_EDenyInvalid, + k_EDenyInvalidVersion, + k_EDenyGeneric, + k_EDenyNotLoggedOn, + k_EDenyNoLicense, + k_EDenyCheater, + k_EDenyLoggedInElseWhere, + k_EDenyUnknownText, + k_EDenyIncompatibleAnticheat, + k_EDenyMemoryCorruption, + k_EDenyIncompatibleSoftware, + k_EDenySteamConnectionLost, + k_EDenySteamConnectionError, + k_EDenySteamResponseTimedOut, + k_EDenySteamValidationStalled, + k_EDenySteamOwnerLeftGuestUser +} diff --git a/Assembly_Firstpass/Steamworks/EDurationControlNotification.cs b/Assembly_Firstpass/Steamworks/EDurationControlNotification.cs new file mode 100644 index 0000000..1df9fed --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EDurationControlNotification.cs @@ -0,0 +1,13 @@ +namespace Steamworks; + +public enum EDurationControlNotification +{ + k_EDurationControlNotification_None, + k_EDurationControlNotification_1Hour, + k_EDurationControlNotification_3Hours, + k_EDurationControlNotification_HalfProgress, + k_EDurationControlNotification_NoProgress, + k_EDurationControlNotification_ExitSoon_3h, + k_EDurationControlNotification_ExitSoon_5h, + k_EDurationControlNotification_ExitSoon_Night +} diff --git a/Assembly_Firstpass/Steamworks/EDurationControlOnlineState.cs b/Assembly_Firstpass/Steamworks/EDurationControlOnlineState.cs new file mode 100644 index 0000000..0e5a2c2 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EDurationControlOnlineState.cs @@ -0,0 +1,9 @@ +namespace Steamworks; + +public enum EDurationControlOnlineState +{ + k_EDurationControlOnlineState_Invalid, + k_EDurationControlOnlineState_Offline, + k_EDurationControlOnlineState_Online, + k_EDurationControlOnlineState_OnlineHighPri +} diff --git a/Assembly_Firstpass/Steamworks/EDurationControlProgress.cs b/Assembly_Firstpass/Steamworks/EDurationControlProgress.cs new file mode 100644 index 0000000..a00b02d --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EDurationControlProgress.cs @@ -0,0 +1,11 @@ +namespace Steamworks; + +public enum EDurationControlProgress +{ + k_EDurationControlProgress_Full, + k_EDurationControlProgress_Half, + k_EDurationControlProgress_None, + k_EDurationControl_ExitSoon_3h, + k_EDurationControl_ExitSoon_5h, + k_EDurationControl_ExitSoon_Night +} diff --git a/Assembly_Firstpass/Steamworks/EFailureType.cs b/Assembly_Firstpass/Steamworks/EFailureType.cs new file mode 100644 index 0000000..d1d19d2 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EFailureType.cs @@ -0,0 +1,7 @@ +namespace Steamworks; + +public enum EFailureType +{ + k_EFailureFlushedCallbackQueue, + k_EFailurePipeFail +} diff --git a/Assembly_Firstpass/Steamworks/EFriendFlags.cs b/Assembly_Firstpass/Steamworks/EFriendFlags.cs new file mode 100644 index 0000000..84f87a0 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EFriendFlags.cs @@ -0,0 +1,20 @@ +using System; + +namespace Steamworks; + +[Flags] +public enum EFriendFlags +{ + k_EFriendFlagNone = 0, + k_EFriendFlagBlocked = 1, + k_EFriendFlagFriendshipRequested = 2, + k_EFriendFlagImmediate = 4, + k_EFriendFlagClanMember = 8, + k_EFriendFlagOnGameServer = 0x10, + k_EFriendFlagRequestingFriendship = 0x80, + k_EFriendFlagRequestingInfo = 0x100, + k_EFriendFlagIgnored = 0x200, + k_EFriendFlagIgnoredFriend = 0x400, + k_EFriendFlagChatMember = 0x1000, + k_EFriendFlagAll = 0xFFFF +} diff --git a/Assembly_Firstpass/Steamworks/EFriendRelationship.cs b/Assembly_Firstpass/Steamworks/EFriendRelationship.cs new file mode 100644 index 0000000..f430479 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EFriendRelationship.cs @@ -0,0 +1,14 @@ +namespace Steamworks; + +public enum EFriendRelationship +{ + k_EFriendRelationshipNone, + k_EFriendRelationshipBlocked, + k_EFriendRelationshipRequestRecipient, + k_EFriendRelationshipFriend, + k_EFriendRelationshipRequestInitiator, + k_EFriendRelationshipIgnored, + k_EFriendRelationshipIgnoredFriend, + k_EFriendRelationshipSuggested_DEPRECATED, + k_EFriendRelationshipMax +} diff --git a/Assembly_Firstpass/Steamworks/EGCResults.cs b/Assembly_Firstpass/Steamworks/EGCResults.cs new file mode 100644 index 0000000..cc3b762 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EGCResults.cs @@ -0,0 +1,10 @@ +namespace Steamworks; + +public enum EGCResults +{ + k_EGCResultOK, + k_EGCResultNoMessage, + k_EGCResultBufferTooSmall, + k_EGCResultNotLoggedOn, + k_EGCResultInvalidMessage +} diff --git a/Assembly_Firstpass/Steamworks/EGameSearchErrorCode_t.cs b/Assembly_Firstpass/Steamworks/EGameSearchErrorCode_t.cs new file mode 100644 index 0000000..e4c58e3 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EGameSearchErrorCode_t.cs @@ -0,0 +1,14 @@ +namespace Steamworks; + +public enum EGameSearchErrorCode_t +{ + k_EGameSearchErrorCode_OK = 1, + k_EGameSearchErrorCode_Failed_Search_Already_In_Progress, + k_EGameSearchErrorCode_Failed_No_Search_In_Progress, + k_EGameSearchErrorCode_Failed_Not_Lobby_Leader, + k_EGameSearchErrorCode_Failed_No_Host_Available, + k_EGameSearchErrorCode_Failed_Search_Params_Invalid, + k_EGameSearchErrorCode_Failed_Offline, + k_EGameSearchErrorCode_Failed_NotAuthorized, + k_EGameSearchErrorCode_Failed_Unknown_Error +} diff --git a/Assembly_Firstpass/Steamworks/EGamepadTextInputLineMode.cs b/Assembly_Firstpass/Steamworks/EGamepadTextInputLineMode.cs new file mode 100644 index 0000000..5099319 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EGamepadTextInputLineMode.cs @@ -0,0 +1,7 @@ +namespace Steamworks; + +public enum EGamepadTextInputLineMode +{ + k_EGamepadTextInputLineModeSingleLine, + k_EGamepadTextInputLineModeMultipleLines +} diff --git a/Assembly_Firstpass/Steamworks/EGamepadTextInputMode.cs b/Assembly_Firstpass/Steamworks/EGamepadTextInputMode.cs new file mode 100644 index 0000000..667beaf --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EGamepadTextInputMode.cs @@ -0,0 +1,7 @@ +namespace Steamworks; + +public enum EGamepadTextInputMode +{ + k_EGamepadTextInputModeNormal, + k_EGamepadTextInputModePassword +} diff --git a/Assembly_Firstpass/Steamworks/EHTMLKeyModifiers.cs b/Assembly_Firstpass/Steamworks/EHTMLKeyModifiers.cs new file mode 100644 index 0000000..2f29a2f --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EHTMLKeyModifiers.cs @@ -0,0 +1,12 @@ +using System; + +namespace Steamworks; + +[Flags] +public enum EHTMLKeyModifiers +{ + k_eHTMLKeyModifier_None = 0, + k_eHTMLKeyModifier_AltDown = 1, + k_eHTMLKeyModifier_CtrlDown = 2, + k_eHTMLKeyModifier_ShiftDown = 4 +} diff --git a/Assembly_Firstpass/Steamworks/EHTMLMouseButton.cs b/Assembly_Firstpass/Steamworks/EHTMLMouseButton.cs new file mode 100644 index 0000000..5b5bfc8 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EHTMLMouseButton.cs @@ -0,0 +1,8 @@ +namespace Steamworks; + +public enum EHTMLMouseButton +{ + eHTMLMouseButton_Left, + eHTMLMouseButton_Right, + eHTMLMouseButton_Middle +} diff --git a/Assembly_Firstpass/Steamworks/EHTTPMethod.cs b/Assembly_Firstpass/Steamworks/EHTTPMethod.cs new file mode 100644 index 0000000..846e606 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EHTTPMethod.cs @@ -0,0 +1,13 @@ +namespace Steamworks; + +public enum EHTTPMethod +{ + k_EHTTPMethodInvalid, + k_EHTTPMethodGET, + k_EHTTPMethodHEAD, + k_EHTTPMethodPOST, + k_EHTTPMethodPUT, + k_EHTTPMethodDELETE, + k_EHTTPMethodOPTIONS, + k_EHTTPMethodPATCH +} diff --git a/Assembly_Firstpass/Steamworks/EHTTPStatusCode.cs b/Assembly_Firstpass/Steamworks/EHTTPStatusCode.cs new file mode 100644 index 0000000..faeaa67 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EHTTPStatusCode.cs @@ -0,0 +1,50 @@ +namespace Steamworks; + +public enum EHTTPStatusCode +{ + k_EHTTPStatusCodeInvalid = 0, + k_EHTTPStatusCode100Continue = 100, + k_EHTTPStatusCode101SwitchingProtocols = 101, + k_EHTTPStatusCode200OK = 200, + k_EHTTPStatusCode201Created = 201, + k_EHTTPStatusCode202Accepted = 202, + k_EHTTPStatusCode203NonAuthoritative = 203, + k_EHTTPStatusCode204NoContent = 204, + k_EHTTPStatusCode205ResetContent = 205, + k_EHTTPStatusCode206PartialContent = 206, + k_EHTTPStatusCode300MultipleChoices = 300, + k_EHTTPStatusCode301MovedPermanently = 301, + k_EHTTPStatusCode302Found = 302, + k_EHTTPStatusCode303SeeOther = 303, + k_EHTTPStatusCode304NotModified = 304, + k_EHTTPStatusCode305UseProxy = 305, + k_EHTTPStatusCode307TemporaryRedirect = 307, + k_EHTTPStatusCode400BadRequest = 400, + k_EHTTPStatusCode401Unauthorized = 401, + k_EHTTPStatusCode402PaymentRequired = 402, + k_EHTTPStatusCode403Forbidden = 403, + k_EHTTPStatusCode404NotFound = 404, + k_EHTTPStatusCode405MethodNotAllowed = 405, + k_EHTTPStatusCode406NotAcceptable = 406, + k_EHTTPStatusCode407ProxyAuthRequired = 407, + k_EHTTPStatusCode408RequestTimeout = 408, + k_EHTTPStatusCode409Conflict = 409, + k_EHTTPStatusCode410Gone = 410, + k_EHTTPStatusCode411LengthRequired = 411, + k_EHTTPStatusCode412PreconditionFailed = 412, + k_EHTTPStatusCode413RequestEntityTooLarge = 413, + k_EHTTPStatusCode414RequestURITooLong = 414, + k_EHTTPStatusCode415UnsupportedMediaType = 415, + k_EHTTPStatusCode416RequestedRangeNotSatisfiable = 416, + k_EHTTPStatusCode417ExpectationFailed = 417, + k_EHTTPStatusCode4xxUnknown = 418, + k_EHTTPStatusCode429TooManyRequests = 429, + k_EHTTPStatusCode444ConnectionClosed = 444, + k_EHTTPStatusCode500InternalServerError = 500, + k_EHTTPStatusCode501NotImplemented = 501, + k_EHTTPStatusCode502BadGateway = 502, + k_EHTTPStatusCode503ServiceUnavailable = 503, + k_EHTTPStatusCode504GatewayTimeout = 504, + k_EHTTPStatusCode505HTTPVersionNotSupported = 505, + k_EHTTPStatusCode5xxUnknown = 599 +} diff --git a/Assembly_Firstpass/Steamworks/EInputActionOrigin.cs b/Assembly_Firstpass/Steamworks/EInputActionOrigin.cs new file mode 100644 index 0000000..5aecc23 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EInputActionOrigin.cs @@ -0,0 +1,340 @@ +namespace Steamworks; + +public enum EInputActionOrigin +{ + k_EInputActionOrigin_None = 0, + k_EInputActionOrigin_SteamController_A = 1, + k_EInputActionOrigin_SteamController_B = 2, + k_EInputActionOrigin_SteamController_X = 3, + k_EInputActionOrigin_SteamController_Y = 4, + k_EInputActionOrigin_SteamController_LeftBumper = 5, + k_EInputActionOrigin_SteamController_RightBumper = 6, + k_EInputActionOrigin_SteamController_LeftGrip = 7, + k_EInputActionOrigin_SteamController_RightGrip = 8, + k_EInputActionOrigin_SteamController_Start = 9, + k_EInputActionOrigin_SteamController_Back = 10, + k_EInputActionOrigin_SteamController_LeftPad_Touch = 11, + k_EInputActionOrigin_SteamController_LeftPad_Swipe = 12, + k_EInputActionOrigin_SteamController_LeftPad_Click = 13, + k_EInputActionOrigin_SteamController_LeftPad_DPadNorth = 14, + k_EInputActionOrigin_SteamController_LeftPad_DPadSouth = 15, + k_EInputActionOrigin_SteamController_LeftPad_DPadWest = 16, + k_EInputActionOrigin_SteamController_LeftPad_DPadEast = 17, + k_EInputActionOrigin_SteamController_RightPad_Touch = 18, + k_EInputActionOrigin_SteamController_RightPad_Swipe = 19, + k_EInputActionOrigin_SteamController_RightPad_Click = 20, + k_EInputActionOrigin_SteamController_RightPad_DPadNorth = 21, + k_EInputActionOrigin_SteamController_RightPad_DPadSouth = 22, + k_EInputActionOrigin_SteamController_RightPad_DPadWest = 23, + k_EInputActionOrigin_SteamController_RightPad_DPadEast = 24, + k_EInputActionOrigin_SteamController_LeftTrigger_Pull = 25, + k_EInputActionOrigin_SteamController_LeftTrigger_Click = 26, + k_EInputActionOrigin_SteamController_RightTrigger_Pull = 27, + k_EInputActionOrigin_SteamController_RightTrigger_Click = 28, + k_EInputActionOrigin_SteamController_LeftStick_Move = 29, + k_EInputActionOrigin_SteamController_LeftStick_Click = 30, + k_EInputActionOrigin_SteamController_LeftStick_DPadNorth = 31, + k_EInputActionOrigin_SteamController_LeftStick_DPadSouth = 32, + k_EInputActionOrigin_SteamController_LeftStick_DPadWest = 33, + k_EInputActionOrigin_SteamController_LeftStick_DPadEast = 34, + k_EInputActionOrigin_SteamController_Gyro_Move = 35, + k_EInputActionOrigin_SteamController_Gyro_Pitch = 36, + k_EInputActionOrigin_SteamController_Gyro_Yaw = 37, + k_EInputActionOrigin_SteamController_Gyro_Roll = 38, + k_EInputActionOrigin_SteamController_Reserved0 = 39, + k_EInputActionOrigin_SteamController_Reserved1 = 40, + k_EInputActionOrigin_SteamController_Reserved2 = 41, + k_EInputActionOrigin_SteamController_Reserved3 = 42, + k_EInputActionOrigin_SteamController_Reserved4 = 43, + k_EInputActionOrigin_SteamController_Reserved5 = 44, + k_EInputActionOrigin_SteamController_Reserved6 = 45, + k_EInputActionOrigin_SteamController_Reserved7 = 46, + k_EInputActionOrigin_SteamController_Reserved8 = 47, + k_EInputActionOrigin_SteamController_Reserved9 = 48, + k_EInputActionOrigin_SteamController_Reserved10 = 49, + k_EInputActionOrigin_PS4_X = 50, + k_EInputActionOrigin_PS4_Circle = 51, + k_EInputActionOrigin_PS4_Triangle = 52, + k_EInputActionOrigin_PS4_Square = 53, + k_EInputActionOrigin_PS4_LeftBumper = 54, + k_EInputActionOrigin_PS4_RightBumper = 55, + k_EInputActionOrigin_PS4_Options = 56, + k_EInputActionOrigin_PS4_Share = 57, + k_EInputActionOrigin_PS4_LeftPad_Touch = 58, + k_EInputActionOrigin_PS4_LeftPad_Swipe = 59, + k_EInputActionOrigin_PS4_LeftPad_Click = 60, + k_EInputActionOrigin_PS4_LeftPad_DPadNorth = 61, + k_EInputActionOrigin_PS4_LeftPad_DPadSouth = 62, + k_EInputActionOrigin_PS4_LeftPad_DPadWest = 63, + k_EInputActionOrigin_PS4_LeftPad_DPadEast = 64, + k_EInputActionOrigin_PS4_RightPad_Touch = 65, + k_EInputActionOrigin_PS4_RightPad_Swipe = 66, + k_EInputActionOrigin_PS4_RightPad_Click = 67, + k_EInputActionOrigin_PS4_RightPad_DPadNorth = 68, + k_EInputActionOrigin_PS4_RightPad_DPadSouth = 69, + k_EInputActionOrigin_PS4_RightPad_DPadWest = 70, + k_EInputActionOrigin_PS4_RightPad_DPadEast = 71, + k_EInputActionOrigin_PS4_CenterPad_Touch = 72, + k_EInputActionOrigin_PS4_CenterPad_Swipe = 73, + k_EInputActionOrigin_PS4_CenterPad_Click = 74, + k_EInputActionOrigin_PS4_CenterPad_DPadNorth = 75, + k_EInputActionOrigin_PS4_CenterPad_DPadSouth = 76, + k_EInputActionOrigin_PS4_CenterPad_DPadWest = 77, + k_EInputActionOrigin_PS4_CenterPad_DPadEast = 78, + k_EInputActionOrigin_PS4_LeftTrigger_Pull = 79, + k_EInputActionOrigin_PS4_LeftTrigger_Click = 80, + k_EInputActionOrigin_PS4_RightTrigger_Pull = 81, + k_EInputActionOrigin_PS4_RightTrigger_Click = 82, + k_EInputActionOrigin_PS4_LeftStick_Move = 83, + k_EInputActionOrigin_PS4_LeftStick_Click = 84, + k_EInputActionOrigin_PS4_LeftStick_DPadNorth = 85, + k_EInputActionOrigin_PS4_LeftStick_DPadSouth = 86, + k_EInputActionOrigin_PS4_LeftStick_DPadWest = 87, + k_EInputActionOrigin_PS4_LeftStick_DPadEast = 88, + k_EInputActionOrigin_PS4_RightStick_Move = 89, + k_EInputActionOrigin_PS4_RightStick_Click = 90, + k_EInputActionOrigin_PS4_RightStick_DPadNorth = 91, + k_EInputActionOrigin_PS4_RightStick_DPadSouth = 92, + k_EInputActionOrigin_PS4_RightStick_DPadWest = 93, + k_EInputActionOrigin_PS4_RightStick_DPadEast = 94, + k_EInputActionOrigin_PS4_DPad_North = 95, + k_EInputActionOrigin_PS4_DPad_South = 96, + k_EInputActionOrigin_PS4_DPad_West = 97, + k_EInputActionOrigin_PS4_DPad_East = 98, + k_EInputActionOrigin_PS4_Gyro_Move = 99, + k_EInputActionOrigin_PS4_Gyro_Pitch = 100, + k_EInputActionOrigin_PS4_Gyro_Yaw = 101, + k_EInputActionOrigin_PS4_Gyro_Roll = 102, + k_EInputActionOrigin_PS4_DPad_Move = 103, + k_EInputActionOrigin_PS4_Reserved1 = 104, + k_EInputActionOrigin_PS4_Reserved2 = 105, + k_EInputActionOrigin_PS4_Reserved3 = 106, + k_EInputActionOrigin_PS4_Reserved4 = 107, + k_EInputActionOrigin_PS4_Reserved5 = 108, + k_EInputActionOrigin_PS4_Reserved6 = 109, + k_EInputActionOrigin_PS4_Reserved7 = 110, + k_EInputActionOrigin_PS4_Reserved8 = 111, + k_EInputActionOrigin_PS4_Reserved9 = 112, + k_EInputActionOrigin_PS4_Reserved10 = 113, + k_EInputActionOrigin_XBoxOne_A = 114, + k_EInputActionOrigin_XBoxOne_B = 115, + k_EInputActionOrigin_XBoxOne_X = 116, + k_EInputActionOrigin_XBoxOne_Y = 117, + k_EInputActionOrigin_XBoxOne_LeftBumper = 118, + k_EInputActionOrigin_XBoxOne_RightBumper = 119, + k_EInputActionOrigin_XBoxOne_Menu = 120, + k_EInputActionOrigin_XBoxOne_View = 121, + k_EInputActionOrigin_XBoxOne_LeftTrigger_Pull = 122, + k_EInputActionOrigin_XBoxOne_LeftTrigger_Click = 123, + k_EInputActionOrigin_XBoxOne_RightTrigger_Pull = 124, + k_EInputActionOrigin_XBoxOne_RightTrigger_Click = 125, + k_EInputActionOrigin_XBoxOne_LeftStick_Move = 126, + k_EInputActionOrigin_XBoxOne_LeftStick_Click = 127, + k_EInputActionOrigin_XBoxOne_LeftStick_DPadNorth = 128, + k_EInputActionOrigin_XBoxOne_LeftStick_DPadSouth = 129, + k_EInputActionOrigin_XBoxOne_LeftStick_DPadWest = 130, + k_EInputActionOrigin_XBoxOne_LeftStick_DPadEast = 131, + k_EInputActionOrigin_XBoxOne_RightStick_Move = 132, + k_EInputActionOrigin_XBoxOne_RightStick_Click = 133, + k_EInputActionOrigin_XBoxOne_RightStick_DPadNorth = 134, + k_EInputActionOrigin_XBoxOne_RightStick_DPadSouth = 135, + k_EInputActionOrigin_XBoxOne_RightStick_DPadWest = 136, + k_EInputActionOrigin_XBoxOne_RightStick_DPadEast = 137, + k_EInputActionOrigin_XBoxOne_DPad_North = 138, + k_EInputActionOrigin_XBoxOne_DPad_South = 139, + k_EInputActionOrigin_XBoxOne_DPad_West = 140, + k_EInputActionOrigin_XBoxOne_DPad_East = 141, + k_EInputActionOrigin_XBoxOne_DPad_Move = 142, + k_EInputActionOrigin_XBoxOne_Reserved1 = 143, + k_EInputActionOrigin_XBoxOne_Reserved2 = 144, + k_EInputActionOrigin_XBoxOne_Reserved3 = 145, + k_EInputActionOrigin_XBoxOne_Reserved4 = 146, + k_EInputActionOrigin_XBoxOne_Reserved5 = 147, + k_EInputActionOrigin_XBoxOne_Reserved6 = 148, + k_EInputActionOrigin_XBoxOne_Reserved7 = 149, + k_EInputActionOrigin_XBoxOne_Reserved8 = 150, + k_EInputActionOrigin_XBoxOne_Reserved9 = 151, + k_EInputActionOrigin_XBoxOne_Reserved10 = 152, + k_EInputActionOrigin_XBox360_A = 153, + k_EInputActionOrigin_XBox360_B = 154, + k_EInputActionOrigin_XBox360_X = 155, + k_EInputActionOrigin_XBox360_Y = 156, + k_EInputActionOrigin_XBox360_LeftBumper = 157, + k_EInputActionOrigin_XBox360_RightBumper = 158, + k_EInputActionOrigin_XBox360_Start = 159, + k_EInputActionOrigin_XBox360_Back = 160, + k_EInputActionOrigin_XBox360_LeftTrigger_Pull = 161, + k_EInputActionOrigin_XBox360_LeftTrigger_Click = 162, + k_EInputActionOrigin_XBox360_RightTrigger_Pull = 163, + k_EInputActionOrigin_XBox360_RightTrigger_Click = 164, + k_EInputActionOrigin_XBox360_LeftStick_Move = 165, + k_EInputActionOrigin_XBox360_LeftStick_Click = 166, + k_EInputActionOrigin_XBox360_LeftStick_DPadNorth = 167, + k_EInputActionOrigin_XBox360_LeftStick_DPadSouth = 168, + k_EInputActionOrigin_XBox360_LeftStick_DPadWest = 169, + k_EInputActionOrigin_XBox360_LeftStick_DPadEast = 170, + k_EInputActionOrigin_XBox360_RightStick_Move = 171, + k_EInputActionOrigin_XBox360_RightStick_Click = 172, + k_EInputActionOrigin_XBox360_RightStick_DPadNorth = 173, + k_EInputActionOrigin_XBox360_RightStick_DPadSouth = 174, + k_EInputActionOrigin_XBox360_RightStick_DPadWest = 175, + k_EInputActionOrigin_XBox360_RightStick_DPadEast = 176, + k_EInputActionOrigin_XBox360_DPad_North = 177, + k_EInputActionOrigin_XBox360_DPad_South = 178, + k_EInputActionOrigin_XBox360_DPad_West = 179, + k_EInputActionOrigin_XBox360_DPad_East = 180, + k_EInputActionOrigin_XBox360_DPad_Move = 181, + k_EInputActionOrigin_XBox360_Reserved1 = 182, + k_EInputActionOrigin_XBox360_Reserved2 = 183, + k_EInputActionOrigin_XBox360_Reserved3 = 184, + k_EInputActionOrigin_XBox360_Reserved4 = 185, + k_EInputActionOrigin_XBox360_Reserved5 = 186, + k_EInputActionOrigin_XBox360_Reserved6 = 187, + k_EInputActionOrigin_XBox360_Reserved7 = 188, + k_EInputActionOrigin_XBox360_Reserved8 = 189, + k_EInputActionOrigin_XBox360_Reserved9 = 190, + k_EInputActionOrigin_XBox360_Reserved10 = 191, + k_EInputActionOrigin_Switch_A = 192, + k_EInputActionOrigin_Switch_B = 193, + k_EInputActionOrigin_Switch_X = 194, + k_EInputActionOrigin_Switch_Y = 195, + k_EInputActionOrigin_Switch_LeftBumper = 196, + k_EInputActionOrigin_Switch_RightBumper = 197, + k_EInputActionOrigin_Switch_Plus = 198, + k_EInputActionOrigin_Switch_Minus = 199, + k_EInputActionOrigin_Switch_Capture = 200, + k_EInputActionOrigin_Switch_LeftTrigger_Pull = 201, + k_EInputActionOrigin_Switch_LeftTrigger_Click = 202, + k_EInputActionOrigin_Switch_RightTrigger_Pull = 203, + k_EInputActionOrigin_Switch_RightTrigger_Click = 204, + k_EInputActionOrigin_Switch_LeftStick_Move = 205, + k_EInputActionOrigin_Switch_LeftStick_Click = 206, + k_EInputActionOrigin_Switch_LeftStick_DPadNorth = 207, + k_EInputActionOrigin_Switch_LeftStick_DPadSouth = 208, + k_EInputActionOrigin_Switch_LeftStick_DPadWest = 209, + k_EInputActionOrigin_Switch_LeftStick_DPadEast = 210, + k_EInputActionOrigin_Switch_RightStick_Move = 211, + k_EInputActionOrigin_Switch_RightStick_Click = 212, + k_EInputActionOrigin_Switch_RightStick_DPadNorth = 213, + k_EInputActionOrigin_Switch_RightStick_DPadSouth = 214, + k_EInputActionOrigin_Switch_RightStick_DPadWest = 215, + k_EInputActionOrigin_Switch_RightStick_DPadEast = 216, + k_EInputActionOrigin_Switch_DPad_North = 217, + k_EInputActionOrigin_Switch_DPad_South = 218, + k_EInputActionOrigin_Switch_DPad_West = 219, + k_EInputActionOrigin_Switch_DPad_East = 220, + k_EInputActionOrigin_Switch_ProGyro_Move = 221, + k_EInputActionOrigin_Switch_ProGyro_Pitch = 222, + k_EInputActionOrigin_Switch_ProGyro_Yaw = 223, + k_EInputActionOrigin_Switch_ProGyro_Roll = 224, + k_EInputActionOrigin_Switch_DPad_Move = 225, + k_EInputActionOrigin_Switch_Reserved1 = 226, + k_EInputActionOrigin_Switch_Reserved2 = 227, + k_EInputActionOrigin_Switch_Reserved3 = 228, + k_EInputActionOrigin_Switch_Reserved4 = 229, + k_EInputActionOrigin_Switch_Reserved5 = 230, + k_EInputActionOrigin_Switch_Reserved6 = 231, + k_EInputActionOrigin_Switch_Reserved7 = 232, + k_EInputActionOrigin_Switch_Reserved8 = 233, + k_EInputActionOrigin_Switch_Reserved9 = 234, + k_EInputActionOrigin_Switch_Reserved10 = 235, + k_EInputActionOrigin_Switch_RightGyro_Move = 236, + k_EInputActionOrigin_Switch_RightGyro_Pitch = 237, + k_EInputActionOrigin_Switch_RightGyro_Yaw = 238, + k_EInputActionOrigin_Switch_RightGyro_Roll = 239, + k_EInputActionOrigin_Switch_LeftGyro_Move = 240, + k_EInputActionOrigin_Switch_LeftGyro_Pitch = 241, + k_EInputActionOrigin_Switch_LeftGyro_Yaw = 242, + k_EInputActionOrigin_Switch_LeftGyro_Roll = 243, + k_EInputActionOrigin_Switch_LeftGrip_Lower = 244, + k_EInputActionOrigin_Switch_LeftGrip_Upper = 245, + k_EInputActionOrigin_Switch_RightGrip_Lower = 246, + k_EInputActionOrigin_Switch_RightGrip_Upper = 247, + k_EInputActionOrigin_Switch_Reserved11 = 248, + k_EInputActionOrigin_Switch_Reserved12 = 249, + k_EInputActionOrigin_Switch_Reserved13 = 250, + k_EInputActionOrigin_Switch_Reserved14 = 251, + k_EInputActionOrigin_Switch_Reserved15 = 252, + k_EInputActionOrigin_Switch_Reserved16 = 253, + k_EInputActionOrigin_Switch_Reserved17 = 254, + k_EInputActionOrigin_Switch_Reserved18 = 255, + k_EInputActionOrigin_Switch_Reserved19 = 256, + k_EInputActionOrigin_Switch_Reserved20 = 257, + k_EInputActionOrigin_PS5_X = 258, + k_EInputActionOrigin_PS5_Circle = 259, + k_EInputActionOrigin_PS5_Triangle = 260, + k_EInputActionOrigin_PS5_Square = 261, + k_EInputActionOrigin_PS5_LeftBumper = 262, + k_EInputActionOrigin_PS5_RightBumper = 263, + k_EInputActionOrigin_PS5_Option = 264, + k_EInputActionOrigin_PS5_Create = 265, + k_EInputActionOrigin_PS5_Mute = 266, + k_EInputActionOrigin_PS5_LeftPad_Touch = 267, + k_EInputActionOrigin_PS5_LeftPad_Swipe = 268, + k_EInputActionOrigin_PS5_LeftPad_Click = 269, + k_EInputActionOrigin_PS5_LeftPad_DPadNorth = 270, + k_EInputActionOrigin_PS5_LeftPad_DPadSouth = 271, + k_EInputActionOrigin_PS5_LeftPad_DPadWest = 272, + k_EInputActionOrigin_PS5_LeftPad_DPadEast = 273, + k_EInputActionOrigin_PS5_RightPad_Touch = 274, + k_EInputActionOrigin_PS5_RightPad_Swipe = 275, + k_EInputActionOrigin_PS5_RightPad_Click = 276, + k_EInputActionOrigin_PS5_RightPad_DPadNorth = 277, + k_EInputActionOrigin_PS5_RightPad_DPadSouth = 278, + k_EInputActionOrigin_PS5_RightPad_DPadWest = 279, + k_EInputActionOrigin_PS5_RightPad_DPadEast = 280, + k_EInputActionOrigin_PS5_CenterPad_Touch = 281, + k_EInputActionOrigin_PS5_CenterPad_Swipe = 282, + k_EInputActionOrigin_PS5_CenterPad_Click = 283, + k_EInputActionOrigin_PS5_CenterPad_DPadNorth = 284, + k_EInputActionOrigin_PS5_CenterPad_DPadSouth = 285, + k_EInputActionOrigin_PS5_CenterPad_DPadWest = 286, + k_EInputActionOrigin_PS5_CenterPad_DPadEast = 287, + k_EInputActionOrigin_PS5_LeftTrigger_Pull = 288, + k_EInputActionOrigin_PS5_LeftTrigger_Click = 289, + k_EInputActionOrigin_PS5_RightTrigger_Pull = 290, + k_EInputActionOrigin_PS5_RightTrigger_Click = 291, + k_EInputActionOrigin_PS5_LeftStick_Move = 292, + k_EInputActionOrigin_PS5_LeftStick_Click = 293, + k_EInputActionOrigin_PS5_LeftStick_DPadNorth = 294, + k_EInputActionOrigin_PS5_LeftStick_DPadSouth = 295, + k_EInputActionOrigin_PS5_LeftStick_DPadWest = 296, + k_EInputActionOrigin_PS5_LeftStick_DPadEast = 297, + k_EInputActionOrigin_PS5_RightStick_Move = 298, + k_EInputActionOrigin_PS5_RightStick_Click = 299, + k_EInputActionOrigin_PS5_RightStick_DPadNorth = 300, + k_EInputActionOrigin_PS5_RightStick_DPadSouth = 301, + k_EInputActionOrigin_PS5_RightStick_DPadWest = 302, + k_EInputActionOrigin_PS5_RightStick_DPadEast = 303, + k_EInputActionOrigin_PS5_DPad_North = 304, + k_EInputActionOrigin_PS5_DPad_South = 305, + k_EInputActionOrigin_PS5_DPad_West = 306, + k_EInputActionOrigin_PS5_DPad_East = 307, + k_EInputActionOrigin_PS5_Gyro_Move = 308, + k_EInputActionOrigin_PS5_Gyro_Pitch = 309, + k_EInputActionOrigin_PS5_Gyro_Yaw = 310, + k_EInputActionOrigin_PS5_Gyro_Roll = 311, + k_EInputActionOrigin_PS5_DPad_Move = 312, + k_EInputActionOrigin_PS5_Reserved1 = 313, + k_EInputActionOrigin_PS5_Reserved2 = 314, + k_EInputActionOrigin_PS5_Reserved3 = 315, + k_EInputActionOrigin_PS5_Reserved4 = 316, + k_EInputActionOrigin_PS5_Reserved5 = 317, + k_EInputActionOrigin_PS5_Reserved6 = 318, + k_EInputActionOrigin_PS5_Reserved7 = 319, + k_EInputActionOrigin_PS5_Reserved8 = 320, + k_EInputActionOrigin_PS5_Reserved9 = 321, + k_EInputActionOrigin_PS5_Reserved10 = 322, + k_EInputActionOrigin_PS5_Reserved11 = 323, + k_EInputActionOrigin_PS5_Reserved12 = 324, + k_EInputActionOrigin_PS5_Reserved13 = 325, + k_EInputActionOrigin_PS5_Reserved14 = 326, + k_EInputActionOrigin_PS5_Reserved15 = 327, + k_EInputActionOrigin_PS5_Reserved16 = 328, + k_EInputActionOrigin_PS5_Reserved17 = 329, + k_EInputActionOrigin_PS5_Reserved18 = 330, + k_EInputActionOrigin_PS5_Reserved19 = 331, + k_EInputActionOrigin_PS5_Reserved20 = 332, + k_EInputActionOrigin_Count = 333, + k_EInputActionOrigin_MaximumPossibleValue = 32767 +} diff --git a/Assembly_Firstpass/Steamworks/EInputSourceMode.cs b/Assembly_Firstpass/Steamworks/EInputSourceMode.cs new file mode 100644 index 0000000..57062a7 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EInputSourceMode.cs @@ -0,0 +1,22 @@ +namespace Steamworks; + +public enum EInputSourceMode +{ + k_EInputSourceMode_None, + k_EInputSourceMode_Dpad, + k_EInputSourceMode_Buttons, + k_EInputSourceMode_FourButtons, + k_EInputSourceMode_AbsoluteMouse, + k_EInputSourceMode_RelativeMouse, + k_EInputSourceMode_JoystickMove, + k_EInputSourceMode_JoystickMouse, + k_EInputSourceMode_JoystickCamera, + k_EInputSourceMode_ScrollWheel, + k_EInputSourceMode_Trigger, + k_EInputSourceMode_TouchMenu, + k_EInputSourceMode_MouseJoystick, + k_EInputSourceMode_MouseRegion, + k_EInputSourceMode_RadialMenu, + k_EInputSourceMode_SingleButton, + k_EInputSourceMode_Switches +} diff --git a/Assembly_Firstpass/Steamworks/EItemPreviewType.cs b/Assembly_Firstpass/Steamworks/EItemPreviewType.cs new file mode 100644 index 0000000..ccd12cd --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EItemPreviewType.cs @@ -0,0 +1,11 @@ +namespace Steamworks; + +public enum EItemPreviewType +{ + k_EItemPreviewType_Image = 0, + k_EItemPreviewType_YouTubeVideo = 1, + k_EItemPreviewType_Sketchfab = 2, + k_EItemPreviewType_EnvironmentMap_HorizontalCross = 3, + k_EItemPreviewType_EnvironmentMap_LatLong = 4, + k_EItemPreviewType_ReservedMax = 255 +} diff --git a/Assembly_Firstpass/Steamworks/EItemState.cs b/Assembly_Firstpass/Steamworks/EItemState.cs new file mode 100644 index 0000000..df1d938 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EItemState.cs @@ -0,0 +1,15 @@ +using System; + +namespace Steamworks; + +[Flags] +public enum EItemState +{ + k_EItemStateNone = 0, + k_EItemStateSubscribed = 1, + k_EItemStateLegacyItem = 2, + k_EItemStateInstalled = 4, + k_EItemStateNeedsUpdate = 8, + k_EItemStateDownloading = 0x10, + k_EItemStateDownloadPending = 0x20 +} diff --git a/Assembly_Firstpass/Steamworks/EItemStatistic.cs b/Assembly_Firstpass/Steamworks/EItemStatistic.cs new file mode 100644 index 0000000..7d41930 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EItemStatistic.cs @@ -0,0 +1,18 @@ +namespace Steamworks; + +public enum EItemStatistic +{ + k_EItemStatistic_NumSubscriptions, + k_EItemStatistic_NumFavorites, + k_EItemStatistic_NumFollowers, + k_EItemStatistic_NumUniqueSubscriptions, + k_EItemStatistic_NumUniqueFavorites, + k_EItemStatistic_NumUniqueFollowers, + k_EItemStatistic_NumUniqueWebsiteViews, + k_EItemStatistic_ReportScore, + k_EItemStatistic_NumSecondsPlayed, + k_EItemStatistic_NumPlaytimeSessions, + k_EItemStatistic_NumComments, + k_EItemStatistic_NumSecondsPlayedDuringTimePeriod, + k_EItemStatistic_NumPlaytimeSessionsDuringTimePeriod +} diff --git a/Assembly_Firstpass/Steamworks/EItemUpdateStatus.cs b/Assembly_Firstpass/Steamworks/EItemUpdateStatus.cs new file mode 100644 index 0000000..8af38b6 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EItemUpdateStatus.cs @@ -0,0 +1,11 @@ +namespace Steamworks; + +public enum EItemUpdateStatus +{ + k_EItemUpdateStatusInvalid, + k_EItemUpdateStatusPreparingConfig, + k_EItemUpdateStatusPreparingContent, + k_EItemUpdateStatusUploadingContent, + k_EItemUpdateStatusUploadingPreviewFile, + k_EItemUpdateStatusCommittingChanges +} diff --git a/Assembly_Firstpass/Steamworks/ELaunchOptionType.cs b/Assembly_Firstpass/Steamworks/ELaunchOptionType.cs new file mode 100644 index 0000000..eee7a27 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ELaunchOptionType.cs @@ -0,0 +1,22 @@ +namespace Steamworks; + +public enum ELaunchOptionType +{ + k_ELaunchOptionType_None = 0, + k_ELaunchOptionType_Default = 1, + k_ELaunchOptionType_SafeMode = 2, + k_ELaunchOptionType_Multiplayer = 3, + k_ELaunchOptionType_Config = 4, + k_ELaunchOptionType_OpenVR = 5, + k_ELaunchOptionType_Server = 6, + k_ELaunchOptionType_Editor = 7, + k_ELaunchOptionType_Manual = 8, + k_ELaunchOptionType_Benchmark = 9, + k_ELaunchOptionType_Option1 = 10, + k_ELaunchOptionType_Option2 = 11, + k_ELaunchOptionType_Option3 = 12, + k_ELaunchOptionType_OculusVR = 13, + k_ELaunchOptionType_OpenVROverlay = 14, + k_ELaunchOptionType_OSVR = 15, + k_ELaunchOptionType_Dialog = 1000 +} diff --git a/Assembly_Firstpass/Steamworks/ELeaderboardDataRequest.cs b/Assembly_Firstpass/Steamworks/ELeaderboardDataRequest.cs new file mode 100644 index 0000000..bd2a370 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ELeaderboardDataRequest.cs @@ -0,0 +1,9 @@ +namespace Steamworks; + +public enum ELeaderboardDataRequest +{ + k_ELeaderboardDataRequestGlobal, + k_ELeaderboardDataRequestGlobalAroundUser, + k_ELeaderboardDataRequestFriends, + k_ELeaderboardDataRequestUsers +} diff --git a/Assembly_Firstpass/Steamworks/ELeaderboardDisplayType.cs b/Assembly_Firstpass/Steamworks/ELeaderboardDisplayType.cs new file mode 100644 index 0000000..d1d2e7c --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ELeaderboardDisplayType.cs @@ -0,0 +1,9 @@ +namespace Steamworks; + +public enum ELeaderboardDisplayType +{ + k_ELeaderboardDisplayTypeNone, + k_ELeaderboardDisplayTypeNumeric, + k_ELeaderboardDisplayTypeTimeSeconds, + k_ELeaderboardDisplayTypeTimeMilliSeconds +} diff --git a/Assembly_Firstpass/Steamworks/ELeaderboardSortMethod.cs b/Assembly_Firstpass/Steamworks/ELeaderboardSortMethod.cs new file mode 100644 index 0000000..adfa71e --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ELeaderboardSortMethod.cs @@ -0,0 +1,8 @@ +namespace Steamworks; + +public enum ELeaderboardSortMethod +{ + k_ELeaderboardSortMethodNone, + k_ELeaderboardSortMethodAscending, + k_ELeaderboardSortMethodDescending +} diff --git a/Assembly_Firstpass/Steamworks/ELeaderboardUploadScoreMethod.cs b/Assembly_Firstpass/Steamworks/ELeaderboardUploadScoreMethod.cs new file mode 100644 index 0000000..0ad70ef --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ELeaderboardUploadScoreMethod.cs @@ -0,0 +1,8 @@ +namespace Steamworks; + +public enum ELeaderboardUploadScoreMethod +{ + k_ELeaderboardUploadScoreMethodNone, + k_ELeaderboardUploadScoreMethodKeepBest, + k_ELeaderboardUploadScoreMethodForceUpdate +} diff --git a/Assembly_Firstpass/Steamworks/ELobbyComparison.cs b/Assembly_Firstpass/Steamworks/ELobbyComparison.cs new file mode 100644 index 0000000..4a64cf7 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ELobbyComparison.cs @@ -0,0 +1,11 @@ +namespace Steamworks; + +public enum ELobbyComparison +{ + k_ELobbyComparisonEqualToOrLessThan = -2, + k_ELobbyComparisonLessThan, + k_ELobbyComparisonEqual, + k_ELobbyComparisonGreaterThan, + k_ELobbyComparisonEqualToOrGreaterThan, + k_ELobbyComparisonNotEqual +} diff --git a/Assembly_Firstpass/Steamworks/ELobbyDistanceFilter.cs b/Assembly_Firstpass/Steamworks/ELobbyDistanceFilter.cs new file mode 100644 index 0000000..38aec99 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ELobbyDistanceFilter.cs @@ -0,0 +1,9 @@ +namespace Steamworks; + +public enum ELobbyDistanceFilter +{ + k_ELobbyDistanceFilterClose, + k_ELobbyDistanceFilterDefault, + k_ELobbyDistanceFilterFar, + k_ELobbyDistanceFilterWorldwide +} diff --git a/Assembly_Firstpass/Steamworks/ELobbyType.cs b/Assembly_Firstpass/Steamworks/ELobbyType.cs new file mode 100644 index 0000000..e4a57e6 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ELobbyType.cs @@ -0,0 +1,10 @@ +namespace Steamworks; + +public enum ELobbyType +{ + k_ELobbyTypePrivate, + k_ELobbyTypeFriendsOnly, + k_ELobbyTypePublic, + k_ELobbyTypeInvisible, + k_ELobbyTypePrivateUnique +} diff --git a/Assembly_Firstpass/Steamworks/EMarketNotAllowedReasonFlags.cs b/Assembly_Firstpass/Steamworks/EMarketNotAllowedReasonFlags.cs new file mode 100644 index 0000000..a9e1fe0 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EMarketNotAllowedReasonFlags.cs @@ -0,0 +1,25 @@ +using System; + +namespace Steamworks; + +[Flags] +public enum EMarketNotAllowedReasonFlags +{ + k_EMarketNotAllowedReason_None = 0, + k_EMarketNotAllowedReason_TemporaryFailure = 1, + k_EMarketNotAllowedReason_AccountDisabled = 2, + k_EMarketNotAllowedReason_AccountLockedDown = 4, + k_EMarketNotAllowedReason_AccountLimited = 8, + k_EMarketNotAllowedReason_TradeBanned = 0x10, + k_EMarketNotAllowedReason_AccountNotTrusted = 0x20, + k_EMarketNotAllowedReason_SteamGuardNotEnabled = 0x40, + k_EMarketNotAllowedReason_SteamGuardOnlyRecentlyEnabled = 0x80, + k_EMarketNotAllowedReason_RecentPasswordReset = 0x100, + k_EMarketNotAllowedReason_NewPaymentMethod = 0x200, + k_EMarketNotAllowedReason_InvalidCookie = 0x400, + k_EMarketNotAllowedReason_UsingNewDevice = 0x800, + k_EMarketNotAllowedReason_RecentSelfRefund = 0x1000, + k_EMarketNotAllowedReason_NewPaymentMethodCannotBeVerified = 0x2000, + k_EMarketNotAllowedReason_NoRecentPurchases = 0x4000, + k_EMarketNotAllowedReason_AcceptedWalletGift = 0x8000 +} diff --git a/Assembly_Firstpass/Steamworks/EMarketingMessageFlags.cs b/Assembly_Firstpass/Steamworks/EMarketingMessageFlags.cs new file mode 100644 index 0000000..6cc0e9b --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EMarketingMessageFlags.cs @@ -0,0 +1,14 @@ +using System; + +namespace Steamworks; + +[Flags] +public enum EMarketingMessageFlags +{ + k_EMarketingMessageFlagsNone = 0, + k_EMarketingMessageFlagsHighPriority = 1, + k_EMarketingMessageFlagsPlatformWindows = 2, + k_EMarketingMessageFlagsPlatformMac = 4, + k_EMarketingMessageFlagsPlatformLinux = 8, + k_EMarketingMessageFlagsPlatformRestrictions = 0xE +} diff --git a/Assembly_Firstpass/Steamworks/EMatchMakingServerResponse.cs b/Assembly_Firstpass/Steamworks/EMatchMakingServerResponse.cs new file mode 100644 index 0000000..5e68e7b --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EMatchMakingServerResponse.cs @@ -0,0 +1,8 @@ +namespace Steamworks; + +public enum EMatchMakingServerResponse +{ + eServerResponded, + eServerFailedToRespond, + eNoServersListedOnMasterServer +} diff --git a/Assembly_Firstpass/Steamworks/EMouseCursor.cs b/Assembly_Firstpass/Steamworks/EMouseCursor.cs new file mode 100644 index 0000000..a899328 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EMouseCursor.cs @@ -0,0 +1,47 @@ +namespace Steamworks; + +public enum EMouseCursor +{ + dc_user, + dc_none, + dc_arrow, + dc_ibeam, + dc_hourglass, + dc_waitarrow, + dc_crosshair, + dc_up, + dc_sizenw, + dc_sizese, + dc_sizene, + dc_sizesw, + dc_sizew, + dc_sizee, + dc_sizen, + dc_sizes, + dc_sizewe, + dc_sizens, + dc_sizeall, + dc_no, + dc_hand, + dc_blank, + dc_middle_pan, + dc_north_pan, + dc_north_east_pan, + dc_east_pan, + dc_south_east_pan, + dc_south_pan, + dc_south_west_pan, + dc_west_pan, + dc_north_west_pan, + dc_alias, + dc_cell, + dc_colresize, + dc_copycur, + dc_verticaltext, + dc_rowresize, + dc_zoomin, + dc_zoomout, + dc_help, + dc_custom, + dc_last +} diff --git a/Assembly_Firstpass/Steamworks/ENotificationPosition.cs b/Assembly_Firstpass/Steamworks/ENotificationPosition.cs new file mode 100644 index 0000000..49d899c --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ENotificationPosition.cs @@ -0,0 +1,9 @@ +namespace Steamworks; + +public enum ENotificationPosition +{ + k_EPositionTopLeft, + k_EPositionTopRight, + k_EPositionBottomLeft, + k_EPositionBottomRight +} diff --git a/Assembly_Firstpass/Steamworks/EOverlayToStoreFlag.cs b/Assembly_Firstpass/Steamworks/EOverlayToStoreFlag.cs new file mode 100644 index 0000000..1ce162a --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EOverlayToStoreFlag.cs @@ -0,0 +1,8 @@ +namespace Steamworks; + +public enum EOverlayToStoreFlag +{ + k_EOverlayToStoreFlag_None, + k_EOverlayToStoreFlag_AddToCart, + k_EOverlayToStoreFlag_AddToCartAndShow +} diff --git a/Assembly_Firstpass/Steamworks/EP2PSend.cs b/Assembly_Firstpass/Steamworks/EP2PSend.cs new file mode 100644 index 0000000..5a34730 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EP2PSend.cs @@ -0,0 +1,9 @@ +namespace Steamworks; + +public enum EP2PSend +{ + k_EP2PSendUnreliable, + k_EP2PSendUnreliableNoDelay, + k_EP2PSendReliable, + k_EP2PSendReliableWithBuffering +} diff --git a/Assembly_Firstpass/Steamworks/EP2PSessionError.cs b/Assembly_Firstpass/Steamworks/EP2PSessionError.cs new file mode 100644 index 0000000..813d074 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EP2PSessionError.cs @@ -0,0 +1,11 @@ +namespace Steamworks; + +public enum EP2PSessionError +{ + k_EP2PSessionErrorNone = 0, + k_EP2PSessionErrorNoRightsToApp = 2, + k_EP2PSessionErrorTimeout = 4, + k_EP2PSessionErrorNotRunningApp_DELETED = 1, + k_EP2PSessionErrorDestinationNotLoggedIn_DELETED = 3, + k_EP2PSessionErrorMax = 5 +} diff --git a/Assembly_Firstpass/Steamworks/EParentalFeature.cs b/Assembly_Firstpass/Steamworks/EParentalFeature.cs new file mode 100644 index 0000000..3afb96c --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EParentalFeature.cs @@ -0,0 +1,20 @@ +namespace Steamworks; + +public enum EParentalFeature +{ + k_EFeatureInvalid, + k_EFeatureStore, + k_EFeatureCommunity, + k_EFeatureProfile, + k_EFeatureFriends, + k_EFeatureNews, + k_EFeatureTrading, + k_EFeatureSettings, + k_EFeatureConsole, + k_EFeatureBrowser, + k_EFeatureParentalSetup, + k_EFeatureLibrary, + k_EFeatureTest, + k_EFeatureSiteLicense, + k_EFeatureMax +} diff --git a/Assembly_Firstpass/Steamworks/EPersonaChange.cs b/Assembly_Firstpass/Steamworks/EPersonaChange.cs new file mode 100644 index 0000000..a9d66d2 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EPersonaChange.cs @@ -0,0 +1,23 @@ +using System; + +namespace Steamworks; + +[Flags] +public enum EPersonaChange +{ + k_EPersonaChangeName = 1, + k_EPersonaChangeStatus = 2, + k_EPersonaChangeComeOnline = 4, + k_EPersonaChangeGoneOffline = 8, + k_EPersonaChangeGamePlayed = 0x10, + k_EPersonaChangeGameServer = 0x20, + k_EPersonaChangeAvatar = 0x40, + k_EPersonaChangeJoinedSource = 0x80, + k_EPersonaChangeLeftSource = 0x100, + k_EPersonaChangeRelationshipChanged = 0x200, + k_EPersonaChangeNameFirstSet = 0x400, + k_EPersonaChangeBroadcast = 0x800, + k_EPersonaChangeNickname = 0x1000, + k_EPersonaChangeSteamLevel = 0x2000, + k_EPersonaChangeRichPresence = 0x4000 +} diff --git a/Assembly_Firstpass/Steamworks/EPersonaState.cs b/Assembly_Firstpass/Steamworks/EPersonaState.cs new file mode 100644 index 0000000..d3eb94e --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EPersonaState.cs @@ -0,0 +1,14 @@ +namespace Steamworks; + +public enum EPersonaState +{ + k_EPersonaStateOffline, + k_EPersonaStateOnline, + k_EPersonaStateBusy, + k_EPersonaStateAway, + k_EPersonaStateSnooze, + k_EPersonaStateLookingToTrade, + k_EPersonaStateLookingToPlay, + k_EPersonaStateInvisible, + k_EPersonaStateMax +} diff --git a/Assembly_Firstpass/Steamworks/EPlayerResult_t.cs b/Assembly_Firstpass/Steamworks/EPlayerResult_t.cs new file mode 100644 index 0000000..22a7ca2 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EPlayerResult_t.cs @@ -0,0 +1,10 @@ +namespace Steamworks; + +public enum EPlayerResult_t +{ + k_EPlayerResultFailedToConnect = 1, + k_EPlayerResultAbandoned, + k_EPlayerResultKicked, + k_EPlayerResultIncomplete, + k_EPlayerResultCompleted +} diff --git a/Assembly_Firstpass/Steamworks/ERegisterActivationCodeResult.cs b/Assembly_Firstpass/Steamworks/ERegisterActivationCodeResult.cs new file mode 100644 index 0000000..3841c0e --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ERegisterActivationCodeResult.cs @@ -0,0 +1,10 @@ +namespace Steamworks; + +public enum ERegisterActivationCodeResult +{ + k_ERegisterActivationCodeResultOK, + k_ERegisterActivationCodeResultFail, + k_ERegisterActivationCodeResultAlreadyRegistered, + k_ERegisterActivationCodeResultTimeout, + k_ERegisterActivationCodeAlreadyOwned +} diff --git a/Assembly_Firstpass/Steamworks/ERemoteStoragePlatform.cs b/Assembly_Firstpass/Steamworks/ERemoteStoragePlatform.cs new file mode 100644 index 0000000..0fdac0e --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ERemoteStoragePlatform.cs @@ -0,0 +1,17 @@ +using System; + +namespace Steamworks; + +[Flags] +public enum ERemoteStoragePlatform +{ + k_ERemoteStoragePlatformNone = 0, + k_ERemoteStoragePlatformWindows = 1, + k_ERemoteStoragePlatformOSX = 2, + k_ERemoteStoragePlatformPS3 = 4, + k_ERemoteStoragePlatformLinux = 8, + k_ERemoteStoragePlatformSwitch = 0x10, + k_ERemoteStoragePlatformAndroid = 0x20, + k_ERemoteStoragePlatformIOS = 0x40, + k_ERemoteStoragePlatformAll = -1 +} diff --git a/Assembly_Firstpass/Steamworks/ERemoteStoragePublishedFileVisibility.cs b/Assembly_Firstpass/Steamworks/ERemoteStoragePublishedFileVisibility.cs new file mode 100644 index 0000000..269e94c --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ERemoteStoragePublishedFileVisibility.cs @@ -0,0 +1,9 @@ +namespace Steamworks; + +public enum ERemoteStoragePublishedFileVisibility +{ + k_ERemoteStoragePublishedFileVisibilityPublic, + k_ERemoteStoragePublishedFileVisibilityFriendsOnly, + k_ERemoteStoragePublishedFileVisibilityPrivate, + k_ERemoteStoragePublishedFileVisibilityUnlisted +} diff --git a/Assembly_Firstpass/Steamworks/EResult.cs b/Assembly_Firstpass/Steamworks/EResult.cs new file mode 100644 index 0000000..69f3af6 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EResult.cs @@ -0,0 +1,124 @@ +namespace Steamworks; + +public enum EResult +{ + k_EResultNone = 0, + k_EResultOK = 1, + k_EResultFail = 2, + k_EResultNoConnection = 3, + k_EResultInvalidPassword = 5, + k_EResultLoggedInElsewhere = 6, + k_EResultInvalidProtocolVer = 7, + k_EResultInvalidParam = 8, + k_EResultFileNotFound = 9, + k_EResultBusy = 10, + k_EResultInvalidState = 11, + k_EResultInvalidName = 12, + k_EResultInvalidEmail = 13, + k_EResultDuplicateName = 14, + k_EResultAccessDenied = 15, + k_EResultTimeout = 16, + k_EResultBanned = 17, + k_EResultAccountNotFound = 18, + k_EResultInvalidSteamID = 19, + k_EResultServiceUnavailable = 20, + k_EResultNotLoggedOn = 21, + k_EResultPending = 22, + k_EResultEncryptionFailure = 23, + k_EResultInsufficientPrivilege = 24, + k_EResultLimitExceeded = 25, + k_EResultRevoked = 26, + k_EResultExpired = 27, + k_EResultAlreadyRedeemed = 28, + k_EResultDuplicateRequest = 29, + k_EResultAlreadyOwned = 30, + k_EResultIPNotFound = 31, + k_EResultPersistFailed = 32, + k_EResultLockingFailed = 33, + k_EResultLogonSessionReplaced = 34, + k_EResultConnectFailed = 35, + k_EResultHandshakeFailed = 36, + k_EResultIOFailure = 37, + k_EResultRemoteDisconnect = 38, + k_EResultShoppingCartNotFound = 39, + k_EResultBlocked = 40, + k_EResultIgnored = 41, + k_EResultNoMatch = 42, + k_EResultAccountDisabled = 43, + k_EResultServiceReadOnly = 44, + k_EResultAccountNotFeatured = 45, + k_EResultAdministratorOK = 46, + k_EResultContentVersion = 47, + k_EResultTryAnotherCM = 48, + k_EResultPasswordRequiredToKickSession = 49, + k_EResultAlreadyLoggedInElsewhere = 50, + k_EResultSuspended = 51, + k_EResultCancelled = 52, + k_EResultDataCorruption = 53, + k_EResultDiskFull = 54, + k_EResultRemoteCallFailed = 55, + k_EResultPasswordUnset = 56, + k_EResultExternalAccountUnlinked = 57, + k_EResultPSNTicketInvalid = 58, + k_EResultExternalAccountAlreadyLinked = 59, + k_EResultRemoteFileConflict = 60, + k_EResultIllegalPassword = 61, + k_EResultSameAsPreviousValue = 62, + k_EResultAccountLogonDenied = 63, + k_EResultCannotUseOldPassword = 64, + k_EResultInvalidLoginAuthCode = 65, + k_EResultAccountLogonDeniedNoMail = 66, + k_EResultHardwareNotCapableOfIPT = 67, + k_EResultIPTInitError = 68, + k_EResultParentalControlRestricted = 69, + k_EResultFacebookQueryError = 70, + k_EResultExpiredLoginAuthCode = 71, + k_EResultIPLoginRestrictionFailed = 72, + k_EResultAccountLockedDown = 73, + k_EResultAccountLogonDeniedVerifiedEmailRequired = 74, + k_EResultNoMatchingURL = 75, + k_EResultBadResponse = 76, + k_EResultRequirePasswordReEntry = 77, + k_EResultValueOutOfRange = 78, + k_EResultUnexpectedError = 79, + k_EResultDisabled = 80, + k_EResultInvalidCEGSubmission = 81, + k_EResultRestrictedDevice = 82, + k_EResultRegionLocked = 83, + k_EResultRateLimitExceeded = 84, + k_EResultAccountLoginDeniedNeedTwoFactor = 85, + k_EResultItemDeleted = 86, + k_EResultAccountLoginDeniedThrottle = 87, + k_EResultTwoFactorCodeMismatch = 88, + k_EResultTwoFactorActivationCodeMismatch = 89, + k_EResultAccountAssociatedToMultiplePartners = 90, + k_EResultNotModified = 91, + k_EResultNoMobileDevice = 92, + k_EResultTimeNotSynced = 93, + k_EResultSmsCodeFailed = 94, + k_EResultAccountLimitExceeded = 95, + k_EResultAccountActivityLimitExceeded = 96, + k_EResultPhoneActivityLimitExceeded = 97, + k_EResultRefundToWallet = 98, + k_EResultEmailSendFailure = 99, + k_EResultNotSettled = 100, + k_EResultNeedCaptcha = 101, + k_EResultGSLTDenied = 102, + k_EResultGSOwnerDenied = 103, + k_EResultInvalidItemType = 104, + k_EResultIPBanned = 105, + k_EResultGSLTExpired = 106, + k_EResultInsufficientFunds = 107, + k_EResultTooManyPending = 108, + k_EResultNoSiteLicensesFound = 109, + k_EResultWGNetworkSendExceeded = 110, + k_EResultAccountNotFriends = 111, + k_EResultLimitedUserAccount = 112, + k_EResultCantRemoveItem = 113, + k_EResultAccountDeleted = 114, + k_EResultExistingUserCancelledLicense = 115, + k_EResultCommunityCooldown = 116, + k_EResultNoLauncherSpecified = 117, + k_EResultMustAgreeToSSA = 118, + k_EResultLauncherMigrated = 119 +} diff --git a/Assembly_Firstpass/Steamworks/ESNetSocketConnectionType.cs b/Assembly_Firstpass/Steamworks/ESNetSocketConnectionType.cs new file mode 100644 index 0000000..3995f31 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ESNetSocketConnectionType.cs @@ -0,0 +1,8 @@ +namespace Steamworks; + +public enum ESNetSocketConnectionType +{ + k_ESNetSocketConnectionTypeNotConnected, + k_ESNetSocketConnectionTypeUDP, + k_ESNetSocketConnectionTypeUDPRelay +} diff --git a/Assembly_Firstpass/Steamworks/ESNetSocketState.cs b/Assembly_Firstpass/Steamworks/ESNetSocketState.cs new file mode 100644 index 0000000..1fb0555 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ESNetSocketState.cs @@ -0,0 +1,16 @@ +namespace Steamworks; + +public enum ESNetSocketState +{ + k_ESNetSocketStateInvalid = 0, + k_ESNetSocketStateConnected = 1, + k_ESNetSocketStateInitiated = 10, + k_ESNetSocketStateLocalCandidatesFound = 11, + k_ESNetSocketStateReceivedRemoteCandidates = 12, + k_ESNetSocketStateChallengeHandshake = 15, + k_ESNetSocketStateDisconnecting = 21, + k_ESNetSocketStateLocalDisconnect = 22, + k_ESNetSocketStateTimeoutDuringConnect = 23, + k_ESNetSocketStateRemoteEndDisconnected = 24, + k_ESNetSocketStateConnectionBroken = 25 +} diff --git a/Assembly_Firstpass/Steamworks/EServerMode.cs b/Assembly_Firstpass/Steamworks/EServerMode.cs new file mode 100644 index 0000000..710ff91 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EServerMode.cs @@ -0,0 +1,9 @@ +namespace Steamworks; + +public enum EServerMode +{ + eServerModeInvalid, + eServerModeNoAuthentication, + eServerModeAuthentication, + eServerModeAuthenticationAndSecure +} diff --git a/Assembly_Firstpass/Steamworks/ESteamAPICallFailure.cs b/Assembly_Firstpass/Steamworks/ESteamAPICallFailure.cs new file mode 100644 index 0000000..c42a310 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ESteamAPICallFailure.cs @@ -0,0 +1,10 @@ +namespace Steamworks; + +public enum ESteamAPICallFailure +{ + k_ESteamAPICallFailureNone = -1, + k_ESteamAPICallFailureSteamGone, + k_ESteamAPICallFailureNetworkFailure, + k_ESteamAPICallFailureInvalidHandle, + k_ESteamAPICallFailureMismatchedCallback +} diff --git a/Assembly_Firstpass/Steamworks/ESteamControllerPad.cs b/Assembly_Firstpass/Steamworks/ESteamControllerPad.cs new file mode 100644 index 0000000..49d51f3 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ESteamControllerPad.cs @@ -0,0 +1,7 @@ +namespace Steamworks; + +public enum ESteamControllerPad +{ + k_ESteamControllerPad_Left, + k_ESteamControllerPad_Right +} diff --git a/Assembly_Firstpass/Steamworks/ESteamDeviceFormFactor.cs b/Assembly_Firstpass/Steamworks/ESteamDeviceFormFactor.cs new file mode 100644 index 0000000..16a24d5 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ESteamDeviceFormFactor.cs @@ -0,0 +1,10 @@ +namespace Steamworks; + +public enum ESteamDeviceFormFactor +{ + k_ESteamDeviceFormFactorUnknown, + k_ESteamDeviceFormFactorPhone, + k_ESteamDeviceFormFactorTablet, + k_ESteamDeviceFormFactorComputer, + k_ESteamDeviceFormFactorTV +} diff --git a/Assembly_Firstpass/Steamworks/ESteamIPType.cs b/Assembly_Firstpass/Steamworks/ESteamIPType.cs new file mode 100644 index 0000000..e882793 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ESteamIPType.cs @@ -0,0 +1,7 @@ +namespace Steamworks; + +public enum ESteamIPType +{ + k_ESteamIPTypeIPv4, + k_ESteamIPTypeIPv6 +} diff --git a/Assembly_Firstpass/Steamworks/ESteamIPv6ConnectivityProtocol.cs b/Assembly_Firstpass/Steamworks/ESteamIPv6ConnectivityProtocol.cs new file mode 100644 index 0000000..5cff476 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ESteamIPv6ConnectivityProtocol.cs @@ -0,0 +1,8 @@ +namespace Steamworks; + +public enum ESteamIPv6ConnectivityProtocol +{ + k_ESteamIPv6ConnectivityProtocol_Invalid, + k_ESteamIPv6ConnectivityProtocol_HTTP, + k_ESteamIPv6ConnectivityProtocol_UDP +} diff --git a/Assembly_Firstpass/Steamworks/ESteamIPv6ConnectivityState.cs b/Assembly_Firstpass/Steamworks/ESteamIPv6ConnectivityState.cs new file mode 100644 index 0000000..f2fcc61 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ESteamIPv6ConnectivityState.cs @@ -0,0 +1,8 @@ +namespace Steamworks; + +public enum ESteamIPv6ConnectivityState +{ + k_ESteamIPv6ConnectivityState_Unknown, + k_ESteamIPv6ConnectivityState_Good, + k_ESteamIPv6ConnectivityState_Bad +} diff --git a/Assembly_Firstpass/Steamworks/ESteamInputLEDFlag.cs b/Assembly_Firstpass/Steamworks/ESteamInputLEDFlag.cs new file mode 100644 index 0000000..d2cb30d --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ESteamInputLEDFlag.cs @@ -0,0 +1,7 @@ +namespace Steamworks; + +public enum ESteamInputLEDFlag +{ + k_ESteamInputLEDFlag_SetColor, + k_ESteamInputLEDFlag_RestoreUserDefault +} diff --git a/Assembly_Firstpass/Steamworks/ESteamInputType.cs b/Assembly_Firstpass/Steamworks/ESteamInputType.cs new file mode 100644 index 0000000..e2592fe --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ESteamInputType.cs @@ -0,0 +1,21 @@ +namespace Steamworks; + +public enum ESteamInputType +{ + k_ESteamInputType_Unknown = 0, + k_ESteamInputType_SteamController = 1, + k_ESteamInputType_XBox360Controller = 2, + k_ESteamInputType_XBoxOneController = 3, + k_ESteamInputType_GenericGamepad = 4, + k_ESteamInputType_PS4Controller = 5, + k_ESteamInputType_AppleMFiController = 6, + k_ESteamInputType_AndroidController = 7, + k_ESteamInputType_SwitchJoyConPair = 8, + k_ESteamInputType_SwitchJoyConSingle = 9, + k_ESteamInputType_SwitchProController = 10, + k_ESteamInputType_MobileTouch = 11, + k_ESteamInputType_PS3Controller = 12, + k_ESteamInputType_PS5Controller = 13, + k_ESteamInputType_Count = 14, + k_ESteamInputType_MaximumPossibleValue = 255 +} diff --git a/Assembly_Firstpass/Steamworks/ESteamItemFlags.cs b/Assembly_Firstpass/Steamworks/ESteamItemFlags.cs new file mode 100644 index 0000000..14f33ed --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ESteamItemFlags.cs @@ -0,0 +1,11 @@ +using System; + +namespace Steamworks; + +[Flags] +public enum ESteamItemFlags +{ + k_ESteamItemNoTrade = 1, + k_ESteamItemRemoved = 0x100, + k_ESteamItemConsumed = 0x200 +} diff --git a/Assembly_Firstpass/Steamworks/ESteamNetConnectionEnd.cs b/Assembly_Firstpass/Steamworks/ESteamNetConnectionEnd.cs new file mode 100644 index 0000000..2f14623 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ESteamNetConnectionEnd.cs @@ -0,0 +1,41 @@ +namespace Steamworks; + +public enum ESteamNetConnectionEnd +{ + k_ESteamNetConnectionEnd_Invalid = 0, + k_ESteamNetConnectionEnd_App_Min = 1000, + k_ESteamNetConnectionEnd_App_Generic = 1000, + k_ESteamNetConnectionEnd_App_Max = 1999, + k_ESteamNetConnectionEnd_AppException_Min = 2000, + k_ESteamNetConnectionEnd_AppException_Generic = 2000, + k_ESteamNetConnectionEnd_AppException_Max = 2999, + k_ESteamNetConnectionEnd_Local_Min = 3000, + k_ESteamNetConnectionEnd_Local_OfflineMode = 3001, + k_ESteamNetConnectionEnd_Local_ManyRelayConnectivity = 3002, + k_ESteamNetConnectionEnd_Local_HostedServerPrimaryRelay = 3003, + k_ESteamNetConnectionEnd_Local_NetworkConfig = 3004, + k_ESteamNetConnectionEnd_Local_Rights = 3005, + k_ESteamNetConnectionEnd_Local_P2P_ICE_NoPublicAddresses = 3006, + k_ESteamNetConnectionEnd_Local_Max = 3999, + k_ESteamNetConnectionEnd_Remote_Min = 4000, + k_ESteamNetConnectionEnd_Remote_Timeout = 4001, + k_ESteamNetConnectionEnd_Remote_BadCrypt = 4002, + k_ESteamNetConnectionEnd_Remote_BadCert = 4003, + k_ESteamNetConnectionEnd_Remote_NotLoggedIn = 4004, + k_ESteamNetConnectionEnd_Remote_NotRunningApp = 4005, + k_ESteamNetConnectionEnd_Remote_BadProtocolVersion = 4006, + k_ESteamNetConnectionEnd_Remote_P2P_ICE_NoPublicAddresses = 4007, + k_ESteamNetConnectionEnd_Remote_Max = 4999, + k_ESteamNetConnectionEnd_Misc_Min = 5000, + k_ESteamNetConnectionEnd_Misc_Generic = 5001, + k_ESteamNetConnectionEnd_Misc_InternalError = 5002, + k_ESteamNetConnectionEnd_Misc_Timeout = 5003, + k_ESteamNetConnectionEnd_Misc_RelayConnectivity = 5004, + k_ESteamNetConnectionEnd_Misc_SteamConnectivity = 5005, + k_ESteamNetConnectionEnd_Misc_NoRelaySessionsToClient = 5006, + k_ESteamNetConnectionEnd_Misc_P2P_Rendezvous = 5008, + k_ESteamNetConnectionEnd_Misc_P2P_NAT_Firewall = 5009, + k_ESteamNetConnectionEnd_Misc_PeerSentNoConnection = 5010, + k_ESteamNetConnectionEnd_Misc_Max = 5999, + k_ESteamNetConnectionEnd__Force32Bit = int.MaxValue +} diff --git a/Assembly_Firstpass/Steamworks/ESteamNetworkingAvailability.cs b/Assembly_Firstpass/Steamworks/ESteamNetworkingAvailability.cs new file mode 100644 index 0000000..68452d7 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ESteamNetworkingAvailability.cs @@ -0,0 +1,15 @@ +namespace Steamworks; + +public enum ESteamNetworkingAvailability +{ + k_ESteamNetworkingAvailability_CannotTry = -102, + k_ESteamNetworkingAvailability_Failed = -101, + k_ESteamNetworkingAvailability_Previously = -100, + k_ESteamNetworkingAvailability_Retrying = -10, + k_ESteamNetworkingAvailability_NeverTried = 1, + k_ESteamNetworkingAvailability_Waiting = 2, + k_ESteamNetworkingAvailability_Attempting = 3, + k_ESteamNetworkingAvailability_Current = 100, + k_ESteamNetworkingAvailability_Unknown = 0, + k_ESteamNetworkingAvailability__Force32bit = int.MaxValue +} diff --git a/Assembly_Firstpass/Steamworks/ESteamNetworkingConfigDataType.cs b/Assembly_Firstpass/Steamworks/ESteamNetworkingConfigDataType.cs new file mode 100644 index 0000000..a10b275 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ESteamNetworkingConfigDataType.cs @@ -0,0 +1,11 @@ +namespace Steamworks; + +public enum ESteamNetworkingConfigDataType +{ + k_ESteamNetworkingConfig_Int32 = 1, + k_ESteamNetworkingConfig_Int64 = 2, + k_ESteamNetworkingConfig_Float = 3, + k_ESteamNetworkingConfig_String = 4, + k_ESteamNetworkingConfig_Ptr = 5, + k_ESteamNetworkingConfigDataType__Force32Bit = int.MaxValue +} diff --git a/Assembly_Firstpass/Steamworks/ESteamNetworkingConfigScope.cs b/Assembly_Firstpass/Steamworks/ESteamNetworkingConfigScope.cs new file mode 100644 index 0000000..cb7ea9e --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ESteamNetworkingConfigScope.cs @@ -0,0 +1,10 @@ +namespace Steamworks; + +public enum ESteamNetworkingConfigScope +{ + k_ESteamNetworkingConfig_Global = 1, + k_ESteamNetworkingConfig_SocketsInterface = 2, + k_ESteamNetworkingConfig_ListenSocket = 3, + k_ESteamNetworkingConfig_Connection = 4, + k_ESteamNetworkingConfigScope__Force32Bit = int.MaxValue +} diff --git a/Assembly_Firstpass/Steamworks/ESteamNetworkingConfigValue.cs b/Assembly_Firstpass/Steamworks/ESteamNetworkingConfigValue.cs new file mode 100644 index 0000000..b425999 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ESteamNetworkingConfigValue.cs @@ -0,0 +1,54 @@ +namespace Steamworks; + +public enum ESteamNetworkingConfigValue +{ + k_ESteamNetworkingConfig_Invalid = 0, + k_ESteamNetworkingConfig_FakePacketLoss_Send = 2, + k_ESteamNetworkingConfig_FakePacketLoss_Recv = 3, + k_ESteamNetworkingConfig_FakePacketLag_Send = 4, + k_ESteamNetworkingConfig_FakePacketLag_Recv = 5, + k_ESteamNetworkingConfig_FakePacketReorder_Send = 6, + k_ESteamNetworkingConfig_FakePacketReorder_Recv = 7, + k_ESteamNetworkingConfig_FakePacketReorder_Time = 8, + k_ESteamNetworkingConfig_FakePacketDup_Send = 26, + k_ESteamNetworkingConfig_FakePacketDup_Recv = 27, + k_ESteamNetworkingConfig_FakePacketDup_TimeMax = 28, + k_ESteamNetworkingConfig_TimeoutInitial = 24, + k_ESteamNetworkingConfig_TimeoutConnected = 25, + k_ESteamNetworkingConfig_SendBufferSize = 9, + k_ESteamNetworkingConfig_SendRateMin = 10, + k_ESteamNetworkingConfig_SendRateMax = 11, + k_ESteamNetworkingConfig_NagleTime = 12, + k_ESteamNetworkingConfig_IP_AllowWithoutAuth = 23, + k_ESteamNetworkingConfig_MTU_PacketSize = 32, + k_ESteamNetworkingConfig_MTU_DataSize = 33, + k_ESteamNetworkingConfig_Unencrypted = 34, + k_ESteamNetworkingConfig_EnumerateDevVars = 35, + k_ESteamNetworkingConfig_SymmetricConnect = 37, + k_ESteamNetworkingConfig_LocalVirtualPort = 38, + k_ESteamNetworkingConfig_Callback_ConnectionStatusChanged = 201, + k_ESteamNetworkingConfig_Callback_AuthStatusChanged = 202, + k_ESteamNetworkingConfig_Callback_RelayNetworkStatusChanged = 203, + k_ESteamNetworkingConfig_Callback_MessagesSessionRequest = 204, + k_ESteamNetworkingConfig_Callback_MessagesSessionFailed = 205, + k_ESteamNetworkingConfig_Callback_CreateConnectionSignaling = 206, + k_ESteamNetworkingConfig_P2P_STUN_ServerList = 103, + k_ESteamNetworkingConfig_P2P_Transport_ICE_Enable = 104, + k_ESteamNetworkingConfig_P2P_Transport_ICE_Penalty = 105, + k_ESteamNetworkingConfig_P2P_Transport_SDR_Penalty = 106, + k_ESteamNetworkingConfig_SDRClient_ConsecutitivePingTimeoutsFailInitial = 19, + k_ESteamNetworkingConfig_SDRClient_ConsecutitivePingTimeoutsFail = 20, + k_ESteamNetworkingConfig_SDRClient_MinPingsBeforePingAccurate = 21, + k_ESteamNetworkingConfig_SDRClient_SingleSocket = 22, + k_ESteamNetworkingConfig_SDRClient_ForceRelayCluster = 29, + k_ESteamNetworkingConfig_SDRClient_DebugTicketAddress = 30, + k_ESteamNetworkingConfig_SDRClient_ForceProxyAddr = 31, + k_ESteamNetworkingConfig_SDRClient_FakeClusterPing = 36, + k_ESteamNetworkingConfig_LogLevel_AckRTT = 13, + k_ESteamNetworkingConfig_LogLevel_PacketDecode = 14, + k_ESteamNetworkingConfig_LogLevel_Message = 15, + k_ESteamNetworkingConfig_LogLevel_PacketGaps = 16, + k_ESteamNetworkingConfig_LogLevel_P2PRendezvous = 17, + k_ESteamNetworkingConfig_LogLevel_SDRRelayPings = 18, + k_ESteamNetworkingConfigValue__Force32Bit = int.MaxValue +} diff --git a/Assembly_Firstpass/Steamworks/ESteamNetworkingConnectionState.cs b/Assembly_Firstpass/Steamworks/ESteamNetworkingConnectionState.cs new file mode 100644 index 0000000..974f9a5 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ESteamNetworkingConnectionState.cs @@ -0,0 +1,15 @@ +namespace Steamworks; + +public enum ESteamNetworkingConnectionState +{ + k_ESteamNetworkingConnectionState_None = 0, + k_ESteamNetworkingConnectionState_Connecting = 1, + k_ESteamNetworkingConnectionState_FindingRoute = 2, + k_ESteamNetworkingConnectionState_Connected = 3, + k_ESteamNetworkingConnectionState_ClosedByPeer = 4, + k_ESteamNetworkingConnectionState_ProblemDetectedLocally = 5, + k_ESteamNetworkingConnectionState_FinWait = -1, + k_ESteamNetworkingConnectionState_Linger = -2, + k_ESteamNetworkingConnectionState_Dead = -3, + k_ESteamNetworkingConnectionState__Force32Bit = int.MaxValue +} diff --git a/Assembly_Firstpass/Steamworks/ESteamNetworkingGetConfigValueResult.cs b/Assembly_Firstpass/Steamworks/ESteamNetworkingGetConfigValueResult.cs new file mode 100644 index 0000000..678077f --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ESteamNetworkingGetConfigValueResult.cs @@ -0,0 +1,11 @@ +namespace Steamworks; + +public enum ESteamNetworkingGetConfigValueResult +{ + k_ESteamNetworkingGetConfigValue_BadValue = -1, + k_ESteamNetworkingGetConfigValue_BadScopeObj = -2, + k_ESteamNetworkingGetConfigValue_BufferTooSmall = -3, + k_ESteamNetworkingGetConfigValue_OK = 1, + k_ESteamNetworkingGetConfigValue_OKInherited = 2, + k_ESteamNetworkingGetConfigValueResult__Force32Bit = int.MaxValue +} diff --git a/Assembly_Firstpass/Steamworks/ESteamNetworkingIdentityType.cs b/Assembly_Firstpass/Steamworks/ESteamNetworkingIdentityType.cs new file mode 100644 index 0000000..d350c48 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ESteamNetworkingIdentityType.cs @@ -0,0 +1,12 @@ +namespace Steamworks; + +public enum ESteamNetworkingIdentityType +{ + k_ESteamNetworkingIdentityType_Invalid = 0, + k_ESteamNetworkingIdentityType_SteamID = 16, + k_ESteamNetworkingIdentityType_IPAddress = 1, + k_ESteamNetworkingIdentityType_GenericString = 2, + k_ESteamNetworkingIdentityType_GenericBytes = 3, + k_ESteamNetworkingIdentityType_UnknownType = 4, + k_ESteamNetworkingIdentityType__Force32bit = int.MaxValue +} diff --git a/Assembly_Firstpass/Steamworks/ESteamNetworkingSocketsDebugOutputType.cs b/Assembly_Firstpass/Steamworks/ESteamNetworkingSocketsDebugOutputType.cs new file mode 100644 index 0000000..ca136a2 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ESteamNetworkingSocketsDebugOutputType.cs @@ -0,0 +1,15 @@ +namespace Steamworks; + +public enum ESteamNetworkingSocketsDebugOutputType +{ + k_ESteamNetworkingSocketsDebugOutputType_None = 0, + k_ESteamNetworkingSocketsDebugOutputType_Bug = 1, + k_ESteamNetworkingSocketsDebugOutputType_Error = 2, + k_ESteamNetworkingSocketsDebugOutputType_Important = 3, + k_ESteamNetworkingSocketsDebugOutputType_Warning = 4, + k_ESteamNetworkingSocketsDebugOutputType_Msg = 5, + k_ESteamNetworkingSocketsDebugOutputType_Verbose = 6, + k_ESteamNetworkingSocketsDebugOutputType_Debug = 7, + k_ESteamNetworkingSocketsDebugOutputType_Everything = 8, + k_ESteamNetworkingSocketsDebugOutputType__Force32Bit = int.MaxValue +} diff --git a/Assembly_Firstpass/Steamworks/ESteamPartyBeaconLocationData.cs b/Assembly_Firstpass/Steamworks/ESteamPartyBeaconLocationData.cs new file mode 100644 index 0000000..9e6efed --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ESteamPartyBeaconLocationData.cs @@ -0,0 +1,10 @@ +namespace Steamworks; + +public enum ESteamPartyBeaconLocationData +{ + k_ESteamPartyBeaconLocationDataInvalid, + k_ESteamPartyBeaconLocationDataName, + k_ESteamPartyBeaconLocationDataIconURLSmall, + k_ESteamPartyBeaconLocationDataIconURLMedium, + k_ESteamPartyBeaconLocationDataIconURLLarge +} diff --git a/Assembly_Firstpass/Steamworks/ESteamPartyBeaconLocationType.cs b/Assembly_Firstpass/Steamworks/ESteamPartyBeaconLocationType.cs new file mode 100644 index 0000000..274b0fe --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ESteamPartyBeaconLocationType.cs @@ -0,0 +1,8 @@ +namespace Steamworks; + +public enum ESteamPartyBeaconLocationType +{ + k_ESteamPartyBeaconLocationType_Invalid, + k_ESteamPartyBeaconLocationType_ChatGroup, + k_ESteamPartyBeaconLocationType_Max +} diff --git a/Assembly_Firstpass/Steamworks/ESteamUserStatType.cs b/Assembly_Firstpass/Steamworks/ESteamUserStatType.cs new file mode 100644 index 0000000..059bb71 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ESteamUserStatType.cs @@ -0,0 +1,12 @@ +namespace Steamworks; + +public enum ESteamUserStatType +{ + k_ESteamUserStatTypeINVALID, + k_ESteamUserStatTypeINT, + k_ESteamUserStatTypeFLOAT, + k_ESteamUserStatTypeAVGRATE, + k_ESteamUserStatTypeACHIEVEMENTS, + k_ESteamUserStatTypeGROUPACHIEVEMENTS, + k_ESteamUserStatTypeMAX +} diff --git a/Assembly_Firstpass/Steamworks/ETextFilteringContext.cs b/Assembly_Firstpass/Steamworks/ETextFilteringContext.cs new file mode 100644 index 0000000..a7cc82c --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ETextFilteringContext.cs @@ -0,0 +1,9 @@ +namespace Steamworks; + +public enum ETextFilteringContext +{ + k_ETextFilteringContextUnknown, + k_ETextFilteringContextGameContent, + k_ETextFilteringContextChat, + k_ETextFilteringContextName +} diff --git a/Assembly_Firstpass/Steamworks/EUGCMatchingUGCType.cs b/Assembly_Firstpass/Steamworks/EUGCMatchingUGCType.cs new file mode 100644 index 0000000..b281167 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EUGCMatchingUGCType.cs @@ -0,0 +1,19 @@ +namespace Steamworks; + +public enum EUGCMatchingUGCType +{ + k_EUGCMatchingUGCType_Items = 0, + k_EUGCMatchingUGCType_Items_Mtx = 1, + k_EUGCMatchingUGCType_Items_ReadyToUse = 2, + k_EUGCMatchingUGCType_Collections = 3, + k_EUGCMatchingUGCType_Artwork = 4, + k_EUGCMatchingUGCType_Videos = 5, + k_EUGCMatchingUGCType_Screenshots = 6, + k_EUGCMatchingUGCType_AllGuides = 7, + k_EUGCMatchingUGCType_WebGuides = 8, + k_EUGCMatchingUGCType_IntegratedGuides = 9, + k_EUGCMatchingUGCType_UsableInGame = 10, + k_EUGCMatchingUGCType_ControllerBindings = 11, + k_EUGCMatchingUGCType_GameManagedItems = 12, + k_EUGCMatchingUGCType_All = -1 +} diff --git a/Assembly_Firstpass/Steamworks/EUGCQuery.cs b/Assembly_Firstpass/Steamworks/EUGCQuery.cs new file mode 100644 index 0000000..0ccacc3 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EUGCQuery.cs @@ -0,0 +1,24 @@ +namespace Steamworks; + +public enum EUGCQuery +{ + k_EUGCQuery_RankedByVote, + k_EUGCQuery_RankedByPublicationDate, + k_EUGCQuery_AcceptedForGameRankedByAcceptanceDate, + k_EUGCQuery_RankedByTrend, + k_EUGCQuery_FavoritedByFriendsRankedByPublicationDate, + k_EUGCQuery_CreatedByFriendsRankedByPublicationDate, + k_EUGCQuery_RankedByNumTimesReported, + k_EUGCQuery_CreatedByFollowedUsersRankedByPublicationDate, + k_EUGCQuery_NotYetRated, + k_EUGCQuery_RankedByTotalVotesAsc, + k_EUGCQuery_RankedByVotesUp, + k_EUGCQuery_RankedByTextSearch, + k_EUGCQuery_RankedByTotalUniqueSubscriptions, + k_EUGCQuery_RankedByPlaytimeTrend, + k_EUGCQuery_RankedByTotalPlaytime, + k_EUGCQuery_RankedByAveragePlaytimeTrend, + k_EUGCQuery_RankedByLifetimeAveragePlaytime, + k_EUGCQuery_RankedByPlaytimeSessionsTrend, + k_EUGCQuery_RankedByLifetimePlaytimeSessions +} diff --git a/Assembly_Firstpass/Steamworks/EUGCReadAction.cs b/Assembly_Firstpass/Steamworks/EUGCReadAction.cs new file mode 100644 index 0000000..d820cd6 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EUGCReadAction.cs @@ -0,0 +1,8 @@ +namespace Steamworks; + +public enum EUGCReadAction +{ + k_EUGCRead_ContinueReadingUntilFinished, + k_EUGCRead_ContinueReading, + k_EUGCRead_Close +} diff --git a/Assembly_Firstpass/Steamworks/EUniverse.cs b/Assembly_Firstpass/Steamworks/EUniverse.cs new file mode 100644 index 0000000..72770b5 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EUniverse.cs @@ -0,0 +1,11 @@ +namespace Steamworks; + +public enum EUniverse +{ + k_EUniverseInvalid, + k_EUniversePublic, + k_EUniverseBeta, + k_EUniverseInternal, + k_EUniverseDev, + k_EUniverseMax +} diff --git a/Assembly_Firstpass/Steamworks/EUserHasLicenseForAppResult.cs b/Assembly_Firstpass/Steamworks/EUserHasLicenseForAppResult.cs new file mode 100644 index 0000000..73899a0 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EUserHasLicenseForAppResult.cs @@ -0,0 +1,8 @@ +namespace Steamworks; + +public enum EUserHasLicenseForAppResult +{ + k_EUserHasLicenseResultHasLicense, + k_EUserHasLicenseResultDoesNotHaveLicense, + k_EUserHasLicenseResultNoAuth +} diff --git a/Assembly_Firstpass/Steamworks/EUserRestriction.cs b/Assembly_Firstpass/Steamworks/EUserRestriction.cs new file mode 100644 index 0000000..9ac7d60 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EUserRestriction.cs @@ -0,0 +1,13 @@ +namespace Steamworks; + +public enum EUserRestriction +{ + k_nUserRestrictionNone = 0, + k_nUserRestrictionUnknown = 1, + k_nUserRestrictionAnyChat = 2, + k_nUserRestrictionVoiceChat = 4, + k_nUserRestrictionGroupChat = 8, + k_nUserRestrictionRating = 0x10, + k_nUserRestrictionGameInvites = 0x20, + k_nUserRestrictionTrading = 0x40 +} diff --git a/Assembly_Firstpass/Steamworks/EUserUGCList.cs b/Assembly_Firstpass/Steamworks/EUserUGCList.cs new file mode 100644 index 0000000..3328ab8 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EUserUGCList.cs @@ -0,0 +1,14 @@ +namespace Steamworks; + +public enum EUserUGCList +{ + k_EUserUGCList_Published, + k_EUserUGCList_VotedOn, + k_EUserUGCList_VotedUp, + k_EUserUGCList_VotedDown, + k_EUserUGCList_WillVoteLater, + k_EUserUGCList_Favorited, + k_EUserUGCList_Subscribed, + k_EUserUGCList_UsedOrPlayed, + k_EUserUGCList_Followed +} diff --git a/Assembly_Firstpass/Steamworks/EUserUGCListSortOrder.cs b/Assembly_Firstpass/Steamworks/EUserUGCListSortOrder.cs new file mode 100644 index 0000000..fdaedb5 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EUserUGCListSortOrder.cs @@ -0,0 +1,12 @@ +namespace Steamworks; + +public enum EUserUGCListSortOrder +{ + k_EUserUGCListSortOrder_CreationOrderDesc, + k_EUserUGCListSortOrder_CreationOrderAsc, + k_EUserUGCListSortOrder_TitleAsc, + k_EUserUGCListSortOrder_LastUpdatedDesc, + k_EUserUGCListSortOrder_SubscriptionDateDesc, + k_EUserUGCListSortOrder_VoteScoreDesc, + k_EUserUGCListSortOrder_ForModeration +} diff --git a/Assembly_Firstpass/Steamworks/EVRHMDType.cs b/Assembly_Firstpass/Steamworks/EVRHMDType.cs new file mode 100644 index 0000000..7c5e76b --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EVRHMDType.cs @@ -0,0 +1,39 @@ +namespace Steamworks; + +public enum EVRHMDType +{ + k_eEVRHMDType_None = -1, + k_eEVRHMDType_Unknown = 0, + k_eEVRHMDType_HTC_Dev = 1, + k_eEVRHMDType_HTC_VivePre = 2, + k_eEVRHMDType_HTC_Vive = 3, + k_eEVRHMDType_HTC_VivePro = 4, + k_eEVRHMDType_HTC_ViveCosmos = 5, + k_eEVRHMDType_HTC_Unknown = 20, + k_eEVRHMDType_Oculus_DK1 = 21, + k_eEVRHMDType_Oculus_DK2 = 22, + k_eEVRHMDType_Oculus_Rift = 23, + k_eEVRHMDType_Oculus_RiftS = 24, + k_eEVRHMDType_Oculus_Quest = 25, + k_eEVRHMDType_Oculus_Unknown = 40, + k_eEVRHMDType_Acer_Unknown = 50, + k_eEVRHMDType_Acer_WindowsMR = 51, + k_eEVRHMDType_Dell_Unknown = 60, + k_eEVRHMDType_Dell_Visor = 61, + k_eEVRHMDType_Lenovo_Unknown = 70, + k_eEVRHMDType_Lenovo_Explorer = 71, + k_eEVRHMDType_HP_Unknown = 80, + k_eEVRHMDType_HP_WindowsMR = 81, + k_eEVRHMDType_HP_Reverb = 82, + k_eEVRHMDType_HP_ReverbG2 = 1463, + k_eEVRHMDType_Samsung_Unknown = 90, + k_eEVRHMDType_Samsung_Odyssey = 91, + k_eEVRHMDType_Unannounced_Unknown = 100, + k_eEVRHMDType_Unannounced_WindowsMR = 101, + k_eEVRHMDType_vridge = 110, + k_eEVRHMDType_Huawei_Unknown = 120, + k_eEVRHMDType_Huawei_VR2 = 121, + k_eEVRHMDType_Huawei_EndOfRange = 129, + k_eEVRHmdType_Valve_Unknown = 130, + k_eEVRHmdType_Valve_Index = 131 +} diff --git a/Assembly_Firstpass/Steamworks/EVRScreenshotType.cs b/Assembly_Firstpass/Steamworks/EVRScreenshotType.cs new file mode 100644 index 0000000..22dabdd --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EVRScreenshotType.cs @@ -0,0 +1,11 @@ +namespace Steamworks; + +public enum EVRScreenshotType +{ + k_EVRScreenshotType_None, + k_EVRScreenshotType_Mono, + k_EVRScreenshotType_Stereo, + k_EVRScreenshotType_MonoCubemap, + k_EVRScreenshotType_MonoPanorama, + k_EVRScreenshotType_StereoPanorama +} diff --git a/Assembly_Firstpass/Steamworks/EVoiceResult.cs b/Assembly_Firstpass/Steamworks/EVoiceResult.cs new file mode 100644 index 0000000..c9ff15b --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EVoiceResult.cs @@ -0,0 +1,15 @@ +namespace Steamworks; + +public enum EVoiceResult +{ + k_EVoiceResultOK, + k_EVoiceResultNotInitialized, + k_EVoiceResultNotRecording, + k_EVoiceResultNoData, + k_EVoiceResultBufferTooSmall, + k_EVoiceResultDataCorrupted, + k_EVoiceResultRestricted, + k_EVoiceResultUnsupportedCodec, + k_EVoiceResultReceiverOutOfDate, + k_EVoiceResultReceiverDidNotAnswer +} diff --git a/Assembly_Firstpass/Steamworks/EWorkshopEnumerationType.cs b/Assembly_Firstpass/Steamworks/EWorkshopEnumerationType.cs new file mode 100644 index 0000000..651642b --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EWorkshopEnumerationType.cs @@ -0,0 +1,12 @@ +namespace Steamworks; + +public enum EWorkshopEnumerationType +{ + k_EWorkshopEnumerationTypeRankedByVote, + k_EWorkshopEnumerationTypeRecent, + k_EWorkshopEnumerationTypeTrending, + k_EWorkshopEnumerationTypeFavoritesOfFriends, + k_EWorkshopEnumerationTypeVotedByFriends, + k_EWorkshopEnumerationTypeContentByFriends, + k_EWorkshopEnumerationTypeRecentFromFollowedUsers +} diff --git a/Assembly_Firstpass/Steamworks/EWorkshopFileAction.cs b/Assembly_Firstpass/Steamworks/EWorkshopFileAction.cs new file mode 100644 index 0000000..8f4d205 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EWorkshopFileAction.cs @@ -0,0 +1,7 @@ +namespace Steamworks; + +public enum EWorkshopFileAction +{ + k_EWorkshopFileActionPlayed, + k_EWorkshopFileActionCompleted +} diff --git a/Assembly_Firstpass/Steamworks/EWorkshopFileType.cs b/Assembly_Firstpass/Steamworks/EWorkshopFileType.cs new file mode 100644 index 0000000..cbc1bf2 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EWorkshopFileType.cs @@ -0,0 +1,23 @@ +namespace Steamworks; + +public enum EWorkshopFileType +{ + k_EWorkshopFileTypeFirst = 0, + k_EWorkshopFileTypeCommunity = 0, + k_EWorkshopFileTypeMicrotransaction = 1, + k_EWorkshopFileTypeCollection = 2, + k_EWorkshopFileTypeArt = 3, + k_EWorkshopFileTypeVideo = 4, + k_EWorkshopFileTypeScreenshot = 5, + k_EWorkshopFileTypeGame = 6, + k_EWorkshopFileTypeSoftware = 7, + k_EWorkshopFileTypeConcept = 8, + k_EWorkshopFileTypeWebGuide = 9, + k_EWorkshopFileTypeIntegratedGuide = 10, + k_EWorkshopFileTypeMerch = 11, + k_EWorkshopFileTypeControllerBinding = 12, + k_EWorkshopFileTypeSteamworksAccessInvite = 13, + k_EWorkshopFileTypeSteamVideo = 14, + k_EWorkshopFileTypeGameManagedItem = 15, + k_EWorkshopFileTypeMax = 16 +} diff --git a/Assembly_Firstpass/Steamworks/EWorkshopVideoProvider.cs b/Assembly_Firstpass/Steamworks/EWorkshopVideoProvider.cs new file mode 100644 index 0000000..da159c1 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EWorkshopVideoProvider.cs @@ -0,0 +1,7 @@ +namespace Steamworks; + +public enum EWorkshopVideoProvider +{ + k_EWorkshopVideoProviderNone, + k_EWorkshopVideoProviderYoutube +} diff --git a/Assembly_Firstpass/Steamworks/EWorkshopVote.cs b/Assembly_Firstpass/Steamworks/EWorkshopVote.cs new file mode 100644 index 0000000..2ce6e9e --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EWorkshopVote.cs @@ -0,0 +1,9 @@ +namespace Steamworks; + +public enum EWorkshopVote +{ + k_EWorkshopVoteUnvoted, + k_EWorkshopVoteFor, + k_EWorkshopVoteAgainst, + k_EWorkshopVoteLater +} diff --git a/Assembly_Firstpass/Steamworks/EXboxOrigin.cs b/Assembly_Firstpass/Steamworks/EXboxOrigin.cs new file mode 100644 index 0000000..ccd884f --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EXboxOrigin.cs @@ -0,0 +1,34 @@ +namespace Steamworks; + +public enum EXboxOrigin +{ + k_EXboxOrigin_A, + k_EXboxOrigin_B, + k_EXboxOrigin_X, + k_EXboxOrigin_Y, + k_EXboxOrigin_LeftBumper, + k_EXboxOrigin_RightBumper, + k_EXboxOrigin_Menu, + k_EXboxOrigin_View, + k_EXboxOrigin_LeftTrigger_Pull, + k_EXboxOrigin_LeftTrigger_Click, + k_EXboxOrigin_RightTrigger_Pull, + k_EXboxOrigin_RightTrigger_Click, + k_EXboxOrigin_LeftStick_Move, + k_EXboxOrigin_LeftStick_Click, + k_EXboxOrigin_LeftStick_DPadNorth, + k_EXboxOrigin_LeftStick_DPadSouth, + k_EXboxOrigin_LeftStick_DPadWest, + k_EXboxOrigin_LeftStick_DPadEast, + k_EXboxOrigin_RightStick_Move, + k_EXboxOrigin_RightStick_Click, + k_EXboxOrigin_RightStick_DPadNorth, + k_EXboxOrigin_RightStick_DPadSouth, + k_EXboxOrigin_RightStick_DPadWest, + k_EXboxOrigin_RightStick_DPadEast, + k_EXboxOrigin_DPad_North, + k_EXboxOrigin_DPad_South, + k_EXboxOrigin_DPad_West, + k_EXboxOrigin_DPad_East, + k_EXboxOrigin_Count +} diff --git a/Assembly_Firstpass/Steamworks/EncryptedAppTicketResponse_t.cs b/Assembly_Firstpass/Steamworks/EncryptedAppTicketResponse_t.cs new file mode 100644 index 0000000..0c0c017 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EncryptedAppTicketResponse_t.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(154)] +public struct EncryptedAppTicketResponse_t +{ + public const int k_iCallback = 154; + + public EResult m_eResult; +} diff --git a/Assembly_Firstpass/Steamworks/EndGameResultCallback_t.cs b/Assembly_Firstpass/Steamworks/EndGameResultCallback_t.cs new file mode 100644 index 0000000..3a2c0e6 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/EndGameResultCallback_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(5215)] +public struct EndGameResultCallback_t +{ + public const int k_iCallback = 5215; + + public EResult m_eResult; + + public ulong ullUniqueGameID; +} diff --git a/Assembly_Firstpass/Steamworks/FSteamNetworkingSocketsDebugOutput.cs b/Assembly_Firstpass/Steamworks/FSteamNetworkingSocketsDebugOutput.cs new file mode 100644 index 0000000..618914b --- /dev/null +++ b/Assembly_Firstpass/Steamworks/FSteamNetworkingSocketsDebugOutput.cs @@ -0,0 +1,7 @@ +using System.Runtime.InteropServices; +using System.Text; + +namespace Steamworks; + +[UnmanagedFunctionPointer(CallingConvention.Cdecl)] +public delegate void FSteamNetworkingSocketsDebugOutput(ESteamNetworkingSocketsDebugOutputType nType, StringBuilder pszMsg); diff --git a/Assembly_Firstpass/Steamworks/FavoritesListAccountsUpdated_t.cs b/Assembly_Firstpass/Steamworks/FavoritesListAccountsUpdated_t.cs new file mode 100644 index 0000000..e54d471 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/FavoritesListAccountsUpdated_t.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(516)] +public struct FavoritesListAccountsUpdated_t +{ + public const int k_iCallback = 516; + + public EResult m_eResult; +} diff --git a/Assembly_Firstpass/Steamworks/FavoritesListChanged_t.cs b/Assembly_Firstpass/Steamworks/FavoritesListChanged_t.cs new file mode 100644 index 0000000..1ba019b --- /dev/null +++ b/Assembly_Firstpass/Steamworks/FavoritesListChanged_t.cs @@ -0,0 +1,25 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(502)] +public struct FavoritesListChanged_t +{ + public const int k_iCallback = 502; + + public uint m_nIP; + + public uint m_nQueryPort; + + public uint m_nConnPort; + + public uint m_nAppID; + + public uint m_nFlags; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bAdd; + + public AccountID_t m_unAccountId; +} diff --git a/Assembly_Firstpass/Steamworks/FileDetailsResult_t.cs b/Assembly_Firstpass/Steamworks/FileDetailsResult_t.cs new file mode 100644 index 0000000..2f87e77 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/FileDetailsResult_t.cs @@ -0,0 +1,19 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1023)] +public struct FileDetailsResult_t +{ + public const int k_iCallback = 1023; + + public EResult m_eResult; + + public ulong m_ulFileSize; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)] + public byte[] m_FileSHA; + + public uint m_unFlags; +} diff --git a/Assembly_Firstpass/Steamworks/FriendGameInfo_t.cs b/Assembly_Firstpass/Steamworks/FriendGameInfo_t.cs new file mode 100644 index 0000000..fc7f51c --- /dev/null +++ b/Assembly_Firstpass/Steamworks/FriendGameInfo_t.cs @@ -0,0 +1,17 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +public struct FriendGameInfo_t +{ + public CGameID m_gameID; + + public uint m_unGameIP; + + public ushort m_usGamePort; + + public ushort m_usQueryPort; + + public CSteamID m_steamIDLobby; +} diff --git a/Assembly_Firstpass/Steamworks/FriendRichPresenceUpdate_t.cs b/Assembly_Firstpass/Steamworks/FriendRichPresenceUpdate_t.cs new file mode 100644 index 0000000..19e0ebf --- /dev/null +++ b/Assembly_Firstpass/Steamworks/FriendRichPresenceUpdate_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 4)] +[CallbackIdentity(336)] +public struct FriendRichPresenceUpdate_t +{ + public const int k_iCallback = 336; + + public CSteamID m_steamIDFriend; + + public AppId_t m_nAppID; +} diff --git a/Assembly_Firstpass/Steamworks/FriendsEnumerateFollowingList_t.cs b/Assembly_Firstpass/Steamworks/FriendsEnumerateFollowingList_t.cs new file mode 100644 index 0000000..9f6487b --- /dev/null +++ b/Assembly_Firstpass/Steamworks/FriendsEnumerateFollowingList_t.cs @@ -0,0 +1,19 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 4)] +[CallbackIdentity(346)] +public struct FriendsEnumerateFollowingList_t +{ + public const int k_iCallback = 346; + + public EResult m_eResult; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50)] + public CSteamID[] m_rgSteamID; + + public int m_nResultsReturned; + + public int m_nTotalResultCount; +} diff --git a/Assembly_Firstpass/Steamworks/FriendsGetFollowerCount_t.cs b/Assembly_Firstpass/Steamworks/FriendsGetFollowerCount_t.cs new file mode 100644 index 0000000..fc17327 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/FriendsGetFollowerCount_t.cs @@ -0,0 +1,16 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 4)] +[CallbackIdentity(344)] +public struct FriendsGetFollowerCount_t +{ + public const int k_iCallback = 344; + + public EResult m_eResult; + + public CSteamID m_steamID; + + public int m_nCount; +} diff --git a/Assembly_Firstpass/Steamworks/FriendsGroupID_t.cs b/Assembly_Firstpass/Steamworks/FriendsGroupID_t.cs new file mode 100644 index 0000000..7de7bd1 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/FriendsGroupID_t.cs @@ -0,0 +1,65 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct FriendsGroupID_t : IEquatable<FriendsGroupID_t>, IComparable<FriendsGroupID_t> +{ + public static readonly FriendsGroupID_t Invalid = new FriendsGroupID_t(-1); + + public short m_FriendsGroupID; + + public FriendsGroupID_t(short value) + { + m_FriendsGroupID = value; + } + + public override string ToString() + { + return m_FriendsGroupID.ToString(); + } + + public override bool Equals(object other) + { + if (other is FriendsGroupID_t) + { + return this == (FriendsGroupID_t)other; + } + return false; + } + + public override int GetHashCode() + { + return m_FriendsGroupID.GetHashCode(); + } + + public static bool operator ==(FriendsGroupID_t x, FriendsGroupID_t y) + { + return x.m_FriendsGroupID == y.m_FriendsGroupID; + } + + public static bool operator !=(FriendsGroupID_t x, FriendsGroupID_t y) + { + return !(x == y); + } + + public static explicit operator FriendsGroupID_t(short value) + { + return new FriendsGroupID_t(value); + } + + public static explicit operator short(FriendsGroupID_t that) + { + return that.m_FriendsGroupID; + } + + public bool Equals(FriendsGroupID_t other) + { + return m_FriendsGroupID == other.m_FriendsGroupID; + } + + public int CompareTo(FriendsGroupID_t other) + { + return m_FriendsGroupID.CompareTo(other.m_FriendsGroupID); + } +} diff --git a/Assembly_Firstpass/Steamworks/FriendsIsFollowing_t.cs b/Assembly_Firstpass/Steamworks/FriendsIsFollowing_t.cs new file mode 100644 index 0000000..f4bf94f --- /dev/null +++ b/Assembly_Firstpass/Steamworks/FriendsIsFollowing_t.cs @@ -0,0 +1,17 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 4)] +[CallbackIdentity(345)] +public struct FriendsIsFollowing_t +{ + public const int k_iCallback = 345; + + public EResult m_eResult; + + public CSteamID m_steamID; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bIsFollowing; +} diff --git a/Assembly_Firstpass/Steamworks/GCMessageAvailable_t.cs b/Assembly_Firstpass/Steamworks/GCMessageAvailable_t.cs new file mode 100644 index 0000000..e4f0f98 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/GCMessageAvailable_t.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1701)] +public struct GCMessageAvailable_t +{ + public const int k_iCallback = 1701; + + public uint m_nMessageSize; +} diff --git a/Assembly_Firstpass/Steamworks/GCMessageFailed_t.cs b/Assembly_Firstpass/Steamworks/GCMessageFailed_t.cs new file mode 100644 index 0000000..4d7bd56 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/GCMessageFailed_t.cs @@ -0,0 +1,10 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8, Size = 1)] +[CallbackIdentity(1702)] +public struct GCMessageFailed_t +{ + public const int k_iCallback = 1702; +} diff --git a/Assembly_Firstpass/Steamworks/GSClientAchievementStatus_t.cs b/Assembly_Firstpass/Steamworks/GSClientAchievementStatus_t.cs new file mode 100644 index 0000000..a47a7f7 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/GSClientAchievementStatus_t.cs @@ -0,0 +1,30 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(206)] +public struct GSClientAchievementStatus_t +{ + public const int k_iCallback = 206; + + public ulong m_SteamID; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] + private byte[] m_pchAchievement_; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bUnlocked; + + public string m_pchAchievement + { + get + { + return InteropHelp.ByteArrayToStringUTF8(m_pchAchievement_); + } + set + { + InteropHelp.StringToByteArrayUTF8(value, m_pchAchievement_, 128); + } + } +} diff --git a/Assembly_Firstpass/Steamworks/GSClientApprove_t.cs b/Assembly_Firstpass/Steamworks/GSClientApprove_t.cs new file mode 100644 index 0000000..84a88b3 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/GSClientApprove_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(201)] +public struct GSClientApprove_t +{ + public const int k_iCallback = 201; + + public CSteamID m_SteamID; + + public CSteamID m_OwnerSteamID; +} diff --git a/Assembly_Firstpass/Steamworks/GSClientDeny_t.cs b/Assembly_Firstpass/Steamworks/GSClientDeny_t.cs new file mode 100644 index 0000000..a2a1854 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/GSClientDeny_t.cs @@ -0,0 +1,29 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 4)] +[CallbackIdentity(202)] +public struct GSClientDeny_t +{ + public const int k_iCallback = 202; + + public CSteamID m_SteamID; + + public EDenyReason m_eDenyReason; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] + private byte[] m_rgchOptionalText_; + + public string m_rgchOptionalText + { + get + { + return InteropHelp.ByteArrayToStringUTF8(m_rgchOptionalText_); + } + set + { + InteropHelp.StringToByteArrayUTF8(value, m_rgchOptionalText_, 128); + } + } +} diff --git a/Assembly_Firstpass/Steamworks/GSClientGroupStatus_t.cs b/Assembly_Firstpass/Steamworks/GSClientGroupStatus_t.cs new file mode 100644 index 0000000..b499c30 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/GSClientGroupStatus_t.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 1)] +[CallbackIdentity(208)] +public struct GSClientGroupStatus_t +{ + public const int k_iCallback = 208; + + public CSteamID m_SteamIDUser; + + public CSteamID m_SteamIDGroup; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bMember; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bOfficer; +} diff --git a/Assembly_Firstpass/Steamworks/GSClientKick_t.cs b/Assembly_Firstpass/Steamworks/GSClientKick_t.cs new file mode 100644 index 0000000..c6a3964 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/GSClientKick_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 4)] +[CallbackIdentity(203)] +public struct GSClientKick_t +{ + public const int k_iCallback = 203; + + public CSteamID m_SteamID; + + public EDenyReason m_eDenyReason; +} diff --git a/Assembly_Firstpass/Steamworks/GSGameplayStats_t.cs b/Assembly_Firstpass/Steamworks/GSGameplayStats_t.cs new file mode 100644 index 0000000..a38cdfd --- /dev/null +++ b/Assembly_Firstpass/Steamworks/GSGameplayStats_t.cs @@ -0,0 +1,18 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(207)] +public struct GSGameplayStats_t +{ + public const int k_iCallback = 207; + + public EResult m_eResult; + + public int m_nRank; + + public uint m_unTotalConnects; + + public uint m_unTotalMinutesPlayed; +} diff --git a/Assembly_Firstpass/Steamworks/GSPolicyResponse_t.cs b/Assembly_Firstpass/Steamworks/GSPolicyResponse_t.cs new file mode 100644 index 0000000..b412c6a --- /dev/null +++ b/Assembly_Firstpass/Steamworks/GSPolicyResponse_t.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(115)] +public struct GSPolicyResponse_t +{ + public const int k_iCallback = 115; + + public byte m_bSecure; +} diff --git a/Assembly_Firstpass/Steamworks/GSReputation_t.cs b/Assembly_Firstpass/Steamworks/GSReputation_t.cs new file mode 100644 index 0000000..44d14cc --- /dev/null +++ b/Assembly_Firstpass/Steamworks/GSReputation_t.cs @@ -0,0 +1,25 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(209)] +public struct GSReputation_t +{ + public const int k_iCallback = 209; + + public EResult m_eResult; + + public uint m_unReputationScore; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bBanned; + + public uint m_unBannedIP; + + public ushort m_usBannedPort; + + public ulong m_ulBannedGameID; + + public uint m_unBanExpires; +} diff --git a/Assembly_Firstpass/Steamworks/GSStatsReceived_t.cs b/Assembly_Firstpass/Steamworks/GSStatsReceived_t.cs new file mode 100644 index 0000000..651d2dd --- /dev/null +++ b/Assembly_Firstpass/Steamworks/GSStatsReceived_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 4)] +[CallbackIdentity(1800)] +public struct GSStatsReceived_t +{ + public const int k_iCallback = 1800; + + public EResult m_eResult; + + public CSteamID m_steamIDUser; +} diff --git a/Assembly_Firstpass/Steamworks/GSStatsStored_t.cs b/Assembly_Firstpass/Steamworks/GSStatsStored_t.cs new file mode 100644 index 0000000..3926e46 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/GSStatsStored_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 4)] +[CallbackIdentity(1801)] +public struct GSStatsStored_t +{ + public const int k_iCallback = 1801; + + public EResult m_eResult; + + public CSteamID m_steamIDUser; +} diff --git a/Assembly_Firstpass/Steamworks/GSStatsUnloaded_t.cs b/Assembly_Firstpass/Steamworks/GSStatsUnloaded_t.cs new file mode 100644 index 0000000..5598a76 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/GSStatsUnloaded_t.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1108)] +public struct GSStatsUnloaded_t +{ + public const int k_iCallback = 1108; + + public CSteamID m_steamIDUser; +} diff --git a/Assembly_Firstpass/Steamworks/GameConnectedChatJoin_t.cs b/Assembly_Firstpass/Steamworks/GameConnectedChatJoin_t.cs new file mode 100644 index 0000000..baaa3a0 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/GameConnectedChatJoin_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(339)] +public struct GameConnectedChatJoin_t +{ + public const int k_iCallback = 339; + + public CSteamID m_steamIDClanChat; + + public CSteamID m_steamIDUser; +} diff --git a/Assembly_Firstpass/Steamworks/GameConnectedChatLeave_t.cs b/Assembly_Firstpass/Steamworks/GameConnectedChatLeave_t.cs new file mode 100644 index 0000000..3f8f927 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/GameConnectedChatLeave_t.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 1)] +[CallbackIdentity(340)] +public struct GameConnectedChatLeave_t +{ + public const int k_iCallback = 340; + + public CSteamID m_steamIDClanChat; + + public CSteamID m_steamIDUser; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bKicked; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bDropped; +} diff --git a/Assembly_Firstpass/Steamworks/GameConnectedClanChatMsg_t.cs b/Assembly_Firstpass/Steamworks/GameConnectedClanChatMsg_t.cs new file mode 100644 index 0000000..6d61251 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/GameConnectedClanChatMsg_t.cs @@ -0,0 +1,16 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 4)] +[CallbackIdentity(338)] +public struct GameConnectedClanChatMsg_t +{ + public const int k_iCallback = 338; + + public CSteamID m_steamIDClanChat; + + public CSteamID m_steamIDUser; + + public int m_iMessageID; +} diff --git a/Assembly_Firstpass/Steamworks/GameConnectedFriendChatMsg_t.cs b/Assembly_Firstpass/Steamworks/GameConnectedFriendChatMsg_t.cs new file mode 100644 index 0000000..eb1f7f8 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/GameConnectedFriendChatMsg_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 4)] +[CallbackIdentity(343)] +public struct GameConnectedFriendChatMsg_t +{ + public const int k_iCallback = 343; + + public CSteamID m_steamIDUser; + + public int m_iMessageID; +} diff --git a/Assembly_Firstpass/Steamworks/GameLobbyJoinRequested_t.cs b/Assembly_Firstpass/Steamworks/GameLobbyJoinRequested_t.cs new file mode 100644 index 0000000..643585e --- /dev/null +++ b/Assembly_Firstpass/Steamworks/GameLobbyJoinRequested_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(333)] +public struct GameLobbyJoinRequested_t +{ + public const int k_iCallback = 333; + + public CSteamID m_steamIDLobby; + + public CSteamID m_steamIDFriend; +} diff --git a/Assembly_Firstpass/Steamworks/GameOverlayActivated_t.cs b/Assembly_Firstpass/Steamworks/GameOverlayActivated_t.cs new file mode 100644 index 0000000..c306e85 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/GameOverlayActivated_t.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(331)] +public struct GameOverlayActivated_t +{ + public const int k_iCallback = 331; + + public byte m_bActive; +} diff --git a/Assembly_Firstpass/Steamworks/GameRichPresenceJoinRequested_t.cs b/Assembly_Firstpass/Steamworks/GameRichPresenceJoinRequested_t.cs new file mode 100644 index 0000000..1828962 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/GameRichPresenceJoinRequested_t.cs @@ -0,0 +1,27 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(337)] +public struct GameRichPresenceJoinRequested_t +{ + public const int k_iCallback = 337; + + public CSteamID m_steamIDFriend; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] + private byte[] m_rgchConnect_; + + public string m_rgchConnect + { + get + { + return InteropHelp.ByteArrayToStringUTF8(m_rgchConnect_); + } + set + { + InteropHelp.StringToByteArrayUTF8(value, m_rgchConnect_, 256); + } + } +} diff --git a/Assembly_Firstpass/Steamworks/GameServer.cs b/Assembly_Firstpass/Steamworks/GameServer.cs new file mode 100644 index 0000000..15cdd44 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/GameServer.cs @@ -0,0 +1,66 @@ +namespace Steamworks; + +public static class GameServer +{ + public static bool Init(uint unIP, ushort usGamePort, ushort usQueryPort, EServerMode eServerMode, string pchVersionString) + { + InteropHelp.TestIfPlatformSupported(); + bool flag; + using (InteropHelp.UTF8StringHandle pchVersionString2 = new InteropHelp.UTF8StringHandle(pchVersionString)) + { + flag = NativeMethods.SteamInternal_GameServer_Init(unIP, 0, usGamePort, usQueryPort, eServerMode, pchVersionString2); + } + if (flag) + { + flag = CSteamGameServerAPIContext.Init(); + } + if (flag) + { + CallbackDispatcher.Initialize(); + } + return flag; + } + + public static void Shutdown() + { + InteropHelp.TestIfPlatformSupported(); + NativeMethods.SteamGameServer_Shutdown(); + CSteamGameServerAPIContext.Clear(); + CallbackDispatcher.Shutdown(); + } + + public static void RunCallbacks() + { + CallbackDispatcher.RunFrame(isGameServer: true); + } + + public static void ReleaseCurrentThreadMemory() + { + InteropHelp.TestIfPlatformSupported(); + NativeMethods.SteamGameServer_ReleaseCurrentThreadMemory(); + } + + public static bool BSecure() + { + InteropHelp.TestIfPlatformSupported(); + return NativeMethods.SteamGameServer_BSecure(); + } + + public static CSteamID GetSteamID() + { + InteropHelp.TestIfPlatformSupported(); + return (CSteamID)NativeMethods.SteamGameServer_GetSteamID(); + } + + public static HSteamPipe GetHSteamPipe() + { + InteropHelp.TestIfPlatformSupported(); + return (HSteamPipe)NativeMethods.SteamGameServer_GetHSteamPipe(); + } + + public static HSteamUser GetHSteamUser() + { + InteropHelp.TestIfPlatformSupported(); + return (HSteamUser)NativeMethods.SteamGameServer_GetHSteamUser(); + } +} diff --git a/Assembly_Firstpass/Steamworks/GameServerChangeRequested_t.cs b/Assembly_Firstpass/Steamworks/GameServerChangeRequested_t.cs new file mode 100644 index 0000000..57a4d47 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/GameServerChangeRequested_t.cs @@ -0,0 +1,40 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(332)] +public struct GameServerChangeRequested_t +{ + public const int k_iCallback = 332; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] + private byte[] m_rgchServer_; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] + private byte[] m_rgchPassword_; + + public string m_rgchServer + { + get + { + return InteropHelp.ByteArrayToStringUTF8(m_rgchServer_); + } + set + { + InteropHelp.StringToByteArrayUTF8(value, m_rgchServer_, 64); + } + } + + public string m_rgchPassword + { + get + { + return InteropHelp.ByteArrayToStringUTF8(m_rgchPassword_); + } + set + { + InteropHelp.StringToByteArrayUTF8(value, m_rgchPassword_, 64); + } + } +} diff --git a/Assembly_Firstpass/Steamworks/GameWebCallback_t.cs b/Assembly_Firstpass/Steamworks/GameWebCallback_t.cs new file mode 100644 index 0000000..4c0f48f --- /dev/null +++ b/Assembly_Firstpass/Steamworks/GameWebCallback_t.cs @@ -0,0 +1,25 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(164)] +public struct GameWebCallback_t +{ + public const int k_iCallback = 164; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] + private byte[] m_szURL_; + + public string m_szURL + { + get + { + return InteropHelp.ByteArrayToStringUTF8(m_szURL_); + } + set + { + InteropHelp.StringToByteArrayUTF8(value, m_szURL_, 256); + } + } +} diff --git a/Assembly_Firstpass/Steamworks/GamepadTextInputDismissed_t.cs b/Assembly_Firstpass/Steamworks/GamepadTextInputDismissed_t.cs new file mode 100644 index 0000000..ba56b19 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/GamepadTextInputDismissed_t.cs @@ -0,0 +1,15 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(714)] +public struct GamepadTextInputDismissed_t +{ + public const int k_iCallback = 714; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bSubmitted; + + public uint m_unSubmittedText; +} diff --git a/Assembly_Firstpass/Steamworks/GetAppDependenciesResult_t.cs b/Assembly_Firstpass/Steamworks/GetAppDependenciesResult_t.cs new file mode 100644 index 0000000..b823154 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/GetAppDependenciesResult_t.cs @@ -0,0 +1,21 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(3416)] +public struct GetAppDependenciesResult_t +{ + public const int k_iCallback = 3416; + + public EResult m_eResult; + + public PublishedFileId_t m_nPublishedFileId; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] + public AppId_t[] m_rgAppIDs; + + public uint m_nNumAppDependencies; + + public uint m_nTotalNumAppDependencies; +} diff --git a/Assembly_Firstpass/Steamworks/GetAuthSessionTicketResponse_t.cs b/Assembly_Firstpass/Steamworks/GetAuthSessionTicketResponse_t.cs new file mode 100644 index 0000000..c4fbc10 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/GetAuthSessionTicketResponse_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(163)] +public struct GetAuthSessionTicketResponse_t +{ + public const int k_iCallback = 163; + + public HAuthTicket m_hAuthTicket; + + public EResult m_eResult; +} diff --git a/Assembly_Firstpass/Steamworks/GetOPFSettingsResult_t.cs b/Assembly_Firstpass/Steamworks/GetOPFSettingsResult_t.cs new file mode 100644 index 0000000..da7623e --- /dev/null +++ b/Assembly_Firstpass/Steamworks/GetOPFSettingsResult_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(4624)] +public struct GetOPFSettingsResult_t +{ + public const int k_iCallback = 4624; + + public EResult m_eResult; + + public AppId_t m_unVideoAppID; +} diff --git a/Assembly_Firstpass/Steamworks/GetUserItemVoteResult_t.cs b/Assembly_Firstpass/Steamworks/GetUserItemVoteResult_t.cs new file mode 100644 index 0000000..d850315 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/GetUserItemVoteResult_t.cs @@ -0,0 +1,23 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(3409)] +public struct GetUserItemVoteResult_t +{ + public const int k_iCallback = 3409; + + public PublishedFileId_t m_nPublishedFileId; + + public EResult m_eResult; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bVotedUp; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bVotedDown; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bVoteSkipped; +} diff --git a/Assembly_Firstpass/Steamworks/GetVideoURLResult_t.cs b/Assembly_Firstpass/Steamworks/GetVideoURLResult_t.cs new file mode 100644 index 0000000..326ef60 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/GetVideoURLResult_t.cs @@ -0,0 +1,29 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(4611)] +public struct GetVideoURLResult_t +{ + public const int k_iCallback = 4611; + + public EResult m_eResult; + + public AppId_t m_unVideoAppID; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] + private byte[] m_rgchURL_; + + public string m_rgchURL + { + get + { + return InteropHelp.ByteArrayToStringUTF8(m_rgchURL_); + } + set + { + InteropHelp.StringToByteArrayUTF8(value, m_rgchURL_, 256); + } + } +} diff --git a/Assembly_Firstpass/Steamworks/GlobalAchievementPercentagesReady_t.cs b/Assembly_Firstpass/Steamworks/GlobalAchievementPercentagesReady_t.cs new file mode 100644 index 0000000..ff444a7 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/GlobalAchievementPercentagesReady_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1110)] +public struct GlobalAchievementPercentagesReady_t +{ + public const int k_iCallback = 1110; + + public ulong m_nGameID; + + public EResult m_eResult; +} diff --git a/Assembly_Firstpass/Steamworks/GlobalStatsReceived_t.cs b/Assembly_Firstpass/Steamworks/GlobalStatsReceived_t.cs new file mode 100644 index 0000000..bc4d9bf --- /dev/null +++ b/Assembly_Firstpass/Steamworks/GlobalStatsReceived_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1112)] +public struct GlobalStatsReceived_t +{ + public const int k_iCallback = 1112; + + public ulong m_nGameID; + + public EResult m_eResult; +} diff --git a/Assembly_Firstpass/Steamworks/HAuthTicket.cs b/Assembly_Firstpass/Steamworks/HAuthTicket.cs new file mode 100644 index 0000000..f7e073b --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HAuthTicket.cs @@ -0,0 +1,65 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct HAuthTicket : IEquatable<HAuthTicket>, IComparable<HAuthTicket> +{ + public static readonly HAuthTicket Invalid = new HAuthTicket(0u); + + public uint m_HAuthTicket; + + public HAuthTicket(uint value) + { + m_HAuthTicket = value; + } + + public override string ToString() + { + return m_HAuthTicket.ToString(); + } + + public override bool Equals(object other) + { + if (other is HAuthTicket) + { + return this == (HAuthTicket)other; + } + return false; + } + + public override int GetHashCode() + { + return m_HAuthTicket.GetHashCode(); + } + + public static bool operator ==(HAuthTicket x, HAuthTicket y) + { + return x.m_HAuthTicket == y.m_HAuthTicket; + } + + public static bool operator !=(HAuthTicket x, HAuthTicket y) + { + return !(x == y); + } + + public static explicit operator HAuthTicket(uint value) + { + return new HAuthTicket(value); + } + + public static explicit operator uint(HAuthTicket that) + { + return that.m_HAuthTicket; + } + + public bool Equals(HAuthTicket other) + { + return m_HAuthTicket == other.m_HAuthTicket; + } + + public int CompareTo(HAuthTicket other) + { + return m_HAuthTicket.CompareTo(other.m_HAuthTicket); + } +} diff --git a/Assembly_Firstpass/Steamworks/HHTMLBrowser.cs b/Assembly_Firstpass/Steamworks/HHTMLBrowser.cs new file mode 100644 index 0000000..d33f5a1 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HHTMLBrowser.cs @@ -0,0 +1,65 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct HHTMLBrowser : IEquatable<HHTMLBrowser>, IComparable<HHTMLBrowser> +{ + public static readonly HHTMLBrowser Invalid = new HHTMLBrowser(0u); + + public uint m_HHTMLBrowser; + + public HHTMLBrowser(uint value) + { + m_HHTMLBrowser = value; + } + + public override string ToString() + { + return m_HHTMLBrowser.ToString(); + } + + public override bool Equals(object other) + { + if (other is HHTMLBrowser) + { + return this == (HHTMLBrowser)other; + } + return false; + } + + public override int GetHashCode() + { + return m_HHTMLBrowser.GetHashCode(); + } + + public static bool operator ==(HHTMLBrowser x, HHTMLBrowser y) + { + return x.m_HHTMLBrowser == y.m_HHTMLBrowser; + } + + public static bool operator !=(HHTMLBrowser x, HHTMLBrowser y) + { + return !(x == y); + } + + public static explicit operator HHTMLBrowser(uint value) + { + return new HHTMLBrowser(value); + } + + public static explicit operator uint(HHTMLBrowser that) + { + return that.m_HHTMLBrowser; + } + + public bool Equals(HHTMLBrowser other) + { + return m_HHTMLBrowser == other.m_HHTMLBrowser; + } + + public int CompareTo(HHTMLBrowser other) + { + return m_HHTMLBrowser.CompareTo(other.m_HHTMLBrowser); + } +} diff --git a/Assembly_Firstpass/Steamworks/HServerListRequest.cs b/Assembly_Firstpass/Steamworks/HServerListRequest.cs new file mode 100644 index 0000000..8bf543c --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HServerListRequest.cs @@ -0,0 +1,60 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct HServerListRequest : IEquatable<HServerListRequest> +{ + public static readonly HServerListRequest Invalid = new HServerListRequest(IntPtr.Zero); + + public IntPtr m_HServerListRequest; + + public HServerListRequest(IntPtr value) + { + m_HServerListRequest = value; + } + + public override string ToString() + { + return m_HServerListRequest.ToString(); + } + + public override bool Equals(object other) + { + if (other is HServerListRequest) + { + return this == (HServerListRequest)other; + } + return false; + } + + public override int GetHashCode() + { + return m_HServerListRequest.GetHashCode(); + } + + public static bool operator ==(HServerListRequest x, HServerListRequest y) + { + return x.m_HServerListRequest == y.m_HServerListRequest; + } + + public static bool operator !=(HServerListRequest x, HServerListRequest y) + { + return !(x == y); + } + + public static explicit operator HServerListRequest(IntPtr value) + { + return new HServerListRequest(value); + } + + public static explicit operator IntPtr(HServerListRequest that) + { + return that.m_HServerListRequest; + } + + public bool Equals(HServerListRequest other) + { + return m_HServerListRequest == other.m_HServerListRequest; + } +} diff --git a/Assembly_Firstpass/Steamworks/HServerQuery.cs b/Assembly_Firstpass/Steamworks/HServerQuery.cs new file mode 100644 index 0000000..6d50299 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HServerQuery.cs @@ -0,0 +1,65 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct HServerQuery : IEquatable<HServerQuery>, IComparable<HServerQuery> +{ + public static readonly HServerQuery Invalid = new HServerQuery(-1); + + public int m_HServerQuery; + + public HServerQuery(int value) + { + m_HServerQuery = value; + } + + public override string ToString() + { + return m_HServerQuery.ToString(); + } + + public override bool Equals(object other) + { + if (other is HServerQuery) + { + return this == (HServerQuery)other; + } + return false; + } + + public override int GetHashCode() + { + return m_HServerQuery.GetHashCode(); + } + + public static bool operator ==(HServerQuery x, HServerQuery y) + { + return x.m_HServerQuery == y.m_HServerQuery; + } + + public static bool operator !=(HServerQuery x, HServerQuery y) + { + return !(x == y); + } + + public static explicit operator HServerQuery(int value) + { + return new HServerQuery(value); + } + + public static explicit operator int(HServerQuery that) + { + return that.m_HServerQuery; + } + + public bool Equals(HServerQuery other) + { + return m_HServerQuery == other.m_HServerQuery; + } + + public int CompareTo(HServerQuery other) + { + return m_HServerQuery.CompareTo(other.m_HServerQuery); + } +} diff --git a/Assembly_Firstpass/Steamworks/HSteamListenSocket.cs b/Assembly_Firstpass/Steamworks/HSteamListenSocket.cs new file mode 100644 index 0000000..04f46b9 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HSteamListenSocket.cs @@ -0,0 +1,65 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct HSteamListenSocket : IEquatable<HSteamListenSocket>, IComparable<HSteamListenSocket> +{ + public static readonly HSteamListenSocket Invalid = new HSteamListenSocket(0u); + + public uint m_HSteamListenSocket; + + public HSteamListenSocket(uint value) + { + m_HSteamListenSocket = value; + } + + public override string ToString() + { + return m_HSteamListenSocket.ToString(); + } + + public override bool Equals(object other) + { + if (other is HSteamListenSocket) + { + return this == (HSteamListenSocket)other; + } + return false; + } + + public override int GetHashCode() + { + return m_HSteamListenSocket.GetHashCode(); + } + + public static bool operator ==(HSteamListenSocket x, HSteamListenSocket y) + { + return x.m_HSteamListenSocket == y.m_HSteamListenSocket; + } + + public static bool operator !=(HSteamListenSocket x, HSteamListenSocket y) + { + return !(x == y); + } + + public static explicit operator HSteamListenSocket(uint value) + { + return new HSteamListenSocket(value); + } + + public static explicit operator uint(HSteamListenSocket that) + { + return that.m_HSteamListenSocket; + } + + public bool Equals(HSteamListenSocket other) + { + return m_HSteamListenSocket == other.m_HSteamListenSocket; + } + + public int CompareTo(HSteamListenSocket other) + { + return m_HSteamListenSocket.CompareTo(other.m_HSteamListenSocket); + } +} diff --git a/Assembly_Firstpass/Steamworks/HSteamNetConnection.cs b/Assembly_Firstpass/Steamworks/HSteamNetConnection.cs new file mode 100644 index 0000000..1630c5f --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HSteamNetConnection.cs @@ -0,0 +1,65 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct HSteamNetConnection : IEquatable<HSteamNetConnection>, IComparable<HSteamNetConnection> +{ + public static readonly HSteamNetConnection Invalid = new HSteamNetConnection(0u); + + public uint m_HSteamNetConnection; + + public HSteamNetConnection(uint value) + { + m_HSteamNetConnection = value; + } + + public override string ToString() + { + return m_HSteamNetConnection.ToString(); + } + + public override bool Equals(object other) + { + if (other is HSteamNetConnection) + { + return this == (HSteamNetConnection)other; + } + return false; + } + + public override int GetHashCode() + { + return m_HSteamNetConnection.GetHashCode(); + } + + public static bool operator ==(HSteamNetConnection x, HSteamNetConnection y) + { + return x.m_HSteamNetConnection == y.m_HSteamNetConnection; + } + + public static bool operator !=(HSteamNetConnection x, HSteamNetConnection y) + { + return !(x == y); + } + + public static explicit operator HSteamNetConnection(uint value) + { + return new HSteamNetConnection(value); + } + + public static explicit operator uint(HSteamNetConnection that) + { + return that.m_HSteamNetConnection; + } + + public bool Equals(HSteamNetConnection other) + { + return m_HSteamNetConnection == other.m_HSteamNetConnection; + } + + public int CompareTo(HSteamNetConnection other) + { + return m_HSteamNetConnection.CompareTo(other.m_HSteamNetConnection); + } +} diff --git a/Assembly_Firstpass/Steamworks/HSteamNetPollGroup.cs b/Assembly_Firstpass/Steamworks/HSteamNetPollGroup.cs new file mode 100644 index 0000000..9f03989 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HSteamNetPollGroup.cs @@ -0,0 +1,65 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct HSteamNetPollGroup : IEquatable<HSteamNetPollGroup>, IComparable<HSteamNetPollGroup> +{ + public static readonly HSteamNetPollGroup Invalid = new HSteamNetPollGroup(0u); + + public uint m_HSteamNetPollGroup; + + public HSteamNetPollGroup(uint value) + { + m_HSteamNetPollGroup = value; + } + + public override string ToString() + { + return m_HSteamNetPollGroup.ToString(); + } + + public override bool Equals(object other) + { + if (other is HSteamNetPollGroup) + { + return this == (HSteamNetPollGroup)other; + } + return false; + } + + public override int GetHashCode() + { + return m_HSteamNetPollGroup.GetHashCode(); + } + + public static bool operator ==(HSteamNetPollGroup x, HSteamNetPollGroup y) + { + return x.m_HSteamNetPollGroup == y.m_HSteamNetPollGroup; + } + + public static bool operator !=(HSteamNetPollGroup x, HSteamNetPollGroup y) + { + return !(x == y); + } + + public static explicit operator HSteamNetPollGroup(uint value) + { + return new HSteamNetPollGroup(value); + } + + public static explicit operator uint(HSteamNetPollGroup that) + { + return that.m_HSteamNetPollGroup; + } + + public bool Equals(HSteamNetPollGroup other) + { + return m_HSteamNetPollGroup == other.m_HSteamNetPollGroup; + } + + public int CompareTo(HSteamNetPollGroup other) + { + return m_HSteamNetPollGroup.CompareTo(other.m_HSteamNetPollGroup); + } +} diff --git a/Assembly_Firstpass/Steamworks/HSteamPipe.cs b/Assembly_Firstpass/Steamworks/HSteamPipe.cs new file mode 100644 index 0000000..8b79afa --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HSteamPipe.cs @@ -0,0 +1,63 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct HSteamPipe : IEquatable<HSteamPipe>, IComparable<HSteamPipe> +{ + public int m_HSteamPipe; + + public HSteamPipe(int value) + { + m_HSteamPipe = value; + } + + public override string ToString() + { + return m_HSteamPipe.ToString(); + } + + public override bool Equals(object other) + { + if (other is HSteamPipe) + { + return this == (HSteamPipe)other; + } + return false; + } + + public override int GetHashCode() + { + return m_HSteamPipe.GetHashCode(); + } + + public static bool operator ==(HSteamPipe x, HSteamPipe y) + { + return x.m_HSteamPipe == y.m_HSteamPipe; + } + + public static bool operator !=(HSteamPipe x, HSteamPipe y) + { + return !(x == y); + } + + public static explicit operator HSteamPipe(int value) + { + return new HSteamPipe(value); + } + + public static explicit operator int(HSteamPipe that) + { + return that.m_HSteamPipe; + } + + public bool Equals(HSteamPipe other) + { + return m_HSteamPipe == other.m_HSteamPipe; + } + + public int CompareTo(HSteamPipe other) + { + return m_HSteamPipe.CompareTo(other.m_HSteamPipe); + } +} diff --git a/Assembly_Firstpass/Steamworks/HSteamUser.cs b/Assembly_Firstpass/Steamworks/HSteamUser.cs new file mode 100644 index 0000000..c90ccd4 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HSteamUser.cs @@ -0,0 +1,63 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct HSteamUser : IEquatable<HSteamUser>, IComparable<HSteamUser> +{ + public int m_HSteamUser; + + public HSteamUser(int value) + { + m_HSteamUser = value; + } + + public override string ToString() + { + return m_HSteamUser.ToString(); + } + + public override bool Equals(object other) + { + if (other is HSteamUser) + { + return this == (HSteamUser)other; + } + return false; + } + + public override int GetHashCode() + { + return m_HSteamUser.GetHashCode(); + } + + public static bool operator ==(HSteamUser x, HSteamUser y) + { + return x.m_HSteamUser == y.m_HSteamUser; + } + + public static bool operator !=(HSteamUser x, HSteamUser y) + { + return !(x == y); + } + + public static explicit operator HSteamUser(int value) + { + return new HSteamUser(value); + } + + public static explicit operator int(HSteamUser that) + { + return that.m_HSteamUser; + } + + public bool Equals(HSteamUser other) + { + return m_HSteamUser == other.m_HSteamUser; + } + + public int CompareTo(HSteamUser other) + { + return m_HSteamUser.CompareTo(other.m_HSteamUser); + } +} diff --git a/Assembly_Firstpass/Steamworks/HTML_BrowserReady_t.cs b/Assembly_Firstpass/Steamworks/HTML_BrowserReady_t.cs new file mode 100644 index 0000000..26dcd90 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HTML_BrowserReady_t.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(4501)] +public struct HTML_BrowserReady_t +{ + public const int k_iCallback = 4501; + + public HHTMLBrowser unBrowserHandle; +} diff --git a/Assembly_Firstpass/Steamworks/HTML_BrowserRestarted_t.cs b/Assembly_Firstpass/Steamworks/HTML_BrowserRestarted_t.cs new file mode 100644 index 0000000..675a5d2 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HTML_BrowserRestarted_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(4527)] +public struct HTML_BrowserRestarted_t +{ + public const int k_iCallback = 4527; + + public HHTMLBrowser unBrowserHandle; + + public HHTMLBrowser unOldBrowserHandle; +} diff --git a/Assembly_Firstpass/Steamworks/HTML_CanGoBackAndForward_t.cs b/Assembly_Firstpass/Steamworks/HTML_CanGoBackAndForward_t.cs new file mode 100644 index 0000000..09f8131 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HTML_CanGoBackAndForward_t.cs @@ -0,0 +1,18 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(4510)] +public struct HTML_CanGoBackAndForward_t +{ + public const int k_iCallback = 4510; + + public HHTMLBrowser unBrowserHandle; + + [MarshalAs(UnmanagedType.I1)] + public bool bCanGoBack; + + [MarshalAs(UnmanagedType.I1)] + public bool bCanGoForward; +} diff --git a/Assembly_Firstpass/Steamworks/HTML_ChangedTitle_t.cs b/Assembly_Firstpass/Steamworks/HTML_ChangedTitle_t.cs new file mode 100644 index 0000000..e60b389 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HTML_ChangedTitle_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(4508)] +public struct HTML_ChangedTitle_t +{ + public const int k_iCallback = 4508; + + public HHTMLBrowser unBrowserHandle; + + public string pchTitle; +} diff --git a/Assembly_Firstpass/Steamworks/HTML_CloseBrowser_t.cs b/Assembly_Firstpass/Steamworks/HTML_CloseBrowser_t.cs new file mode 100644 index 0000000..9cecc77 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HTML_CloseBrowser_t.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(4504)] +public struct HTML_CloseBrowser_t +{ + public const int k_iCallback = 4504; + + public HHTMLBrowser unBrowserHandle; +} diff --git a/Assembly_Firstpass/Steamworks/HTML_FileOpenDialog_t.cs b/Assembly_Firstpass/Steamworks/HTML_FileOpenDialog_t.cs new file mode 100644 index 0000000..9a66014 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HTML_FileOpenDialog_t.cs @@ -0,0 +1,16 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(4516)] +public struct HTML_FileOpenDialog_t +{ + public const int k_iCallback = 4516; + + public HHTMLBrowser unBrowserHandle; + + public string pchTitle; + + public string pchInitialFile; +} diff --git a/Assembly_Firstpass/Steamworks/HTML_FinishedRequest_t.cs b/Assembly_Firstpass/Steamworks/HTML_FinishedRequest_t.cs new file mode 100644 index 0000000..e64410a --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HTML_FinishedRequest_t.cs @@ -0,0 +1,16 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(4506)] +public struct HTML_FinishedRequest_t +{ + public const int k_iCallback = 4506; + + public HHTMLBrowser unBrowserHandle; + + public string pchURL; + + public string pchPageTitle; +} diff --git a/Assembly_Firstpass/Steamworks/HTML_HideToolTip_t.cs b/Assembly_Firstpass/Steamworks/HTML_HideToolTip_t.cs new file mode 100644 index 0000000..e0d2d3b --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HTML_HideToolTip_t.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(4526)] +public struct HTML_HideToolTip_t +{ + public const int k_iCallback = 4526; + + public HHTMLBrowser unBrowserHandle; +} diff --git a/Assembly_Firstpass/Steamworks/HTML_HorizontalScroll_t.cs b/Assembly_Firstpass/Steamworks/HTML_HorizontalScroll_t.cs new file mode 100644 index 0000000..5f541c8 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HTML_HorizontalScroll_t.cs @@ -0,0 +1,23 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(4511)] +public struct HTML_HorizontalScroll_t +{ + public const int k_iCallback = 4511; + + public HHTMLBrowser unBrowserHandle; + + public uint unScrollMax; + + public uint unScrollCurrent; + + public float flPageScale; + + [MarshalAs(UnmanagedType.I1)] + public bool bVisible; + + public uint unPageSize; +} diff --git a/Assembly_Firstpass/Steamworks/HTML_JSAlert_t.cs b/Assembly_Firstpass/Steamworks/HTML_JSAlert_t.cs new file mode 100644 index 0000000..6560c9d --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HTML_JSAlert_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(4514)] +public struct HTML_JSAlert_t +{ + public const int k_iCallback = 4514; + + public HHTMLBrowser unBrowserHandle; + + public string pchMessage; +} diff --git a/Assembly_Firstpass/Steamworks/HTML_JSConfirm_t.cs b/Assembly_Firstpass/Steamworks/HTML_JSConfirm_t.cs new file mode 100644 index 0000000..bdf09be --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HTML_JSConfirm_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(4515)] +public struct HTML_JSConfirm_t +{ + public const int k_iCallback = 4515; + + public HHTMLBrowser unBrowserHandle; + + public string pchMessage; +} diff --git a/Assembly_Firstpass/Steamworks/HTML_LinkAtPosition_t.cs b/Assembly_Firstpass/Steamworks/HTML_LinkAtPosition_t.cs new file mode 100644 index 0000000..fa3d127 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HTML_LinkAtPosition_t.cs @@ -0,0 +1,24 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(4513)] +public struct HTML_LinkAtPosition_t +{ + public const int k_iCallback = 4513; + + public HHTMLBrowser unBrowserHandle; + + public uint x; + + public uint y; + + public string pchURL; + + [MarshalAs(UnmanagedType.I1)] + public bool bInput; + + [MarshalAs(UnmanagedType.I1)] + public bool bLiveLink; +} diff --git a/Assembly_Firstpass/Steamworks/HTML_NeedsPaint_t.cs b/Assembly_Firstpass/Steamworks/HTML_NeedsPaint_t.cs new file mode 100644 index 0000000..06a2d03 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HTML_NeedsPaint_t.cs @@ -0,0 +1,35 @@ +using System; +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(4502)] +public struct HTML_NeedsPaint_t +{ + public const int k_iCallback = 4502; + + public HHTMLBrowser unBrowserHandle; + + public IntPtr pBGRA; + + public uint unWide; + + public uint unTall; + + public uint unUpdateX; + + public uint unUpdateY; + + public uint unUpdateWide; + + public uint unUpdateTall; + + public uint unScrollX; + + public uint unScrollY; + + public float flPageScale; + + public uint unPageSerial; +} diff --git a/Assembly_Firstpass/Steamworks/HTML_NewWindow_t.cs b/Assembly_Firstpass/Steamworks/HTML_NewWindow_t.cs new file mode 100644 index 0000000..5c0f7b1 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HTML_NewWindow_t.cs @@ -0,0 +1,24 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(4521)] +public struct HTML_NewWindow_t +{ + public const int k_iCallback = 4521; + + public HHTMLBrowser unBrowserHandle; + + public string pchURL; + + public uint unX; + + public uint unY; + + public uint unWide; + + public uint unTall; + + public HHTMLBrowser unNewWindow_BrowserHandle_IGNORE; +} diff --git a/Assembly_Firstpass/Steamworks/HTML_OpenLinkInNewTab_t.cs b/Assembly_Firstpass/Steamworks/HTML_OpenLinkInNewTab_t.cs new file mode 100644 index 0000000..55b72ef --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HTML_OpenLinkInNewTab_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(4507)] +public struct HTML_OpenLinkInNewTab_t +{ + public const int k_iCallback = 4507; + + public HHTMLBrowser unBrowserHandle; + + public string pchURL; +} diff --git a/Assembly_Firstpass/Steamworks/HTML_SearchResults_t.cs b/Assembly_Firstpass/Steamworks/HTML_SearchResults_t.cs new file mode 100644 index 0000000..132130b --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HTML_SearchResults_t.cs @@ -0,0 +1,16 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(4509)] +public struct HTML_SearchResults_t +{ + public const int k_iCallback = 4509; + + public HHTMLBrowser unBrowserHandle; + + public uint unResults; + + public uint unCurrentMatch; +} diff --git a/Assembly_Firstpass/Steamworks/HTML_SetCursor_t.cs b/Assembly_Firstpass/Steamworks/HTML_SetCursor_t.cs new file mode 100644 index 0000000..476b654 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HTML_SetCursor_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(4522)] +public struct HTML_SetCursor_t +{ + public const int k_iCallback = 4522; + + public HHTMLBrowser unBrowserHandle; + + public uint eMouseCursor; +} diff --git a/Assembly_Firstpass/Steamworks/HTML_ShowToolTip_t.cs b/Assembly_Firstpass/Steamworks/HTML_ShowToolTip_t.cs new file mode 100644 index 0000000..0483828 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HTML_ShowToolTip_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(4524)] +public struct HTML_ShowToolTip_t +{ + public const int k_iCallback = 4524; + + public HHTMLBrowser unBrowserHandle; + + public string pchMsg; +} diff --git a/Assembly_Firstpass/Steamworks/HTML_StartRequest_t.cs b/Assembly_Firstpass/Steamworks/HTML_StartRequest_t.cs new file mode 100644 index 0000000..1a6bf6b --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HTML_StartRequest_t.cs @@ -0,0 +1,21 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(4503)] +public struct HTML_StartRequest_t +{ + public const int k_iCallback = 4503; + + public HHTMLBrowser unBrowserHandle; + + public string pchURL; + + public string pchTarget; + + public string pchPostData; + + [MarshalAs(UnmanagedType.I1)] + public bool bIsRedirect; +} diff --git a/Assembly_Firstpass/Steamworks/HTML_StatusText_t.cs b/Assembly_Firstpass/Steamworks/HTML_StatusText_t.cs new file mode 100644 index 0000000..a525a79 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HTML_StatusText_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(4523)] +public struct HTML_StatusText_t +{ + public const int k_iCallback = 4523; + + public HHTMLBrowser unBrowserHandle; + + public string pchMsg; +} diff --git a/Assembly_Firstpass/Steamworks/HTML_URLChanged_t.cs b/Assembly_Firstpass/Steamworks/HTML_URLChanged_t.cs new file mode 100644 index 0000000..c8b08fb --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HTML_URLChanged_t.cs @@ -0,0 +1,24 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(4505)] +public struct HTML_URLChanged_t +{ + public const int k_iCallback = 4505; + + public HHTMLBrowser unBrowserHandle; + + public string pchURL; + + public string pchPostData; + + [MarshalAs(UnmanagedType.I1)] + public bool bIsRedirect; + + public string pchPageTitle; + + [MarshalAs(UnmanagedType.I1)] + public bool bNewNavigation; +} diff --git a/Assembly_Firstpass/Steamworks/HTML_UpdateToolTip_t.cs b/Assembly_Firstpass/Steamworks/HTML_UpdateToolTip_t.cs new file mode 100644 index 0000000..d7bbabf --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HTML_UpdateToolTip_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(4525)] +public struct HTML_UpdateToolTip_t +{ + public const int k_iCallback = 4525; + + public HHTMLBrowser unBrowserHandle; + + public string pchMsg; +} diff --git a/Assembly_Firstpass/Steamworks/HTML_VerticalScroll_t.cs b/Assembly_Firstpass/Steamworks/HTML_VerticalScroll_t.cs new file mode 100644 index 0000000..afa5dc1 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HTML_VerticalScroll_t.cs @@ -0,0 +1,23 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(4512)] +public struct HTML_VerticalScroll_t +{ + public const int k_iCallback = 4512; + + public HHTMLBrowser unBrowserHandle; + + public uint unScrollMax; + + public uint unScrollCurrent; + + public float flPageScale; + + [MarshalAs(UnmanagedType.I1)] + public bool bVisible; + + public uint unPageSize; +} diff --git a/Assembly_Firstpass/Steamworks/HTTPCookieContainerHandle.cs b/Assembly_Firstpass/Steamworks/HTTPCookieContainerHandle.cs new file mode 100644 index 0000000..32d0f91 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HTTPCookieContainerHandle.cs @@ -0,0 +1,65 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct HTTPCookieContainerHandle : IEquatable<HTTPCookieContainerHandle>, IComparable<HTTPCookieContainerHandle> +{ + public static readonly HTTPCookieContainerHandle Invalid = new HTTPCookieContainerHandle(0u); + + public uint m_HTTPCookieContainerHandle; + + public HTTPCookieContainerHandle(uint value) + { + m_HTTPCookieContainerHandle = value; + } + + public override string ToString() + { + return m_HTTPCookieContainerHandle.ToString(); + } + + public override bool Equals(object other) + { + if (other is HTTPCookieContainerHandle) + { + return this == (HTTPCookieContainerHandle)other; + } + return false; + } + + public override int GetHashCode() + { + return m_HTTPCookieContainerHandle.GetHashCode(); + } + + public static bool operator ==(HTTPCookieContainerHandle x, HTTPCookieContainerHandle y) + { + return x.m_HTTPCookieContainerHandle == y.m_HTTPCookieContainerHandle; + } + + public static bool operator !=(HTTPCookieContainerHandle x, HTTPCookieContainerHandle y) + { + return !(x == y); + } + + public static explicit operator HTTPCookieContainerHandle(uint value) + { + return new HTTPCookieContainerHandle(value); + } + + public static explicit operator uint(HTTPCookieContainerHandle that) + { + return that.m_HTTPCookieContainerHandle; + } + + public bool Equals(HTTPCookieContainerHandle other) + { + return m_HTTPCookieContainerHandle == other.m_HTTPCookieContainerHandle; + } + + public int CompareTo(HTTPCookieContainerHandle other) + { + return m_HTTPCookieContainerHandle.CompareTo(other.m_HTTPCookieContainerHandle); + } +} diff --git a/Assembly_Firstpass/Steamworks/HTTPRequestCompleted_t.cs b/Assembly_Firstpass/Steamworks/HTTPRequestCompleted_t.cs new file mode 100644 index 0000000..935d212 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HTTPRequestCompleted_t.cs @@ -0,0 +1,21 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(2101)] +public struct HTTPRequestCompleted_t +{ + public const int k_iCallback = 2101; + + public HTTPRequestHandle m_hRequest; + + public ulong m_ulContextValue; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bRequestSuccessful; + + public EHTTPStatusCode m_eStatusCode; + + public uint m_unBodySize; +} diff --git a/Assembly_Firstpass/Steamworks/HTTPRequestDataReceived_t.cs b/Assembly_Firstpass/Steamworks/HTTPRequestDataReceived_t.cs new file mode 100644 index 0000000..0baae1d --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HTTPRequestDataReceived_t.cs @@ -0,0 +1,18 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(2103)] +public struct HTTPRequestDataReceived_t +{ + public const int k_iCallback = 2103; + + public HTTPRequestHandle m_hRequest; + + public ulong m_ulContextValue; + + public uint m_cOffset; + + public uint m_cBytesReceived; +} diff --git a/Assembly_Firstpass/Steamworks/HTTPRequestHandle.cs b/Assembly_Firstpass/Steamworks/HTTPRequestHandle.cs new file mode 100644 index 0000000..fdc133f --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HTTPRequestHandle.cs @@ -0,0 +1,65 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct HTTPRequestHandle : IEquatable<HTTPRequestHandle>, IComparable<HTTPRequestHandle> +{ + public static readonly HTTPRequestHandle Invalid = new HTTPRequestHandle(0u); + + public uint m_HTTPRequestHandle; + + public HTTPRequestHandle(uint value) + { + m_HTTPRequestHandle = value; + } + + public override string ToString() + { + return m_HTTPRequestHandle.ToString(); + } + + public override bool Equals(object other) + { + if (other is HTTPRequestHandle) + { + return this == (HTTPRequestHandle)other; + } + return false; + } + + public override int GetHashCode() + { + return m_HTTPRequestHandle.GetHashCode(); + } + + public static bool operator ==(HTTPRequestHandle x, HTTPRequestHandle y) + { + return x.m_HTTPRequestHandle == y.m_HTTPRequestHandle; + } + + public static bool operator !=(HTTPRequestHandle x, HTTPRequestHandle y) + { + return !(x == y); + } + + public static explicit operator HTTPRequestHandle(uint value) + { + return new HTTPRequestHandle(value); + } + + public static explicit operator uint(HTTPRequestHandle that) + { + return that.m_HTTPRequestHandle; + } + + public bool Equals(HTTPRequestHandle other) + { + return m_HTTPRequestHandle == other.m_HTTPRequestHandle; + } + + public int CompareTo(HTTPRequestHandle other) + { + return m_HTTPRequestHandle.CompareTo(other.m_HTTPRequestHandle); + } +} diff --git a/Assembly_Firstpass/Steamworks/HTTPRequestHeadersReceived_t.cs b/Assembly_Firstpass/Steamworks/HTTPRequestHeadersReceived_t.cs new file mode 100644 index 0000000..d9799ac --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HTTPRequestHeadersReceived_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(2102)] +public struct HTTPRequestHeadersReceived_t +{ + public const int k_iCallback = 2102; + + public HTTPRequestHandle m_hRequest; + + public ulong m_ulContextValue; +} diff --git a/Assembly_Firstpass/Steamworks/IPCFailure_t.cs b/Assembly_Firstpass/Steamworks/IPCFailure_t.cs new file mode 100644 index 0000000..e478092 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/IPCFailure_t.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(117)] +public struct IPCFailure_t +{ + public const int k_iCallback = 117; + + public byte m_eFailureType; +} diff --git a/Assembly_Firstpass/Steamworks/IPCountry_t.cs b/Assembly_Firstpass/Steamworks/IPCountry_t.cs new file mode 100644 index 0000000..6049823 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/IPCountry_t.cs @@ -0,0 +1,10 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8, Size = 1)] +[CallbackIdentity(701)] +public struct IPCountry_t +{ + public const int k_iCallback = 701; +} diff --git a/Assembly_Firstpass/Steamworks/ISteamMatchmakingPingResponse.cs b/Assembly_Firstpass/Steamworks/ISteamMatchmakingPingResponse.cs new file mode 100644 index 0000000..88b91ef --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ISteamMatchmakingPingResponse.cs @@ -0,0 +1,84 @@ +using System; +using System.Runtime.InteropServices; + +namespace Steamworks; + +public class ISteamMatchmakingPingResponse +{ + public delegate void ServerResponded(gameserveritem_t server); + + public delegate void ServerFailedToRespond(); + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void InternalServerResponded(gameserveritem_t server); + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void InternalServerFailedToRespond(); + + [StructLayout(LayoutKind.Sequential)] + private class VTable + { + [NonSerialized] + [MarshalAs(UnmanagedType.FunctionPtr)] + public InternalServerResponded m_VTServerResponded; + + [NonSerialized] + [MarshalAs(UnmanagedType.FunctionPtr)] + public InternalServerFailedToRespond m_VTServerFailedToRespond; + } + + private VTable m_VTable; + + private IntPtr m_pVTable; + + private GCHandle m_pGCHandle; + + private ServerResponded m_ServerResponded; + + private ServerFailedToRespond m_ServerFailedToRespond; + + public ISteamMatchmakingPingResponse(ServerResponded onServerResponded, ServerFailedToRespond onServerFailedToRespond) + { + if (onServerResponded == null || onServerFailedToRespond == null) + { + throw new ArgumentNullException(); + } + m_ServerResponded = onServerResponded; + m_ServerFailedToRespond = onServerFailedToRespond; + m_VTable = new VTable + { + m_VTServerResponded = InternalOnServerResponded, + m_VTServerFailedToRespond = InternalOnServerFailedToRespond + }; + m_pVTable = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(VTable))); + Marshal.StructureToPtr(m_VTable, m_pVTable, fDeleteOld: false); + m_pGCHandle = GCHandle.Alloc(m_pVTable, GCHandleType.Pinned); + } + + ~ISteamMatchmakingPingResponse() + { + if (m_pVTable != IntPtr.Zero) + { + Marshal.FreeHGlobal(m_pVTable); + } + if (m_pGCHandle.IsAllocated) + { + m_pGCHandle.Free(); + } + } + + private void InternalOnServerResponded(gameserveritem_t server) + { + m_ServerResponded(server); + } + + private void InternalOnServerFailedToRespond() + { + m_ServerFailedToRespond(); + } + + public static explicit operator IntPtr(ISteamMatchmakingPingResponse that) + { + return that.m_pGCHandle.AddrOfPinnedObject(); + } +} diff --git a/Assembly_Firstpass/Steamworks/ISteamMatchmakingPlayersResponse.cs b/Assembly_Firstpass/Steamworks/ISteamMatchmakingPlayersResponse.cs new file mode 100644 index 0000000..d243da1 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ISteamMatchmakingPlayersResponse.cs @@ -0,0 +1,102 @@ +using System; +using System.Runtime.InteropServices; + +namespace Steamworks; + +public class ISteamMatchmakingPlayersResponse +{ + public delegate void AddPlayerToList(string pchName, int nScore, float flTimePlayed); + + public delegate void PlayersFailedToRespond(); + + public delegate void PlayersRefreshComplete(); + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + public delegate void InternalAddPlayerToList(IntPtr pchName, int nScore, float flTimePlayed); + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + public delegate void InternalPlayersFailedToRespond(); + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + public delegate void InternalPlayersRefreshComplete(); + + [StructLayout(LayoutKind.Sequential)] + private class VTable + { + [NonSerialized] + [MarshalAs(UnmanagedType.FunctionPtr)] + public InternalAddPlayerToList m_VTAddPlayerToList; + + [NonSerialized] + [MarshalAs(UnmanagedType.FunctionPtr)] + public InternalPlayersFailedToRespond m_VTPlayersFailedToRespond; + + [NonSerialized] + [MarshalAs(UnmanagedType.FunctionPtr)] + public InternalPlayersRefreshComplete m_VTPlayersRefreshComplete; + } + + private VTable m_VTable; + + private IntPtr m_pVTable; + + private GCHandle m_pGCHandle; + + private AddPlayerToList m_AddPlayerToList; + + private PlayersFailedToRespond m_PlayersFailedToRespond; + + private PlayersRefreshComplete m_PlayersRefreshComplete; + + public ISteamMatchmakingPlayersResponse(AddPlayerToList onAddPlayerToList, PlayersFailedToRespond onPlayersFailedToRespond, PlayersRefreshComplete onPlayersRefreshComplete) + { + if (onAddPlayerToList == null || onPlayersFailedToRespond == null || onPlayersRefreshComplete == null) + { + throw new ArgumentNullException(); + } + m_AddPlayerToList = onAddPlayerToList; + m_PlayersFailedToRespond = onPlayersFailedToRespond; + m_PlayersRefreshComplete = onPlayersRefreshComplete; + m_VTable = new VTable + { + m_VTAddPlayerToList = InternalOnAddPlayerToList, + m_VTPlayersFailedToRespond = InternalOnPlayersFailedToRespond, + m_VTPlayersRefreshComplete = InternalOnPlayersRefreshComplete + }; + m_pVTable = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(VTable))); + Marshal.StructureToPtr(m_VTable, m_pVTable, fDeleteOld: false); + m_pGCHandle = GCHandle.Alloc(m_pVTable, GCHandleType.Pinned); + } + + ~ISteamMatchmakingPlayersResponse() + { + if (m_pVTable != IntPtr.Zero) + { + Marshal.FreeHGlobal(m_pVTable); + } + if (m_pGCHandle.IsAllocated) + { + m_pGCHandle.Free(); + } + } + + private void InternalOnAddPlayerToList(IntPtr pchName, int nScore, float flTimePlayed) + { + m_AddPlayerToList(InteropHelp.PtrToStringUTF8(pchName), nScore, flTimePlayed); + } + + private void InternalOnPlayersFailedToRespond() + { + m_PlayersFailedToRespond(); + } + + private void InternalOnPlayersRefreshComplete() + { + m_PlayersRefreshComplete(); + } + + public static explicit operator IntPtr(ISteamMatchmakingPlayersResponse that) + { + return that.m_pGCHandle.AddrOfPinnedObject(); + } +} diff --git a/Assembly_Firstpass/Steamworks/ISteamMatchmakingRulesResponse.cs b/Assembly_Firstpass/Steamworks/ISteamMatchmakingRulesResponse.cs new file mode 100644 index 0000000..b29b777 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ISteamMatchmakingRulesResponse.cs @@ -0,0 +1,102 @@ +using System; +using System.Runtime.InteropServices; + +namespace Steamworks; + +public class ISteamMatchmakingRulesResponse +{ + public delegate void RulesResponded(string pchRule, string pchValue); + + public delegate void RulesFailedToRespond(); + + public delegate void RulesRefreshComplete(); + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + public delegate void InternalRulesResponded(IntPtr pchRule, IntPtr pchValue); + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + public delegate void InternalRulesFailedToRespond(); + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + public delegate void InternalRulesRefreshComplete(); + + [StructLayout(LayoutKind.Sequential)] + private class VTable + { + [NonSerialized] + [MarshalAs(UnmanagedType.FunctionPtr)] + public InternalRulesResponded m_VTRulesResponded; + + [NonSerialized] + [MarshalAs(UnmanagedType.FunctionPtr)] + public InternalRulesFailedToRespond m_VTRulesFailedToRespond; + + [NonSerialized] + [MarshalAs(UnmanagedType.FunctionPtr)] + public InternalRulesRefreshComplete m_VTRulesRefreshComplete; + } + + private VTable m_VTable; + + private IntPtr m_pVTable; + + private GCHandle m_pGCHandle; + + private RulesResponded m_RulesResponded; + + private RulesFailedToRespond m_RulesFailedToRespond; + + private RulesRefreshComplete m_RulesRefreshComplete; + + public ISteamMatchmakingRulesResponse(RulesResponded onRulesResponded, RulesFailedToRespond onRulesFailedToRespond, RulesRefreshComplete onRulesRefreshComplete) + { + if (onRulesResponded == null || onRulesFailedToRespond == null || onRulesRefreshComplete == null) + { + throw new ArgumentNullException(); + } + m_RulesResponded = onRulesResponded; + m_RulesFailedToRespond = onRulesFailedToRespond; + m_RulesRefreshComplete = onRulesRefreshComplete; + m_VTable = new VTable + { + m_VTRulesResponded = InternalOnRulesResponded, + m_VTRulesFailedToRespond = InternalOnRulesFailedToRespond, + m_VTRulesRefreshComplete = InternalOnRulesRefreshComplete + }; + m_pVTable = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(VTable))); + Marshal.StructureToPtr(m_VTable, m_pVTable, fDeleteOld: false); + m_pGCHandle = GCHandle.Alloc(m_pVTable, GCHandleType.Pinned); + } + + ~ISteamMatchmakingRulesResponse() + { + if (m_pVTable != IntPtr.Zero) + { + Marshal.FreeHGlobal(m_pVTable); + } + if (m_pGCHandle.IsAllocated) + { + m_pGCHandle.Free(); + } + } + + private void InternalOnRulesResponded(IntPtr pchRule, IntPtr pchValue) + { + m_RulesResponded(InteropHelp.PtrToStringUTF8(pchRule), InteropHelp.PtrToStringUTF8(pchValue)); + } + + private void InternalOnRulesFailedToRespond() + { + m_RulesFailedToRespond(); + } + + private void InternalOnRulesRefreshComplete() + { + m_RulesRefreshComplete(); + } + + public static explicit operator IntPtr(ISteamMatchmakingRulesResponse that) + { + return that.m_pGCHandle.AddrOfPinnedObject(); + } +} diff --git a/Assembly_Firstpass/Steamworks/ISteamMatchmakingServerListResponse.cs b/Assembly_Firstpass/Steamworks/ISteamMatchmakingServerListResponse.cs new file mode 100644 index 0000000..367aa45 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ISteamMatchmakingServerListResponse.cs @@ -0,0 +1,123 @@ +using System; +using System.Runtime.InteropServices; + +namespace Steamworks; + +public class ISteamMatchmakingServerListResponse +{ + public delegate void ServerResponded(HServerListRequest hRequest, int iServer); + + public delegate void ServerFailedToRespond(HServerListRequest hRequest, int iServer); + + public delegate void RefreshComplete(HServerListRequest hRequest, EMatchMakingServerResponse response); + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void InternalServerResponded(HServerListRequest hRequest, int iServer); + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void InternalServerFailedToRespond(HServerListRequest hRequest, int iServer); + + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void InternalRefreshComplete(HServerListRequest hRequest, EMatchMakingServerResponse response); + + [StructLayout(LayoutKind.Sequential)] + private class VTable + { + [NonSerialized] + [MarshalAs(UnmanagedType.FunctionPtr)] + public InternalServerResponded m_VTServerResponded; + + [NonSerialized] + [MarshalAs(UnmanagedType.FunctionPtr)] + public InternalServerFailedToRespond m_VTServerFailedToRespond; + + [NonSerialized] + [MarshalAs(UnmanagedType.FunctionPtr)] + public InternalRefreshComplete m_VTRefreshComplete; + } + + private VTable m_VTable; + + private IntPtr m_pVTable; + + private GCHandle m_pGCHandle; + + private ServerResponded m_ServerResponded; + + private ServerFailedToRespond m_ServerFailedToRespond; + + private RefreshComplete m_RefreshComplete; + + public ISteamMatchmakingServerListResponse(ServerResponded onServerResponded, ServerFailedToRespond onServerFailedToRespond, RefreshComplete onRefreshComplete) + { + if (onServerResponded == null || onServerFailedToRespond == null || onRefreshComplete == null) + { + throw new ArgumentNullException(); + } + m_ServerResponded = onServerResponded; + m_ServerFailedToRespond = onServerFailedToRespond; + m_RefreshComplete = onRefreshComplete; + m_VTable = new VTable + { + m_VTServerResponded = InternalOnServerResponded, + m_VTServerFailedToRespond = InternalOnServerFailedToRespond, + m_VTRefreshComplete = InternalOnRefreshComplete + }; + m_pVTable = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(VTable))); + Marshal.StructureToPtr(m_VTable, m_pVTable, fDeleteOld: false); + m_pGCHandle = GCHandle.Alloc(m_pVTable, GCHandleType.Pinned); + } + + ~ISteamMatchmakingServerListResponse() + { + if (m_pVTable != IntPtr.Zero) + { + Marshal.FreeHGlobal(m_pVTable); + } + if (m_pGCHandle.IsAllocated) + { + m_pGCHandle.Free(); + } + } + + private void InternalOnServerResponded(HServerListRequest hRequest, int iServer) + { + try + { + m_ServerResponded(hRequest, iServer); + } + catch (Exception e) + { + CallbackDispatcher.ExceptionHandler(e); + } + } + + private void InternalOnServerFailedToRespond(HServerListRequest hRequest, int iServer) + { + try + { + m_ServerFailedToRespond(hRequest, iServer); + } + catch (Exception e) + { + CallbackDispatcher.ExceptionHandler(e); + } + } + + private void InternalOnRefreshComplete(HServerListRequest hRequest, EMatchMakingServerResponse response) + { + try + { + m_RefreshComplete(hRequest, response); + } + catch (Exception e) + { + CallbackDispatcher.ExceptionHandler(e); + } + } + + public static explicit operator IntPtr(ISteamMatchmakingServerListResponse that) + { + return that.m_pGCHandle.AddrOfPinnedObject(); + } +} diff --git a/Assembly_Firstpass/Steamworks/ISteamNetworkingConnectionSignaling.cs b/Assembly_Firstpass/Steamworks/ISteamNetworkingConnectionSignaling.cs new file mode 100644 index 0000000..4e867db --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ISteamNetworkingConnectionSignaling.cs @@ -0,0 +1,17 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct ISteamNetworkingConnectionSignaling +{ + public bool SendSignal(HSteamNetConnection hConn, ref SteamNetConnectionInfo_t info, IntPtr pMsg, int cbMsg) + { + return NativeMethods.SteamAPI_ISteamNetworkingConnectionSignaling_SendSignal(ref this, hConn, ref info, pMsg, cbMsg); + } + + public void Release() + { + NativeMethods.SteamAPI_ISteamNetworkingConnectionSignaling_Release(ref this); + } +} diff --git a/Assembly_Firstpass/Steamworks/ISteamNetworkingSignalingRecvContext.cs b/Assembly_Firstpass/Steamworks/ISteamNetworkingSignalingRecvContext.cs new file mode 100644 index 0000000..bf58e8e --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ISteamNetworkingSignalingRecvContext.cs @@ -0,0 +1,17 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct ISteamNetworkingSignalingRecvContext +{ + public IntPtr OnConnectRequest(HSteamNetConnection hConn, ref SteamNetworkingIdentity identityPeer, int nLocalVirtualPort) + { + return NativeMethods.SteamAPI_ISteamNetworkingSignalingRecvContext_OnConnectRequest(ref this, hConn, ref identityPeer, nLocalVirtualPort); + } + + public void SendRejectionSignal(ref SteamNetworkingIdentity identityPeer, IntPtr pMsg, int cbMsg) + { + NativeMethods.SteamAPI_ISteamNetworkingSignalingRecvContext_SendRejectionSignal(ref this, ref identityPeer, pMsg, cbMsg); + } +} diff --git a/Assembly_Firstpass/Steamworks/InputActionSetHandle_t.cs b/Assembly_Firstpass/Steamworks/InputActionSetHandle_t.cs new file mode 100644 index 0000000..a01161e --- /dev/null +++ b/Assembly_Firstpass/Steamworks/InputActionSetHandle_t.cs @@ -0,0 +1,63 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct InputActionSetHandle_t : IEquatable<InputActionSetHandle_t>, IComparable<InputActionSetHandle_t> +{ + public ulong m_InputActionSetHandle; + + public InputActionSetHandle_t(ulong value) + { + m_InputActionSetHandle = value; + } + + public override string ToString() + { + return m_InputActionSetHandle.ToString(); + } + + public override bool Equals(object other) + { + if (other is InputActionSetHandle_t) + { + return this == (InputActionSetHandle_t)other; + } + return false; + } + + public override int GetHashCode() + { + return m_InputActionSetHandle.GetHashCode(); + } + + public static bool operator ==(InputActionSetHandle_t x, InputActionSetHandle_t y) + { + return x.m_InputActionSetHandle == y.m_InputActionSetHandle; + } + + public static bool operator !=(InputActionSetHandle_t x, InputActionSetHandle_t y) + { + return !(x == y); + } + + public static explicit operator InputActionSetHandle_t(ulong value) + { + return new InputActionSetHandle_t(value); + } + + public static explicit operator ulong(InputActionSetHandle_t that) + { + return that.m_InputActionSetHandle; + } + + public bool Equals(InputActionSetHandle_t other) + { + return m_InputActionSetHandle == other.m_InputActionSetHandle; + } + + public int CompareTo(InputActionSetHandle_t other) + { + return m_InputActionSetHandle.CompareTo(other.m_InputActionSetHandle); + } +} diff --git a/Assembly_Firstpass/Steamworks/InputAnalogActionData_t.cs b/Assembly_Firstpass/Steamworks/InputAnalogActionData_t.cs new file mode 100644 index 0000000..51373d4 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/InputAnalogActionData_t.cs @@ -0,0 +1,15 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 1)] +public struct InputAnalogActionData_t +{ + public EInputSourceMode eMode; + + public float x; + + public float y; + + public byte bActive; +} diff --git a/Assembly_Firstpass/Steamworks/InputAnalogActionHandle_t.cs b/Assembly_Firstpass/Steamworks/InputAnalogActionHandle_t.cs new file mode 100644 index 0000000..49edf15 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/InputAnalogActionHandle_t.cs @@ -0,0 +1,63 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct InputAnalogActionHandle_t : IEquatable<InputAnalogActionHandle_t>, IComparable<InputAnalogActionHandle_t> +{ + public ulong m_InputAnalogActionHandle; + + public InputAnalogActionHandle_t(ulong value) + { + m_InputAnalogActionHandle = value; + } + + public override string ToString() + { + return m_InputAnalogActionHandle.ToString(); + } + + public override bool Equals(object other) + { + if (other is InputAnalogActionHandle_t) + { + return this == (InputAnalogActionHandle_t)other; + } + return false; + } + + public override int GetHashCode() + { + return m_InputAnalogActionHandle.GetHashCode(); + } + + public static bool operator ==(InputAnalogActionHandle_t x, InputAnalogActionHandle_t y) + { + return x.m_InputAnalogActionHandle == y.m_InputAnalogActionHandle; + } + + public static bool operator !=(InputAnalogActionHandle_t x, InputAnalogActionHandle_t y) + { + return !(x == y); + } + + public static explicit operator InputAnalogActionHandle_t(ulong value) + { + return new InputAnalogActionHandle_t(value); + } + + public static explicit operator ulong(InputAnalogActionHandle_t that) + { + return that.m_InputAnalogActionHandle; + } + + public bool Equals(InputAnalogActionHandle_t other) + { + return m_InputAnalogActionHandle == other.m_InputAnalogActionHandle; + } + + public int CompareTo(InputAnalogActionHandle_t other) + { + return m_InputAnalogActionHandle.CompareTo(other.m_InputAnalogActionHandle); + } +} diff --git a/Assembly_Firstpass/Steamworks/InputDigitalActionData_t.cs b/Assembly_Firstpass/Steamworks/InputDigitalActionData_t.cs new file mode 100644 index 0000000..b2f8fd8 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/InputDigitalActionData_t.cs @@ -0,0 +1,11 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 1)] +public struct InputDigitalActionData_t +{ + public byte bState; + + public byte bActive; +} diff --git a/Assembly_Firstpass/Steamworks/InputDigitalActionHandle_t.cs b/Assembly_Firstpass/Steamworks/InputDigitalActionHandle_t.cs new file mode 100644 index 0000000..f83ff9e --- /dev/null +++ b/Assembly_Firstpass/Steamworks/InputDigitalActionHandle_t.cs @@ -0,0 +1,63 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct InputDigitalActionHandle_t : IEquatable<InputDigitalActionHandle_t>, IComparable<InputDigitalActionHandle_t> +{ + public ulong m_InputDigitalActionHandle; + + public InputDigitalActionHandle_t(ulong value) + { + m_InputDigitalActionHandle = value; + } + + public override string ToString() + { + return m_InputDigitalActionHandle.ToString(); + } + + public override bool Equals(object other) + { + if (other is InputDigitalActionHandle_t) + { + return this == (InputDigitalActionHandle_t)other; + } + return false; + } + + public override int GetHashCode() + { + return m_InputDigitalActionHandle.GetHashCode(); + } + + public static bool operator ==(InputDigitalActionHandle_t x, InputDigitalActionHandle_t y) + { + return x.m_InputDigitalActionHandle == y.m_InputDigitalActionHandle; + } + + public static bool operator !=(InputDigitalActionHandle_t x, InputDigitalActionHandle_t y) + { + return !(x == y); + } + + public static explicit operator InputDigitalActionHandle_t(ulong value) + { + return new InputDigitalActionHandle_t(value); + } + + public static explicit operator ulong(InputDigitalActionHandle_t that) + { + return that.m_InputDigitalActionHandle; + } + + public bool Equals(InputDigitalActionHandle_t other) + { + return m_InputDigitalActionHandle == other.m_InputDigitalActionHandle; + } + + public int CompareTo(InputDigitalActionHandle_t other) + { + return m_InputDigitalActionHandle.CompareTo(other.m_InputDigitalActionHandle); + } +} diff --git a/Assembly_Firstpass/Steamworks/InputHandle_t.cs b/Assembly_Firstpass/Steamworks/InputHandle_t.cs new file mode 100644 index 0000000..543276d --- /dev/null +++ b/Assembly_Firstpass/Steamworks/InputHandle_t.cs @@ -0,0 +1,63 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct InputHandle_t : IEquatable<InputHandle_t>, IComparable<InputHandle_t> +{ + public ulong m_InputHandle; + + public InputHandle_t(ulong value) + { + m_InputHandle = value; + } + + public override string ToString() + { + return m_InputHandle.ToString(); + } + + public override bool Equals(object other) + { + if (other is InputHandle_t) + { + return this == (InputHandle_t)other; + } + return false; + } + + public override int GetHashCode() + { + return m_InputHandle.GetHashCode(); + } + + public static bool operator ==(InputHandle_t x, InputHandle_t y) + { + return x.m_InputHandle == y.m_InputHandle; + } + + public static bool operator !=(InputHandle_t x, InputHandle_t y) + { + return !(x == y); + } + + public static explicit operator InputHandle_t(ulong value) + { + return new InputHandle_t(value); + } + + public static explicit operator ulong(InputHandle_t that) + { + return that.m_InputHandle; + } + + public bool Equals(InputHandle_t other) + { + return m_InputHandle == other.m_InputHandle; + } + + public int CompareTo(InputHandle_t other) + { + return m_InputHandle.CompareTo(other.m_InputHandle); + } +} diff --git a/Assembly_Firstpass/Steamworks/InputMotionData_t.cs b/Assembly_Firstpass/Steamworks/InputMotionData_t.cs new file mode 100644 index 0000000..73df748 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/InputMotionData_t.cs @@ -0,0 +1,27 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +public struct InputMotionData_t +{ + public float rotQuatX; + + public float rotQuatY; + + public float rotQuatZ; + + public float rotQuatW; + + public float posAccelX; + + public float posAccelY; + + public float posAccelZ; + + public float rotVelX; + + public float rotVelY; + + public float rotVelZ; +} diff --git a/Assembly_Firstpass/Steamworks/InteropHelp.cs b/Assembly_Firstpass/Steamworks/InteropHelp.cs new file mode 100644 index 0000000..f8bff70 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/InteropHelp.cs @@ -0,0 +1,152 @@ +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Text; +using Microsoft.Win32.SafeHandles; + +namespace Steamworks; + +public class InteropHelp +{ + public class UTF8StringHandle : SafeHandleZeroOrMinusOneIsInvalid + { + public UTF8StringHandle(string str) + : base(ownsHandle: true) + { + if (str == null) + { + SetHandle(IntPtr.Zero); + return; + } + byte[] array = new byte[Encoding.UTF8.GetByteCount(str) + 1]; + Encoding.UTF8.GetBytes(str, 0, str.Length, array, 0); + IntPtr destination = Marshal.AllocHGlobal(array.Length); + Marshal.Copy(array, 0, destination, array.Length); + SetHandle(destination); + } + + protected override bool ReleaseHandle() + { + if (!IsInvalid) + { + Marshal.FreeHGlobal(handle); + } + return true; + } + } + + public class SteamParamStringArray + { + private IntPtr[] m_Strings; + + private IntPtr m_ptrStrings; + + private IntPtr m_pSteamParamStringArray; + + public SteamParamStringArray(IList<string> strings) + { + if (strings == null) + { + m_pSteamParamStringArray = IntPtr.Zero; + return; + } + m_Strings = new IntPtr[strings.Count]; + for (int i = 0; i < strings.Count; i++) + { + byte[] array = new byte[Encoding.UTF8.GetByteCount(strings[i]) + 1]; + Encoding.UTF8.GetBytes(strings[i], 0, strings[i].Length, array, 0); + m_Strings[i] = Marshal.AllocHGlobal(array.Length); + Marshal.Copy(array, 0, m_Strings[i], array.Length); + } + m_ptrStrings = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(IntPtr)) * m_Strings.Length); + SteamParamStringArray_t structure = new SteamParamStringArray_t + { + m_ppStrings = m_ptrStrings, + m_nNumStrings = m_Strings.Length + }; + Marshal.Copy(m_Strings, 0, structure.m_ppStrings, m_Strings.Length); + m_pSteamParamStringArray = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(SteamParamStringArray_t))); + Marshal.StructureToPtr(structure, m_pSteamParamStringArray, fDeleteOld: false); + } + + ~SteamParamStringArray() + { + IntPtr[] strings = m_Strings; + int i = 0; + for (; i < strings.Length; i++) + { + Marshal.FreeHGlobal(strings[i]); + } + if (m_ptrStrings != IntPtr.Zero) + { + Marshal.FreeHGlobal(m_ptrStrings); + } + if (m_pSteamParamStringArray != IntPtr.Zero) + { + Marshal.FreeHGlobal(m_pSteamParamStringArray); + } + } + + public static implicit operator IntPtr(SteamParamStringArray that) + { + return that.m_pSteamParamStringArray; + } + } + + public static void TestIfPlatformSupported() + { + } + + public static void TestIfAvailableClient() + { + TestIfPlatformSupported(); + if (CSteamAPIContext.GetSteamClient() == IntPtr.Zero && !CSteamAPIContext.Init()) + { + throw new InvalidOperationException("Steamworks is not initialized."); + } + } + + public static void TestIfAvailableGameServer() + { + TestIfPlatformSupported(); + if (CSteamGameServerAPIContext.GetSteamClient() == IntPtr.Zero && !CSteamGameServerAPIContext.Init()) + { + throw new InvalidOperationException("Steamworks GameServer is not initialized."); + } + } + + public static string PtrToStringUTF8(IntPtr nativeUtf8) + { + if (nativeUtf8 == IntPtr.Zero) + { + return null; + } + int i; + for (i = 0; Marshal.ReadByte(nativeUtf8, i) != 0; i++) + { + } + if (i == 0) + { + return string.Empty; + } + byte[] array = new byte[i]; + Marshal.Copy(nativeUtf8, array, 0, array.Length); + return Encoding.UTF8.GetString(array); + } + + public static string ByteArrayToStringUTF8(byte[] buffer) + { + int i; + for (i = 0; i < buffer.Length && buffer[i] != 0; i++) + { + } + return Encoding.UTF8.GetString(buffer, 0, i); + } + + public static void StringToByteArrayUTF8(string str, byte[] outArrayBuffer, int outArrayBufferSize) + { + outArrayBuffer = new byte[outArrayBufferSize]; + int bytes = Encoding.UTF8.GetBytes(str, 0, str.Length, outArrayBuffer, 0); + outArrayBuffer[bytes] = 0; + } +} diff --git a/Assembly_Firstpass/Steamworks/ItemInstalled_t.cs b/Assembly_Firstpass/Steamworks/ItemInstalled_t.cs new file mode 100644 index 0000000..7e54dcb --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ItemInstalled_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(3405)] +public struct ItemInstalled_t +{ + public const int k_iCallback = 3405; + + public AppId_t m_unAppID; + + public PublishedFileId_t m_nPublishedFileId; +} diff --git a/Assembly_Firstpass/Steamworks/JoinClanChatRoomCompletionResult_t.cs b/Assembly_Firstpass/Steamworks/JoinClanChatRoomCompletionResult_t.cs new file mode 100644 index 0000000..8485a5a --- /dev/null +++ b/Assembly_Firstpass/Steamworks/JoinClanChatRoomCompletionResult_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 4)] +[CallbackIdentity(342)] +public struct JoinClanChatRoomCompletionResult_t +{ + public const int k_iCallback = 342; + + public CSteamID m_steamIDClanChat; + + public EChatRoomEnterResponse m_eChatRoomEnterResponse; +} diff --git a/Assembly_Firstpass/Steamworks/JoinPartyCallback_t.cs b/Assembly_Firstpass/Steamworks/JoinPartyCallback_t.cs new file mode 100644 index 0000000..768bdbf --- /dev/null +++ b/Assembly_Firstpass/Steamworks/JoinPartyCallback_t.cs @@ -0,0 +1,31 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(5301)] +public struct JoinPartyCallback_t +{ + public const int k_iCallback = 5301; + + public EResult m_eResult; + + public PartyBeaconID_t m_ulBeaconID; + + public CSteamID m_SteamIDBeaconOwner; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] + private byte[] m_rgchConnectString_; + + public string m_rgchConnectString + { + get + { + return InteropHelp.ByteArrayToStringUTF8(m_rgchConnectString_); + } + set + { + InteropHelp.StringToByteArrayUTF8(value, m_rgchConnectString_, 256); + } + } +} diff --git a/Assembly_Firstpass/Steamworks/LeaderboardEntry_t.cs b/Assembly_Firstpass/Steamworks/LeaderboardEntry_t.cs new file mode 100644 index 0000000..9299b84 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/LeaderboardEntry_t.cs @@ -0,0 +1,17 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +public struct LeaderboardEntry_t +{ + public CSteamID m_steamIDUser; + + public int m_nGlobalRank; + + public int m_nScore; + + public int m_cDetails; + + public UGCHandle_t m_hUGC; +} diff --git a/Assembly_Firstpass/Steamworks/LeaderboardFindResult_t.cs b/Assembly_Firstpass/Steamworks/LeaderboardFindResult_t.cs new file mode 100644 index 0000000..5d7ba91 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/LeaderboardFindResult_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1104)] +public struct LeaderboardFindResult_t +{ + public const int k_iCallback = 1104; + + public SteamLeaderboard_t m_hSteamLeaderboard; + + public byte m_bLeaderboardFound; +} diff --git a/Assembly_Firstpass/Steamworks/LeaderboardScoreUploaded_t.cs b/Assembly_Firstpass/Steamworks/LeaderboardScoreUploaded_t.cs new file mode 100644 index 0000000..9be8c4a --- /dev/null +++ b/Assembly_Firstpass/Steamworks/LeaderboardScoreUploaded_t.cs @@ -0,0 +1,22 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1106)] +public struct LeaderboardScoreUploaded_t +{ + public const int k_iCallback = 1106; + + public byte m_bSuccess; + + public SteamLeaderboard_t m_hSteamLeaderboard; + + public int m_nScore; + + public byte m_bScoreChanged; + + public int m_nGlobalRankNew; + + public int m_nGlobalRankPrevious; +} diff --git a/Assembly_Firstpass/Steamworks/LeaderboardScoresDownloaded_t.cs b/Assembly_Firstpass/Steamworks/LeaderboardScoresDownloaded_t.cs new file mode 100644 index 0000000..486bd9a --- /dev/null +++ b/Assembly_Firstpass/Steamworks/LeaderboardScoresDownloaded_t.cs @@ -0,0 +1,16 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1105)] +public struct LeaderboardScoresDownloaded_t +{ + public const int k_iCallback = 1105; + + public SteamLeaderboard_t m_hSteamLeaderboard; + + public SteamLeaderboardEntries_t m_hSteamLeaderboardEntries; + + public int m_cEntryCount; +} diff --git a/Assembly_Firstpass/Steamworks/LeaderboardUGCSet_t.cs b/Assembly_Firstpass/Steamworks/LeaderboardUGCSet_t.cs new file mode 100644 index 0000000..30bec90 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/LeaderboardUGCSet_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1111)] +public struct LeaderboardUGCSet_t +{ + public const int k_iCallback = 1111; + + public EResult m_eResult; + + public SteamLeaderboard_t m_hSteamLeaderboard; +} diff --git a/Assembly_Firstpass/Steamworks/LicensesUpdated_t.cs b/Assembly_Firstpass/Steamworks/LicensesUpdated_t.cs new file mode 100644 index 0000000..a9fd6f5 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/LicensesUpdated_t.cs @@ -0,0 +1,10 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8, Size = 1)] +[CallbackIdentity(125)] +public struct LicensesUpdated_t +{ + public const int k_iCallback = 125; +} diff --git a/Assembly_Firstpass/Steamworks/LobbyChatMsg_t.cs b/Assembly_Firstpass/Steamworks/LobbyChatMsg_t.cs new file mode 100644 index 0000000..99aac97 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/LobbyChatMsg_t.cs @@ -0,0 +1,18 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(507)] +public struct LobbyChatMsg_t +{ + public const int k_iCallback = 507; + + public ulong m_ulSteamIDLobby; + + public ulong m_ulSteamIDUser; + + public byte m_eChatEntryType; + + public uint m_iChatID; +} diff --git a/Assembly_Firstpass/Steamworks/LobbyChatUpdate_t.cs b/Assembly_Firstpass/Steamworks/LobbyChatUpdate_t.cs new file mode 100644 index 0000000..af9be50 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/LobbyChatUpdate_t.cs @@ -0,0 +1,18 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(506)] +public struct LobbyChatUpdate_t +{ + public const int k_iCallback = 506; + + public ulong m_ulSteamIDLobby; + + public ulong m_ulSteamIDUserChanged; + + public ulong m_ulSteamIDMakingChange; + + public uint m_rgfChatMemberStateChange; +} diff --git a/Assembly_Firstpass/Steamworks/LobbyCreated_t.cs b/Assembly_Firstpass/Steamworks/LobbyCreated_t.cs new file mode 100644 index 0000000..a980d50 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/LobbyCreated_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(513)] +public struct LobbyCreated_t +{ + public const int k_iCallback = 513; + + public EResult m_eResult; + + public ulong m_ulSteamIDLobby; +} diff --git a/Assembly_Firstpass/Steamworks/LobbyDataUpdate_t.cs b/Assembly_Firstpass/Steamworks/LobbyDataUpdate_t.cs new file mode 100644 index 0000000..a9ad193 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/LobbyDataUpdate_t.cs @@ -0,0 +1,16 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(505)] +public struct LobbyDataUpdate_t +{ + public const int k_iCallback = 505; + + public ulong m_ulSteamIDLobby; + + public ulong m_ulSteamIDMember; + + public byte m_bSuccess; +} diff --git a/Assembly_Firstpass/Steamworks/LobbyEnter_t.cs b/Assembly_Firstpass/Steamworks/LobbyEnter_t.cs new file mode 100644 index 0000000..eee3827 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/LobbyEnter_t.cs @@ -0,0 +1,19 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(504)] +public struct LobbyEnter_t +{ + public const int k_iCallback = 504; + + public ulong m_ulSteamIDLobby; + + public uint m_rgfChatPermissions; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bLocked; + + public uint m_EChatRoomEnterResponse; +} diff --git a/Assembly_Firstpass/Steamworks/LobbyGameCreated_t.cs b/Assembly_Firstpass/Steamworks/LobbyGameCreated_t.cs new file mode 100644 index 0000000..919ee9e --- /dev/null +++ b/Assembly_Firstpass/Steamworks/LobbyGameCreated_t.cs @@ -0,0 +1,18 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(509)] +public struct LobbyGameCreated_t +{ + public const int k_iCallback = 509; + + public ulong m_ulSteamIDLobby; + + public ulong m_ulSteamIDGameServer; + + public uint m_unIP; + + public ushort m_usPort; +} diff --git a/Assembly_Firstpass/Steamworks/LobbyInvite_t.cs b/Assembly_Firstpass/Steamworks/LobbyInvite_t.cs new file mode 100644 index 0000000..2f7bcd6 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/LobbyInvite_t.cs @@ -0,0 +1,16 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(503)] +public struct LobbyInvite_t +{ + public const int k_iCallback = 503; + + public ulong m_ulSteamIDUser; + + public ulong m_ulSteamIDLobby; + + public ulong m_ulGameID; +} diff --git a/Assembly_Firstpass/Steamworks/LobbyKicked_t.cs b/Assembly_Firstpass/Steamworks/LobbyKicked_t.cs new file mode 100644 index 0000000..9882bb2 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/LobbyKicked_t.cs @@ -0,0 +1,16 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(512)] +public struct LobbyKicked_t +{ + public const int k_iCallback = 512; + + public ulong m_ulSteamIDLobby; + + public ulong m_ulSteamIDAdmin; + + public byte m_bKickedDueToDisconnect; +} diff --git a/Assembly_Firstpass/Steamworks/LobbyMatchList_t.cs b/Assembly_Firstpass/Steamworks/LobbyMatchList_t.cs new file mode 100644 index 0000000..f12573c --- /dev/null +++ b/Assembly_Firstpass/Steamworks/LobbyMatchList_t.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(510)] +public struct LobbyMatchList_t +{ + public const int k_iCallback = 510; + + public uint m_nLobbiesMatching; +} diff --git a/Assembly_Firstpass/Steamworks/LowBatteryPower_t.cs b/Assembly_Firstpass/Steamworks/LowBatteryPower_t.cs new file mode 100644 index 0000000..c8a572e --- /dev/null +++ b/Assembly_Firstpass/Steamworks/LowBatteryPower_t.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(702)] +public struct LowBatteryPower_t +{ + public const int k_iCallback = 702; + + public byte m_nMinutesBatteryLeft; +} diff --git a/Assembly_Firstpass/Steamworks/MMKVPMarshaller.cs b/Assembly_Firstpass/Steamworks/MMKVPMarshaller.cs new file mode 100644 index 0000000..7e73196 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/MMKVPMarshaller.cs @@ -0,0 +1,43 @@ +using System; +using System.Runtime.InteropServices; + +namespace Steamworks; + +public class MMKVPMarshaller +{ + private IntPtr m_pNativeArray; + + private IntPtr m_pArrayEntries; + + public MMKVPMarshaller(MatchMakingKeyValuePair_t[] filters) + { + if (filters != null) + { + int num = Marshal.SizeOf(typeof(MatchMakingKeyValuePair_t)); + m_pNativeArray = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(IntPtr)) * filters.Length); + m_pArrayEntries = Marshal.AllocHGlobal(num * filters.Length); + for (int i = 0; i < filters.Length; i++) + { + Marshal.StructureToPtr(filters[i], new IntPtr(m_pArrayEntries.ToInt64() + i * num), fDeleteOld: false); + } + Marshal.WriteIntPtr(m_pNativeArray, m_pArrayEntries); + } + } + + ~MMKVPMarshaller() + { + if (m_pArrayEntries != IntPtr.Zero) + { + Marshal.FreeHGlobal(m_pArrayEntries); + } + if (m_pNativeArray != IntPtr.Zero) + { + Marshal.FreeHGlobal(m_pNativeArray); + } + } + + public static implicit operator IntPtr(MMKVPMarshaller that) + { + return that.m_pNativeArray; + } +} diff --git a/Assembly_Firstpass/Steamworks/ManifestId_t.cs b/Assembly_Firstpass/Steamworks/ManifestId_t.cs new file mode 100644 index 0000000..6664b9e --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ManifestId_t.cs @@ -0,0 +1,65 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct ManifestId_t : IEquatable<ManifestId_t>, IComparable<ManifestId_t> +{ + public static readonly ManifestId_t Invalid = new ManifestId_t(0uL); + + public ulong m_ManifestId; + + public ManifestId_t(ulong value) + { + m_ManifestId = value; + } + + public override string ToString() + { + return m_ManifestId.ToString(); + } + + public override bool Equals(object other) + { + if (other is ManifestId_t) + { + return this == (ManifestId_t)other; + } + return false; + } + + public override int GetHashCode() + { + return m_ManifestId.GetHashCode(); + } + + public static bool operator ==(ManifestId_t x, ManifestId_t y) + { + return x.m_ManifestId == y.m_ManifestId; + } + + public static bool operator !=(ManifestId_t x, ManifestId_t y) + { + return !(x == y); + } + + public static explicit operator ManifestId_t(ulong value) + { + return new ManifestId_t(value); + } + + public static explicit operator ulong(ManifestId_t that) + { + return that.m_ManifestId; + } + + public bool Equals(ManifestId_t other) + { + return m_ManifestId == other.m_ManifestId; + } + + public int CompareTo(ManifestId_t other) + { + return m_ManifestId.CompareTo(other.m_ManifestId); + } +} diff --git a/Assembly_Firstpass/Steamworks/MarketEligibilityResponse_t.cs b/Assembly_Firstpass/Steamworks/MarketEligibilityResponse_t.cs new file mode 100644 index 0000000..3df8b3b --- /dev/null +++ b/Assembly_Firstpass/Steamworks/MarketEligibilityResponse_t.cs @@ -0,0 +1,21 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(166)] +public struct MarketEligibilityResponse_t +{ + public const int k_iCallback = 166; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bAllowed; + + public EMarketNotAllowedReasonFlags m_eNotAllowedReason; + + public RTime32 m_rtAllowedAtTime; + + public int m_cdaySteamGuardRequiredDays; + + public int m_cdayNewDeviceCooldown; +} diff --git a/Assembly_Firstpass/Steamworks/MatchMakingKeyValuePair_t.cs b/Assembly_Firstpass/Steamworks/MatchMakingKeyValuePair_t.cs new file mode 100644 index 0000000..fa6d768 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/MatchMakingKeyValuePair_t.cs @@ -0,0 +1,18 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +public struct MatchMakingKeyValuePair_t +{ + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] + public string m_szKey; + + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] + public string m_szValue; + + private MatchMakingKeyValuePair_t(string strKey, string strValue) + { + m_szKey = strKey; + m_szValue = strValue; + } +} diff --git a/Assembly_Firstpass/Steamworks/MicroTxnAuthorizationResponse_t.cs b/Assembly_Firstpass/Steamworks/MicroTxnAuthorizationResponse_t.cs new file mode 100644 index 0000000..6b25f9b --- /dev/null +++ b/Assembly_Firstpass/Steamworks/MicroTxnAuthorizationResponse_t.cs @@ -0,0 +1,16 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(152)] +public struct MicroTxnAuthorizationResponse_t +{ + public const int k_iCallback = 152; + + public uint m_unAppID; + + public ulong m_ulOrderID; + + public byte m_bAuthorized; +} diff --git a/Assembly_Firstpass/Steamworks/MusicPlayerRemoteToFront_t.cs b/Assembly_Firstpass/Steamworks/MusicPlayerRemoteToFront_t.cs new file mode 100644 index 0000000..1c7c82a --- /dev/null +++ b/Assembly_Firstpass/Steamworks/MusicPlayerRemoteToFront_t.cs @@ -0,0 +1,10 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8, Size = 1)] +[CallbackIdentity(4103)] +public struct MusicPlayerRemoteToFront_t +{ + public const int k_iCallback = 4103; +} diff --git a/Assembly_Firstpass/Steamworks/MusicPlayerRemoteWillActivate_t.cs b/Assembly_Firstpass/Steamworks/MusicPlayerRemoteWillActivate_t.cs new file mode 100644 index 0000000..0f7a083 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/MusicPlayerRemoteWillActivate_t.cs @@ -0,0 +1,10 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8, Size = 1)] +[CallbackIdentity(4101)] +public struct MusicPlayerRemoteWillActivate_t +{ + public const int k_iCallback = 4101; +} diff --git a/Assembly_Firstpass/Steamworks/MusicPlayerRemoteWillDeactivate_t.cs b/Assembly_Firstpass/Steamworks/MusicPlayerRemoteWillDeactivate_t.cs new file mode 100644 index 0000000..2f693d5 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/MusicPlayerRemoteWillDeactivate_t.cs @@ -0,0 +1,10 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8, Size = 1)] +[CallbackIdentity(4102)] +public struct MusicPlayerRemoteWillDeactivate_t +{ + public const int k_iCallback = 4102; +} diff --git a/Assembly_Firstpass/Steamworks/MusicPlayerSelectsPlaylistEntry_t.cs b/Assembly_Firstpass/Steamworks/MusicPlayerSelectsPlaylistEntry_t.cs new file mode 100644 index 0000000..89d4750 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/MusicPlayerSelectsPlaylistEntry_t.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(4013)] +public struct MusicPlayerSelectsPlaylistEntry_t +{ + public const int k_iCallback = 4013; + + public int nID; +} diff --git a/Assembly_Firstpass/Steamworks/MusicPlayerSelectsQueueEntry_t.cs b/Assembly_Firstpass/Steamworks/MusicPlayerSelectsQueueEntry_t.cs new file mode 100644 index 0000000..74f0085 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/MusicPlayerSelectsQueueEntry_t.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(4012)] +public struct MusicPlayerSelectsQueueEntry_t +{ + public const int k_iCallback = 4012; + + public int nID; +} diff --git a/Assembly_Firstpass/Steamworks/MusicPlayerWantsLooped_t.cs b/Assembly_Firstpass/Steamworks/MusicPlayerWantsLooped_t.cs new file mode 100644 index 0000000..970082c --- /dev/null +++ b/Assembly_Firstpass/Steamworks/MusicPlayerWantsLooped_t.cs @@ -0,0 +1,13 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(4110)] +public struct MusicPlayerWantsLooped_t +{ + public const int k_iCallback = 4110; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bLooped; +} diff --git a/Assembly_Firstpass/Steamworks/MusicPlayerWantsPause_t.cs b/Assembly_Firstpass/Steamworks/MusicPlayerWantsPause_t.cs new file mode 100644 index 0000000..8ad9c77 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/MusicPlayerWantsPause_t.cs @@ -0,0 +1,10 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8, Size = 1)] +[CallbackIdentity(4106)] +public struct MusicPlayerWantsPause_t +{ + public const int k_iCallback = 4106; +} diff --git a/Assembly_Firstpass/Steamworks/MusicPlayerWantsPlayNext_t.cs b/Assembly_Firstpass/Steamworks/MusicPlayerWantsPlayNext_t.cs new file mode 100644 index 0000000..925ea3b --- /dev/null +++ b/Assembly_Firstpass/Steamworks/MusicPlayerWantsPlayNext_t.cs @@ -0,0 +1,10 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8, Size = 1)] +[CallbackIdentity(4108)] +public struct MusicPlayerWantsPlayNext_t +{ + public const int k_iCallback = 4108; +} diff --git a/Assembly_Firstpass/Steamworks/MusicPlayerWantsPlayPrevious_t.cs b/Assembly_Firstpass/Steamworks/MusicPlayerWantsPlayPrevious_t.cs new file mode 100644 index 0000000..e58a76a --- /dev/null +++ b/Assembly_Firstpass/Steamworks/MusicPlayerWantsPlayPrevious_t.cs @@ -0,0 +1,10 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8, Size = 1)] +[CallbackIdentity(4107)] +public struct MusicPlayerWantsPlayPrevious_t +{ + public const int k_iCallback = 4107; +} diff --git a/Assembly_Firstpass/Steamworks/MusicPlayerWantsPlay_t.cs b/Assembly_Firstpass/Steamworks/MusicPlayerWantsPlay_t.cs new file mode 100644 index 0000000..9a6f88b --- /dev/null +++ b/Assembly_Firstpass/Steamworks/MusicPlayerWantsPlay_t.cs @@ -0,0 +1,10 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8, Size = 1)] +[CallbackIdentity(4105)] +public struct MusicPlayerWantsPlay_t +{ + public const int k_iCallback = 4105; +} diff --git a/Assembly_Firstpass/Steamworks/MusicPlayerWantsPlayingRepeatStatus_t.cs b/Assembly_Firstpass/Steamworks/MusicPlayerWantsPlayingRepeatStatus_t.cs new file mode 100644 index 0000000..1f66cda --- /dev/null +++ b/Assembly_Firstpass/Steamworks/MusicPlayerWantsPlayingRepeatStatus_t.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(4114)] +public struct MusicPlayerWantsPlayingRepeatStatus_t +{ + public const int k_iCallback = 4114; + + public int m_nPlayingRepeatStatus; +} diff --git a/Assembly_Firstpass/Steamworks/MusicPlayerWantsShuffled_t.cs b/Assembly_Firstpass/Steamworks/MusicPlayerWantsShuffled_t.cs new file mode 100644 index 0000000..32e436d --- /dev/null +++ b/Assembly_Firstpass/Steamworks/MusicPlayerWantsShuffled_t.cs @@ -0,0 +1,13 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(4109)] +public struct MusicPlayerWantsShuffled_t +{ + public const int k_iCallback = 4109; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bShuffled; +} diff --git a/Assembly_Firstpass/Steamworks/MusicPlayerWantsVolume_t.cs b/Assembly_Firstpass/Steamworks/MusicPlayerWantsVolume_t.cs new file mode 100644 index 0000000..286da77 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/MusicPlayerWantsVolume_t.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(4011)] +public struct MusicPlayerWantsVolume_t +{ + public const int k_iCallback = 4011; + + public float m_flNewVolume; +} diff --git a/Assembly_Firstpass/Steamworks/MusicPlayerWillQuit_t.cs b/Assembly_Firstpass/Steamworks/MusicPlayerWillQuit_t.cs new file mode 100644 index 0000000..8e24d9f --- /dev/null +++ b/Assembly_Firstpass/Steamworks/MusicPlayerWillQuit_t.cs @@ -0,0 +1,10 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8, Size = 1)] +[CallbackIdentity(4104)] +public struct MusicPlayerWillQuit_t +{ + public const int k_iCallback = 4104; +} diff --git a/Assembly_Firstpass/Steamworks/NativeMethods.cs b/Assembly_Firstpass/Steamworks/NativeMethods.cs new file mode 100644 index 0000000..bfe8d82 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/NativeMethods.cs @@ -0,0 +1,3079 @@ +using System; +using System.Runtime.InteropServices; +using System.Security; + +namespace Steamworks; + +[SuppressUnmanagedCodeSecurity] +internal static class NativeMethods +{ + internal const string NativeLibraryName = "steam_api"; + + internal const string NativeLibrary_SDKEncryptedAppTicket = "sdkencryptedappticket"; + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool SteamAPI_Init(); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern void SteamAPI_Shutdown(); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool SteamAPI_RestartAppIfNecessary(AppId_t unOwnAppID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern void SteamAPI_ReleaseCurrentThreadMemory(); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern void SteamAPI_WriteMiniDump(uint uStructuredExceptionCode, IntPtr pvExceptionInfo, uint uBuildID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern void SteamAPI_SetMiniDumpComment(InteropHelp.UTF8StringHandle pchMsg); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern void SteamAPI_RunCallbacks(); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern void SteamAPI_RegisterCallback(IntPtr pCallback, int iCallback); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern void SteamAPI_UnregisterCallback(IntPtr pCallback); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern void SteamAPI_RegisterCallResult(IntPtr pCallback, ulong hAPICall); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern void SteamAPI_UnregisterCallResult(IntPtr pCallback, ulong hAPICall); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool SteamAPI_IsSteamRunning(); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern int SteamAPI_GetSteamInstallPath(); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern int SteamAPI_GetHSteamPipe(); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern void SteamAPI_SetTryCatchCallbacks([MarshalAs(UnmanagedType.I1)] bool bTryCatchCallbacks); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern int SteamAPI_GetHSteamUser(); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr SteamInternal_ContextInit(IntPtr pContextInitData); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr SteamInternal_CreateInterface(InteropHelp.UTF8StringHandle ver); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr SteamInternal_FindOrCreateUserInterface(HSteamUser hSteamUser, InteropHelp.UTF8StringHandle pszVersion); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr SteamInternal_FindOrCreateGameServerInterface(HSteamUser hSteamUser, InteropHelp.UTF8StringHandle pszVersion); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern void SteamAPI_UseBreakpadCrashHandler(InteropHelp.UTF8StringHandle pchVersion, InteropHelp.UTF8StringHandle pchDate, InteropHelp.UTF8StringHandle pchTime, [MarshalAs(UnmanagedType.I1)] bool bFullMemoryDumps, IntPtr pvContext, IntPtr m_pfnPreMinidumpCallback); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern void SteamAPI_SetBreakpadAppID(uint unAppID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern void SteamAPI_ManualDispatch_Init(); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern void SteamAPI_ManualDispatch_RunFrame(HSteamPipe hSteamPipe); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool SteamAPI_ManualDispatch_GetNextCallback(HSteamPipe hSteamPipe, IntPtr pCallbackMsg); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern void SteamAPI_ManualDispatch_FreeLastCallback(HSteamPipe hSteamPipe); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool SteamAPI_ManualDispatch_GetAPICallResult(HSteamPipe hSteamPipe, SteamAPICall_t hSteamAPICall, IntPtr pCallback, int cubCallback, int iCallbackExpected, out bool pbFailed); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern void SteamGameServer_Shutdown(); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern void SteamGameServer_RunCallbacks(); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern void SteamGameServer_ReleaseCurrentThreadMemory(); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool SteamGameServer_BSecure(); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern ulong SteamGameServer_GetSteamID(); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern int SteamGameServer_GetHSteamPipe(); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern int SteamGameServer_GetHSteamUser(); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool SteamInternal_GameServer_Init(uint unIP, ushort usPort, ushort usGamePort, ushort usQueryPort, EServerMode eServerMode, InteropHelp.UTF8StringHandle pchVersionString); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr SteamClient(); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr SteamGameServerClient(); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern void SteamAPI_SteamNetworkingIPAddr_Clear(ref SteamNetworkingIPAddr self); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool SteamAPI_SteamNetworkingIPAddr_IsIPv6AllZeros(ref SteamNetworkingIPAddr self); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern void SteamAPI_SteamNetworkingIPAddr_SetIPv6(ref SteamNetworkingIPAddr self, [In][Out] byte[] ipv6, ushort nPort); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern void SteamAPI_SteamNetworkingIPAddr_SetIPv4(ref SteamNetworkingIPAddr self, uint nIP, ushort nPort); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool SteamAPI_SteamNetworkingIPAddr_IsIPv4(ref SteamNetworkingIPAddr self); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern uint SteamAPI_SteamNetworkingIPAddr_GetIPv4(ref SteamNetworkingIPAddr self); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern void SteamAPI_SteamNetworkingIPAddr_SetIPv6LocalHost(ref SteamNetworkingIPAddr self, ushort nPort); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool SteamAPI_SteamNetworkingIPAddr_IsLocalHost(ref SteamNetworkingIPAddr self); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern void SteamNetworkingIPAddr_ToString(ref SteamNetworkingIPAddr self, IntPtr buf, uint cbBuf, [MarshalAs(UnmanagedType.I1)] bool bWithPort); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool SteamNetworkingIPAddr_ParseString(ref SteamNetworkingIPAddr self, InteropHelp.UTF8StringHandle pszStr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool SteamAPI_SteamNetworkingIPAddr_IsEqualTo(ref SteamNetworkingIPAddr self, ref SteamNetworkingIPAddr x); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern void SteamAPI_SteamNetworkingIdentity_Clear(ref SteamNetworkingIdentity self); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_SteamNetworkingIdentity_SetIPAddr")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool SteamAPI_SteamNetworkingIdentity_IsInvalid(ref SteamNetworkingIdentity self); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern void SteamAPI_SteamNetworkingIdentity_SetSteamID(ref SteamNetworkingIdentity self, ulong steamID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern ulong SteamAPI_SteamNetworkingIdentity_GetSteamID(ref SteamNetworkingIdentity self); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern void SteamAPI_SteamNetworkingIdentity_SetSteamID64(ref SteamNetworkingIdentity self, ulong steamID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern ulong SteamAPI_SteamNetworkingIdentity_GetSteamID64(ref SteamNetworkingIdentity self); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool SteamAPI_SteamNetworkingIdentity_SetXboxPairwiseID(ref SteamNetworkingIdentity self, InteropHelp.UTF8StringHandle pszString); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr SteamAPI_SteamNetworkingIdentity_GetXboxPairwiseID(ref SteamNetworkingIdentity self); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr SteamAPI_SteamNetworkingIdentity_SetIPAddr(ref SteamNetworkingIdentity self, ref SteamNetworkingIPAddr addr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr SteamAPI_SteamNetworkingIdentity_GetIPAddr(ref SteamNetworkingIdentity self); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern void SteamAPI_SteamNetworkingIdentity_SetLocalHost(ref SteamNetworkingIdentity self); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool SteamAPI_SteamNetworkingIdentity_IsLocalHost(ref SteamNetworkingIdentity self); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool SteamAPI_SteamNetworkingIdentity_SetGenericString(ref SteamNetworkingIdentity self, InteropHelp.UTF8StringHandle pszString); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr SteamAPI_SteamNetworkingIdentity_GetGenericString(ref SteamNetworkingIdentity self); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool SteamAPI_SteamNetworkingIdentity_SetGenericBytes(ref SteamNetworkingIdentity self, [In][Out] byte[] data, uint cbLen); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr SteamAPI_SteamNetworkingIdentity_GetGenericBytes(ref SteamNetworkingIdentity self, out int cbLen); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool SteamAPI_SteamNetworkingIdentity_IsEqualTo(ref SteamNetworkingIdentity self, ref SteamNetworkingIdentity x); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern void SteamNetworkingIdentity_ToString(ref SteamNetworkingIdentity self, IntPtr buf, uint cbBuf); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool SteamNetworkingIdentity_ParseString(ref SteamNetworkingIdentity self, InteropHelp.UTF8StringHandle pszStr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern void SteamAPI_SteamNetworkingMessage_t_Release(IntPtr self); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool SteamAPI_ISteamNetworkingConnectionSignaling_SendSignal(ref ISteamNetworkingConnectionSignaling self, HSteamNetConnection hConn, ref SteamNetConnectionInfo_t info, IntPtr pMsg, int cbMsg); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern void SteamAPI_ISteamNetworkingConnectionSignaling_Release(ref ISteamNetworkingConnectionSignaling self); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr SteamAPI_ISteamNetworkingSignalingRecvContext_OnConnectRequest(ref ISteamNetworkingSignalingRecvContext self, HSteamNetConnection hConn, ref SteamNetworkingIdentity identityPeer, int nLocalVirtualPort); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl)] + public static extern void SteamAPI_ISteamNetworkingSignalingRecvContext_SendRejectionSignal(ref ISteamNetworkingSignalingRecvContext self, ref SteamNetworkingIdentity identityPeer, IntPtr pMsg, int cbMsg); + + [DllImport("sdkencryptedappticket", CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool SteamEncryptedAppTicket_BDecryptTicket([In][Out] byte[] rgubTicketEncrypted, uint cubTicketEncrypted, [In][Out] byte[] rgubTicketDecrypted, ref uint pcubTicketDecrypted, [MarshalAs(UnmanagedType.LPArray, SizeConst = 32)] byte[] rgubKey, int cubKey); + + [DllImport("sdkencryptedappticket", CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool SteamEncryptedAppTicket_BIsTicketForApp([In][Out] byte[] rgubTicketDecrypted, uint cubTicketDecrypted, AppId_t nAppID); + + [DllImport("sdkencryptedappticket", CallingConvention = CallingConvention.Cdecl)] + public static extern uint SteamEncryptedAppTicket_GetTicketIssueTime([In][Out] byte[] rgubTicketDecrypted, uint cubTicketDecrypted); + + [DllImport("sdkencryptedappticket", CallingConvention = CallingConvention.Cdecl)] + public static extern void SteamEncryptedAppTicket_GetTicketSteamID([In][Out] byte[] rgubTicketDecrypted, uint cubTicketDecrypted, out CSteamID psteamID); + + [DllImport("sdkencryptedappticket", CallingConvention = CallingConvention.Cdecl)] + public static extern uint SteamEncryptedAppTicket_GetTicketAppID([In][Out] byte[] rgubTicketDecrypted, uint cubTicketDecrypted); + + [DllImport("sdkencryptedappticket", CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool SteamEncryptedAppTicket_BUserOwnsAppInTicket([In][Out] byte[] rgubTicketDecrypted, uint cubTicketDecrypted, AppId_t nAppID); + + [DllImport("sdkencryptedappticket", CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool SteamEncryptedAppTicket_BUserIsVacBanned([In][Out] byte[] rgubTicketDecrypted, uint cubTicketDecrypted); + + [DllImport("sdkencryptedappticket", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr SteamEncryptedAppTicket_GetUserVariableData([In][Out] byte[] rgubTicketDecrypted, uint cubTicketDecrypted, out uint pcubUserData); + + [DllImport("sdkencryptedappticket", CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool SteamEncryptedAppTicket_BIsTicketSigned([In][Out] byte[] rgubTicketDecrypted, uint cubTicketDecrypted, [In][Out] byte[] pubRSAKey, uint cubRSAKey); + + [DllImport("sdkencryptedappticket", CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool SteamEncryptedAppTicket_BIsLicenseBorrowed([In][Out] byte[] rgubTicketDecrypted, uint cubTicketDecrypted); + + [DllImport("sdkencryptedappticket", CallingConvention = CallingConvention.Cdecl)] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool SteamEncryptedAppTicket_BIsLicenseTemporary([In][Out] byte[] rgubTicketDecrypted, uint cubTicketDecrypted); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamAppList_GetNumInstalledApps")] + public static extern uint ISteamAppList_GetNumInstalledApps(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamAppList_GetInstalledApps")] + public static extern uint ISteamAppList_GetInstalledApps(IntPtr instancePtr, [In][Out] AppId_t[] pvecAppID, uint unMaxAppIDs); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamAppList_GetAppName")] + public static extern int ISteamAppList_GetAppName(IntPtr instancePtr, AppId_t nAppID, IntPtr pchName, int cchNameMax); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamAppList_GetAppInstallDir")] + public static extern int ISteamAppList_GetAppInstallDir(IntPtr instancePtr, AppId_t nAppID, IntPtr pchDirectory, int cchNameMax); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamAppList_GetAppBuildId")] + public static extern int ISteamAppList_GetAppBuildId(IntPtr instancePtr, AppId_t nAppID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_BIsSubscribed")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamApps_BIsSubscribed(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_BIsLowViolence")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamApps_BIsLowViolence(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_BIsCybercafe")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamApps_BIsCybercafe(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_BIsVACBanned")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamApps_BIsVACBanned(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_GetCurrentGameLanguage")] + public static extern IntPtr ISteamApps_GetCurrentGameLanguage(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_GetAvailableGameLanguages")] + public static extern IntPtr ISteamApps_GetAvailableGameLanguages(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_BIsSubscribedApp")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamApps_BIsSubscribedApp(IntPtr instancePtr, AppId_t appID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_BIsDlcInstalled")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamApps_BIsDlcInstalled(IntPtr instancePtr, AppId_t appID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_GetEarliestPurchaseUnixTime")] + public static extern uint ISteamApps_GetEarliestPurchaseUnixTime(IntPtr instancePtr, AppId_t nAppID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_BIsSubscribedFromFreeWeekend")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamApps_BIsSubscribedFromFreeWeekend(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_GetDLCCount")] + public static extern int ISteamApps_GetDLCCount(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_BGetDLCDataByIndex")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamApps_BGetDLCDataByIndex(IntPtr instancePtr, int iDLC, out AppId_t pAppID, out bool pbAvailable, IntPtr pchName, int cchNameBufferSize); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_InstallDLC")] + public static extern void ISteamApps_InstallDLC(IntPtr instancePtr, AppId_t nAppID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_UninstallDLC")] + public static extern void ISteamApps_UninstallDLC(IntPtr instancePtr, AppId_t nAppID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_RequestAppProofOfPurchaseKey")] + public static extern void ISteamApps_RequestAppProofOfPurchaseKey(IntPtr instancePtr, AppId_t nAppID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_GetCurrentBetaName")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamApps_GetCurrentBetaName(IntPtr instancePtr, IntPtr pchName, int cchNameBufferSize); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_MarkContentCorrupt")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamApps_MarkContentCorrupt(IntPtr instancePtr, [MarshalAs(UnmanagedType.I1)] bool bMissingFilesOnly); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_GetInstalledDepots")] + public static extern uint ISteamApps_GetInstalledDepots(IntPtr instancePtr, AppId_t appID, [In][Out] DepotId_t[] pvecDepots, uint cMaxDepots); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_GetAppInstallDir")] + public static extern uint ISteamApps_GetAppInstallDir(IntPtr instancePtr, AppId_t appID, IntPtr pchFolder, uint cchFolderBufferSize); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_BIsAppInstalled")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamApps_BIsAppInstalled(IntPtr instancePtr, AppId_t appID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_GetAppOwner")] + public static extern ulong ISteamApps_GetAppOwner(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_GetLaunchQueryParam")] + public static extern IntPtr ISteamApps_GetLaunchQueryParam(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchKey); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_GetDlcDownloadProgress")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamApps_GetDlcDownloadProgress(IntPtr instancePtr, AppId_t nAppID, out ulong punBytesDownloaded, out ulong punBytesTotal); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_GetAppBuildId")] + public static extern int ISteamApps_GetAppBuildId(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_RequestAllProofOfPurchaseKeys")] + public static extern void ISteamApps_RequestAllProofOfPurchaseKeys(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_GetFileDetails")] + public static extern ulong ISteamApps_GetFileDetails(IntPtr instancePtr, InteropHelp.UTF8StringHandle pszFileName); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_GetLaunchCommandLine")] + public static extern int ISteamApps_GetLaunchCommandLine(IntPtr instancePtr, IntPtr pszCommandLine, int cubCommandLine); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_BIsSubscribedFromFamilySharing")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamApps_BIsSubscribedFromFamilySharing(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamApps_BIsTimedTrial")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamApps_BIsTimedTrial(IntPtr instancePtr, out uint punSecondsAllowed, out uint punSecondsPlayed); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_CreateSteamPipe")] + public static extern int ISteamClient_CreateSteamPipe(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_BReleaseSteamPipe")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamClient_BReleaseSteamPipe(IntPtr instancePtr, HSteamPipe hSteamPipe); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_ConnectToGlobalUser")] + public static extern int ISteamClient_ConnectToGlobalUser(IntPtr instancePtr, HSteamPipe hSteamPipe); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_CreateLocalUser")] + public static extern int ISteamClient_CreateLocalUser(IntPtr instancePtr, out HSteamPipe phSteamPipe, EAccountType eAccountType); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_ReleaseUser")] + public static extern void ISteamClient_ReleaseUser(IntPtr instancePtr, HSteamPipe hSteamPipe, HSteamUser hUser); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamUser")] + public static extern IntPtr ISteamClient_GetISteamUser(IntPtr instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, InteropHelp.UTF8StringHandle pchVersion); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamGameServer")] + public static extern IntPtr ISteamClient_GetISteamGameServer(IntPtr instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, InteropHelp.UTF8StringHandle pchVersion); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_SetLocalIPBinding")] + public static extern void ISteamClient_SetLocalIPBinding(IntPtr instancePtr, ref SteamIPAddress_t unIP, ushort usPort); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamFriends")] + public static extern IntPtr ISteamClient_GetISteamFriends(IntPtr instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, InteropHelp.UTF8StringHandle pchVersion); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamUtils")] + public static extern IntPtr ISteamClient_GetISteamUtils(IntPtr instancePtr, HSteamPipe hSteamPipe, InteropHelp.UTF8StringHandle pchVersion); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamMatchmaking")] + public static extern IntPtr ISteamClient_GetISteamMatchmaking(IntPtr instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, InteropHelp.UTF8StringHandle pchVersion); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamMatchmakingServers")] + public static extern IntPtr ISteamClient_GetISteamMatchmakingServers(IntPtr instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, InteropHelp.UTF8StringHandle pchVersion); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamGenericInterface")] + public static extern IntPtr ISteamClient_GetISteamGenericInterface(IntPtr instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, InteropHelp.UTF8StringHandle pchVersion); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamUserStats")] + public static extern IntPtr ISteamClient_GetISteamUserStats(IntPtr instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, InteropHelp.UTF8StringHandle pchVersion); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamGameServerStats")] + public static extern IntPtr ISteamClient_GetISteamGameServerStats(IntPtr instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, InteropHelp.UTF8StringHandle pchVersion); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamApps")] + public static extern IntPtr ISteamClient_GetISteamApps(IntPtr instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, InteropHelp.UTF8StringHandle pchVersion); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamNetworking")] + public static extern IntPtr ISteamClient_GetISteamNetworking(IntPtr instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, InteropHelp.UTF8StringHandle pchVersion); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamRemoteStorage")] + public static extern IntPtr ISteamClient_GetISteamRemoteStorage(IntPtr instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, InteropHelp.UTF8StringHandle pchVersion); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamScreenshots")] + public static extern IntPtr ISteamClient_GetISteamScreenshots(IntPtr instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, InteropHelp.UTF8StringHandle pchVersion); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamGameSearch")] + public static extern IntPtr ISteamClient_GetISteamGameSearch(IntPtr instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, InteropHelp.UTF8StringHandle pchVersion); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetIPCCallCount")] + public static extern uint ISteamClient_GetIPCCallCount(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_SetWarningMessageHook")] + public static extern void ISteamClient_SetWarningMessageHook(IntPtr instancePtr, SteamAPIWarningMessageHook_t pFunction); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_BShutdownIfAllPipesClosed")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamClient_BShutdownIfAllPipesClosed(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamHTTP")] + public static extern IntPtr ISteamClient_GetISteamHTTP(IntPtr instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, InteropHelp.UTF8StringHandle pchVersion); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamController")] + public static extern IntPtr ISteamClient_GetISteamController(IntPtr instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, InteropHelp.UTF8StringHandle pchVersion); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamUGC")] + public static extern IntPtr ISteamClient_GetISteamUGC(IntPtr instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, InteropHelp.UTF8StringHandle pchVersion); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamAppList")] + public static extern IntPtr ISteamClient_GetISteamAppList(IntPtr instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, InteropHelp.UTF8StringHandle pchVersion); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamMusic")] + public static extern IntPtr ISteamClient_GetISteamMusic(IntPtr instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, InteropHelp.UTF8StringHandle pchVersion); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamMusicRemote")] + public static extern IntPtr ISteamClient_GetISteamMusicRemote(IntPtr instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, InteropHelp.UTF8StringHandle pchVersion); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamHTMLSurface")] + public static extern IntPtr ISteamClient_GetISteamHTMLSurface(IntPtr instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, InteropHelp.UTF8StringHandle pchVersion); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamInventory")] + public static extern IntPtr ISteamClient_GetISteamInventory(IntPtr instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, InteropHelp.UTF8StringHandle pchVersion); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamVideo")] + public static extern IntPtr ISteamClient_GetISteamVideo(IntPtr instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, InteropHelp.UTF8StringHandle pchVersion); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamParentalSettings")] + public static extern IntPtr ISteamClient_GetISteamParentalSettings(IntPtr instancePtr, HSteamUser hSteamuser, HSteamPipe hSteamPipe, InteropHelp.UTF8StringHandle pchVersion); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamInput")] + public static extern IntPtr ISteamClient_GetISteamInput(IntPtr instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, InteropHelp.UTF8StringHandle pchVersion); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamParties")] + public static extern IntPtr ISteamClient_GetISteamParties(IntPtr instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, InteropHelp.UTF8StringHandle pchVersion); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamClient_GetISteamRemotePlay")] + public static extern IntPtr ISteamClient_GetISteamRemotePlay(IntPtr instancePtr, HSteamUser hSteamUser, HSteamPipe hSteamPipe, InteropHelp.UTF8StringHandle pchVersion); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetPersonaName")] + public static extern IntPtr ISteamFriends_GetPersonaName(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_SetPersonaName")] + public static extern ulong ISteamFriends_SetPersonaName(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchPersonaName); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetPersonaState")] + public static extern EPersonaState ISteamFriends_GetPersonaState(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetFriendCount")] + public static extern int ISteamFriends_GetFriendCount(IntPtr instancePtr, EFriendFlags iFriendFlags); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetFriendByIndex")] + public static extern ulong ISteamFriends_GetFriendByIndex(IntPtr instancePtr, int iFriend, EFriendFlags iFriendFlags); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetFriendRelationship")] + public static extern EFriendRelationship ISteamFriends_GetFriendRelationship(IntPtr instancePtr, CSteamID steamIDFriend); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetFriendPersonaState")] + public static extern EPersonaState ISteamFriends_GetFriendPersonaState(IntPtr instancePtr, CSteamID steamIDFriend); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetFriendPersonaName")] + public static extern IntPtr ISteamFriends_GetFriendPersonaName(IntPtr instancePtr, CSteamID steamIDFriend); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetFriendGamePlayed")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamFriends_GetFriendGamePlayed(IntPtr instancePtr, CSteamID steamIDFriend, out FriendGameInfo_t pFriendGameInfo); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetFriendPersonaNameHistory")] + public static extern IntPtr ISteamFriends_GetFriendPersonaNameHistory(IntPtr instancePtr, CSteamID steamIDFriend, int iPersonaName); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetFriendSteamLevel")] + public static extern int ISteamFriends_GetFriendSteamLevel(IntPtr instancePtr, CSteamID steamIDFriend); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetPlayerNickname")] + public static extern IntPtr ISteamFriends_GetPlayerNickname(IntPtr instancePtr, CSteamID steamIDPlayer); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetFriendsGroupCount")] + public static extern int ISteamFriends_GetFriendsGroupCount(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetFriendsGroupIDByIndex")] + public static extern short ISteamFriends_GetFriendsGroupIDByIndex(IntPtr instancePtr, int iFG); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetFriendsGroupName")] + public static extern IntPtr ISteamFriends_GetFriendsGroupName(IntPtr instancePtr, FriendsGroupID_t friendsGroupID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetFriendsGroupMembersCount")] + public static extern int ISteamFriends_GetFriendsGroupMembersCount(IntPtr instancePtr, FriendsGroupID_t friendsGroupID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetFriendsGroupMembersList")] + public static extern void ISteamFriends_GetFriendsGroupMembersList(IntPtr instancePtr, FriendsGroupID_t friendsGroupID, [In][Out] CSteamID[] pOutSteamIDMembers, int nMembersCount); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_HasFriend")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamFriends_HasFriend(IntPtr instancePtr, CSteamID steamIDFriend, EFriendFlags iFriendFlags); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetClanCount")] + public static extern int ISteamFriends_GetClanCount(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetClanByIndex")] + public static extern ulong ISteamFriends_GetClanByIndex(IntPtr instancePtr, int iClan); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetClanName")] + public static extern IntPtr ISteamFriends_GetClanName(IntPtr instancePtr, CSteamID steamIDClan); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetClanTag")] + public static extern IntPtr ISteamFriends_GetClanTag(IntPtr instancePtr, CSteamID steamIDClan); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetClanActivityCounts")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamFriends_GetClanActivityCounts(IntPtr instancePtr, CSteamID steamIDClan, out int pnOnline, out int pnInGame, out int pnChatting); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_DownloadClanActivityCounts")] + public static extern ulong ISteamFriends_DownloadClanActivityCounts(IntPtr instancePtr, [In][Out] CSteamID[] psteamIDClans, int cClansToRequest); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetFriendCountFromSource")] + public static extern int ISteamFriends_GetFriendCountFromSource(IntPtr instancePtr, CSteamID steamIDSource); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetFriendFromSourceByIndex")] + public static extern ulong ISteamFriends_GetFriendFromSourceByIndex(IntPtr instancePtr, CSteamID steamIDSource, int iFriend); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_IsUserInSource")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamFriends_IsUserInSource(IntPtr instancePtr, CSteamID steamIDUser, CSteamID steamIDSource); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_SetInGameVoiceSpeaking")] + public static extern void ISteamFriends_SetInGameVoiceSpeaking(IntPtr instancePtr, CSteamID steamIDUser, [MarshalAs(UnmanagedType.I1)] bool bSpeaking); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_ActivateGameOverlay")] + public static extern void ISteamFriends_ActivateGameOverlay(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchDialog); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_ActivateGameOverlayToUser")] + public static extern void ISteamFriends_ActivateGameOverlayToUser(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchDialog, CSteamID steamID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage")] + public static extern void ISteamFriends_ActivateGameOverlayToWebPage(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchURL, EActivateGameOverlayToWebPageMode eMode); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_ActivateGameOverlayToStore")] + public static extern void ISteamFriends_ActivateGameOverlayToStore(IntPtr instancePtr, AppId_t nAppID, EOverlayToStoreFlag eFlag); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_SetPlayedWith")] + public static extern void ISteamFriends_SetPlayedWith(IntPtr instancePtr, CSteamID steamIDUserPlayedWith); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_ActivateGameOverlayInviteDialog")] + public static extern void ISteamFriends_ActivateGameOverlayInviteDialog(IntPtr instancePtr, CSteamID steamIDLobby); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetSmallFriendAvatar")] + public static extern int ISteamFriends_GetSmallFriendAvatar(IntPtr instancePtr, CSteamID steamIDFriend); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetMediumFriendAvatar")] + public static extern int ISteamFriends_GetMediumFriendAvatar(IntPtr instancePtr, CSteamID steamIDFriend); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetLargeFriendAvatar")] + public static extern int ISteamFriends_GetLargeFriendAvatar(IntPtr instancePtr, CSteamID steamIDFriend); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_RequestUserInformation")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamFriends_RequestUserInformation(IntPtr instancePtr, CSteamID steamIDUser, [MarshalAs(UnmanagedType.I1)] bool bRequireNameOnly); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_RequestClanOfficerList")] + public static extern ulong ISteamFriends_RequestClanOfficerList(IntPtr instancePtr, CSteamID steamIDClan); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetClanOwner")] + public static extern ulong ISteamFriends_GetClanOwner(IntPtr instancePtr, CSteamID steamIDClan); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetClanOfficerCount")] + public static extern int ISteamFriends_GetClanOfficerCount(IntPtr instancePtr, CSteamID steamIDClan); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetClanOfficerByIndex")] + public static extern ulong ISteamFriends_GetClanOfficerByIndex(IntPtr instancePtr, CSteamID steamIDClan, int iOfficer); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetUserRestrictions")] + public static extern uint ISteamFriends_GetUserRestrictions(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_SetRichPresence")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamFriends_SetRichPresence(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchKey, InteropHelp.UTF8StringHandle pchValue); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_ClearRichPresence")] + public static extern void ISteamFriends_ClearRichPresence(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetFriendRichPresence")] + public static extern IntPtr ISteamFriends_GetFriendRichPresence(IntPtr instancePtr, CSteamID steamIDFriend, InteropHelp.UTF8StringHandle pchKey); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetFriendRichPresenceKeyCount")] + public static extern int ISteamFriends_GetFriendRichPresenceKeyCount(IntPtr instancePtr, CSteamID steamIDFriend); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetFriendRichPresenceKeyByIndex")] + public static extern IntPtr ISteamFriends_GetFriendRichPresenceKeyByIndex(IntPtr instancePtr, CSteamID steamIDFriend, int iKey); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_RequestFriendRichPresence")] + public static extern void ISteamFriends_RequestFriendRichPresence(IntPtr instancePtr, CSteamID steamIDFriend); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_InviteUserToGame")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamFriends_InviteUserToGame(IntPtr instancePtr, CSteamID steamIDFriend, InteropHelp.UTF8StringHandle pchConnectString); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetCoplayFriendCount")] + public static extern int ISteamFriends_GetCoplayFriendCount(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetCoplayFriend")] + public static extern ulong ISteamFriends_GetCoplayFriend(IntPtr instancePtr, int iCoplayFriend); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetFriendCoplayTime")] + public static extern int ISteamFriends_GetFriendCoplayTime(IntPtr instancePtr, CSteamID steamIDFriend); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetFriendCoplayGame")] + public static extern uint ISteamFriends_GetFriendCoplayGame(IntPtr instancePtr, CSteamID steamIDFriend); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_JoinClanChatRoom")] + public static extern ulong ISteamFriends_JoinClanChatRoom(IntPtr instancePtr, CSteamID steamIDClan); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_LeaveClanChatRoom")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamFriends_LeaveClanChatRoom(IntPtr instancePtr, CSteamID steamIDClan); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetClanChatMemberCount")] + public static extern int ISteamFriends_GetClanChatMemberCount(IntPtr instancePtr, CSteamID steamIDClan); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetChatMemberByIndex")] + public static extern ulong ISteamFriends_GetChatMemberByIndex(IntPtr instancePtr, CSteamID steamIDClan, int iUser); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_SendClanChatMessage")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamFriends_SendClanChatMessage(IntPtr instancePtr, CSteamID steamIDClanChat, InteropHelp.UTF8StringHandle pchText); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetClanChatMessage")] + public static extern int ISteamFriends_GetClanChatMessage(IntPtr instancePtr, CSteamID steamIDClanChat, int iMessage, IntPtr prgchText, int cchTextMax, out EChatEntryType peChatEntryType, out CSteamID psteamidChatter); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_IsClanChatAdmin")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamFriends_IsClanChatAdmin(IntPtr instancePtr, CSteamID steamIDClanChat, CSteamID steamIDUser); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_IsClanChatWindowOpenInSteam")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamFriends_IsClanChatWindowOpenInSteam(IntPtr instancePtr, CSteamID steamIDClanChat); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_OpenClanChatWindowInSteam")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamFriends_OpenClanChatWindowInSteam(IntPtr instancePtr, CSteamID steamIDClanChat); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_CloseClanChatWindowInSteam")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamFriends_CloseClanChatWindowInSteam(IntPtr instancePtr, CSteamID steamIDClanChat); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_SetListenForFriendsMessages")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamFriends_SetListenForFriendsMessages(IntPtr instancePtr, [MarshalAs(UnmanagedType.I1)] bool bInterceptEnabled); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_ReplyToFriendMessage")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamFriends_ReplyToFriendMessage(IntPtr instancePtr, CSteamID steamIDFriend, InteropHelp.UTF8StringHandle pchMsgToSend); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetFriendMessage")] + public static extern int ISteamFriends_GetFriendMessage(IntPtr instancePtr, CSteamID steamIDFriend, int iMessageID, IntPtr pvData, int cubData, out EChatEntryType peChatEntryType); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetFollowerCount")] + public static extern ulong ISteamFriends_GetFollowerCount(IntPtr instancePtr, CSteamID steamID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_IsFollowing")] + public static extern ulong ISteamFriends_IsFollowing(IntPtr instancePtr, CSteamID steamID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_EnumerateFollowingList")] + public static extern ulong ISteamFriends_EnumerateFollowingList(IntPtr instancePtr, uint unStartIndex); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_IsClanPublic")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamFriends_IsClanPublic(IntPtr instancePtr, CSteamID steamIDClan); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_IsClanOfficialGameGroup")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamFriends_IsClanOfficialGameGroup(IntPtr instancePtr, CSteamID steamIDClan); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_GetNumChatsWithUnreadPriorityMessages")] + public static extern int ISteamFriends_GetNumChatsWithUnreadPriorityMessages(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_ActivateGameOverlayRemotePlayTogetherInviteDialog")] + public static extern void ISteamFriends_ActivateGameOverlayRemotePlayTogetherInviteDialog(IntPtr instancePtr, CSteamID steamIDLobby); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_RegisterProtocolInOverlayBrowser")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamFriends_RegisterProtocolInOverlayBrowser(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchProtocol); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamFriends_ActivateGameOverlayInviteDialogConnectString")] + public static extern void ISteamFriends_ActivateGameOverlayInviteDialogConnectString(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchConnectString); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_SetProduct")] + public static extern void ISteamGameServer_SetProduct(IntPtr instancePtr, InteropHelp.UTF8StringHandle pszProduct); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_SetGameDescription")] + public static extern void ISteamGameServer_SetGameDescription(IntPtr instancePtr, InteropHelp.UTF8StringHandle pszGameDescription); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_SetModDir")] + public static extern void ISteamGameServer_SetModDir(IntPtr instancePtr, InteropHelp.UTF8StringHandle pszModDir); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_SetDedicatedServer")] + public static extern void ISteamGameServer_SetDedicatedServer(IntPtr instancePtr, [MarshalAs(UnmanagedType.I1)] bool bDedicated); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_LogOn")] + public static extern void ISteamGameServer_LogOn(IntPtr instancePtr, InteropHelp.UTF8StringHandle pszToken); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_LogOnAnonymous")] + public static extern void ISteamGameServer_LogOnAnonymous(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_LogOff")] + public static extern void ISteamGameServer_LogOff(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_BLoggedOn")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamGameServer_BLoggedOn(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_BSecure")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamGameServer_BSecure(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_GetSteamID")] + public static extern ulong ISteamGameServer_GetSteamID(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_WasRestartRequested")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamGameServer_WasRestartRequested(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_SetMaxPlayerCount")] + public static extern void ISteamGameServer_SetMaxPlayerCount(IntPtr instancePtr, int cPlayersMax); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_SetBotPlayerCount")] + public static extern void ISteamGameServer_SetBotPlayerCount(IntPtr instancePtr, int cBotplayers); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_SetServerName")] + public static extern void ISteamGameServer_SetServerName(IntPtr instancePtr, InteropHelp.UTF8StringHandle pszServerName); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_SetMapName")] + public static extern void ISteamGameServer_SetMapName(IntPtr instancePtr, InteropHelp.UTF8StringHandle pszMapName); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_SetPasswordProtected")] + public static extern void ISteamGameServer_SetPasswordProtected(IntPtr instancePtr, [MarshalAs(UnmanagedType.I1)] bool bPasswordProtected); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_SetSpectatorPort")] + public static extern void ISteamGameServer_SetSpectatorPort(IntPtr instancePtr, ushort unSpectatorPort); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_SetSpectatorServerName")] + public static extern void ISteamGameServer_SetSpectatorServerName(IntPtr instancePtr, InteropHelp.UTF8StringHandle pszSpectatorServerName); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_ClearAllKeyValues")] + public static extern void ISteamGameServer_ClearAllKeyValues(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_SetKeyValue")] + public static extern void ISteamGameServer_SetKeyValue(IntPtr instancePtr, InteropHelp.UTF8StringHandle pKey, InteropHelp.UTF8StringHandle pValue); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_SetGameTags")] + public static extern void ISteamGameServer_SetGameTags(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchGameTags); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_SetGameData")] + public static extern void ISteamGameServer_SetGameData(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchGameData); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_SetRegion")] + public static extern void ISteamGameServer_SetRegion(IntPtr instancePtr, InteropHelp.UTF8StringHandle pszRegion); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_SendUserConnectAndAuthenticate")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamGameServer_SendUserConnectAndAuthenticate(IntPtr instancePtr, uint unIPClient, byte[] pvAuthBlob, uint cubAuthBlobSize, out CSteamID pSteamIDUser); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_CreateUnauthenticatedUserConnection")] + public static extern ulong ISteamGameServer_CreateUnauthenticatedUserConnection(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_SendUserDisconnect")] + public static extern void ISteamGameServer_SendUserDisconnect(IntPtr instancePtr, CSteamID steamIDUser); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_BUpdateUserData")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamGameServer_BUpdateUserData(IntPtr instancePtr, CSteamID steamIDUser, InteropHelp.UTF8StringHandle pchPlayerName, uint uScore); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_GetAuthSessionTicket")] + public static extern uint ISteamGameServer_GetAuthSessionTicket(IntPtr instancePtr, byte[] pTicket, int cbMaxTicket, out uint pcbTicket); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_BeginAuthSession")] + public static extern EBeginAuthSessionResult ISteamGameServer_BeginAuthSession(IntPtr instancePtr, byte[] pAuthTicket, int cbAuthTicket, CSteamID steamID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_EndAuthSession")] + public static extern void ISteamGameServer_EndAuthSession(IntPtr instancePtr, CSteamID steamID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_CancelAuthTicket")] + public static extern void ISteamGameServer_CancelAuthTicket(IntPtr instancePtr, HAuthTicket hAuthTicket); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_UserHasLicenseForApp")] + public static extern EUserHasLicenseForAppResult ISteamGameServer_UserHasLicenseForApp(IntPtr instancePtr, CSteamID steamID, AppId_t appID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_RequestUserGroupStatus")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamGameServer_RequestUserGroupStatus(IntPtr instancePtr, CSteamID steamIDUser, CSteamID steamIDGroup); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_GetGameplayStats")] + public static extern void ISteamGameServer_GetGameplayStats(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_GetServerReputation")] + public static extern ulong ISteamGameServer_GetServerReputation(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_GetPublicIP")] + public static extern SteamIPAddress_t ISteamGameServer_GetPublicIP(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_HandleIncomingPacket")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamGameServer_HandleIncomingPacket(IntPtr instancePtr, byte[] pData, int cbData, uint srcIP, ushort srcPort); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_GetNextOutgoingPacket")] + public static extern int ISteamGameServer_GetNextOutgoingPacket(IntPtr instancePtr, byte[] pOut, int cbMaxOut, out uint pNetAdr, out ushort pPort); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_EnableHeartbeats")] + public static extern void ISteamGameServer_EnableHeartbeats(IntPtr instancePtr, [MarshalAs(UnmanagedType.I1)] bool bActive); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_SetHeartbeatInterval")] + public static extern void ISteamGameServer_SetHeartbeatInterval(IntPtr instancePtr, int iHeartbeatInterval); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_ForceHeartbeat")] + public static extern void ISteamGameServer_ForceHeartbeat(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_AssociateWithClan")] + public static extern ulong ISteamGameServer_AssociateWithClan(IntPtr instancePtr, CSteamID steamIDClan); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServer_ComputeNewPlayerCompatibility")] + public static extern ulong ISteamGameServer_ComputeNewPlayerCompatibility(IntPtr instancePtr, CSteamID steamIDNewPlayer); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServerStats_RequestUserStats")] + public static extern ulong ISteamGameServerStats_RequestUserStats(IntPtr instancePtr, CSteamID steamIDUser); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServerStats_GetUserStatInt32")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamGameServerStats_GetUserStatInt32(IntPtr instancePtr, CSteamID steamIDUser, InteropHelp.UTF8StringHandle pchName, out int pData); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServerStats_GetUserStatFloat")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamGameServerStats_GetUserStatFloat(IntPtr instancePtr, CSteamID steamIDUser, InteropHelp.UTF8StringHandle pchName, out float pData); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServerStats_GetUserAchievement")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamGameServerStats_GetUserAchievement(IntPtr instancePtr, CSteamID steamIDUser, InteropHelp.UTF8StringHandle pchName, out bool pbAchieved); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServerStats_SetUserStatInt32")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamGameServerStats_SetUserStatInt32(IntPtr instancePtr, CSteamID steamIDUser, InteropHelp.UTF8StringHandle pchName, int nData); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServerStats_SetUserStatFloat")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamGameServerStats_SetUserStatFloat(IntPtr instancePtr, CSteamID steamIDUser, InteropHelp.UTF8StringHandle pchName, float fData); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServerStats_UpdateUserAvgRateStat")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamGameServerStats_UpdateUserAvgRateStat(IntPtr instancePtr, CSteamID steamIDUser, InteropHelp.UTF8StringHandle pchName, float flCountThisSession, double dSessionLength); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServerStats_SetUserAchievement")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamGameServerStats_SetUserAchievement(IntPtr instancePtr, CSteamID steamIDUser, InteropHelp.UTF8StringHandle pchName); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServerStats_ClearUserAchievement")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamGameServerStats_ClearUserAchievement(IntPtr instancePtr, CSteamID steamIDUser, InteropHelp.UTF8StringHandle pchName); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameServerStats_StoreUserStats")] + public static extern ulong ISteamGameServerStats_StoreUserStats(IntPtr instancePtr, CSteamID steamIDUser); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTMLSurface_Init")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamHTMLSurface_Init(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTMLSurface_Shutdown")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamHTMLSurface_Shutdown(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTMLSurface_CreateBrowser")] + public static extern ulong ISteamHTMLSurface_CreateBrowser(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchUserAgent, InteropHelp.UTF8StringHandle pchUserCSS); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTMLSurface_RemoveBrowser")] + public static extern void ISteamHTMLSurface_RemoveBrowser(IntPtr instancePtr, HHTMLBrowser unBrowserHandle); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTMLSurface_LoadURL")] + public static extern void ISteamHTMLSurface_LoadURL(IntPtr instancePtr, HHTMLBrowser unBrowserHandle, InteropHelp.UTF8StringHandle pchURL, InteropHelp.UTF8StringHandle pchPostData); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTMLSurface_SetSize")] + public static extern void ISteamHTMLSurface_SetSize(IntPtr instancePtr, HHTMLBrowser unBrowserHandle, uint unWidth, uint unHeight); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTMLSurface_StopLoad")] + public static extern void ISteamHTMLSurface_StopLoad(IntPtr instancePtr, HHTMLBrowser unBrowserHandle); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTMLSurface_Reload")] + public static extern void ISteamHTMLSurface_Reload(IntPtr instancePtr, HHTMLBrowser unBrowserHandle); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTMLSurface_GoBack")] + public static extern void ISteamHTMLSurface_GoBack(IntPtr instancePtr, HHTMLBrowser unBrowserHandle); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTMLSurface_GoForward")] + public static extern void ISteamHTMLSurface_GoForward(IntPtr instancePtr, HHTMLBrowser unBrowserHandle); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTMLSurface_AddHeader")] + public static extern void ISteamHTMLSurface_AddHeader(IntPtr instancePtr, HHTMLBrowser unBrowserHandle, InteropHelp.UTF8StringHandle pchKey, InteropHelp.UTF8StringHandle pchValue); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTMLSurface_ExecuteJavascript")] + public static extern void ISteamHTMLSurface_ExecuteJavascript(IntPtr instancePtr, HHTMLBrowser unBrowserHandle, InteropHelp.UTF8StringHandle pchScript); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTMLSurface_MouseUp")] + public static extern void ISteamHTMLSurface_MouseUp(IntPtr instancePtr, HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTMLSurface_MouseDown")] + public static extern void ISteamHTMLSurface_MouseDown(IntPtr instancePtr, HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTMLSurface_MouseDoubleClick")] + public static extern void ISteamHTMLSurface_MouseDoubleClick(IntPtr instancePtr, HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTMLSurface_MouseMove")] + public static extern void ISteamHTMLSurface_MouseMove(IntPtr instancePtr, HHTMLBrowser unBrowserHandle, int x, int y); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTMLSurface_MouseWheel")] + public static extern void ISteamHTMLSurface_MouseWheel(IntPtr instancePtr, HHTMLBrowser unBrowserHandle, int nDelta); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTMLSurface_KeyDown")] + public static extern void ISteamHTMLSurface_KeyDown(IntPtr instancePtr, HHTMLBrowser unBrowserHandle, uint nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers, [MarshalAs(UnmanagedType.I1)] bool bIsSystemKey); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTMLSurface_KeyUp")] + public static extern void ISteamHTMLSurface_KeyUp(IntPtr instancePtr, HHTMLBrowser unBrowserHandle, uint nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTMLSurface_KeyChar")] + public static extern void ISteamHTMLSurface_KeyChar(IntPtr instancePtr, HHTMLBrowser unBrowserHandle, uint cUnicodeChar, EHTMLKeyModifiers eHTMLKeyModifiers); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTMLSurface_SetHorizontalScroll")] + public static extern void ISteamHTMLSurface_SetHorizontalScroll(IntPtr instancePtr, HHTMLBrowser unBrowserHandle, uint nAbsolutePixelScroll); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTMLSurface_SetVerticalScroll")] + public static extern void ISteamHTMLSurface_SetVerticalScroll(IntPtr instancePtr, HHTMLBrowser unBrowserHandle, uint nAbsolutePixelScroll); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTMLSurface_SetKeyFocus")] + public static extern void ISteamHTMLSurface_SetKeyFocus(IntPtr instancePtr, HHTMLBrowser unBrowserHandle, [MarshalAs(UnmanagedType.I1)] bool bHasKeyFocus); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTMLSurface_ViewSource")] + public static extern void ISteamHTMLSurface_ViewSource(IntPtr instancePtr, HHTMLBrowser unBrowserHandle); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTMLSurface_CopyToClipboard")] + public static extern void ISteamHTMLSurface_CopyToClipboard(IntPtr instancePtr, HHTMLBrowser unBrowserHandle); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTMLSurface_PasteFromClipboard")] + public static extern void ISteamHTMLSurface_PasteFromClipboard(IntPtr instancePtr, HHTMLBrowser unBrowserHandle); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTMLSurface_Find")] + public static extern void ISteamHTMLSurface_Find(IntPtr instancePtr, HHTMLBrowser unBrowserHandle, InteropHelp.UTF8StringHandle pchSearchStr, [MarshalAs(UnmanagedType.I1)] bool bCurrentlyInFind, [MarshalAs(UnmanagedType.I1)] bool bReverse); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTMLSurface_StopFind")] + public static extern void ISteamHTMLSurface_StopFind(IntPtr instancePtr, HHTMLBrowser unBrowserHandle); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTMLSurface_GetLinkAtPosition")] + public static extern void ISteamHTMLSurface_GetLinkAtPosition(IntPtr instancePtr, HHTMLBrowser unBrowserHandle, int x, int y); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTMLSurface_SetCookie")] + public static extern void ISteamHTMLSurface_SetCookie(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchHostname, InteropHelp.UTF8StringHandle pchKey, InteropHelp.UTF8StringHandle pchValue, InteropHelp.UTF8StringHandle pchPath, uint nExpires, [MarshalAs(UnmanagedType.I1)] bool bSecure, [MarshalAs(UnmanagedType.I1)] bool bHTTPOnly); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTMLSurface_SetPageScaleFactor")] + public static extern void ISteamHTMLSurface_SetPageScaleFactor(IntPtr instancePtr, HHTMLBrowser unBrowserHandle, float flZoom, int nPointX, int nPointY); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTMLSurface_SetBackgroundMode")] + public static extern void ISteamHTMLSurface_SetBackgroundMode(IntPtr instancePtr, HHTMLBrowser unBrowserHandle, [MarshalAs(UnmanagedType.I1)] bool bBackgroundMode); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTMLSurface_SetDPIScalingFactor")] + public static extern void ISteamHTMLSurface_SetDPIScalingFactor(IntPtr instancePtr, HHTMLBrowser unBrowserHandle, float flDPIScaling); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTMLSurface_OpenDeveloperTools")] + public static extern void ISteamHTMLSurface_OpenDeveloperTools(IntPtr instancePtr, HHTMLBrowser unBrowserHandle); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTMLSurface_AllowStartRequest")] + public static extern void ISteamHTMLSurface_AllowStartRequest(IntPtr instancePtr, HHTMLBrowser unBrowserHandle, [MarshalAs(UnmanagedType.I1)] bool bAllowed); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTMLSurface_JSDialogResponse")] + public static extern void ISteamHTMLSurface_JSDialogResponse(IntPtr instancePtr, HHTMLBrowser unBrowserHandle, [MarshalAs(UnmanagedType.I1)] bool bResult); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTMLSurface_FileLoadDialogResponse")] + public static extern void ISteamHTMLSurface_FileLoadDialogResponse(IntPtr instancePtr, HHTMLBrowser unBrowserHandle, IntPtr pchSelectedFiles); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTTP_CreateHTTPRequest")] + public static extern uint ISteamHTTP_CreateHTTPRequest(IntPtr instancePtr, EHTTPMethod eHTTPRequestMethod, InteropHelp.UTF8StringHandle pchAbsoluteURL); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestContextValue")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamHTTP_SetHTTPRequestContextValue(IntPtr instancePtr, HTTPRequestHandle hRequest, ulong ulContextValue); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestNetworkActivityTimeout")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamHTTP_SetHTTPRequestNetworkActivityTimeout(IntPtr instancePtr, HTTPRequestHandle hRequest, uint unTimeoutSeconds); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestHeaderValue")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamHTTP_SetHTTPRequestHeaderValue(IntPtr instancePtr, HTTPRequestHandle hRequest, InteropHelp.UTF8StringHandle pchHeaderName, InteropHelp.UTF8StringHandle pchHeaderValue); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestGetOrPostParameter")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamHTTP_SetHTTPRequestGetOrPostParameter(IntPtr instancePtr, HTTPRequestHandle hRequest, InteropHelp.UTF8StringHandle pchParamName, InteropHelp.UTF8StringHandle pchParamValue); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTTP_SendHTTPRequest")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamHTTP_SendHTTPRequest(IntPtr instancePtr, HTTPRequestHandle hRequest, out SteamAPICall_t pCallHandle); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTTP_SendHTTPRequestAndStreamResponse")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamHTTP_SendHTTPRequestAndStreamResponse(IntPtr instancePtr, HTTPRequestHandle hRequest, out SteamAPICall_t pCallHandle); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTTP_DeferHTTPRequest")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamHTTP_DeferHTTPRequest(IntPtr instancePtr, HTTPRequestHandle hRequest); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTTP_PrioritizeHTTPRequest")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamHTTP_PrioritizeHTTPRequest(IntPtr instancePtr, HTTPRequestHandle hRequest); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTTP_GetHTTPResponseHeaderSize")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamHTTP_GetHTTPResponseHeaderSize(IntPtr instancePtr, HTTPRequestHandle hRequest, InteropHelp.UTF8StringHandle pchHeaderName, out uint unResponseHeaderSize); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTTP_GetHTTPResponseHeaderValue")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamHTTP_GetHTTPResponseHeaderValue(IntPtr instancePtr, HTTPRequestHandle hRequest, InteropHelp.UTF8StringHandle pchHeaderName, byte[] pHeaderValueBuffer, uint unBufferSize); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTTP_GetHTTPResponseBodySize")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamHTTP_GetHTTPResponseBodySize(IntPtr instancePtr, HTTPRequestHandle hRequest, out uint unBodySize); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTTP_GetHTTPResponseBodyData")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamHTTP_GetHTTPResponseBodyData(IntPtr instancePtr, HTTPRequestHandle hRequest, byte[] pBodyDataBuffer, uint unBufferSize); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTTP_GetHTTPStreamingResponseBodyData")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamHTTP_GetHTTPStreamingResponseBodyData(IntPtr instancePtr, HTTPRequestHandle hRequest, uint cOffset, byte[] pBodyDataBuffer, uint unBufferSize); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTTP_ReleaseHTTPRequest")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamHTTP_ReleaseHTTPRequest(IntPtr instancePtr, HTTPRequestHandle hRequest); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTTP_GetHTTPDownloadProgressPct")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamHTTP_GetHTTPDownloadProgressPct(IntPtr instancePtr, HTTPRequestHandle hRequest, out float pflPercentOut); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestRawPostBody")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamHTTP_SetHTTPRequestRawPostBody(IntPtr instancePtr, HTTPRequestHandle hRequest, InteropHelp.UTF8StringHandle pchContentType, byte[] pubBody, uint unBodyLen); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTTP_CreateCookieContainer")] + public static extern uint ISteamHTTP_CreateCookieContainer(IntPtr instancePtr, [MarshalAs(UnmanagedType.I1)] bool bAllowResponsesToModify); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTTP_ReleaseCookieContainer")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamHTTP_ReleaseCookieContainer(IntPtr instancePtr, HTTPCookieContainerHandle hCookieContainer); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTTP_SetCookie")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamHTTP_SetCookie(IntPtr instancePtr, HTTPCookieContainerHandle hCookieContainer, InteropHelp.UTF8StringHandle pchHost, InteropHelp.UTF8StringHandle pchUrl, InteropHelp.UTF8StringHandle pchCookie); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestCookieContainer")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamHTTP_SetHTTPRequestCookieContainer(IntPtr instancePtr, HTTPRequestHandle hRequest, HTTPCookieContainerHandle hCookieContainer); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestUserAgentInfo")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamHTTP_SetHTTPRequestUserAgentInfo(IntPtr instancePtr, HTTPRequestHandle hRequest, InteropHelp.UTF8StringHandle pchUserAgentInfo); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestRequiresVerifiedCertificate")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamHTTP_SetHTTPRequestRequiresVerifiedCertificate(IntPtr instancePtr, HTTPRequestHandle hRequest, [MarshalAs(UnmanagedType.I1)] bool bRequireVerifiedCertificate); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestAbsoluteTimeoutMS")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamHTTP_SetHTTPRequestAbsoluteTimeoutMS(IntPtr instancePtr, HTTPRequestHandle hRequest, uint unMilliseconds); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamHTTP_GetHTTPRequestWasTimedOut")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamHTTP_GetHTTPRequestWasTimedOut(IntPtr instancePtr, HTTPRequestHandle hRequest, out bool pbWasTimedOut); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInput_Init")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamInput_Init(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInput_Shutdown")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamInput_Shutdown(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInput_RunFrame")] + public static extern void ISteamInput_RunFrame(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInput_GetConnectedControllers")] + public static extern int ISteamInput_GetConnectedControllers(IntPtr instancePtr, [In][Out] InputHandle_t[] handlesOut); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInput_GetActionSetHandle")] + public static extern ulong ISteamInput_GetActionSetHandle(IntPtr instancePtr, InteropHelp.UTF8StringHandle pszActionSetName); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInput_ActivateActionSet")] + public static extern void ISteamInput_ActivateActionSet(IntPtr instancePtr, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInput_GetCurrentActionSet")] + public static extern ulong ISteamInput_GetCurrentActionSet(IntPtr instancePtr, InputHandle_t inputHandle); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInput_ActivateActionSetLayer")] + public static extern void ISteamInput_ActivateActionSetLayer(IntPtr instancePtr, InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInput_DeactivateActionSetLayer")] + public static extern void ISteamInput_DeactivateActionSetLayer(IntPtr instancePtr, InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInput_DeactivateAllActionSetLayers")] + public static extern void ISteamInput_DeactivateAllActionSetLayers(IntPtr instancePtr, InputHandle_t inputHandle); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInput_GetActiveActionSetLayers")] + public static extern int ISteamInput_GetActiveActionSetLayers(IntPtr instancePtr, InputHandle_t inputHandle, [In][Out] InputActionSetHandle_t[] handlesOut); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInput_GetDigitalActionHandle")] + public static extern ulong ISteamInput_GetDigitalActionHandle(IntPtr instancePtr, InteropHelp.UTF8StringHandle pszActionName); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInput_GetDigitalActionData")] + public static extern InputDigitalActionData_t ISteamInput_GetDigitalActionData(IntPtr instancePtr, InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInput_GetDigitalActionOrigins")] + public static extern int ISteamInput_GetDigitalActionOrigins(IntPtr instancePtr, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputDigitalActionHandle_t digitalActionHandle, [In][Out] EInputActionOrigin[] originsOut); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInput_GetAnalogActionHandle")] + public static extern ulong ISteamInput_GetAnalogActionHandle(IntPtr instancePtr, InteropHelp.UTF8StringHandle pszActionName); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInput_GetAnalogActionData")] + public static extern InputAnalogActionData_t ISteamInput_GetAnalogActionData(IntPtr instancePtr, InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInput_GetAnalogActionOrigins")] + public static extern int ISteamInput_GetAnalogActionOrigins(IntPtr instancePtr, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputAnalogActionHandle_t analogActionHandle, [In][Out] EInputActionOrigin[] originsOut); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInput_GetGlyphForActionOrigin")] + public static extern IntPtr ISteamInput_GetGlyphForActionOrigin(IntPtr instancePtr, EInputActionOrigin eOrigin); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInput_GetStringForActionOrigin")] + public static extern IntPtr ISteamInput_GetStringForActionOrigin(IntPtr instancePtr, EInputActionOrigin eOrigin); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInput_StopAnalogActionMomentum")] + public static extern void ISteamInput_StopAnalogActionMomentum(IntPtr instancePtr, InputHandle_t inputHandle, InputAnalogActionHandle_t eAction); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInput_GetMotionData")] + public static extern InputMotionData_t ISteamInput_GetMotionData(IntPtr instancePtr, InputHandle_t inputHandle); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInput_TriggerVibration")] + public static extern void ISteamInput_TriggerVibration(IntPtr instancePtr, InputHandle_t inputHandle, ushort usLeftSpeed, ushort usRightSpeed); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInput_SetLEDColor")] + public static extern void ISteamInput_SetLEDColor(IntPtr instancePtr, InputHandle_t inputHandle, byte nColorR, byte nColorG, byte nColorB, uint nFlags); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInput_TriggerHapticPulse")] + public static extern void ISteamInput_TriggerHapticPulse(IntPtr instancePtr, InputHandle_t inputHandle, ESteamControllerPad eTargetPad, ushort usDurationMicroSec); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInput_TriggerRepeatedHapticPulse")] + public static extern void ISteamInput_TriggerRepeatedHapticPulse(IntPtr instancePtr, InputHandle_t inputHandle, ESteamControllerPad eTargetPad, ushort usDurationMicroSec, ushort usOffMicroSec, ushort unRepeat, uint nFlags); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInput_ShowBindingPanel")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamInput_ShowBindingPanel(IntPtr instancePtr, InputHandle_t inputHandle); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInput_GetInputTypeForHandle")] + public static extern ESteamInputType ISteamInput_GetInputTypeForHandle(IntPtr instancePtr, InputHandle_t inputHandle); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInput_GetControllerForGamepadIndex")] + public static extern ulong ISteamInput_GetControllerForGamepadIndex(IntPtr instancePtr, int nIndex); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInput_GetGamepadIndexForController")] + public static extern int ISteamInput_GetGamepadIndexForController(IntPtr instancePtr, InputHandle_t ulinputHandle); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInput_GetStringForXboxOrigin")] + public static extern IntPtr ISteamInput_GetStringForXboxOrigin(IntPtr instancePtr, EXboxOrigin eOrigin); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInput_GetGlyphForXboxOrigin")] + public static extern IntPtr ISteamInput_GetGlyphForXboxOrigin(IntPtr instancePtr, EXboxOrigin eOrigin); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInput_GetActionOriginFromXboxOrigin")] + public static extern EInputActionOrigin ISteamInput_GetActionOriginFromXboxOrigin(IntPtr instancePtr, InputHandle_t inputHandle, EXboxOrigin eOrigin); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInput_TranslateActionOrigin")] + public static extern EInputActionOrigin ISteamInput_TranslateActionOrigin(IntPtr instancePtr, ESteamInputType eDestinationInputType, EInputActionOrigin eSourceOrigin); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInput_GetDeviceBindingRevision")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamInput_GetDeviceBindingRevision(IntPtr instancePtr, InputHandle_t inputHandle, out int pMajor, out int pMinor); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInput_GetRemotePlaySessionID")] + public static extern uint ISteamInput_GetRemotePlaySessionID(IntPtr instancePtr, InputHandle_t inputHandle); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInventory_GetResultStatus")] + public static extern EResult ISteamInventory_GetResultStatus(IntPtr instancePtr, SteamInventoryResult_t resultHandle); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInventory_GetResultItems")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamInventory_GetResultItems(IntPtr instancePtr, SteamInventoryResult_t resultHandle, [In][Out] SteamItemDetails_t[] pOutItemsArray, ref uint punOutItemsArraySize); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInventory_GetResultItemProperty")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamInventory_GetResultItemProperty(IntPtr instancePtr, SteamInventoryResult_t resultHandle, uint unItemIndex, InteropHelp.UTF8StringHandle pchPropertyName, IntPtr pchValueBuffer, ref uint punValueBufferSizeOut); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInventory_GetResultTimestamp")] + public static extern uint ISteamInventory_GetResultTimestamp(IntPtr instancePtr, SteamInventoryResult_t resultHandle); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInventory_CheckResultSteamID")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamInventory_CheckResultSteamID(IntPtr instancePtr, SteamInventoryResult_t resultHandle, CSteamID steamIDExpected); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInventory_DestroyResult")] + public static extern void ISteamInventory_DestroyResult(IntPtr instancePtr, SteamInventoryResult_t resultHandle); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInventory_GetAllItems")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamInventory_GetAllItems(IntPtr instancePtr, out SteamInventoryResult_t pResultHandle); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInventory_GetItemsByID")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamInventory_GetItemsByID(IntPtr instancePtr, out SteamInventoryResult_t pResultHandle, [In][Out] SteamItemInstanceID_t[] pInstanceIDs, uint unCountInstanceIDs); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInventory_SerializeResult")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamInventory_SerializeResult(IntPtr instancePtr, SteamInventoryResult_t resultHandle, byte[] pOutBuffer, out uint punOutBufferSize); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInventory_DeserializeResult")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamInventory_DeserializeResult(IntPtr instancePtr, out SteamInventoryResult_t pOutResultHandle, byte[] pBuffer, uint unBufferSize, [MarshalAs(UnmanagedType.I1)] bool bRESERVED_MUST_BE_FALSE); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInventory_GenerateItems")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamInventory_GenerateItems(IntPtr instancePtr, out SteamInventoryResult_t pResultHandle, [In][Out] SteamItemDef_t[] pArrayItemDefs, [In][Out] uint[] punArrayQuantity, uint unArrayLength); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInventory_GrantPromoItems")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamInventory_GrantPromoItems(IntPtr instancePtr, out SteamInventoryResult_t pResultHandle); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInventory_AddPromoItem")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamInventory_AddPromoItem(IntPtr instancePtr, out SteamInventoryResult_t pResultHandle, SteamItemDef_t itemDef); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInventory_AddPromoItems")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamInventory_AddPromoItems(IntPtr instancePtr, out SteamInventoryResult_t pResultHandle, [In][Out] SteamItemDef_t[] pArrayItemDefs, uint unArrayLength); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInventory_ConsumeItem")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamInventory_ConsumeItem(IntPtr instancePtr, out SteamInventoryResult_t pResultHandle, SteamItemInstanceID_t itemConsume, uint unQuantity); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInventory_ExchangeItems")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamInventory_ExchangeItems(IntPtr instancePtr, out SteamInventoryResult_t pResultHandle, [In][Out] SteamItemDef_t[] pArrayGenerate, [In][Out] uint[] punArrayGenerateQuantity, uint unArrayGenerateLength, [In][Out] SteamItemInstanceID_t[] pArrayDestroy, [In][Out] uint[] punArrayDestroyQuantity, uint unArrayDestroyLength); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInventory_TransferItemQuantity")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamInventory_TransferItemQuantity(IntPtr instancePtr, out SteamInventoryResult_t pResultHandle, SteamItemInstanceID_t itemIdSource, uint unQuantity, SteamItemInstanceID_t itemIdDest); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInventory_SendItemDropHeartbeat")] + public static extern void ISteamInventory_SendItemDropHeartbeat(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInventory_TriggerItemDrop")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamInventory_TriggerItemDrop(IntPtr instancePtr, out SteamInventoryResult_t pResultHandle, SteamItemDef_t dropListDefinition); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInventory_TradeItems")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamInventory_TradeItems(IntPtr instancePtr, out SteamInventoryResult_t pResultHandle, CSteamID steamIDTradePartner, [In][Out] SteamItemInstanceID_t[] pArrayGive, [In][Out] uint[] pArrayGiveQuantity, uint nArrayGiveLength, [In][Out] SteamItemInstanceID_t[] pArrayGet, [In][Out] uint[] pArrayGetQuantity, uint nArrayGetLength); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInventory_LoadItemDefinitions")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamInventory_LoadItemDefinitions(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInventory_GetItemDefinitionIDs")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamInventory_GetItemDefinitionIDs(IntPtr instancePtr, [In][Out] SteamItemDef_t[] pItemDefIDs, ref uint punItemDefIDsArraySize); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInventory_GetItemDefinitionProperty")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamInventory_GetItemDefinitionProperty(IntPtr instancePtr, SteamItemDef_t iDefinition, InteropHelp.UTF8StringHandle pchPropertyName, IntPtr pchValueBuffer, ref uint punValueBufferSizeOut); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInventory_RequestEligiblePromoItemDefinitionsIDs")] + public static extern ulong ISteamInventory_RequestEligiblePromoItemDefinitionsIDs(IntPtr instancePtr, CSteamID steamID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInventory_GetEligiblePromoItemDefinitionIDs")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamInventory_GetEligiblePromoItemDefinitionIDs(IntPtr instancePtr, CSteamID steamID, [In][Out] SteamItemDef_t[] pItemDefIDs, ref uint punItemDefIDsArraySize); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInventory_StartPurchase")] + public static extern ulong ISteamInventory_StartPurchase(IntPtr instancePtr, [In][Out] SteamItemDef_t[] pArrayItemDefs, [In][Out] uint[] punArrayQuantity, uint unArrayLength); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInventory_RequestPrices")] + public static extern ulong ISteamInventory_RequestPrices(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInventory_GetNumItemsWithPrices")] + public static extern uint ISteamInventory_GetNumItemsWithPrices(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInventory_GetItemsWithPrices")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamInventory_GetItemsWithPrices(IntPtr instancePtr, [In][Out] SteamItemDef_t[] pArrayItemDefs, [In][Out] ulong[] pCurrentPrices, [In][Out] ulong[] pBasePrices, uint unArrayLength); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInventory_GetItemPrice")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamInventory_GetItemPrice(IntPtr instancePtr, SteamItemDef_t iDefinition, out ulong pCurrentPrice, out ulong pBasePrice); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInventory_StartUpdateProperties")] + public static extern ulong ISteamInventory_StartUpdateProperties(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInventory_RemoveProperty")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamInventory_RemoveProperty(IntPtr instancePtr, SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, InteropHelp.UTF8StringHandle pchPropertyName); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInventory_SetPropertyString")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamInventory_SetPropertyString(IntPtr instancePtr, SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, InteropHelp.UTF8StringHandle pchPropertyName, InteropHelp.UTF8StringHandle pchPropertyValue); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInventory_SetPropertyBool")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamInventory_SetPropertyBool(IntPtr instancePtr, SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, InteropHelp.UTF8StringHandle pchPropertyName, [MarshalAs(UnmanagedType.I1)] bool bValue); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInventory_SetPropertyInt64")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamInventory_SetPropertyInt64(IntPtr instancePtr, SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, InteropHelp.UTF8StringHandle pchPropertyName, long nValue); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInventory_SetPropertyFloat")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamInventory_SetPropertyFloat(IntPtr instancePtr, SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, InteropHelp.UTF8StringHandle pchPropertyName, float flValue); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInventory_SubmitUpdateProperties")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamInventory_SubmitUpdateProperties(IntPtr instancePtr, SteamInventoryUpdateHandle_t handle, out SteamInventoryResult_t pResultHandle); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamInventory_InspectItem")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamInventory_InspectItem(IntPtr instancePtr, out SteamInventoryResult_t pResultHandle, InteropHelp.UTF8StringHandle pchItemToken); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmaking_GetFavoriteGameCount")] + public static extern int ISteamMatchmaking_GetFavoriteGameCount(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmaking_GetFavoriteGame")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMatchmaking_GetFavoriteGame(IntPtr instancePtr, int iGame, out AppId_t pnAppID, out uint pnIP, out ushort pnConnPort, out ushort pnQueryPort, out uint punFlags, out uint pRTime32LastPlayedOnServer); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmaking_AddFavoriteGame")] + public static extern int ISteamMatchmaking_AddFavoriteGame(IntPtr instancePtr, AppId_t nAppID, uint nIP, ushort nConnPort, ushort nQueryPort, uint unFlags, uint rTime32LastPlayedOnServer); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmaking_RemoveFavoriteGame")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMatchmaking_RemoveFavoriteGame(IntPtr instancePtr, AppId_t nAppID, uint nIP, ushort nConnPort, ushort nQueryPort, uint unFlags); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmaking_RequestLobbyList")] + public static extern ulong ISteamMatchmaking_RequestLobbyList(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmaking_AddRequestLobbyListStringFilter")] + public static extern void ISteamMatchmaking_AddRequestLobbyListStringFilter(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchKeyToMatch, InteropHelp.UTF8StringHandle pchValueToMatch, ELobbyComparison eComparisonType); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmaking_AddRequestLobbyListNumericalFilter")] + public static extern void ISteamMatchmaking_AddRequestLobbyListNumericalFilter(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchKeyToMatch, int nValueToMatch, ELobbyComparison eComparisonType); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmaking_AddRequestLobbyListNearValueFilter")] + public static extern void ISteamMatchmaking_AddRequestLobbyListNearValueFilter(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchKeyToMatch, int nValueToBeCloseTo); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmaking_AddRequestLobbyListFilterSlotsAvailable")] + public static extern void ISteamMatchmaking_AddRequestLobbyListFilterSlotsAvailable(IntPtr instancePtr, int nSlotsAvailable); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmaking_AddRequestLobbyListDistanceFilter")] + public static extern void ISteamMatchmaking_AddRequestLobbyListDistanceFilter(IntPtr instancePtr, ELobbyDistanceFilter eLobbyDistanceFilter); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmaking_AddRequestLobbyListResultCountFilter")] + public static extern void ISteamMatchmaking_AddRequestLobbyListResultCountFilter(IntPtr instancePtr, int cMaxResults); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmaking_AddRequestLobbyListCompatibleMembersFilter")] + public static extern void ISteamMatchmaking_AddRequestLobbyListCompatibleMembersFilter(IntPtr instancePtr, CSteamID steamIDLobby); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyByIndex")] + public static extern ulong ISteamMatchmaking_GetLobbyByIndex(IntPtr instancePtr, int iLobby); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmaking_CreateLobby")] + public static extern ulong ISteamMatchmaking_CreateLobby(IntPtr instancePtr, ELobbyType eLobbyType, int cMaxMembers); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmaking_JoinLobby")] + public static extern ulong ISteamMatchmaking_JoinLobby(IntPtr instancePtr, CSteamID steamIDLobby); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmaking_LeaveLobby")] + public static extern void ISteamMatchmaking_LeaveLobby(IntPtr instancePtr, CSteamID steamIDLobby); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmaking_InviteUserToLobby")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMatchmaking_InviteUserToLobby(IntPtr instancePtr, CSteamID steamIDLobby, CSteamID steamIDInvitee); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmaking_GetNumLobbyMembers")] + public static extern int ISteamMatchmaking_GetNumLobbyMembers(IntPtr instancePtr, CSteamID steamIDLobby); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyMemberByIndex")] + public static extern ulong ISteamMatchmaking_GetLobbyMemberByIndex(IntPtr instancePtr, CSteamID steamIDLobby, int iMember); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyData")] + public static extern IntPtr ISteamMatchmaking_GetLobbyData(IntPtr instancePtr, CSteamID steamIDLobby, InteropHelp.UTF8StringHandle pchKey); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyData")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMatchmaking_SetLobbyData(IntPtr instancePtr, CSteamID steamIDLobby, InteropHelp.UTF8StringHandle pchKey, InteropHelp.UTF8StringHandle pchValue); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyDataCount")] + public static extern int ISteamMatchmaking_GetLobbyDataCount(IntPtr instancePtr, CSteamID steamIDLobby); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyDataByIndex")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMatchmaking_GetLobbyDataByIndex(IntPtr instancePtr, CSteamID steamIDLobby, int iLobbyData, IntPtr pchKey, int cchKeyBufferSize, IntPtr pchValue, int cchValueBufferSize); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmaking_DeleteLobbyData")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMatchmaking_DeleteLobbyData(IntPtr instancePtr, CSteamID steamIDLobby, InteropHelp.UTF8StringHandle pchKey); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyMemberData")] + public static extern IntPtr ISteamMatchmaking_GetLobbyMemberData(IntPtr instancePtr, CSteamID steamIDLobby, CSteamID steamIDUser, InteropHelp.UTF8StringHandle pchKey); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyMemberData")] + public static extern void ISteamMatchmaking_SetLobbyMemberData(IntPtr instancePtr, CSteamID steamIDLobby, InteropHelp.UTF8StringHandle pchKey, InteropHelp.UTF8StringHandle pchValue); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmaking_SendLobbyChatMsg")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMatchmaking_SendLobbyChatMsg(IntPtr instancePtr, CSteamID steamIDLobby, byte[] pvMsgBody, int cubMsgBody); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyChatEntry")] + public static extern int ISteamMatchmaking_GetLobbyChatEntry(IntPtr instancePtr, CSteamID steamIDLobby, int iChatID, out CSteamID pSteamIDUser, byte[] pvData, int cubData, out EChatEntryType peChatEntryType); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmaking_RequestLobbyData")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMatchmaking_RequestLobbyData(IntPtr instancePtr, CSteamID steamIDLobby); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyGameServer")] + public static extern void ISteamMatchmaking_SetLobbyGameServer(IntPtr instancePtr, CSteamID steamIDLobby, uint unGameServerIP, ushort unGameServerPort, CSteamID steamIDGameServer); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyGameServer")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMatchmaking_GetLobbyGameServer(IntPtr instancePtr, CSteamID steamIDLobby, out uint punGameServerIP, out ushort punGameServerPort, out CSteamID psteamIDGameServer); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyMemberLimit")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMatchmaking_SetLobbyMemberLimit(IntPtr instancePtr, CSteamID steamIDLobby, int cMaxMembers); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyMemberLimit")] + public static extern int ISteamMatchmaking_GetLobbyMemberLimit(IntPtr instancePtr, CSteamID steamIDLobby); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyType")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMatchmaking_SetLobbyType(IntPtr instancePtr, CSteamID steamIDLobby, ELobbyType eLobbyType); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyJoinable")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMatchmaking_SetLobbyJoinable(IntPtr instancePtr, CSteamID steamIDLobby, [MarshalAs(UnmanagedType.I1)] bool bLobbyJoinable); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyOwner")] + public static extern ulong ISteamMatchmaking_GetLobbyOwner(IntPtr instancePtr, CSteamID steamIDLobby); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyOwner")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMatchmaking_SetLobbyOwner(IntPtr instancePtr, CSteamID steamIDLobby, CSteamID steamIDNewOwner); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLinkedLobby")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMatchmaking_SetLinkedLobby(IntPtr instancePtr, CSteamID steamIDLobby, CSteamID steamIDLobbyDependent); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RequestInternetServerList")] + public static extern IntPtr ISteamMatchmakingServers_RequestInternetServerList(IntPtr instancePtr, AppId_t iApp, IntPtr ppchFilters, uint nFilters, IntPtr pRequestServersResponse); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RequestLANServerList")] + public static extern IntPtr ISteamMatchmakingServers_RequestLANServerList(IntPtr instancePtr, AppId_t iApp, IntPtr pRequestServersResponse); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RequestFriendsServerList")] + public static extern IntPtr ISteamMatchmakingServers_RequestFriendsServerList(IntPtr instancePtr, AppId_t iApp, IntPtr ppchFilters, uint nFilters, IntPtr pRequestServersResponse); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RequestFavoritesServerList")] + public static extern IntPtr ISteamMatchmakingServers_RequestFavoritesServerList(IntPtr instancePtr, AppId_t iApp, IntPtr ppchFilters, uint nFilters, IntPtr pRequestServersResponse); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RequestHistoryServerList")] + public static extern IntPtr ISteamMatchmakingServers_RequestHistoryServerList(IntPtr instancePtr, AppId_t iApp, IntPtr ppchFilters, uint nFilters, IntPtr pRequestServersResponse); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RequestSpectatorServerList")] + public static extern IntPtr ISteamMatchmakingServers_RequestSpectatorServerList(IntPtr instancePtr, AppId_t iApp, IntPtr ppchFilters, uint nFilters, IntPtr pRequestServersResponse); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmakingServers_ReleaseRequest")] + public static extern void ISteamMatchmakingServers_ReleaseRequest(IntPtr instancePtr, HServerListRequest hServerListRequest); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmakingServers_GetServerDetails")] + public static extern IntPtr ISteamMatchmakingServers_GetServerDetails(IntPtr instancePtr, HServerListRequest hRequest, int iServer); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmakingServers_CancelQuery")] + public static extern void ISteamMatchmakingServers_CancelQuery(IntPtr instancePtr, HServerListRequest hRequest); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RefreshQuery")] + public static extern void ISteamMatchmakingServers_RefreshQuery(IntPtr instancePtr, HServerListRequest hRequest); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmakingServers_IsRefreshing")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMatchmakingServers_IsRefreshing(IntPtr instancePtr, HServerListRequest hRequest); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmakingServers_GetServerCount")] + public static extern int ISteamMatchmakingServers_GetServerCount(IntPtr instancePtr, HServerListRequest hRequest); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RefreshServer")] + public static extern void ISteamMatchmakingServers_RefreshServer(IntPtr instancePtr, HServerListRequest hRequest, int iServer); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmakingServers_PingServer")] + public static extern int ISteamMatchmakingServers_PingServer(IntPtr instancePtr, uint unIP, ushort usPort, IntPtr pRequestServersResponse); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmakingServers_PlayerDetails")] + public static extern int ISteamMatchmakingServers_PlayerDetails(IntPtr instancePtr, uint unIP, ushort usPort, IntPtr pRequestServersResponse); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmakingServers_ServerRules")] + public static extern int ISteamMatchmakingServers_ServerRules(IntPtr instancePtr, uint unIP, ushort usPort, IntPtr pRequestServersResponse); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMatchmakingServers_CancelServerQuery")] + public static extern void ISteamMatchmakingServers_CancelServerQuery(IntPtr instancePtr, HServerQuery hServerQuery); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameSearch_AddGameSearchParams")] + public static extern EGameSearchErrorCode_t ISteamGameSearch_AddGameSearchParams(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchKeyToFind, InteropHelp.UTF8StringHandle pchValuesToFind); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameSearch_SearchForGameWithLobby")] + public static extern EGameSearchErrorCode_t ISteamGameSearch_SearchForGameWithLobby(IntPtr instancePtr, CSteamID steamIDLobby, int nPlayerMin, int nPlayerMax); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameSearch_SearchForGameSolo")] + public static extern EGameSearchErrorCode_t ISteamGameSearch_SearchForGameSolo(IntPtr instancePtr, int nPlayerMin, int nPlayerMax); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameSearch_AcceptGame")] + public static extern EGameSearchErrorCode_t ISteamGameSearch_AcceptGame(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameSearch_DeclineGame")] + public static extern EGameSearchErrorCode_t ISteamGameSearch_DeclineGame(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameSearch_RetrieveConnectionDetails")] + public static extern EGameSearchErrorCode_t ISteamGameSearch_RetrieveConnectionDetails(IntPtr instancePtr, CSteamID steamIDHost, IntPtr pchConnectionDetails, int cubConnectionDetails); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameSearch_EndGameSearch")] + public static extern EGameSearchErrorCode_t ISteamGameSearch_EndGameSearch(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameSearch_SetGameHostParams")] + public static extern EGameSearchErrorCode_t ISteamGameSearch_SetGameHostParams(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchKey, InteropHelp.UTF8StringHandle pchValue); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameSearch_SetConnectionDetails")] + public static extern EGameSearchErrorCode_t ISteamGameSearch_SetConnectionDetails(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchConnectionDetails, int cubConnectionDetails); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameSearch_RequestPlayersForGame")] + public static extern EGameSearchErrorCode_t ISteamGameSearch_RequestPlayersForGame(IntPtr instancePtr, int nPlayerMin, int nPlayerMax, int nMaxTeamSize); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameSearch_HostConfirmGameStart")] + public static extern EGameSearchErrorCode_t ISteamGameSearch_HostConfirmGameStart(IntPtr instancePtr, ulong ullUniqueGameID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameSearch_CancelRequestPlayersForGame")] + public static extern EGameSearchErrorCode_t ISteamGameSearch_CancelRequestPlayersForGame(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameSearch_SubmitPlayerResult")] + public static extern EGameSearchErrorCode_t ISteamGameSearch_SubmitPlayerResult(IntPtr instancePtr, ulong ullUniqueGameID, CSteamID steamIDPlayer, EPlayerResult_t EPlayerResult); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamGameSearch_EndGame")] + public static extern EGameSearchErrorCode_t ISteamGameSearch_EndGame(IntPtr instancePtr, ulong ullUniqueGameID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamParties_GetNumActiveBeacons")] + public static extern uint ISteamParties_GetNumActiveBeacons(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamParties_GetBeaconByIndex")] + public static extern ulong ISteamParties_GetBeaconByIndex(IntPtr instancePtr, uint unIndex); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamParties_GetBeaconDetails")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamParties_GetBeaconDetails(IntPtr instancePtr, PartyBeaconID_t ulBeaconID, out CSteamID pSteamIDBeaconOwner, out SteamPartyBeaconLocation_t pLocation, IntPtr pchMetadata, int cchMetadata); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamParties_JoinParty")] + public static extern ulong ISteamParties_JoinParty(IntPtr instancePtr, PartyBeaconID_t ulBeaconID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamParties_GetNumAvailableBeaconLocations")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamParties_GetNumAvailableBeaconLocations(IntPtr instancePtr, out uint puNumLocations); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamParties_GetAvailableBeaconLocations")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamParties_GetAvailableBeaconLocations(IntPtr instancePtr, [In][Out] SteamPartyBeaconLocation_t[] pLocationList, uint uMaxNumLocations); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamParties_CreateBeacon")] + public static extern ulong ISteamParties_CreateBeacon(IntPtr instancePtr, uint unOpenSlots, ref SteamPartyBeaconLocation_t pBeaconLocation, InteropHelp.UTF8StringHandle pchConnectString, InteropHelp.UTF8StringHandle pchMetadata); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamParties_OnReservationCompleted")] + public static extern void ISteamParties_OnReservationCompleted(IntPtr instancePtr, PartyBeaconID_t ulBeacon, CSteamID steamIDUser); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamParties_CancelReservation")] + public static extern void ISteamParties_CancelReservation(IntPtr instancePtr, PartyBeaconID_t ulBeacon, CSteamID steamIDUser); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamParties_ChangeNumOpenSlots")] + public static extern ulong ISteamParties_ChangeNumOpenSlots(IntPtr instancePtr, PartyBeaconID_t ulBeacon, uint unOpenSlots); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamParties_DestroyBeacon")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamParties_DestroyBeacon(IntPtr instancePtr, PartyBeaconID_t ulBeacon); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamParties_GetBeaconLocationData")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamParties_GetBeaconLocationData(IntPtr instancePtr, SteamPartyBeaconLocation_t BeaconLocation, ESteamPartyBeaconLocationData eData, IntPtr pchDataStringOut, int cchDataStringOut); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusic_BIsEnabled")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMusic_BIsEnabled(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusic_BIsPlaying")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMusic_BIsPlaying(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusic_GetPlaybackStatus")] + public static extern AudioPlayback_Status ISteamMusic_GetPlaybackStatus(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusic_Play")] + public static extern void ISteamMusic_Play(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusic_Pause")] + public static extern void ISteamMusic_Pause(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusic_PlayPrevious")] + public static extern void ISteamMusic_PlayPrevious(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusic_PlayNext")] + public static extern void ISteamMusic_PlayNext(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusic_SetVolume")] + public static extern void ISteamMusic_SetVolume(IntPtr instancePtr, float flVolume); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusic_GetVolume")] + public static extern float ISteamMusic_GetVolume(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusicRemote_RegisterSteamMusicRemote")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMusicRemote_RegisterSteamMusicRemote(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchName); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusicRemote_DeregisterSteamMusicRemote")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMusicRemote_DeregisterSteamMusicRemote(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusicRemote_BIsCurrentMusicRemote")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMusicRemote_BIsCurrentMusicRemote(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusicRemote_BActivationSuccess")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMusicRemote_BActivationSuccess(IntPtr instancePtr, [MarshalAs(UnmanagedType.I1)] bool bValue); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusicRemote_SetDisplayName")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMusicRemote_SetDisplayName(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchDisplayName); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusicRemote_SetPNGIcon_64x64")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMusicRemote_SetPNGIcon_64x64(IntPtr instancePtr, byte[] pvBuffer, uint cbBufferLength); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusicRemote_EnablePlayPrevious")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMusicRemote_EnablePlayPrevious(IntPtr instancePtr, [MarshalAs(UnmanagedType.I1)] bool bValue); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusicRemote_EnablePlayNext")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMusicRemote_EnablePlayNext(IntPtr instancePtr, [MarshalAs(UnmanagedType.I1)] bool bValue); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusicRemote_EnableShuffled")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMusicRemote_EnableShuffled(IntPtr instancePtr, [MarshalAs(UnmanagedType.I1)] bool bValue); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusicRemote_EnableLooped")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMusicRemote_EnableLooped(IntPtr instancePtr, [MarshalAs(UnmanagedType.I1)] bool bValue); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusicRemote_EnableQueue")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMusicRemote_EnableQueue(IntPtr instancePtr, [MarshalAs(UnmanagedType.I1)] bool bValue); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusicRemote_EnablePlaylists")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMusicRemote_EnablePlaylists(IntPtr instancePtr, [MarshalAs(UnmanagedType.I1)] bool bValue); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusicRemote_UpdatePlaybackStatus")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMusicRemote_UpdatePlaybackStatus(IntPtr instancePtr, AudioPlayback_Status nStatus); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusicRemote_UpdateShuffled")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMusicRemote_UpdateShuffled(IntPtr instancePtr, [MarshalAs(UnmanagedType.I1)] bool bValue); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusicRemote_UpdateLooped")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMusicRemote_UpdateLooped(IntPtr instancePtr, [MarshalAs(UnmanagedType.I1)] bool bValue); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusicRemote_UpdateVolume")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMusicRemote_UpdateVolume(IntPtr instancePtr, float flValue); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusicRemote_CurrentEntryWillChange")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMusicRemote_CurrentEntryWillChange(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusicRemote_CurrentEntryIsAvailable")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMusicRemote_CurrentEntryIsAvailable(IntPtr instancePtr, [MarshalAs(UnmanagedType.I1)] bool bAvailable); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusicRemote_UpdateCurrentEntryText")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMusicRemote_UpdateCurrentEntryText(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchText); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusicRemote_UpdateCurrentEntryElapsedSeconds")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMusicRemote_UpdateCurrentEntryElapsedSeconds(IntPtr instancePtr, int nValue); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusicRemote_UpdateCurrentEntryCoverArt")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMusicRemote_UpdateCurrentEntryCoverArt(IntPtr instancePtr, byte[] pvBuffer, uint cbBufferLength); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusicRemote_CurrentEntryDidChange")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMusicRemote_CurrentEntryDidChange(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusicRemote_QueueWillChange")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMusicRemote_QueueWillChange(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusicRemote_ResetQueueEntries")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMusicRemote_ResetQueueEntries(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusicRemote_SetQueueEntry")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMusicRemote_SetQueueEntry(IntPtr instancePtr, int nID, int nPosition, InteropHelp.UTF8StringHandle pchEntryText); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusicRemote_SetCurrentQueueEntry")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMusicRemote_SetCurrentQueueEntry(IntPtr instancePtr, int nID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusicRemote_QueueDidChange")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMusicRemote_QueueDidChange(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusicRemote_PlaylistWillChange")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMusicRemote_PlaylistWillChange(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusicRemote_ResetPlaylistEntries")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMusicRemote_ResetPlaylistEntries(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusicRemote_SetPlaylistEntry")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMusicRemote_SetPlaylistEntry(IntPtr instancePtr, int nID, int nPosition, InteropHelp.UTF8StringHandle pchEntryText); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusicRemote_SetCurrentPlaylistEntry")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMusicRemote_SetCurrentPlaylistEntry(IntPtr instancePtr, int nID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamMusicRemote_PlaylistDidChange")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamMusicRemote_PlaylistDidChange(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworking_SendP2PPacket")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworking_SendP2PPacket(IntPtr instancePtr, CSteamID steamIDRemote, byte[] pubData, uint cubData, EP2PSend eP2PSendType, int nChannel); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworking_IsP2PPacketAvailable")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworking_IsP2PPacketAvailable(IntPtr instancePtr, out uint pcubMsgSize, int nChannel); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworking_ReadP2PPacket")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworking_ReadP2PPacket(IntPtr instancePtr, byte[] pubDest, uint cubDest, out uint pcubMsgSize, out CSteamID psteamIDRemote, int nChannel); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworking_AcceptP2PSessionWithUser")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworking_AcceptP2PSessionWithUser(IntPtr instancePtr, CSteamID steamIDRemote); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworking_CloseP2PSessionWithUser")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworking_CloseP2PSessionWithUser(IntPtr instancePtr, CSteamID steamIDRemote); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworking_CloseP2PChannelWithUser")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworking_CloseP2PChannelWithUser(IntPtr instancePtr, CSteamID steamIDRemote, int nChannel); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworking_GetP2PSessionState")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworking_GetP2PSessionState(IntPtr instancePtr, CSteamID steamIDRemote, out P2PSessionState_t pConnectionState); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworking_AllowP2PPacketRelay")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworking_AllowP2PPacketRelay(IntPtr instancePtr, [MarshalAs(UnmanagedType.I1)] bool bAllow); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworking_CreateListenSocket")] + public static extern uint ISteamNetworking_CreateListenSocket(IntPtr instancePtr, int nVirtualP2PPort, SteamIPAddress_t nIP, ushort nPort, [MarshalAs(UnmanagedType.I1)] bool bAllowUseOfPacketRelay); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworking_CreateP2PConnectionSocket")] + public static extern uint ISteamNetworking_CreateP2PConnectionSocket(IntPtr instancePtr, CSteamID steamIDTarget, int nVirtualPort, int nTimeoutSec, [MarshalAs(UnmanagedType.I1)] bool bAllowUseOfPacketRelay); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworking_CreateConnectionSocket")] + public static extern uint ISteamNetworking_CreateConnectionSocket(IntPtr instancePtr, SteamIPAddress_t nIP, ushort nPort, int nTimeoutSec); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworking_DestroySocket")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworking_DestroySocket(IntPtr instancePtr, SNetSocket_t hSocket, [MarshalAs(UnmanagedType.I1)] bool bNotifyRemoteEnd); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworking_DestroyListenSocket")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworking_DestroyListenSocket(IntPtr instancePtr, SNetListenSocket_t hSocket, [MarshalAs(UnmanagedType.I1)] bool bNotifyRemoteEnd); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworking_SendDataOnSocket")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworking_SendDataOnSocket(IntPtr instancePtr, SNetSocket_t hSocket, byte[] pubData, uint cubData, [MarshalAs(UnmanagedType.I1)] bool bReliable); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworking_IsDataAvailableOnSocket")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworking_IsDataAvailableOnSocket(IntPtr instancePtr, SNetSocket_t hSocket, out uint pcubMsgSize); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworking_RetrieveDataFromSocket")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworking_RetrieveDataFromSocket(IntPtr instancePtr, SNetSocket_t hSocket, byte[] pubDest, uint cubDest, out uint pcubMsgSize); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworking_IsDataAvailable")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworking_IsDataAvailable(IntPtr instancePtr, SNetListenSocket_t hListenSocket, out uint pcubMsgSize, out SNetSocket_t phSocket); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworking_RetrieveData")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworking_RetrieveData(IntPtr instancePtr, SNetListenSocket_t hListenSocket, byte[] pubDest, uint cubDest, out uint pcubMsgSize, out SNetSocket_t phSocket); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworking_GetSocketInfo")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworking_GetSocketInfo(IntPtr instancePtr, SNetSocket_t hSocket, out CSteamID pSteamIDRemote, out int peSocketStatus, out SteamIPAddress_t punIPRemote, out ushort punPortRemote); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworking_GetListenSocketInfo")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworking_GetListenSocketInfo(IntPtr instancePtr, SNetListenSocket_t hListenSocket, out SteamIPAddress_t pnIP, out ushort pnPort); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworking_GetSocketConnectionType")] + public static extern ESNetSocketConnectionType ISteamNetworking_GetSocketConnectionType(IntPtr instancePtr, SNetSocket_t hSocket); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworking_GetMaxPacketSize")] + public static extern int ISteamNetworking_GetMaxPacketSize(IntPtr instancePtr, SNetSocket_t hSocket); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingMessages_SendMessageToUser")] + public static extern EResult ISteamNetworkingMessages_SendMessageToUser(IntPtr instancePtr, ref SteamNetworkingIdentity identityRemote, IntPtr pubData, uint cubData, int nSendFlags, int nRemoteChannel); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingMessages_ReceiveMessagesOnChannel")] + public static extern int ISteamNetworkingMessages_ReceiveMessagesOnChannel(IntPtr instancePtr, int nLocalChannel, [In][Out] IntPtr[] ppOutMessages, int nMaxMessages); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingMessages_AcceptSessionWithUser")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworkingMessages_AcceptSessionWithUser(IntPtr instancePtr, ref SteamNetworkingIdentity identityRemote); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingMessages_CloseSessionWithUser")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworkingMessages_CloseSessionWithUser(IntPtr instancePtr, ref SteamNetworkingIdentity identityRemote); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingMessages_CloseChannelWithUser")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworkingMessages_CloseChannelWithUser(IntPtr instancePtr, ref SteamNetworkingIdentity identityRemote, int nLocalChannel); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingMessages_GetSessionConnectionInfo")] + public static extern ESteamNetworkingConnectionState ISteamNetworkingMessages_GetSessionConnectionInfo(IntPtr instancePtr, ref SteamNetworkingIdentity identityRemote, out SteamNetConnectionInfo_t pConnectionInfo, out SteamNetworkingQuickConnectionStatus pQuickStatus); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_CreateListenSocketIP")] + public static extern uint ISteamNetworkingSockets_CreateListenSocketIP(IntPtr instancePtr, ref SteamNetworkingIPAddr localAddress, int nOptions, [In][Out] SteamNetworkingConfigValue_t[] pOptions); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_ConnectByIPAddress")] + public static extern uint ISteamNetworkingSockets_ConnectByIPAddress(IntPtr instancePtr, ref SteamNetworkingIPAddr address, int nOptions, [In][Out] SteamNetworkingConfigValue_t[] pOptions); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_CreateListenSocketP2P")] + public static extern uint ISteamNetworkingSockets_CreateListenSocketP2P(IntPtr instancePtr, int nLocalVirtualPort, int nOptions, [In][Out] SteamNetworkingConfigValue_t[] pOptions); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_ConnectP2P")] + public static extern uint ISteamNetworkingSockets_ConnectP2P(IntPtr instancePtr, ref SteamNetworkingIdentity identityRemote, int nRemoteVirtualPort, int nOptions, [In][Out] SteamNetworkingConfigValue_t[] pOptions); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_AcceptConnection")] + public static extern EResult ISteamNetworkingSockets_AcceptConnection(IntPtr instancePtr, HSteamNetConnection hConn); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_CloseConnection")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworkingSockets_CloseConnection(IntPtr instancePtr, HSteamNetConnection hPeer, int nReason, InteropHelp.UTF8StringHandle pszDebug, [MarshalAs(UnmanagedType.I1)] bool bEnableLinger); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_CloseListenSocket")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworkingSockets_CloseListenSocket(IntPtr instancePtr, HSteamListenSocket hSocket); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_SetConnectionUserData")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworkingSockets_SetConnectionUserData(IntPtr instancePtr, HSteamNetConnection hPeer, long nUserData); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetConnectionUserData")] + public static extern long ISteamNetworkingSockets_GetConnectionUserData(IntPtr instancePtr, HSteamNetConnection hPeer); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_SetConnectionName")] + public static extern void ISteamNetworkingSockets_SetConnectionName(IntPtr instancePtr, HSteamNetConnection hPeer, InteropHelp.UTF8StringHandle pszName); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetConnectionName")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworkingSockets_GetConnectionName(IntPtr instancePtr, HSteamNetConnection hPeer, IntPtr pszName, int nMaxLen); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_SendMessageToConnection")] + public static extern EResult ISteamNetworkingSockets_SendMessageToConnection(IntPtr instancePtr, HSteamNetConnection hConn, IntPtr pData, uint cbData, int nSendFlags, out long pOutMessageNumber); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_SendMessages")] + public static extern void ISteamNetworkingSockets_SendMessages(IntPtr instancePtr, int nMessages, [In][Out] SteamNetworkingMessage_t[] pMessages, [In][Out] long[] pOutMessageNumberOrResult); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_FlushMessagesOnConnection")] + public static extern EResult ISteamNetworkingSockets_FlushMessagesOnConnection(IntPtr instancePtr, HSteamNetConnection hConn); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_ReceiveMessagesOnConnection")] + public static extern int ISteamNetworkingSockets_ReceiveMessagesOnConnection(IntPtr instancePtr, HSteamNetConnection hConn, [In][Out] IntPtr[] ppOutMessages, int nMaxMessages); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetConnectionInfo")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworkingSockets_GetConnectionInfo(IntPtr instancePtr, HSteamNetConnection hConn, out SteamNetConnectionInfo_t pInfo); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetQuickConnectionStatus")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworkingSockets_GetQuickConnectionStatus(IntPtr instancePtr, HSteamNetConnection hConn, out SteamNetworkingQuickConnectionStatus pStats); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetDetailedConnectionStatus")] + public static extern int ISteamNetworkingSockets_GetDetailedConnectionStatus(IntPtr instancePtr, HSteamNetConnection hConn, IntPtr pszBuf, int cbBuf); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetListenSocketAddress")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworkingSockets_GetListenSocketAddress(IntPtr instancePtr, HSteamListenSocket hSocket, out SteamNetworkingIPAddr address); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_CreateSocketPair")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworkingSockets_CreateSocketPair(IntPtr instancePtr, out HSteamNetConnection pOutConnection1, out HSteamNetConnection pOutConnection2, [MarshalAs(UnmanagedType.I1)] bool bUseNetworkLoopback, ref SteamNetworkingIdentity pIdentity1, ref SteamNetworkingIdentity pIdentity2); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetIdentity")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworkingSockets_GetIdentity(IntPtr instancePtr, out SteamNetworkingIdentity pIdentity); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_InitAuthentication")] + public static extern ESteamNetworkingAvailability ISteamNetworkingSockets_InitAuthentication(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetAuthenticationStatus")] + public static extern ESteamNetworkingAvailability ISteamNetworkingSockets_GetAuthenticationStatus(IntPtr instancePtr, out SteamNetAuthenticationStatus_t pDetails); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_CreatePollGroup")] + public static extern uint ISteamNetworkingSockets_CreatePollGroup(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_DestroyPollGroup")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworkingSockets_DestroyPollGroup(IntPtr instancePtr, HSteamNetPollGroup hPollGroup); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_SetConnectionPollGroup")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworkingSockets_SetConnectionPollGroup(IntPtr instancePtr, HSteamNetConnection hConn, HSteamNetPollGroup hPollGroup); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_ReceiveMessagesOnPollGroup")] + public static extern int ISteamNetworkingSockets_ReceiveMessagesOnPollGroup(IntPtr instancePtr, HSteamNetPollGroup hPollGroup, [In][Out] IntPtr[] ppOutMessages, int nMaxMessages); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_ReceivedRelayAuthTicket")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworkingSockets_ReceivedRelayAuthTicket(IntPtr instancePtr, IntPtr pvTicket, int cbTicket, out SteamDatagramRelayAuthTicket pOutParsedTicket); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_FindRelayAuthTicketForServer")] + public static extern int ISteamNetworkingSockets_FindRelayAuthTicketForServer(IntPtr instancePtr, ref SteamNetworkingIdentity identityGameServer, int nRemoteVirtualPort, out SteamDatagramRelayAuthTicket pOutParsedTicket); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_ConnectToHostedDedicatedServer")] + public static extern uint ISteamNetworkingSockets_ConnectToHostedDedicatedServer(IntPtr instancePtr, ref SteamNetworkingIdentity identityTarget, int nRemoteVirtualPort, int nOptions, [In][Out] SteamNetworkingConfigValue_t[] pOptions); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetHostedDedicatedServerPort")] + public static extern ushort ISteamNetworkingSockets_GetHostedDedicatedServerPort(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetHostedDedicatedServerPOPID")] + public static extern uint ISteamNetworkingSockets_GetHostedDedicatedServerPOPID(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetHostedDedicatedServerAddress")] + public static extern EResult ISteamNetworkingSockets_GetHostedDedicatedServerAddress(IntPtr instancePtr, out SteamDatagramHostedAddress pRouting); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_CreateHostedDedicatedServerListenSocket")] + public static extern uint ISteamNetworkingSockets_CreateHostedDedicatedServerListenSocket(IntPtr instancePtr, int nLocalVirtualPort, int nOptions, [In][Out] SteamNetworkingConfigValue_t[] pOptions); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetGameCoordinatorServerLogin")] + public static extern EResult ISteamNetworkingSockets_GetGameCoordinatorServerLogin(IntPtr instancePtr, out SteamDatagramGameCoordinatorServerLogin pLoginInfo, out int pcbSignedBlob, IntPtr pBlob); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_ConnectP2PCustomSignaling")] + public static extern uint ISteamNetworkingSockets_ConnectP2PCustomSignaling(IntPtr instancePtr, out ISteamNetworkingConnectionSignaling pSignaling, ref SteamNetworkingIdentity pPeerIdentity, int nRemoteVirtualPort, int nOptions, [In][Out] SteamNetworkingConfigValue_t[] pOptions); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_ReceivedP2PCustomSignal")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworkingSockets_ReceivedP2PCustomSignal(IntPtr instancePtr, IntPtr pMsg, int cbMsg, out ISteamNetworkingSignalingRecvContext pContext); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetCertificateRequest")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworkingSockets_GetCertificateRequest(IntPtr instancePtr, out int pcbBlob, IntPtr pBlob, out SteamNetworkingErrMsg errMsg); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_SetCertificate")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworkingSockets_SetCertificate(IntPtr instancePtr, IntPtr pCertificate, int cbCertificate, out SteamNetworkingErrMsg errMsg); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingSockets_RunCallbacks")] + public static extern void ISteamNetworkingSockets_RunCallbacks(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingUtils_AllocateMessage")] + public static extern IntPtr ISteamNetworkingUtils_AllocateMessage(IntPtr instancePtr, int cbAllocateBuffer); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingUtils_InitRelayNetworkAccess")] + public static extern void ISteamNetworkingUtils_InitRelayNetworkAccess(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetRelayNetworkStatus")] + public static extern ESteamNetworkingAvailability ISteamNetworkingUtils_GetRelayNetworkStatus(IntPtr instancePtr, out SteamRelayNetworkStatus_t pDetails); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetLocalPingLocation")] + public static extern float ISteamNetworkingUtils_GetLocalPingLocation(IntPtr instancePtr, out SteamNetworkPingLocation_t result); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingUtils_EstimatePingTimeBetweenTwoLocations")] + public static extern int ISteamNetworkingUtils_EstimatePingTimeBetweenTwoLocations(IntPtr instancePtr, ref SteamNetworkPingLocation_t location1, ref SteamNetworkPingLocation_t location2); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingUtils_EstimatePingTimeFromLocalHost")] + public static extern int ISteamNetworkingUtils_EstimatePingTimeFromLocalHost(IntPtr instancePtr, ref SteamNetworkPingLocation_t remoteLocation); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingUtils_ConvertPingLocationToString")] + public static extern void ISteamNetworkingUtils_ConvertPingLocationToString(IntPtr instancePtr, ref SteamNetworkPingLocation_t location, IntPtr pszBuf, int cchBufSize); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingUtils_ParsePingLocationString")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworkingUtils_ParsePingLocationString(IntPtr instancePtr, InteropHelp.UTF8StringHandle pszString, out SteamNetworkPingLocation_t result); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingUtils_CheckPingDataUpToDate")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworkingUtils_CheckPingDataUpToDate(IntPtr instancePtr, float flMaxAgeSeconds); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetPingToDataCenter")] + public static extern int ISteamNetworkingUtils_GetPingToDataCenter(IntPtr instancePtr, SteamNetworkingPOPID popID, out SteamNetworkingPOPID pViaRelayPoP); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetDirectPingToPOP")] + public static extern int ISteamNetworkingUtils_GetDirectPingToPOP(IntPtr instancePtr, SteamNetworkingPOPID popID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetPOPCount")] + public static extern int ISteamNetworkingUtils_GetPOPCount(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetPOPList")] + public static extern int ISteamNetworkingUtils_GetPOPList(IntPtr instancePtr, out SteamNetworkingPOPID list, int nListSz); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetLocalTimestamp")] + public static extern long ISteamNetworkingUtils_GetLocalTimestamp(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SetDebugOutputFunction")] + public static extern void ISteamNetworkingUtils_SetDebugOutputFunction(IntPtr instancePtr, ESteamNetworkingSocketsDebugOutputType eDetailLevel, FSteamNetworkingSocketsDebugOutput pfnFunc); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SetConfigValue")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworkingUtils_SetConfigValue(IntPtr instancePtr, ESteamNetworkingConfigValue eValue, ESteamNetworkingConfigScope eScopeType, IntPtr scopeObj, ESteamNetworkingConfigDataType eDataType, IntPtr pArg); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetConfigValue")] + public static extern ESteamNetworkingGetConfigValueResult ISteamNetworkingUtils_GetConfigValue(IntPtr instancePtr, ESteamNetworkingConfigValue eValue, ESteamNetworkingConfigScope eScopeType, IntPtr scopeObj, out ESteamNetworkingConfigDataType pOutDataType, IntPtr pResult, out ulong cbResult); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetConfigValueInfo")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworkingUtils_GetConfigValueInfo(IntPtr instancePtr, ESteamNetworkingConfigValue eValue, IntPtr pOutName, out ESteamNetworkingConfigDataType pOutDataType, out ESteamNetworkingConfigScope pOutScope, out ESteamNetworkingConfigValue pOutNextValue); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetFirstConfigValue")] + public static extern ESteamNetworkingConfigValue ISteamNetworkingUtils_GetFirstConfigValue(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SteamNetworkingIPAddr_ToString")] + public static extern void ISteamNetworkingUtils_SteamNetworkingIPAddr_ToString(IntPtr instancePtr, ref SteamNetworkingIPAddr addr, IntPtr buf, uint cbBuf, [MarshalAs(UnmanagedType.I1)] bool bWithPort); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SteamNetworkingIPAddr_ParseString")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworkingUtils_SteamNetworkingIPAddr_ParseString(IntPtr instancePtr, out SteamNetworkingIPAddr pAddr, InteropHelp.UTF8StringHandle pszStr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SteamNetworkingIdentity_ToString")] + public static extern void ISteamNetworkingUtils_SteamNetworkingIdentity_ToString(IntPtr instancePtr, ref SteamNetworkingIdentity identity, IntPtr buf, uint cbBuf); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SteamNetworkingIdentity_ParseString")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamNetworkingUtils_SteamNetworkingIdentity_ParseString(IntPtr instancePtr, out SteamNetworkingIdentity pIdentity, InteropHelp.UTF8StringHandle pszStr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamParentalSettings_BIsParentalLockEnabled")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamParentalSettings_BIsParentalLockEnabled(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamParentalSettings_BIsParentalLockLocked")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamParentalSettings_BIsParentalLockLocked(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamParentalSettings_BIsAppBlocked")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamParentalSettings_BIsAppBlocked(IntPtr instancePtr, AppId_t nAppID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamParentalSettings_BIsAppInBlockList")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamParentalSettings_BIsAppInBlockList(IntPtr instancePtr, AppId_t nAppID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamParentalSettings_BIsFeatureBlocked")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamParentalSettings_BIsFeatureBlocked(IntPtr instancePtr, EParentalFeature eFeature); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamParentalSettings_BIsFeatureInBlockList")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamParentalSettings_BIsFeatureInBlockList(IntPtr instancePtr, EParentalFeature eFeature); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemotePlay_GetSessionCount")] + public static extern uint ISteamRemotePlay_GetSessionCount(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemotePlay_GetSessionID")] + public static extern uint ISteamRemotePlay_GetSessionID(IntPtr instancePtr, int iSessionIndex); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemotePlay_GetSessionSteamID")] + public static extern ulong ISteamRemotePlay_GetSessionSteamID(IntPtr instancePtr, RemotePlaySessionID_t unSessionID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemotePlay_GetSessionClientName")] + public static extern IntPtr ISteamRemotePlay_GetSessionClientName(IntPtr instancePtr, RemotePlaySessionID_t unSessionID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemotePlay_GetSessionClientFormFactor")] + public static extern ESteamDeviceFormFactor ISteamRemotePlay_GetSessionClientFormFactor(IntPtr instancePtr, RemotePlaySessionID_t unSessionID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemotePlay_BGetSessionClientResolution")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamRemotePlay_BGetSessionClientResolution(IntPtr instancePtr, RemotePlaySessionID_t unSessionID, out int pnResolutionX, out int pnResolutionY); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemotePlay_BSendRemotePlayTogetherInvite")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamRemotePlay_BSendRemotePlayTogetherInvite(IntPtr instancePtr, CSteamID steamIDFriend); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileWrite")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamRemoteStorage_FileWrite(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchFile, byte[] pvData, int cubData); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileRead")] + public static extern int ISteamRemoteStorage_FileRead(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchFile, byte[] pvData, int cubDataToRead); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileWriteAsync")] + public static extern ulong ISteamRemoteStorage_FileWriteAsync(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchFile, byte[] pvData, uint cubData); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileReadAsync")] + public static extern ulong ISteamRemoteStorage_FileReadAsync(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchFile, uint nOffset, uint cubToRead); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileReadAsyncComplete")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamRemoteStorage_FileReadAsyncComplete(IntPtr instancePtr, SteamAPICall_t hReadCall, byte[] pvBuffer, uint cubToRead); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileForget")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamRemoteStorage_FileForget(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchFile); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileDelete")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamRemoteStorage_FileDelete(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchFile); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileShare")] + public static extern ulong ISteamRemoteStorage_FileShare(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchFile); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_SetSyncPlatforms")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamRemoteStorage_SetSyncPlatforms(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchFile, ERemoteStoragePlatform eRemoteStoragePlatform); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileWriteStreamOpen")] + public static extern ulong ISteamRemoteStorage_FileWriteStreamOpen(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchFile); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileWriteStreamWriteChunk")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamRemoteStorage_FileWriteStreamWriteChunk(IntPtr instancePtr, UGCFileWriteStreamHandle_t writeHandle, byte[] pvData, int cubData); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileWriteStreamClose")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamRemoteStorage_FileWriteStreamClose(IntPtr instancePtr, UGCFileWriteStreamHandle_t writeHandle); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileWriteStreamCancel")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamRemoteStorage_FileWriteStreamCancel(IntPtr instancePtr, UGCFileWriteStreamHandle_t writeHandle); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileExists")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamRemoteStorage_FileExists(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchFile); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_FilePersisted")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamRemoteStorage_FilePersisted(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchFile); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetFileSize")] + public static extern int ISteamRemoteStorage_GetFileSize(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchFile); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetFileTimestamp")] + public static extern long ISteamRemoteStorage_GetFileTimestamp(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchFile); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetSyncPlatforms")] + public static extern ERemoteStoragePlatform ISteamRemoteStorage_GetSyncPlatforms(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchFile); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetFileCount")] + public static extern int ISteamRemoteStorage_GetFileCount(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetFileNameAndSize")] + public static extern IntPtr ISteamRemoteStorage_GetFileNameAndSize(IntPtr instancePtr, int iFile, out int pnFileSizeInBytes); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetQuota")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamRemoteStorage_GetQuota(IntPtr instancePtr, out ulong pnTotalBytes, out ulong puAvailableBytes); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_IsCloudEnabledForAccount")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamRemoteStorage_IsCloudEnabledForAccount(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_IsCloudEnabledForApp")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamRemoteStorage_IsCloudEnabledForApp(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_SetCloudEnabledForApp")] + public static extern void ISteamRemoteStorage_SetCloudEnabledForApp(IntPtr instancePtr, [MarshalAs(UnmanagedType.I1)] bool bEnabled); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_UGCDownload")] + public static extern ulong ISteamRemoteStorage_UGCDownload(IntPtr instancePtr, UGCHandle_t hContent, uint unPriority); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetUGCDownloadProgress")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamRemoteStorage_GetUGCDownloadProgress(IntPtr instancePtr, UGCHandle_t hContent, out int pnBytesDownloaded, out int pnBytesExpected); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetUGCDetails")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamRemoteStorage_GetUGCDetails(IntPtr instancePtr, UGCHandle_t hContent, out AppId_t pnAppID, out IntPtr ppchName, out int pnFileSizeInBytes, out CSteamID pSteamIDOwner); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_UGCRead")] + public static extern int ISteamRemoteStorage_UGCRead(IntPtr instancePtr, UGCHandle_t hContent, byte[] pvData, int cubDataToRead, uint cOffset, EUGCReadAction eAction); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetCachedUGCCount")] + public static extern int ISteamRemoteStorage_GetCachedUGCCount(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetCachedUGCHandle")] + public static extern ulong ISteamRemoteStorage_GetCachedUGCHandle(IntPtr instancePtr, int iCachedContent); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_PublishWorkshopFile")] + public static extern ulong ISteamRemoteStorage_PublishWorkshopFile(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchFile, InteropHelp.UTF8StringHandle pchPreviewFile, AppId_t nConsumerAppId, InteropHelp.UTF8StringHandle pchTitle, InteropHelp.UTF8StringHandle pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, IntPtr pTags, EWorkshopFileType eWorkshopFileType); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_CreatePublishedFileUpdateRequest")] + public static extern ulong ISteamRemoteStorage_CreatePublishedFileUpdateRequest(IntPtr instancePtr, PublishedFileId_t unPublishedFileId); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_UpdatePublishedFileFile")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamRemoteStorage_UpdatePublishedFileFile(IntPtr instancePtr, PublishedFileUpdateHandle_t updateHandle, InteropHelp.UTF8StringHandle pchFile); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_UpdatePublishedFilePreviewFile")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamRemoteStorage_UpdatePublishedFilePreviewFile(IntPtr instancePtr, PublishedFileUpdateHandle_t updateHandle, InteropHelp.UTF8StringHandle pchPreviewFile); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_UpdatePublishedFileTitle")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamRemoteStorage_UpdatePublishedFileTitle(IntPtr instancePtr, PublishedFileUpdateHandle_t updateHandle, InteropHelp.UTF8StringHandle pchTitle); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_UpdatePublishedFileDescription")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamRemoteStorage_UpdatePublishedFileDescription(IntPtr instancePtr, PublishedFileUpdateHandle_t updateHandle, InteropHelp.UTF8StringHandle pchDescription); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_UpdatePublishedFileVisibility")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamRemoteStorage_UpdatePublishedFileVisibility(IntPtr instancePtr, PublishedFileUpdateHandle_t updateHandle, ERemoteStoragePublishedFileVisibility eVisibility); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_UpdatePublishedFileTags")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamRemoteStorage_UpdatePublishedFileTags(IntPtr instancePtr, PublishedFileUpdateHandle_t updateHandle, IntPtr pTags); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_CommitPublishedFileUpdate")] + public static extern ulong ISteamRemoteStorage_CommitPublishedFileUpdate(IntPtr instancePtr, PublishedFileUpdateHandle_t updateHandle); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetPublishedFileDetails")] + public static extern ulong ISteamRemoteStorage_GetPublishedFileDetails(IntPtr instancePtr, PublishedFileId_t unPublishedFileId, uint unMaxSecondsOld); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_DeletePublishedFile")] + public static extern ulong ISteamRemoteStorage_DeletePublishedFile(IntPtr instancePtr, PublishedFileId_t unPublishedFileId); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_EnumerateUserPublishedFiles")] + public static extern ulong ISteamRemoteStorage_EnumerateUserPublishedFiles(IntPtr instancePtr, uint unStartIndex); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_SubscribePublishedFile")] + public static extern ulong ISteamRemoteStorage_SubscribePublishedFile(IntPtr instancePtr, PublishedFileId_t unPublishedFileId); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_EnumerateUserSubscribedFiles")] + public static extern ulong ISteamRemoteStorage_EnumerateUserSubscribedFiles(IntPtr instancePtr, uint unStartIndex); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_UnsubscribePublishedFile")] + public static extern ulong ISteamRemoteStorage_UnsubscribePublishedFile(IntPtr instancePtr, PublishedFileId_t unPublishedFileId); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_UpdatePublishedFileSetChangeDescription")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamRemoteStorage_UpdatePublishedFileSetChangeDescription(IntPtr instancePtr, PublishedFileUpdateHandle_t updateHandle, InteropHelp.UTF8StringHandle pchChangeDescription); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetPublishedItemVoteDetails")] + public static extern ulong ISteamRemoteStorage_GetPublishedItemVoteDetails(IntPtr instancePtr, PublishedFileId_t unPublishedFileId); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_UpdateUserPublishedItemVote")] + public static extern ulong ISteamRemoteStorage_UpdateUserPublishedItemVote(IntPtr instancePtr, PublishedFileId_t unPublishedFileId, [MarshalAs(UnmanagedType.I1)] bool bVoteUp); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetUserPublishedItemVoteDetails")] + public static extern ulong ISteamRemoteStorage_GetUserPublishedItemVoteDetails(IntPtr instancePtr, PublishedFileId_t unPublishedFileId); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_EnumerateUserSharedWorkshopFiles")] + public static extern ulong ISteamRemoteStorage_EnumerateUserSharedWorkshopFiles(IntPtr instancePtr, CSteamID steamId, uint unStartIndex, IntPtr pRequiredTags, IntPtr pExcludedTags); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_PublishVideo")] + public static extern ulong ISteamRemoteStorage_PublishVideo(IntPtr instancePtr, EWorkshopVideoProvider eVideoProvider, InteropHelp.UTF8StringHandle pchVideoAccount, InteropHelp.UTF8StringHandle pchVideoIdentifier, InteropHelp.UTF8StringHandle pchPreviewFile, AppId_t nConsumerAppId, InteropHelp.UTF8StringHandle pchTitle, InteropHelp.UTF8StringHandle pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, IntPtr pTags); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_SetUserPublishedFileAction")] + public static extern ulong ISteamRemoteStorage_SetUserPublishedFileAction(IntPtr instancePtr, PublishedFileId_t unPublishedFileId, EWorkshopFileAction eAction); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_EnumeratePublishedFilesByUserAction")] + public static extern ulong ISteamRemoteStorage_EnumeratePublishedFilesByUserAction(IntPtr instancePtr, EWorkshopFileAction eAction, uint unStartIndex); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_EnumeratePublishedWorkshopFiles")] + public static extern ulong ISteamRemoteStorage_EnumeratePublishedWorkshopFiles(IntPtr instancePtr, EWorkshopEnumerationType eEnumerationType, uint unStartIndex, uint unCount, uint unDays, IntPtr pTags, IntPtr pUserTags); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamRemoteStorage_UGCDownloadToLocation")] + public static extern ulong ISteamRemoteStorage_UGCDownloadToLocation(IntPtr instancePtr, UGCHandle_t hContent, InteropHelp.UTF8StringHandle pchLocation, uint unPriority); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamScreenshots_WriteScreenshot")] + public static extern uint ISteamScreenshots_WriteScreenshot(IntPtr instancePtr, byte[] pubRGB, uint cubRGB, int nWidth, int nHeight); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamScreenshots_AddScreenshotToLibrary")] + public static extern uint ISteamScreenshots_AddScreenshotToLibrary(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchFilename, InteropHelp.UTF8StringHandle pchThumbnailFilename, int nWidth, int nHeight); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamScreenshots_TriggerScreenshot")] + public static extern void ISteamScreenshots_TriggerScreenshot(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamScreenshots_HookScreenshots")] + public static extern void ISteamScreenshots_HookScreenshots(IntPtr instancePtr, [MarshalAs(UnmanagedType.I1)] bool bHook); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamScreenshots_SetLocation")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamScreenshots_SetLocation(IntPtr instancePtr, ScreenshotHandle hScreenshot, InteropHelp.UTF8StringHandle pchLocation); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamScreenshots_TagUser")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamScreenshots_TagUser(IntPtr instancePtr, ScreenshotHandle hScreenshot, CSteamID steamID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamScreenshots_TagPublishedFile")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamScreenshots_TagPublishedFile(IntPtr instancePtr, ScreenshotHandle hScreenshot, PublishedFileId_t unPublishedFileID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamScreenshots_IsScreenshotsHooked")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamScreenshots_IsScreenshotsHooked(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamScreenshots_AddVRScreenshotToLibrary")] + public static extern uint ISteamScreenshots_AddVRScreenshotToLibrary(IntPtr instancePtr, EVRScreenshotType eType, InteropHelp.UTF8StringHandle pchFilename, InteropHelp.UTF8StringHandle pchVRFilename); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_CreateQueryUserUGCRequest")] + public static extern ulong ISteamUGC_CreateQueryUserUGCRequest(IntPtr instancePtr, AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint unPage); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_CreateQueryAllUGCRequestPage")] + public static extern ulong ISteamUGC_CreateQueryAllUGCRequestPage(IntPtr instancePtr, EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint unPage); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_CreateQueryAllUGCRequestCursor")] + public static extern ulong ISteamUGC_CreateQueryAllUGCRequestCursor(IntPtr instancePtr, EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, InteropHelp.UTF8StringHandle pchCursor); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_CreateQueryUGCDetailsRequest")] + public static extern ulong ISteamUGC_CreateQueryUGCDetailsRequest(IntPtr instancePtr, [In][Out] PublishedFileId_t[] pvecPublishedFileID, uint unNumPublishedFileIDs); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_SendQueryUGCRequest")] + public static extern ulong ISteamUGC_SendQueryUGCRequest(IntPtr instancePtr, UGCQueryHandle_t handle); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCResult")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_GetQueryUGCResult(IntPtr instancePtr, UGCQueryHandle_t handle, uint index, out SteamUGCDetails_t pDetails); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCNumTags")] + public static extern uint ISteamUGC_GetQueryUGCNumTags(IntPtr instancePtr, UGCQueryHandle_t handle, uint index); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCTag")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_GetQueryUGCTag(IntPtr instancePtr, UGCQueryHandle_t handle, uint index, uint indexTag, IntPtr pchValue, uint cchValueSize); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCTagDisplayName")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_GetQueryUGCTagDisplayName(IntPtr instancePtr, UGCQueryHandle_t handle, uint index, uint indexTag, IntPtr pchValue, uint cchValueSize); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCPreviewURL")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_GetQueryUGCPreviewURL(IntPtr instancePtr, UGCQueryHandle_t handle, uint index, IntPtr pchURL, uint cchURLSize); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCMetadata")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_GetQueryUGCMetadata(IntPtr instancePtr, UGCQueryHandle_t handle, uint index, IntPtr pchMetadata, uint cchMetadatasize); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCChildren")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_GetQueryUGCChildren(IntPtr instancePtr, UGCQueryHandle_t handle, uint index, [In][Out] PublishedFileId_t[] pvecPublishedFileID, uint cMaxEntries); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCStatistic")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_GetQueryUGCStatistic(IntPtr instancePtr, UGCQueryHandle_t handle, uint index, EItemStatistic eStatType, out ulong pStatValue); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCNumAdditionalPreviews")] + public static extern uint ISteamUGC_GetQueryUGCNumAdditionalPreviews(IntPtr instancePtr, UGCQueryHandle_t handle, uint index); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCAdditionalPreview")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_GetQueryUGCAdditionalPreview(IntPtr instancePtr, UGCQueryHandle_t handle, uint index, uint previewIndex, IntPtr pchURLOrVideoID, uint cchURLSize, IntPtr pchOriginalFileName, uint cchOriginalFileNameSize, out EItemPreviewType pPreviewType); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCNumKeyValueTags")] + public static extern uint ISteamUGC_GetQueryUGCNumKeyValueTags(IntPtr instancePtr, UGCQueryHandle_t handle, uint index); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCKeyValueTag")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_GetQueryUGCKeyValueTag(IntPtr instancePtr, UGCQueryHandle_t handle, uint index, uint keyValueTagIndex, IntPtr pchKey, uint cchKeySize, IntPtr pchValue, uint cchValueSize); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_GetQueryFirstUGCKeyValueTag")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_GetQueryFirstUGCKeyValueTag(IntPtr instancePtr, UGCQueryHandle_t handle, uint index, InteropHelp.UTF8StringHandle pchKey, IntPtr pchValue, uint cchValueSize); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_ReleaseQueryUGCRequest")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_ReleaseQueryUGCRequest(IntPtr instancePtr, UGCQueryHandle_t handle); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_AddRequiredTag")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_AddRequiredTag(IntPtr instancePtr, UGCQueryHandle_t handle, InteropHelp.UTF8StringHandle pTagName); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_AddRequiredTagGroup")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_AddRequiredTagGroup(IntPtr instancePtr, UGCQueryHandle_t handle, IntPtr pTagGroups); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_AddExcludedTag")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_AddExcludedTag(IntPtr instancePtr, UGCQueryHandle_t handle, InteropHelp.UTF8StringHandle pTagName); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_SetReturnOnlyIDs")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_SetReturnOnlyIDs(IntPtr instancePtr, UGCQueryHandle_t handle, [MarshalAs(UnmanagedType.I1)] bool bReturnOnlyIDs); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_SetReturnKeyValueTags")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_SetReturnKeyValueTags(IntPtr instancePtr, UGCQueryHandle_t handle, [MarshalAs(UnmanagedType.I1)] bool bReturnKeyValueTags); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_SetReturnLongDescription")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_SetReturnLongDescription(IntPtr instancePtr, UGCQueryHandle_t handle, [MarshalAs(UnmanagedType.I1)] bool bReturnLongDescription); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_SetReturnMetadata")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_SetReturnMetadata(IntPtr instancePtr, UGCQueryHandle_t handle, [MarshalAs(UnmanagedType.I1)] bool bReturnMetadata); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_SetReturnChildren")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_SetReturnChildren(IntPtr instancePtr, UGCQueryHandle_t handle, [MarshalAs(UnmanagedType.I1)] bool bReturnChildren); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_SetReturnAdditionalPreviews")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_SetReturnAdditionalPreviews(IntPtr instancePtr, UGCQueryHandle_t handle, [MarshalAs(UnmanagedType.I1)] bool bReturnAdditionalPreviews); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_SetReturnTotalOnly")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_SetReturnTotalOnly(IntPtr instancePtr, UGCQueryHandle_t handle, [MarshalAs(UnmanagedType.I1)] bool bReturnTotalOnly); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_SetReturnPlaytimeStats")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_SetReturnPlaytimeStats(IntPtr instancePtr, UGCQueryHandle_t handle, uint unDays); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_SetLanguage")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_SetLanguage(IntPtr instancePtr, UGCQueryHandle_t handle, InteropHelp.UTF8StringHandle pchLanguage); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_SetAllowCachedResponse")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_SetAllowCachedResponse(IntPtr instancePtr, UGCQueryHandle_t handle, uint unMaxAgeSeconds); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_SetCloudFileNameFilter")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_SetCloudFileNameFilter(IntPtr instancePtr, UGCQueryHandle_t handle, InteropHelp.UTF8StringHandle pMatchCloudFileName); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_SetMatchAnyTag")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_SetMatchAnyTag(IntPtr instancePtr, UGCQueryHandle_t handle, [MarshalAs(UnmanagedType.I1)] bool bMatchAnyTag); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_SetSearchText")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_SetSearchText(IntPtr instancePtr, UGCQueryHandle_t handle, InteropHelp.UTF8StringHandle pSearchText); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_SetRankedByTrendDays")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_SetRankedByTrendDays(IntPtr instancePtr, UGCQueryHandle_t handle, uint unDays); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_AddRequiredKeyValueTag")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_AddRequiredKeyValueTag(IntPtr instancePtr, UGCQueryHandle_t handle, InteropHelp.UTF8StringHandle pKey, InteropHelp.UTF8StringHandle pValue); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_RequestUGCDetails")] + public static extern ulong ISteamUGC_RequestUGCDetails(IntPtr instancePtr, PublishedFileId_t nPublishedFileID, uint unMaxAgeSeconds); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_CreateItem")] + public static extern ulong ISteamUGC_CreateItem(IntPtr instancePtr, AppId_t nConsumerAppId, EWorkshopFileType eFileType); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_StartItemUpdate")] + public static extern ulong ISteamUGC_StartItemUpdate(IntPtr instancePtr, AppId_t nConsumerAppId, PublishedFileId_t nPublishedFileID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_SetItemTitle")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_SetItemTitle(IntPtr instancePtr, UGCUpdateHandle_t handle, InteropHelp.UTF8StringHandle pchTitle); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_SetItemDescription")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_SetItemDescription(IntPtr instancePtr, UGCUpdateHandle_t handle, InteropHelp.UTF8StringHandle pchDescription); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_SetItemUpdateLanguage")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_SetItemUpdateLanguage(IntPtr instancePtr, UGCUpdateHandle_t handle, InteropHelp.UTF8StringHandle pchLanguage); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_SetItemMetadata")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_SetItemMetadata(IntPtr instancePtr, UGCUpdateHandle_t handle, InteropHelp.UTF8StringHandle pchMetaData); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_SetItemVisibility")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_SetItemVisibility(IntPtr instancePtr, UGCUpdateHandle_t handle, ERemoteStoragePublishedFileVisibility eVisibility); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_SetItemTags")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_SetItemTags(IntPtr instancePtr, UGCUpdateHandle_t updateHandle, IntPtr pTags); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_SetItemContent")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_SetItemContent(IntPtr instancePtr, UGCUpdateHandle_t handle, InteropHelp.UTF8StringHandle pszContentFolder); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_SetItemPreview")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_SetItemPreview(IntPtr instancePtr, UGCUpdateHandle_t handle, InteropHelp.UTF8StringHandle pszPreviewFile); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_SetAllowLegacyUpload")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_SetAllowLegacyUpload(IntPtr instancePtr, UGCUpdateHandle_t handle, [MarshalAs(UnmanagedType.I1)] bool bAllowLegacyUpload); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_RemoveAllItemKeyValueTags")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_RemoveAllItemKeyValueTags(IntPtr instancePtr, UGCUpdateHandle_t handle); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_RemoveItemKeyValueTags")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_RemoveItemKeyValueTags(IntPtr instancePtr, UGCUpdateHandle_t handle, InteropHelp.UTF8StringHandle pchKey); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_AddItemKeyValueTag")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_AddItemKeyValueTag(IntPtr instancePtr, UGCUpdateHandle_t handle, InteropHelp.UTF8StringHandle pchKey, InteropHelp.UTF8StringHandle pchValue); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_AddItemPreviewFile")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_AddItemPreviewFile(IntPtr instancePtr, UGCUpdateHandle_t handle, InteropHelp.UTF8StringHandle pszPreviewFile, EItemPreviewType type); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_AddItemPreviewVideo")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_AddItemPreviewVideo(IntPtr instancePtr, UGCUpdateHandle_t handle, InteropHelp.UTF8StringHandle pszVideoID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_UpdateItemPreviewFile")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_UpdateItemPreviewFile(IntPtr instancePtr, UGCUpdateHandle_t handle, uint index, InteropHelp.UTF8StringHandle pszPreviewFile); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_UpdateItemPreviewVideo")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_UpdateItemPreviewVideo(IntPtr instancePtr, UGCUpdateHandle_t handle, uint index, InteropHelp.UTF8StringHandle pszVideoID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_RemoveItemPreview")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_RemoveItemPreview(IntPtr instancePtr, UGCUpdateHandle_t handle, uint index); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_SubmitItemUpdate")] + public static extern ulong ISteamUGC_SubmitItemUpdate(IntPtr instancePtr, UGCUpdateHandle_t handle, InteropHelp.UTF8StringHandle pchChangeNote); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_GetItemUpdateProgress")] + public static extern EItemUpdateStatus ISteamUGC_GetItemUpdateProgress(IntPtr instancePtr, UGCUpdateHandle_t handle, out ulong punBytesProcessed, out ulong punBytesTotal); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_SetUserItemVote")] + public static extern ulong ISteamUGC_SetUserItemVote(IntPtr instancePtr, PublishedFileId_t nPublishedFileID, [MarshalAs(UnmanagedType.I1)] bool bVoteUp); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_GetUserItemVote")] + public static extern ulong ISteamUGC_GetUserItemVote(IntPtr instancePtr, PublishedFileId_t nPublishedFileID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_AddItemToFavorites")] + public static extern ulong ISteamUGC_AddItemToFavorites(IntPtr instancePtr, AppId_t nAppId, PublishedFileId_t nPublishedFileID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_RemoveItemFromFavorites")] + public static extern ulong ISteamUGC_RemoveItemFromFavorites(IntPtr instancePtr, AppId_t nAppId, PublishedFileId_t nPublishedFileID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_SubscribeItem")] + public static extern ulong ISteamUGC_SubscribeItem(IntPtr instancePtr, PublishedFileId_t nPublishedFileID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_UnsubscribeItem")] + public static extern ulong ISteamUGC_UnsubscribeItem(IntPtr instancePtr, PublishedFileId_t nPublishedFileID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_GetNumSubscribedItems")] + public static extern uint ISteamUGC_GetNumSubscribedItems(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_GetSubscribedItems")] + public static extern uint ISteamUGC_GetSubscribedItems(IntPtr instancePtr, [In][Out] PublishedFileId_t[] pvecPublishedFileID, uint cMaxEntries); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_GetItemState")] + public static extern uint ISteamUGC_GetItemState(IntPtr instancePtr, PublishedFileId_t nPublishedFileID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_GetItemInstallInfo")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_GetItemInstallInfo(IntPtr instancePtr, PublishedFileId_t nPublishedFileID, out ulong punSizeOnDisk, IntPtr pchFolder, uint cchFolderSize, out uint punTimeStamp); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_GetItemDownloadInfo")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_GetItemDownloadInfo(IntPtr instancePtr, PublishedFileId_t nPublishedFileID, out ulong punBytesDownloaded, out ulong punBytesTotal); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_DownloadItem")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_DownloadItem(IntPtr instancePtr, PublishedFileId_t nPublishedFileID, [MarshalAs(UnmanagedType.I1)] bool bHighPriority); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_BInitWorkshopForGameServer")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUGC_BInitWorkshopForGameServer(IntPtr instancePtr, DepotId_t unWorkshopDepotID, InteropHelp.UTF8StringHandle pszFolder); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_SuspendDownloads")] + public static extern void ISteamUGC_SuspendDownloads(IntPtr instancePtr, [MarshalAs(UnmanagedType.I1)] bool bSuspend); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_StartPlaytimeTracking")] + public static extern ulong ISteamUGC_StartPlaytimeTracking(IntPtr instancePtr, [In][Out] PublishedFileId_t[] pvecPublishedFileID, uint unNumPublishedFileIDs); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_StopPlaytimeTracking")] + public static extern ulong ISteamUGC_StopPlaytimeTracking(IntPtr instancePtr, [In][Out] PublishedFileId_t[] pvecPublishedFileID, uint unNumPublishedFileIDs); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_StopPlaytimeTrackingForAllItems")] + public static extern ulong ISteamUGC_StopPlaytimeTrackingForAllItems(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_AddDependency")] + public static extern ulong ISteamUGC_AddDependency(IntPtr instancePtr, PublishedFileId_t nParentPublishedFileID, PublishedFileId_t nChildPublishedFileID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_RemoveDependency")] + public static extern ulong ISteamUGC_RemoveDependency(IntPtr instancePtr, PublishedFileId_t nParentPublishedFileID, PublishedFileId_t nChildPublishedFileID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_AddAppDependency")] + public static extern ulong ISteamUGC_AddAppDependency(IntPtr instancePtr, PublishedFileId_t nPublishedFileID, AppId_t nAppID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_RemoveAppDependency")] + public static extern ulong ISteamUGC_RemoveAppDependency(IntPtr instancePtr, PublishedFileId_t nPublishedFileID, AppId_t nAppID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_GetAppDependencies")] + public static extern ulong ISteamUGC_GetAppDependencies(IntPtr instancePtr, PublishedFileId_t nPublishedFileID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUGC_DeleteItem")] + public static extern ulong ISteamUGC_DeleteItem(IntPtr instancePtr, PublishedFileId_t nPublishedFileID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUser_GetHSteamUser")] + public static extern int ISteamUser_GetHSteamUser(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUser_BLoggedOn")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUser_BLoggedOn(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUser_GetSteamID")] + public static extern ulong ISteamUser_GetSteamID(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUser_InitiateGameConnection")] + public static extern int ISteamUser_InitiateGameConnection(IntPtr instancePtr, byte[] pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, uint unIPServer, ushort usPortServer, [MarshalAs(UnmanagedType.I1)] bool bSecure); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUser_TerminateGameConnection")] + public static extern void ISteamUser_TerminateGameConnection(IntPtr instancePtr, uint unIPServer, ushort usPortServer); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUser_TrackAppUsageEvent")] + public static extern void ISteamUser_TrackAppUsageEvent(IntPtr instancePtr, CGameID gameID, int eAppUsageEvent, InteropHelp.UTF8StringHandle pchExtraInfo); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUser_GetUserDataFolder")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUser_GetUserDataFolder(IntPtr instancePtr, IntPtr pchBuffer, int cubBuffer); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUser_StartVoiceRecording")] + public static extern void ISteamUser_StartVoiceRecording(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUser_StopVoiceRecording")] + public static extern void ISteamUser_StopVoiceRecording(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUser_GetAvailableVoice")] + public static extern EVoiceResult ISteamUser_GetAvailableVoice(IntPtr instancePtr, out uint pcbCompressed, IntPtr pcbUncompressed_Deprecated, uint nUncompressedVoiceDesiredSampleRate_Deprecated); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUser_GetVoice")] + public static extern EVoiceResult ISteamUser_GetVoice(IntPtr instancePtr, [MarshalAs(UnmanagedType.I1)] bool bWantCompressed, byte[] pDestBuffer, uint cbDestBufferSize, out uint nBytesWritten, [MarshalAs(UnmanagedType.I1)] bool bWantUncompressed_Deprecated, IntPtr pUncompressedDestBuffer_Deprecated, uint cbUncompressedDestBufferSize_Deprecated, IntPtr nUncompressBytesWritten_Deprecated, uint nUncompressedVoiceDesiredSampleRate_Deprecated); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUser_DecompressVoice")] + public static extern EVoiceResult ISteamUser_DecompressVoice(IntPtr instancePtr, byte[] pCompressed, uint cbCompressed, byte[] pDestBuffer, uint cbDestBufferSize, out uint nBytesWritten, uint nDesiredSampleRate); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUser_GetVoiceOptimalSampleRate")] + public static extern uint ISteamUser_GetVoiceOptimalSampleRate(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUser_GetAuthSessionTicket")] + public static extern uint ISteamUser_GetAuthSessionTicket(IntPtr instancePtr, byte[] pTicket, int cbMaxTicket, out uint pcbTicket); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUser_BeginAuthSession")] + public static extern EBeginAuthSessionResult ISteamUser_BeginAuthSession(IntPtr instancePtr, byte[] pAuthTicket, int cbAuthTicket, CSteamID steamID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUser_EndAuthSession")] + public static extern void ISteamUser_EndAuthSession(IntPtr instancePtr, CSteamID steamID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUser_CancelAuthTicket")] + public static extern void ISteamUser_CancelAuthTicket(IntPtr instancePtr, HAuthTicket hAuthTicket); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUser_UserHasLicenseForApp")] + public static extern EUserHasLicenseForAppResult ISteamUser_UserHasLicenseForApp(IntPtr instancePtr, CSteamID steamID, AppId_t appID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUser_BIsBehindNAT")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUser_BIsBehindNAT(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUser_AdvertiseGame")] + public static extern void ISteamUser_AdvertiseGame(IntPtr instancePtr, CSteamID steamIDGameServer, uint unIPServer, ushort usPortServer); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUser_RequestEncryptedAppTicket")] + public static extern ulong ISteamUser_RequestEncryptedAppTicket(IntPtr instancePtr, byte[] pDataToInclude, int cbDataToInclude); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUser_GetEncryptedAppTicket")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUser_GetEncryptedAppTicket(IntPtr instancePtr, byte[] pTicket, int cbMaxTicket, out uint pcbTicket); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUser_GetGameBadgeLevel")] + public static extern int ISteamUser_GetGameBadgeLevel(IntPtr instancePtr, int nSeries, [MarshalAs(UnmanagedType.I1)] bool bFoil); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUser_GetPlayerSteamLevel")] + public static extern int ISteamUser_GetPlayerSteamLevel(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUser_RequestStoreAuthURL")] + public static extern ulong ISteamUser_RequestStoreAuthURL(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchRedirectURL); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUser_BIsPhoneVerified")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUser_BIsPhoneVerified(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUser_BIsTwoFactorEnabled")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUser_BIsTwoFactorEnabled(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUser_BIsPhoneIdentifying")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUser_BIsPhoneIdentifying(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUser_BIsPhoneRequiringVerification")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUser_BIsPhoneRequiringVerification(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUser_GetMarketEligibility")] + public static extern ulong ISteamUser_GetMarketEligibility(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUser_GetDurationControl")] + public static extern ulong ISteamUser_GetDurationControl(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUser_BSetDurationControlOnlineState")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUser_BSetDurationControlOnlineState(IntPtr instancePtr, EDurationControlOnlineState eNewState); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_RequestCurrentStats")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUserStats_RequestCurrentStats(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_GetStatInt32")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUserStats_GetStatInt32(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchName, out int pData); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_GetStatFloat")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUserStats_GetStatFloat(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchName, out float pData); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_SetStatInt32")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUserStats_SetStatInt32(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchName, int nData); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_SetStatFloat")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUserStats_SetStatFloat(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchName, float fData); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_UpdateAvgRateStat")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUserStats_UpdateAvgRateStat(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchName, float flCountThisSession, double dSessionLength); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievement")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUserStats_GetAchievement(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchName, out bool pbAchieved); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_SetAchievement")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUserStats_SetAchievement(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchName); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_ClearAchievement")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUserStats_ClearAchievement(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchName); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievementAndUnlockTime")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUserStats_GetAchievementAndUnlockTime(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchName, out bool pbAchieved, out uint punUnlockTime); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_StoreStats")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUserStats_StoreStats(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievementIcon")] + public static extern int ISteamUserStats_GetAchievementIcon(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchName); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievementDisplayAttribute")] + public static extern IntPtr ISteamUserStats_GetAchievementDisplayAttribute(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchName, InteropHelp.UTF8StringHandle pchKey); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_IndicateAchievementProgress")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUserStats_IndicateAchievementProgress(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchName, uint nCurProgress, uint nMaxProgress); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_GetNumAchievements")] + public static extern uint ISteamUserStats_GetNumAchievements(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievementName")] + public static extern IntPtr ISteamUserStats_GetAchievementName(IntPtr instancePtr, uint iAchievement); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_RequestUserStats")] + public static extern ulong ISteamUserStats_RequestUserStats(IntPtr instancePtr, CSteamID steamIDUser); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_GetUserStatInt32")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUserStats_GetUserStatInt32(IntPtr instancePtr, CSteamID steamIDUser, InteropHelp.UTF8StringHandle pchName, out int pData); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_GetUserStatFloat")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUserStats_GetUserStatFloat(IntPtr instancePtr, CSteamID steamIDUser, InteropHelp.UTF8StringHandle pchName, out float pData); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_GetUserAchievement")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUserStats_GetUserAchievement(IntPtr instancePtr, CSteamID steamIDUser, InteropHelp.UTF8StringHandle pchName, out bool pbAchieved); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_GetUserAchievementAndUnlockTime")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUserStats_GetUserAchievementAndUnlockTime(IntPtr instancePtr, CSteamID steamIDUser, InteropHelp.UTF8StringHandle pchName, out bool pbAchieved, out uint punUnlockTime); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_ResetAllStats")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUserStats_ResetAllStats(IntPtr instancePtr, [MarshalAs(UnmanagedType.I1)] bool bAchievementsToo); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_FindOrCreateLeaderboard")] + public static extern ulong ISteamUserStats_FindOrCreateLeaderboard(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchLeaderboardName, ELeaderboardSortMethod eLeaderboardSortMethod, ELeaderboardDisplayType eLeaderboardDisplayType); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_FindLeaderboard")] + public static extern ulong ISteamUserStats_FindLeaderboard(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchLeaderboardName); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_GetLeaderboardName")] + public static extern IntPtr ISteamUserStats_GetLeaderboardName(IntPtr instancePtr, SteamLeaderboard_t hSteamLeaderboard); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_GetLeaderboardEntryCount")] + public static extern int ISteamUserStats_GetLeaderboardEntryCount(IntPtr instancePtr, SteamLeaderboard_t hSteamLeaderboard); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_GetLeaderboardSortMethod")] + public static extern ELeaderboardSortMethod ISteamUserStats_GetLeaderboardSortMethod(IntPtr instancePtr, SteamLeaderboard_t hSteamLeaderboard); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_GetLeaderboardDisplayType")] + public static extern ELeaderboardDisplayType ISteamUserStats_GetLeaderboardDisplayType(IntPtr instancePtr, SteamLeaderboard_t hSteamLeaderboard); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_DownloadLeaderboardEntries")] + public static extern ulong ISteamUserStats_DownloadLeaderboardEntries(IntPtr instancePtr, SteamLeaderboard_t hSteamLeaderboard, ELeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_DownloadLeaderboardEntriesForUsers")] + public static extern ulong ISteamUserStats_DownloadLeaderboardEntriesForUsers(IntPtr instancePtr, SteamLeaderboard_t hSteamLeaderboard, [In][Out] CSteamID[] prgUsers, int cUsers); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_GetDownloadedLeaderboardEntry")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUserStats_GetDownloadedLeaderboardEntry(IntPtr instancePtr, SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, out LeaderboardEntry_t pLeaderboardEntry, [In][Out] int[] pDetails, int cDetailsMax); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_UploadLeaderboardScore")] + public static extern ulong ISteamUserStats_UploadLeaderboardScore(IntPtr instancePtr, SteamLeaderboard_t hSteamLeaderboard, ELeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int nScore, [In][Out] int[] pScoreDetails, int cScoreDetailsCount); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_AttachLeaderboardUGC")] + public static extern ulong ISteamUserStats_AttachLeaderboardUGC(IntPtr instancePtr, SteamLeaderboard_t hSteamLeaderboard, UGCHandle_t hUGC); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_GetNumberOfCurrentPlayers")] + public static extern ulong ISteamUserStats_GetNumberOfCurrentPlayers(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_RequestGlobalAchievementPercentages")] + public static extern ulong ISteamUserStats_RequestGlobalAchievementPercentages(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_GetMostAchievedAchievementInfo")] + public static extern int ISteamUserStats_GetMostAchievedAchievementInfo(IntPtr instancePtr, IntPtr pchName, uint unNameBufLen, out float pflPercent, out bool pbAchieved); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_GetNextMostAchievedAchievementInfo")] + public static extern int ISteamUserStats_GetNextMostAchievedAchievementInfo(IntPtr instancePtr, int iIteratorPrevious, IntPtr pchName, uint unNameBufLen, out float pflPercent, out bool pbAchieved); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievementAchievedPercent")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUserStats_GetAchievementAchievedPercent(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchName, out float pflPercent); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_RequestGlobalStats")] + public static extern ulong ISteamUserStats_RequestGlobalStats(IntPtr instancePtr, int nHistoryDays); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_GetGlobalStatInt64")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUserStats_GetGlobalStatInt64(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchStatName, out long pData); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_GetGlobalStatDouble")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUserStats_GetGlobalStatDouble(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchStatName, out double pData); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_GetGlobalStatHistoryInt64")] + public static extern int ISteamUserStats_GetGlobalStatHistoryInt64(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchStatName, [In][Out] long[] pData, uint cubData); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_GetGlobalStatHistoryDouble")] + public static extern int ISteamUserStats_GetGlobalStatHistoryDouble(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchStatName, [In][Out] double[] pData, uint cubData); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievementProgressLimitsInt32")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUserStats_GetAchievementProgressLimitsInt32(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchName, out int pnMinProgress, out int pnMaxProgress); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievementProgressLimitsFloat")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUserStats_GetAchievementProgressLimitsFloat(IntPtr instancePtr, InteropHelp.UTF8StringHandle pchName, out float pfMinProgress, out float pfMaxProgress); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUtils_GetSecondsSinceAppActive")] + public static extern uint ISteamUtils_GetSecondsSinceAppActive(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUtils_GetSecondsSinceComputerActive")] + public static extern uint ISteamUtils_GetSecondsSinceComputerActive(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUtils_GetConnectedUniverse")] + public static extern EUniverse ISteamUtils_GetConnectedUniverse(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUtils_GetServerRealTime")] + public static extern uint ISteamUtils_GetServerRealTime(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUtils_GetIPCountry")] + public static extern IntPtr ISteamUtils_GetIPCountry(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUtils_GetImageSize")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUtils_GetImageSize(IntPtr instancePtr, int iImage, out uint pnWidth, out uint pnHeight); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUtils_GetImageRGBA")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUtils_GetImageRGBA(IntPtr instancePtr, int iImage, byte[] pubDest, int nDestBufferSize); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUtils_GetCurrentBatteryPower")] + public static extern byte ISteamUtils_GetCurrentBatteryPower(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUtils_GetAppID")] + public static extern uint ISteamUtils_GetAppID(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUtils_SetOverlayNotificationPosition")] + public static extern void ISteamUtils_SetOverlayNotificationPosition(IntPtr instancePtr, ENotificationPosition eNotificationPosition); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUtils_IsAPICallCompleted")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUtils_IsAPICallCompleted(IntPtr instancePtr, SteamAPICall_t hSteamAPICall, out bool pbFailed); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUtils_GetAPICallFailureReason")] + public static extern ESteamAPICallFailure ISteamUtils_GetAPICallFailureReason(IntPtr instancePtr, SteamAPICall_t hSteamAPICall); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUtils_GetAPICallResult")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUtils_GetAPICallResult(IntPtr instancePtr, SteamAPICall_t hSteamAPICall, IntPtr pCallback, int cubCallback, int iCallbackExpected, out bool pbFailed); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUtils_GetIPCCallCount")] + public static extern uint ISteamUtils_GetIPCCallCount(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUtils_SetWarningMessageHook")] + public static extern void ISteamUtils_SetWarningMessageHook(IntPtr instancePtr, SteamAPIWarningMessageHook_t pFunction); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUtils_IsOverlayEnabled")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUtils_IsOverlayEnabled(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUtils_BOverlayNeedsPresent")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUtils_BOverlayNeedsPresent(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUtils_CheckFileSignature")] + public static extern ulong ISteamUtils_CheckFileSignature(IntPtr instancePtr, InteropHelp.UTF8StringHandle szFileName); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUtils_ShowGamepadTextInput")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUtils_ShowGamepadTextInput(IntPtr instancePtr, EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, InteropHelp.UTF8StringHandle pchDescription, uint unCharMax, InteropHelp.UTF8StringHandle pchExistingText); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUtils_GetEnteredGamepadTextLength")] + public static extern uint ISteamUtils_GetEnteredGamepadTextLength(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUtils_GetEnteredGamepadTextInput")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUtils_GetEnteredGamepadTextInput(IntPtr instancePtr, IntPtr pchText, uint cchText); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUtils_GetSteamUILanguage")] + public static extern IntPtr ISteamUtils_GetSteamUILanguage(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUtils_IsSteamRunningInVR")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUtils_IsSteamRunningInVR(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUtils_SetOverlayNotificationInset")] + public static extern void ISteamUtils_SetOverlayNotificationInset(IntPtr instancePtr, int nHorizontalInset, int nVerticalInset); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUtils_IsSteamInBigPictureMode")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUtils_IsSteamInBigPictureMode(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUtils_StartVRDashboard")] + public static extern void ISteamUtils_StartVRDashboard(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUtils_IsVRHeadsetStreamingEnabled")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUtils_IsVRHeadsetStreamingEnabled(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUtils_SetVRHeadsetStreamingEnabled")] + public static extern void ISteamUtils_SetVRHeadsetStreamingEnabled(IntPtr instancePtr, [MarshalAs(UnmanagedType.I1)] bool bEnabled); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUtils_IsSteamChinaLauncher")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUtils_IsSteamChinaLauncher(IntPtr instancePtr); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUtils_InitFilterText")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamUtils_InitFilterText(IntPtr instancePtr, uint unFilterOptions); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUtils_FilterText")] + public static extern int ISteamUtils_FilterText(IntPtr instancePtr, ETextFilteringContext eContext, CSteamID sourceSteamID, InteropHelp.UTF8StringHandle pchInputMessage, IntPtr pchOutFilteredText, uint nByteSizeOutFilteredText); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamUtils_GetIPv6ConnectivityState")] + public static extern ESteamIPv6ConnectivityState ISteamUtils_GetIPv6ConnectivityState(IntPtr instancePtr, ESteamIPv6ConnectivityProtocol eProtocol); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamVideo_GetVideoURL")] + public static extern void ISteamVideo_GetVideoURL(IntPtr instancePtr, AppId_t unVideoAppID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamVideo_IsBroadcasting")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamVideo_IsBroadcasting(IntPtr instancePtr, out int pnNumViewers); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamVideo_GetOPFSettings")] + public static extern void ISteamVideo_GetOPFSettings(IntPtr instancePtr, AppId_t unVideoAppID); + + [DllImport("steam_api", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SteamAPI_ISteamVideo_GetOPFStringForApp")] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool ISteamVideo_GetOPFStringForApp(IntPtr instancePtr, AppId_t unVideoAppID, IntPtr pchBuffer, ref int pnBufferSize); +} diff --git a/Assembly_Firstpass/Steamworks/NewUrlLaunchParameters_t.cs b/Assembly_Firstpass/Steamworks/NewUrlLaunchParameters_t.cs new file mode 100644 index 0000000..403a7dc --- /dev/null +++ b/Assembly_Firstpass/Steamworks/NewUrlLaunchParameters_t.cs @@ -0,0 +1,10 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8, Size = 1)] +[CallbackIdentity(1014)] +public struct NewUrlLaunchParameters_t +{ + public const int k_iCallback = 1014; +} diff --git a/Assembly_Firstpass/Steamworks/NumberOfCurrentPlayers_t.cs b/Assembly_Firstpass/Steamworks/NumberOfCurrentPlayers_t.cs new file mode 100644 index 0000000..381bf48 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/NumberOfCurrentPlayers_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1107)] +public struct NumberOfCurrentPlayers_t +{ + public const int k_iCallback = 1107; + + public byte m_bSuccess; + + public int m_cPlayers; +} diff --git a/Assembly_Firstpass/Steamworks/OverlayBrowserProtocolNavigation_t.cs b/Assembly_Firstpass/Steamworks/OverlayBrowserProtocolNavigation_t.cs new file mode 100644 index 0000000..f9eb59a --- /dev/null +++ b/Assembly_Firstpass/Steamworks/OverlayBrowserProtocolNavigation_t.cs @@ -0,0 +1,25 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(349)] +public struct OverlayBrowserProtocolNavigation_t +{ + public const int k_iCallback = 349; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1024)] + private byte[] rgchURI_; + + public string rgchURI + { + get + { + return InteropHelp.ByteArrayToStringUTF8(rgchURI_); + } + set + { + InteropHelp.StringToByteArrayUTF8(value, rgchURI_, 1024); + } + } +} diff --git a/Assembly_Firstpass/Steamworks/P2PSessionConnectFail_t.cs b/Assembly_Firstpass/Steamworks/P2PSessionConnectFail_t.cs new file mode 100644 index 0000000..499348d --- /dev/null +++ b/Assembly_Firstpass/Steamworks/P2PSessionConnectFail_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 1)] +[CallbackIdentity(1203)] +public struct P2PSessionConnectFail_t +{ + public const int k_iCallback = 1203; + + public CSteamID m_steamIDRemote; + + public byte m_eP2PSessionError; +} diff --git a/Assembly_Firstpass/Steamworks/P2PSessionRequest_t.cs b/Assembly_Firstpass/Steamworks/P2PSessionRequest_t.cs new file mode 100644 index 0000000..f8fc65f --- /dev/null +++ b/Assembly_Firstpass/Steamworks/P2PSessionRequest_t.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1202)] +public struct P2PSessionRequest_t +{ + public const int k_iCallback = 1202; + + public CSteamID m_steamIDRemote; +} diff --git a/Assembly_Firstpass/Steamworks/P2PSessionState_t.cs b/Assembly_Firstpass/Steamworks/P2PSessionState_t.cs new file mode 100644 index 0000000..fe20755 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/P2PSessionState_t.cs @@ -0,0 +1,23 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +public struct P2PSessionState_t +{ + public byte m_bConnectionActive; + + public byte m_bConnecting; + + public byte m_eP2PSessionError; + + public byte m_bUsingRelay; + + public int m_nBytesQueuedForSend; + + public int m_nPacketsQueuedForSend; + + public uint m_nRemoteIP; + + public ushort m_nRemotePort; +} diff --git a/Assembly_Firstpass/Steamworks/Packsize.cs b/Assembly_Firstpass/Steamworks/Packsize.cs new file mode 100644 index 0000000..01f6543 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/Packsize.cs @@ -0,0 +1,31 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +public static class Packsize +{ + [StructLayout(LayoutKind.Sequential, Pack = 8)] + private struct ValvePackingSentinel_t + { + private uint m_u32; + + private ulong m_u64; + + private ushort m_u16; + + private double m_d; + } + + public const int value = 8; + + public static bool Test() + { + int num = Marshal.SizeOf(typeof(ValvePackingSentinel_t)); + int num2 = Marshal.SizeOf(typeof(RemoteStorageEnumerateUserSubscribedFilesResult_t)); + if (num != 32 || num2 != 616) + { + return false; + } + return true; + } +} diff --git a/Assembly_Firstpass/Steamworks/PartyBeaconID_t.cs b/Assembly_Firstpass/Steamworks/PartyBeaconID_t.cs new file mode 100644 index 0000000..8a2ec99 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/PartyBeaconID_t.cs @@ -0,0 +1,65 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct PartyBeaconID_t : IEquatable<PartyBeaconID_t>, IComparable<PartyBeaconID_t> +{ + public static readonly PartyBeaconID_t Invalid = new PartyBeaconID_t(0uL); + + public ulong m_PartyBeaconID; + + public PartyBeaconID_t(ulong value) + { + m_PartyBeaconID = value; + } + + public override string ToString() + { + return m_PartyBeaconID.ToString(); + } + + public override bool Equals(object other) + { + if (other is PartyBeaconID_t) + { + return this == (PartyBeaconID_t)other; + } + return false; + } + + public override int GetHashCode() + { + return m_PartyBeaconID.GetHashCode(); + } + + public static bool operator ==(PartyBeaconID_t x, PartyBeaconID_t y) + { + return x.m_PartyBeaconID == y.m_PartyBeaconID; + } + + public static bool operator !=(PartyBeaconID_t x, PartyBeaconID_t y) + { + return !(x == y); + } + + public static explicit operator PartyBeaconID_t(ulong value) + { + return new PartyBeaconID_t(value); + } + + public static explicit operator ulong(PartyBeaconID_t that) + { + return that.m_PartyBeaconID; + } + + public bool Equals(PartyBeaconID_t other) + { + return m_PartyBeaconID == other.m_PartyBeaconID; + } + + public int CompareTo(PartyBeaconID_t other) + { + return m_PartyBeaconID.CompareTo(other.m_PartyBeaconID); + } +} diff --git a/Assembly_Firstpass/Steamworks/PersonaStateChange_t.cs b/Assembly_Firstpass/Steamworks/PersonaStateChange_t.cs new file mode 100644 index 0000000..10f6cfe --- /dev/null +++ b/Assembly_Firstpass/Steamworks/PersonaStateChange_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(304)] +public struct PersonaStateChange_t +{ + public const int k_iCallback = 304; + + public ulong m_ulSteamID; + + public EPersonaChange m_nChangeFlags; +} diff --git a/Assembly_Firstpass/Steamworks/PlaybackStatusHasChanged_t.cs b/Assembly_Firstpass/Steamworks/PlaybackStatusHasChanged_t.cs new file mode 100644 index 0000000..4c0cb0c --- /dev/null +++ b/Assembly_Firstpass/Steamworks/PlaybackStatusHasChanged_t.cs @@ -0,0 +1,10 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8, Size = 1)] +[CallbackIdentity(4001)] +public struct PlaybackStatusHasChanged_t +{ + public const int k_iCallback = 4001; +} diff --git a/Assembly_Firstpass/Steamworks/PlayerAcceptState_t.cs b/Assembly_Firstpass/Steamworks/PlayerAcceptState_t.cs new file mode 100644 index 0000000..516a6d2 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/PlayerAcceptState_t.cs @@ -0,0 +1,8 @@ +namespace Steamworks; + +public enum PlayerAcceptState_t +{ + k_EStateUnknown, + k_EStatePlayerAccepted, + k_EStatePlayerDeclined +} diff --git a/Assembly_Firstpass/Steamworks/PublishedFileId_t.cs b/Assembly_Firstpass/Steamworks/PublishedFileId_t.cs new file mode 100644 index 0000000..9e4af3a --- /dev/null +++ b/Assembly_Firstpass/Steamworks/PublishedFileId_t.cs @@ -0,0 +1,65 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct PublishedFileId_t : IEquatable<PublishedFileId_t>, IComparable<PublishedFileId_t> +{ + public static readonly PublishedFileId_t Invalid = new PublishedFileId_t(0uL); + + public ulong m_PublishedFileId; + + public PublishedFileId_t(ulong value) + { + m_PublishedFileId = value; + } + + public override string ToString() + { + return m_PublishedFileId.ToString(); + } + + public override bool Equals(object other) + { + if (other is PublishedFileId_t) + { + return this == (PublishedFileId_t)other; + } + return false; + } + + public override int GetHashCode() + { + return m_PublishedFileId.GetHashCode(); + } + + public static bool operator ==(PublishedFileId_t x, PublishedFileId_t y) + { + return x.m_PublishedFileId == y.m_PublishedFileId; + } + + public static bool operator !=(PublishedFileId_t x, PublishedFileId_t y) + { + return !(x == y); + } + + public static explicit operator PublishedFileId_t(ulong value) + { + return new PublishedFileId_t(value); + } + + public static explicit operator ulong(PublishedFileId_t that) + { + return that.m_PublishedFileId; + } + + public bool Equals(PublishedFileId_t other) + { + return m_PublishedFileId == other.m_PublishedFileId; + } + + public int CompareTo(PublishedFileId_t other) + { + return m_PublishedFileId.CompareTo(other.m_PublishedFileId); + } +} diff --git a/Assembly_Firstpass/Steamworks/PublishedFileUpdateHandle_t.cs b/Assembly_Firstpass/Steamworks/PublishedFileUpdateHandle_t.cs new file mode 100644 index 0000000..b4845cf --- /dev/null +++ b/Assembly_Firstpass/Steamworks/PublishedFileUpdateHandle_t.cs @@ -0,0 +1,65 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct PublishedFileUpdateHandle_t : IEquatable<PublishedFileUpdateHandle_t>, IComparable<PublishedFileUpdateHandle_t> +{ + public static readonly PublishedFileUpdateHandle_t Invalid = new PublishedFileUpdateHandle_t(ulong.MaxValue); + + public ulong m_PublishedFileUpdateHandle; + + public PublishedFileUpdateHandle_t(ulong value) + { + m_PublishedFileUpdateHandle = value; + } + + public override string ToString() + { + return m_PublishedFileUpdateHandle.ToString(); + } + + public override bool Equals(object other) + { + if (other is PublishedFileUpdateHandle_t) + { + return this == (PublishedFileUpdateHandle_t)other; + } + return false; + } + + public override int GetHashCode() + { + return m_PublishedFileUpdateHandle.GetHashCode(); + } + + public static bool operator ==(PublishedFileUpdateHandle_t x, PublishedFileUpdateHandle_t y) + { + return x.m_PublishedFileUpdateHandle == y.m_PublishedFileUpdateHandle; + } + + public static bool operator !=(PublishedFileUpdateHandle_t x, PublishedFileUpdateHandle_t y) + { + return !(x == y); + } + + public static explicit operator PublishedFileUpdateHandle_t(ulong value) + { + return new PublishedFileUpdateHandle_t(value); + } + + public static explicit operator ulong(PublishedFileUpdateHandle_t that) + { + return that.m_PublishedFileUpdateHandle; + } + + public bool Equals(PublishedFileUpdateHandle_t other) + { + return m_PublishedFileUpdateHandle == other.m_PublishedFileUpdateHandle; + } + + public int CompareTo(PublishedFileUpdateHandle_t other) + { + return m_PublishedFileUpdateHandle.CompareTo(other.m_PublishedFileUpdateHandle); + } +} diff --git a/Assembly_Firstpass/Steamworks/RTime32.cs b/Assembly_Firstpass/Steamworks/RTime32.cs new file mode 100644 index 0000000..9a99665 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/RTime32.cs @@ -0,0 +1,63 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct RTime32 : IEquatable<RTime32>, IComparable<RTime32> +{ + public uint m_RTime32; + + public RTime32(uint value) + { + m_RTime32 = value; + } + + public override string ToString() + { + return m_RTime32.ToString(); + } + + public override bool Equals(object other) + { + if (other is RTime32) + { + return this == (RTime32)other; + } + return false; + } + + public override int GetHashCode() + { + return m_RTime32.GetHashCode(); + } + + public static bool operator ==(RTime32 x, RTime32 y) + { + return x.m_RTime32 == y.m_RTime32; + } + + public static bool operator !=(RTime32 x, RTime32 y) + { + return !(x == y); + } + + public static explicit operator RTime32(uint value) + { + return new RTime32(value); + } + + public static explicit operator uint(RTime32 that) + { + return that.m_RTime32; + } + + public bool Equals(RTime32 other) + { + return m_RTime32 == other.m_RTime32; + } + + public int CompareTo(RTime32 other) + { + return m_RTime32.CompareTo(other.m_RTime32); + } +} diff --git a/Assembly_Firstpass/Steamworks/RegisterActivationCodeResponse_t.cs b/Assembly_Firstpass/Steamworks/RegisterActivationCodeResponse_t.cs new file mode 100644 index 0000000..c198357 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/RegisterActivationCodeResponse_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1008)] +public struct RegisterActivationCodeResponse_t +{ + public const int k_iCallback = 1008; + + public ERegisterActivationCodeResult m_eResult; + + public uint m_unPackageRegistered; +} diff --git a/Assembly_Firstpass/Steamworks/RemotePlaySessionID_t.cs b/Assembly_Firstpass/Steamworks/RemotePlaySessionID_t.cs new file mode 100644 index 0000000..8662115 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/RemotePlaySessionID_t.cs @@ -0,0 +1,63 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct RemotePlaySessionID_t : IEquatable<RemotePlaySessionID_t>, IComparable<RemotePlaySessionID_t> +{ + public uint m_RemotePlaySessionID; + + public RemotePlaySessionID_t(uint value) + { + m_RemotePlaySessionID = value; + } + + public override string ToString() + { + return m_RemotePlaySessionID.ToString(); + } + + public override bool Equals(object other) + { + if (other is RemotePlaySessionID_t) + { + return this == (RemotePlaySessionID_t)other; + } + return false; + } + + public override int GetHashCode() + { + return m_RemotePlaySessionID.GetHashCode(); + } + + public static bool operator ==(RemotePlaySessionID_t x, RemotePlaySessionID_t y) + { + return x.m_RemotePlaySessionID == y.m_RemotePlaySessionID; + } + + public static bool operator !=(RemotePlaySessionID_t x, RemotePlaySessionID_t y) + { + return !(x == y); + } + + public static explicit operator RemotePlaySessionID_t(uint value) + { + return new RemotePlaySessionID_t(value); + } + + public static explicit operator uint(RemotePlaySessionID_t that) + { + return that.m_RemotePlaySessionID; + } + + public bool Equals(RemotePlaySessionID_t other) + { + return m_RemotePlaySessionID == other.m_RemotePlaySessionID; + } + + public int CompareTo(RemotePlaySessionID_t other) + { + return m_RemotePlaySessionID.CompareTo(other.m_RemotePlaySessionID); + } +} diff --git a/Assembly_Firstpass/Steamworks/RemoteStorageAppSyncProgress_t.cs b/Assembly_Firstpass/Steamworks/RemoteStorageAppSyncProgress_t.cs new file mode 100644 index 0000000..e9fbee6 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/RemoteStorageAppSyncProgress_t.cs @@ -0,0 +1,34 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1303)] +public struct RemoteStorageAppSyncProgress_t +{ + public const int k_iCallback = 1303; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 260)] + private byte[] m_rgchCurrentFile_; + + public AppId_t m_nAppID; + + public uint m_uBytesTransferredThisChunk; + + public double m_dAppPercentComplete; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bUploading; + + public string m_rgchCurrentFile + { + get + { + return InteropHelp.ByteArrayToStringUTF8(m_rgchCurrentFile_); + } + set + { + InteropHelp.StringToByteArrayUTF8(value, m_rgchCurrentFile_, 260); + } + } +} diff --git a/Assembly_Firstpass/Steamworks/RemoteStorageAppSyncStatusCheck_t.cs b/Assembly_Firstpass/Steamworks/RemoteStorageAppSyncStatusCheck_t.cs new file mode 100644 index 0000000..9dfa5ad --- /dev/null +++ b/Assembly_Firstpass/Steamworks/RemoteStorageAppSyncStatusCheck_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1305)] +public struct RemoteStorageAppSyncStatusCheck_t +{ + public const int k_iCallback = 1305; + + public AppId_t m_nAppID; + + public EResult m_eResult; +} diff --git a/Assembly_Firstpass/Steamworks/RemoteStorageAppSyncedClient_t.cs b/Assembly_Firstpass/Steamworks/RemoteStorageAppSyncedClient_t.cs new file mode 100644 index 0000000..3ecc263 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/RemoteStorageAppSyncedClient_t.cs @@ -0,0 +1,16 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1301)] +public struct RemoteStorageAppSyncedClient_t +{ + public const int k_iCallback = 1301; + + public AppId_t m_nAppID; + + public EResult m_eResult; + + public int m_unNumDownloads; +} diff --git a/Assembly_Firstpass/Steamworks/RemoteStorageAppSyncedServer_t.cs b/Assembly_Firstpass/Steamworks/RemoteStorageAppSyncedServer_t.cs new file mode 100644 index 0000000..8f8c2e6 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/RemoteStorageAppSyncedServer_t.cs @@ -0,0 +1,16 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1302)] +public struct RemoteStorageAppSyncedServer_t +{ + public const int k_iCallback = 1302; + + public AppId_t m_nAppID; + + public EResult m_eResult; + + public int m_unNumUploads; +} diff --git a/Assembly_Firstpass/Steamworks/RemoteStorageDeletePublishedFileResult_t.cs b/Assembly_Firstpass/Steamworks/RemoteStorageDeletePublishedFileResult_t.cs new file mode 100644 index 0000000..46d8b30 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/RemoteStorageDeletePublishedFileResult_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1311)] +public struct RemoteStorageDeletePublishedFileResult_t +{ + public const int k_iCallback = 1311; + + public EResult m_eResult; + + public PublishedFileId_t m_nPublishedFileId; +} diff --git a/Assembly_Firstpass/Steamworks/RemoteStorageDownloadUGCResult_t.cs b/Assembly_Firstpass/Steamworks/RemoteStorageDownloadUGCResult_t.cs new file mode 100644 index 0000000..717625b --- /dev/null +++ b/Assembly_Firstpass/Steamworks/RemoteStorageDownloadUGCResult_t.cs @@ -0,0 +1,35 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1317)] +public struct RemoteStorageDownloadUGCResult_t +{ + public const int k_iCallback = 1317; + + public EResult m_eResult; + + public UGCHandle_t m_hFile; + + public AppId_t m_nAppID; + + public int m_nSizeInBytes; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 260)] + private byte[] m_pchFileName_; + + public ulong m_ulSteamIDOwner; + + public string m_pchFileName + { + get + { + return InteropHelp.ByteArrayToStringUTF8(m_pchFileName_); + } + set + { + InteropHelp.StringToByteArrayUTF8(value, m_pchFileName_, 260); + } + } +} diff --git a/Assembly_Firstpass/Steamworks/RemoteStorageEnumeratePublishedFilesByUserActionResult_t.cs b/Assembly_Firstpass/Steamworks/RemoteStorageEnumeratePublishedFilesByUserActionResult_t.cs new file mode 100644 index 0000000..988f23d --- /dev/null +++ b/Assembly_Firstpass/Steamworks/RemoteStorageEnumeratePublishedFilesByUserActionResult_t.cs @@ -0,0 +1,24 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1328)] +public struct RemoteStorageEnumeratePublishedFilesByUserActionResult_t +{ + public const int k_iCallback = 1328; + + public EResult m_eResult; + + public EWorkshopFileAction m_eAction; + + public int m_nResultsReturned; + + public int m_nTotalResultCount; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50)] + public PublishedFileId_t[] m_rgPublishedFileId; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50)] + public uint[] m_rgRTimeUpdated; +} diff --git a/Assembly_Firstpass/Steamworks/RemoteStorageEnumerateUserPublishedFilesResult_t.cs b/Assembly_Firstpass/Steamworks/RemoteStorageEnumerateUserPublishedFilesResult_t.cs new file mode 100644 index 0000000..50984f2 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/RemoteStorageEnumerateUserPublishedFilesResult_t.cs @@ -0,0 +1,19 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1312)] +public struct RemoteStorageEnumerateUserPublishedFilesResult_t +{ + public const int k_iCallback = 1312; + + public EResult m_eResult; + + public int m_nResultsReturned; + + public int m_nTotalResultCount; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50)] + public PublishedFileId_t[] m_rgPublishedFileId; +} diff --git a/Assembly_Firstpass/Steamworks/RemoteStorageEnumerateUserSharedWorkshopFilesResult_t.cs b/Assembly_Firstpass/Steamworks/RemoteStorageEnumerateUserSharedWorkshopFilesResult_t.cs new file mode 100644 index 0000000..29d3931 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/RemoteStorageEnumerateUserSharedWorkshopFilesResult_t.cs @@ -0,0 +1,19 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1326)] +public struct RemoteStorageEnumerateUserSharedWorkshopFilesResult_t +{ + public const int k_iCallback = 1326; + + public EResult m_eResult; + + public int m_nResultsReturned; + + public int m_nTotalResultCount; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50)] + public PublishedFileId_t[] m_rgPublishedFileId; +} diff --git a/Assembly_Firstpass/Steamworks/RemoteStorageEnumerateUserSubscribedFilesResult_t.cs b/Assembly_Firstpass/Steamworks/RemoteStorageEnumerateUserSubscribedFilesResult_t.cs new file mode 100644 index 0000000..f2128d2 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/RemoteStorageEnumerateUserSubscribedFilesResult_t.cs @@ -0,0 +1,22 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1314)] +public struct RemoteStorageEnumerateUserSubscribedFilesResult_t +{ + public const int k_iCallback = 1314; + + public EResult m_eResult; + + public int m_nResultsReturned; + + public int m_nTotalResultCount; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50)] + public PublishedFileId_t[] m_rgPublishedFileId; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50)] + public uint[] m_rgRTimeSubscribed; +} diff --git a/Assembly_Firstpass/Steamworks/RemoteStorageEnumerateWorkshopFilesResult_t.cs b/Assembly_Firstpass/Steamworks/RemoteStorageEnumerateWorkshopFilesResult_t.cs new file mode 100644 index 0000000..be5cac8 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/RemoteStorageEnumerateWorkshopFilesResult_t.cs @@ -0,0 +1,26 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1319)] +public struct RemoteStorageEnumerateWorkshopFilesResult_t +{ + public const int k_iCallback = 1319; + + public EResult m_eResult; + + public int m_nResultsReturned; + + public int m_nTotalResultCount; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50)] + public PublishedFileId_t[] m_rgPublishedFileId; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50)] + public float[] m_rgScore; + + public AppId_t m_nAppId; + + public uint m_unStartIndex; +} diff --git a/Assembly_Firstpass/Steamworks/RemoteStorageFileReadAsyncComplete_t.cs b/Assembly_Firstpass/Steamworks/RemoteStorageFileReadAsyncComplete_t.cs new file mode 100644 index 0000000..130dad8 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/RemoteStorageFileReadAsyncComplete_t.cs @@ -0,0 +1,18 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1332)] +public struct RemoteStorageFileReadAsyncComplete_t +{ + public const int k_iCallback = 1332; + + public SteamAPICall_t m_hFileReadAsync; + + public EResult m_eResult; + + public uint m_nOffset; + + public uint m_cubRead; +} diff --git a/Assembly_Firstpass/Steamworks/RemoteStorageFileShareResult_t.cs b/Assembly_Firstpass/Steamworks/RemoteStorageFileShareResult_t.cs new file mode 100644 index 0000000..7da67cb --- /dev/null +++ b/Assembly_Firstpass/Steamworks/RemoteStorageFileShareResult_t.cs @@ -0,0 +1,29 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1307)] +public struct RemoteStorageFileShareResult_t +{ + public const int k_iCallback = 1307; + + public EResult m_eResult; + + public UGCHandle_t m_hFile; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 260)] + private byte[] m_rgchFilename_; + + public string m_rgchFilename + { + get + { + return InteropHelp.ByteArrayToStringUTF8(m_rgchFilename_); + } + set + { + InteropHelp.StringToByteArrayUTF8(value, m_rgchFilename_, 260); + } + } +} diff --git a/Assembly_Firstpass/Steamworks/RemoteStorageFileWriteAsyncComplete_t.cs b/Assembly_Firstpass/Steamworks/RemoteStorageFileWriteAsyncComplete_t.cs new file mode 100644 index 0000000..1ace69a --- /dev/null +++ b/Assembly_Firstpass/Steamworks/RemoteStorageFileWriteAsyncComplete_t.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1331)] +public struct RemoteStorageFileWriteAsyncComplete_t +{ + public const int k_iCallback = 1331; + + public EResult m_eResult; +} diff --git a/Assembly_Firstpass/Steamworks/RemoteStorageGetPublishedFileDetailsResult_t.cs b/Assembly_Firstpass/Steamworks/RemoteStorageGetPublishedFileDetailsResult_t.cs new file mode 100644 index 0000000..e0c3f63 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/RemoteStorageGetPublishedFileDetailsResult_t.cs @@ -0,0 +1,120 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1318)] +public struct RemoteStorageGetPublishedFileDetailsResult_t +{ + public const int k_iCallback = 1318; + + public EResult m_eResult; + + public PublishedFileId_t m_nPublishedFileId; + + public AppId_t m_nCreatorAppID; + + public AppId_t m_nConsumerAppID; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 129)] + private byte[] m_rgchTitle_; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8000)] + private byte[] m_rgchDescription_; + + public UGCHandle_t m_hFile; + + public UGCHandle_t m_hPreviewFile; + + public ulong m_ulSteamIDOwner; + + public uint m_rtimeCreated; + + public uint m_rtimeUpdated; + + public ERemoteStoragePublishedFileVisibility m_eVisibility; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bBanned; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1025)] + private byte[] m_rgchTags_; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bTagsTruncated; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 260)] + private byte[] m_pchFileName_; + + public int m_nFileSize; + + public int m_nPreviewFileSize; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] + private byte[] m_rgchURL_; + + public EWorkshopFileType m_eFileType; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bAcceptedForUse; + + public string m_rgchTitle + { + get + { + return InteropHelp.ByteArrayToStringUTF8(m_rgchTitle_); + } + set + { + InteropHelp.StringToByteArrayUTF8(value, m_rgchTitle_, 129); + } + } + + public string m_rgchDescription + { + get + { + return InteropHelp.ByteArrayToStringUTF8(m_rgchDescription_); + } + set + { + InteropHelp.StringToByteArrayUTF8(value, m_rgchDescription_, 8000); + } + } + + public string m_rgchTags + { + get + { + return InteropHelp.ByteArrayToStringUTF8(m_rgchTags_); + } + set + { + InteropHelp.StringToByteArrayUTF8(value, m_rgchTags_, 1025); + } + } + + public string m_pchFileName + { + get + { + return InteropHelp.ByteArrayToStringUTF8(m_pchFileName_); + } + set + { + InteropHelp.StringToByteArrayUTF8(value, m_pchFileName_, 260); + } + } + + public string m_rgchURL + { + get + { + return InteropHelp.ByteArrayToStringUTF8(m_rgchURL_); + } + set + { + InteropHelp.StringToByteArrayUTF8(value, m_rgchURL_, 256); + } + } +} diff --git a/Assembly_Firstpass/Steamworks/RemoteStorageGetPublishedItemVoteDetailsResult_t.cs b/Assembly_Firstpass/Steamworks/RemoteStorageGetPublishedItemVoteDetailsResult_t.cs new file mode 100644 index 0000000..d074dd5 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/RemoteStorageGetPublishedItemVoteDetailsResult_t.cs @@ -0,0 +1,22 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1320)] +public struct RemoteStorageGetPublishedItemVoteDetailsResult_t +{ + public const int k_iCallback = 1320; + + public EResult m_eResult; + + public PublishedFileId_t m_unPublishedFileId; + + public int m_nVotesFor; + + public int m_nVotesAgainst; + + public int m_nReports; + + public float m_fScore; +} diff --git a/Assembly_Firstpass/Steamworks/RemoteStoragePublishFileProgress_t.cs b/Assembly_Firstpass/Steamworks/RemoteStoragePublishFileProgress_t.cs new file mode 100644 index 0000000..8c33dfb --- /dev/null +++ b/Assembly_Firstpass/Steamworks/RemoteStoragePublishFileProgress_t.cs @@ -0,0 +1,15 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1329)] +public struct RemoteStoragePublishFileProgress_t +{ + public const int k_iCallback = 1329; + + public double m_dPercentFile; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bPreview; +} diff --git a/Assembly_Firstpass/Steamworks/RemoteStoragePublishFileResult_t.cs b/Assembly_Firstpass/Steamworks/RemoteStoragePublishFileResult_t.cs new file mode 100644 index 0000000..74a1122 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/RemoteStoragePublishFileResult_t.cs @@ -0,0 +1,17 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1309)] +public struct RemoteStoragePublishFileResult_t +{ + public const int k_iCallback = 1309; + + public EResult m_eResult; + + public PublishedFileId_t m_nPublishedFileId; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bUserNeedsToAcceptWorkshopLegalAgreement; +} diff --git a/Assembly_Firstpass/Steamworks/RemoteStoragePublishedFileDeleted_t.cs b/Assembly_Firstpass/Steamworks/RemoteStoragePublishedFileDeleted_t.cs new file mode 100644 index 0000000..c3f792f --- /dev/null +++ b/Assembly_Firstpass/Steamworks/RemoteStoragePublishedFileDeleted_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1323)] +public struct RemoteStoragePublishedFileDeleted_t +{ + public const int k_iCallback = 1323; + + public PublishedFileId_t m_nPublishedFileId; + + public AppId_t m_nAppID; +} diff --git a/Assembly_Firstpass/Steamworks/RemoteStoragePublishedFileSubscribed_t.cs b/Assembly_Firstpass/Steamworks/RemoteStoragePublishedFileSubscribed_t.cs new file mode 100644 index 0000000..68f325e --- /dev/null +++ b/Assembly_Firstpass/Steamworks/RemoteStoragePublishedFileSubscribed_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1321)] +public struct RemoteStoragePublishedFileSubscribed_t +{ + public const int k_iCallback = 1321; + + public PublishedFileId_t m_nPublishedFileId; + + public AppId_t m_nAppID; +} diff --git a/Assembly_Firstpass/Steamworks/RemoteStoragePublishedFileUnsubscribed_t.cs b/Assembly_Firstpass/Steamworks/RemoteStoragePublishedFileUnsubscribed_t.cs new file mode 100644 index 0000000..ea3545f --- /dev/null +++ b/Assembly_Firstpass/Steamworks/RemoteStoragePublishedFileUnsubscribed_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1322)] +public struct RemoteStoragePublishedFileUnsubscribed_t +{ + public const int k_iCallback = 1322; + + public PublishedFileId_t m_nPublishedFileId; + + public AppId_t m_nAppID; +} diff --git a/Assembly_Firstpass/Steamworks/RemoteStoragePublishedFileUpdated_t.cs b/Assembly_Firstpass/Steamworks/RemoteStoragePublishedFileUpdated_t.cs new file mode 100644 index 0000000..f9c3d84 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/RemoteStoragePublishedFileUpdated_t.cs @@ -0,0 +1,16 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1330)] +public struct RemoteStoragePublishedFileUpdated_t +{ + public const int k_iCallback = 1330; + + public PublishedFileId_t m_nPublishedFileId; + + public AppId_t m_nAppID; + + public ulong m_ulUnused; +} diff --git a/Assembly_Firstpass/Steamworks/RemoteStorageSetUserPublishedFileActionResult_t.cs b/Assembly_Firstpass/Steamworks/RemoteStorageSetUserPublishedFileActionResult_t.cs new file mode 100644 index 0000000..e594eb2 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/RemoteStorageSetUserPublishedFileActionResult_t.cs @@ -0,0 +1,16 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1327)] +public struct RemoteStorageSetUserPublishedFileActionResult_t +{ + public const int k_iCallback = 1327; + + public EResult m_eResult; + + public PublishedFileId_t m_nPublishedFileId; + + public EWorkshopFileAction m_eAction; +} diff --git a/Assembly_Firstpass/Steamworks/RemoteStorageSubscribePublishedFileResult_t.cs b/Assembly_Firstpass/Steamworks/RemoteStorageSubscribePublishedFileResult_t.cs new file mode 100644 index 0000000..521d3f0 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/RemoteStorageSubscribePublishedFileResult_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1313)] +public struct RemoteStorageSubscribePublishedFileResult_t +{ + public const int k_iCallback = 1313; + + public EResult m_eResult; + + public PublishedFileId_t m_nPublishedFileId; +} diff --git a/Assembly_Firstpass/Steamworks/RemoteStorageUnsubscribePublishedFileResult_t.cs b/Assembly_Firstpass/Steamworks/RemoteStorageUnsubscribePublishedFileResult_t.cs new file mode 100644 index 0000000..20d27ea --- /dev/null +++ b/Assembly_Firstpass/Steamworks/RemoteStorageUnsubscribePublishedFileResult_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1315)] +public struct RemoteStorageUnsubscribePublishedFileResult_t +{ + public const int k_iCallback = 1315; + + public EResult m_eResult; + + public PublishedFileId_t m_nPublishedFileId; +} diff --git a/Assembly_Firstpass/Steamworks/RemoteStorageUpdatePublishedFileResult_t.cs b/Assembly_Firstpass/Steamworks/RemoteStorageUpdatePublishedFileResult_t.cs new file mode 100644 index 0000000..cc854b8 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/RemoteStorageUpdatePublishedFileResult_t.cs @@ -0,0 +1,17 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1316)] +public struct RemoteStorageUpdatePublishedFileResult_t +{ + public const int k_iCallback = 1316; + + public EResult m_eResult; + + public PublishedFileId_t m_nPublishedFileId; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bUserNeedsToAcceptWorkshopLegalAgreement; +} diff --git a/Assembly_Firstpass/Steamworks/RemoteStorageUpdateUserPublishedItemVoteResult_t.cs b/Assembly_Firstpass/Steamworks/RemoteStorageUpdateUserPublishedItemVoteResult_t.cs new file mode 100644 index 0000000..982fc0d --- /dev/null +++ b/Assembly_Firstpass/Steamworks/RemoteStorageUpdateUserPublishedItemVoteResult_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1324)] +public struct RemoteStorageUpdateUserPublishedItemVoteResult_t +{ + public const int k_iCallback = 1324; + + public EResult m_eResult; + + public PublishedFileId_t m_nPublishedFileId; +} diff --git a/Assembly_Firstpass/Steamworks/RemoteStorageUserVoteDetails_t.cs b/Assembly_Firstpass/Steamworks/RemoteStorageUserVoteDetails_t.cs new file mode 100644 index 0000000..292e94b --- /dev/null +++ b/Assembly_Firstpass/Steamworks/RemoteStorageUserVoteDetails_t.cs @@ -0,0 +1,16 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1325)] +public struct RemoteStorageUserVoteDetails_t +{ + public const int k_iCallback = 1325; + + public EResult m_eResult; + + public PublishedFileId_t m_nPublishedFileId; + + public EWorkshopVote m_eVote; +} diff --git a/Assembly_Firstpass/Steamworks/RemoveAppDependencyResult_t.cs b/Assembly_Firstpass/Steamworks/RemoveAppDependencyResult_t.cs new file mode 100644 index 0000000..e3df331 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/RemoveAppDependencyResult_t.cs @@ -0,0 +1,16 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(3415)] +public struct RemoveAppDependencyResult_t +{ + public const int k_iCallback = 3415; + + public EResult m_eResult; + + public PublishedFileId_t m_nPublishedFileId; + + public AppId_t m_nAppID; +} diff --git a/Assembly_Firstpass/Steamworks/RemoveUGCDependencyResult_t.cs b/Assembly_Firstpass/Steamworks/RemoveUGCDependencyResult_t.cs new file mode 100644 index 0000000..34b91e3 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/RemoveUGCDependencyResult_t.cs @@ -0,0 +1,16 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(3413)] +public struct RemoveUGCDependencyResult_t +{ + public const int k_iCallback = 3413; + + public EResult m_eResult; + + public PublishedFileId_t m_nPublishedFileId; + + public PublishedFileId_t m_nChildPublishedFileId; +} diff --git a/Assembly_Firstpass/Steamworks/RequestPlayersForGameFinalResultCallback_t.cs b/Assembly_Firstpass/Steamworks/RequestPlayersForGameFinalResultCallback_t.cs new file mode 100644 index 0000000..362154b --- /dev/null +++ b/Assembly_Firstpass/Steamworks/RequestPlayersForGameFinalResultCallback_t.cs @@ -0,0 +1,16 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(5213)] +public struct RequestPlayersForGameFinalResultCallback_t +{ + public const int k_iCallback = 5213; + + public EResult m_eResult; + + public ulong m_ullSearchID; + + public ulong m_ullUniqueGameID; +} diff --git a/Assembly_Firstpass/Steamworks/RequestPlayersForGameProgressCallback_t.cs b/Assembly_Firstpass/Steamworks/RequestPlayersForGameProgressCallback_t.cs new file mode 100644 index 0000000..aaddd5a --- /dev/null +++ b/Assembly_Firstpass/Steamworks/RequestPlayersForGameProgressCallback_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(5211)] +public struct RequestPlayersForGameProgressCallback_t +{ + public const int k_iCallback = 5211; + + public EResult m_eResult; + + public ulong m_ullSearchID; +} diff --git a/Assembly_Firstpass/Steamworks/RequestPlayersForGameResultCallback_t.cs b/Assembly_Firstpass/Steamworks/RequestPlayersForGameResultCallback_t.cs new file mode 100644 index 0000000..ddc0969 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/RequestPlayersForGameResultCallback_t.cs @@ -0,0 +1,30 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(5212)] +public struct RequestPlayersForGameResultCallback_t +{ + public const int k_iCallback = 5212; + + public EResult m_eResult; + + public ulong m_ullSearchID; + + public CSteamID m_SteamIDPlayerFound; + + public CSteamID m_SteamIDLobby; + + public PlayerAcceptState_t m_ePlayerAcceptState; + + public int m_nPlayerIndex; + + public int m_nTotalPlayersFound; + + public int m_nTotalPlayersAcceptedGame; + + public int m_nSuggestedTeamIndex; + + public ulong m_ullUniqueGameID; +} diff --git a/Assembly_Firstpass/Steamworks/ReservationNotificationCallback_t.cs b/Assembly_Firstpass/Steamworks/ReservationNotificationCallback_t.cs new file mode 100644 index 0000000..290b482 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ReservationNotificationCallback_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(5303)] +public struct ReservationNotificationCallback_t +{ + public const int k_iCallback = 5303; + + public PartyBeaconID_t m_ulBeaconID; + + public CSteamID m_steamIDJoiner; +} diff --git a/Assembly_Firstpass/Steamworks/SNetListenSocket_t.cs b/Assembly_Firstpass/Steamworks/SNetListenSocket_t.cs new file mode 100644 index 0000000..4a9a803 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SNetListenSocket_t.cs @@ -0,0 +1,63 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct SNetListenSocket_t : IEquatable<SNetListenSocket_t>, IComparable<SNetListenSocket_t> +{ + public uint m_SNetListenSocket; + + public SNetListenSocket_t(uint value) + { + m_SNetListenSocket = value; + } + + public override string ToString() + { + return m_SNetListenSocket.ToString(); + } + + public override bool Equals(object other) + { + if (other is SNetListenSocket_t) + { + return this == (SNetListenSocket_t)other; + } + return false; + } + + public override int GetHashCode() + { + return m_SNetListenSocket.GetHashCode(); + } + + public static bool operator ==(SNetListenSocket_t x, SNetListenSocket_t y) + { + return x.m_SNetListenSocket == y.m_SNetListenSocket; + } + + public static bool operator !=(SNetListenSocket_t x, SNetListenSocket_t y) + { + return !(x == y); + } + + public static explicit operator SNetListenSocket_t(uint value) + { + return new SNetListenSocket_t(value); + } + + public static explicit operator uint(SNetListenSocket_t that) + { + return that.m_SNetListenSocket; + } + + public bool Equals(SNetListenSocket_t other) + { + return m_SNetListenSocket == other.m_SNetListenSocket; + } + + public int CompareTo(SNetListenSocket_t other) + { + return m_SNetListenSocket.CompareTo(other.m_SNetListenSocket); + } +} diff --git a/Assembly_Firstpass/Steamworks/SNetSocket_t.cs b/Assembly_Firstpass/Steamworks/SNetSocket_t.cs new file mode 100644 index 0000000..073b0d7 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SNetSocket_t.cs @@ -0,0 +1,63 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct SNetSocket_t : IEquatable<SNetSocket_t>, IComparable<SNetSocket_t> +{ + public uint m_SNetSocket; + + public SNetSocket_t(uint value) + { + m_SNetSocket = value; + } + + public override string ToString() + { + return m_SNetSocket.ToString(); + } + + public override bool Equals(object other) + { + if (other is SNetSocket_t) + { + return this == (SNetSocket_t)other; + } + return false; + } + + public override int GetHashCode() + { + return m_SNetSocket.GetHashCode(); + } + + public static bool operator ==(SNetSocket_t x, SNetSocket_t y) + { + return x.m_SNetSocket == y.m_SNetSocket; + } + + public static bool operator !=(SNetSocket_t x, SNetSocket_t y) + { + return !(x == y); + } + + public static explicit operator SNetSocket_t(uint value) + { + return new SNetSocket_t(value); + } + + public static explicit operator uint(SNetSocket_t that) + { + return that.m_SNetSocket; + } + + public bool Equals(SNetSocket_t other) + { + return m_SNetSocket == other.m_SNetSocket; + } + + public int CompareTo(SNetSocket_t other) + { + return m_SNetSocket.CompareTo(other.m_SNetSocket); + } +} diff --git a/Assembly_Firstpass/Steamworks/ScreenshotHandle.cs b/Assembly_Firstpass/Steamworks/ScreenshotHandle.cs new file mode 100644 index 0000000..6e32e44 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ScreenshotHandle.cs @@ -0,0 +1,65 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct ScreenshotHandle : IEquatable<ScreenshotHandle>, IComparable<ScreenshotHandle> +{ + public static readonly ScreenshotHandle Invalid = new ScreenshotHandle(0u); + + public uint m_ScreenshotHandle; + + public ScreenshotHandle(uint value) + { + m_ScreenshotHandle = value; + } + + public override string ToString() + { + return m_ScreenshotHandle.ToString(); + } + + public override bool Equals(object other) + { + if (other is ScreenshotHandle) + { + return this == (ScreenshotHandle)other; + } + return false; + } + + public override int GetHashCode() + { + return m_ScreenshotHandle.GetHashCode(); + } + + public static bool operator ==(ScreenshotHandle x, ScreenshotHandle y) + { + return x.m_ScreenshotHandle == y.m_ScreenshotHandle; + } + + public static bool operator !=(ScreenshotHandle x, ScreenshotHandle y) + { + return !(x == y); + } + + public static explicit operator ScreenshotHandle(uint value) + { + return new ScreenshotHandle(value); + } + + public static explicit operator uint(ScreenshotHandle that) + { + return that.m_ScreenshotHandle; + } + + public bool Equals(ScreenshotHandle other) + { + return m_ScreenshotHandle == other.m_ScreenshotHandle; + } + + public int CompareTo(ScreenshotHandle other) + { + return m_ScreenshotHandle.CompareTo(other.m_ScreenshotHandle); + } +} diff --git a/Assembly_Firstpass/Steamworks/ScreenshotReady_t.cs b/Assembly_Firstpass/Steamworks/ScreenshotReady_t.cs new file mode 100644 index 0000000..f4a473e --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ScreenshotReady_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(2301)] +public struct ScreenshotReady_t +{ + public const int k_iCallback = 2301; + + public ScreenshotHandle m_hLocal; + + public EResult m_eResult; +} diff --git a/Assembly_Firstpass/Steamworks/ScreenshotRequested_t.cs b/Assembly_Firstpass/Steamworks/ScreenshotRequested_t.cs new file mode 100644 index 0000000..82f8845 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ScreenshotRequested_t.cs @@ -0,0 +1,10 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8, Size = 1)] +[CallbackIdentity(2302)] +public struct ScreenshotRequested_t +{ + public const int k_iCallback = 2302; +} diff --git a/Assembly_Firstpass/Steamworks/SearchForGameProgressCallback_t.cs b/Assembly_Firstpass/Steamworks/SearchForGameProgressCallback_t.cs new file mode 100644 index 0000000..3ccdca8 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SearchForGameProgressCallback_t.cs @@ -0,0 +1,22 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(5201)] +public struct SearchForGameProgressCallback_t +{ + public const int k_iCallback = 5201; + + public ulong m_ullSearchID; + + public EResult m_eResult; + + public CSteamID m_lobbyID; + + public CSteamID m_steamIDEndedSearch; + + public int m_nSecondsRemainingEstimate; + + public int m_cPlayersSearching; +} diff --git a/Assembly_Firstpass/Steamworks/SearchForGameResultCallback_t.cs b/Assembly_Firstpass/Steamworks/SearchForGameResultCallback_t.cs new file mode 100644 index 0000000..e2095dd --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SearchForGameResultCallback_t.cs @@ -0,0 +1,23 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(5202)] +public struct SearchForGameResultCallback_t +{ + public const int k_iCallback = 5202; + + public ulong m_ullSearchID; + + public EResult m_eResult; + + public int m_nCountPlayersInGame; + + public int m_nCountAcceptedGame; + + public CSteamID m_steamIDHost; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bFinalCallback; +} diff --git a/Assembly_Firstpass/Steamworks/SetPersonaNameResponse_t.cs b/Assembly_Firstpass/Steamworks/SetPersonaNameResponse_t.cs new file mode 100644 index 0000000..017f29d --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SetPersonaNameResponse_t.cs @@ -0,0 +1,18 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(347)] +public struct SetPersonaNameResponse_t +{ + public const int k_iCallback = 347; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bSuccess; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bLocalSuccess; + + public EResult m_result; +} diff --git a/Assembly_Firstpass/Steamworks/SetUserItemVoteResult_t.cs b/Assembly_Firstpass/Steamworks/SetUserItemVoteResult_t.cs new file mode 100644 index 0000000..8b65d00 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SetUserItemVoteResult_t.cs @@ -0,0 +1,17 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(3408)] +public struct SetUserItemVoteResult_t +{ + public const int k_iCallback = 3408; + + public PublishedFileId_t m_nPublishedFileId; + + public EResult m_eResult; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bVoteUp; +} diff --git a/Assembly_Firstpass/Steamworks/SiteId_t.cs b/Assembly_Firstpass/Steamworks/SiteId_t.cs new file mode 100644 index 0000000..069b5e3 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SiteId_t.cs @@ -0,0 +1,65 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct SiteId_t : IEquatable<SiteId_t>, IComparable<SiteId_t> +{ + public static readonly SiteId_t Invalid = new SiteId_t(0uL); + + public ulong m_SiteId; + + public SiteId_t(ulong value) + { + m_SiteId = value; + } + + public override string ToString() + { + return m_SiteId.ToString(); + } + + public override bool Equals(object other) + { + if (other is SiteId_t) + { + return this == (SiteId_t)other; + } + return false; + } + + public override int GetHashCode() + { + return m_SiteId.GetHashCode(); + } + + public static bool operator ==(SiteId_t x, SiteId_t y) + { + return x.m_SiteId == y.m_SiteId; + } + + public static bool operator !=(SiteId_t x, SiteId_t y) + { + return !(x == y); + } + + public static explicit operator SiteId_t(ulong value) + { + return new SiteId_t(value); + } + + public static explicit operator ulong(SiteId_t that) + { + return that.m_SiteId; + } + + public bool Equals(SiteId_t other) + { + return m_SiteId == other.m_SiteId; + } + + public int CompareTo(SiteId_t other) + { + return m_SiteId.CompareTo(other.m_SiteId); + } +} diff --git a/Assembly_Firstpass/Steamworks/SocketStatusCallback_t.cs b/Assembly_Firstpass/Steamworks/SocketStatusCallback_t.cs new file mode 100644 index 0000000..a950ce0 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SocketStatusCallback_t.cs @@ -0,0 +1,18 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 4)] +[CallbackIdentity(1201)] +public struct SocketStatusCallback_t +{ + public const int k_iCallback = 1201; + + public SNetSocket_t m_hSocket; + + public SNetListenSocket_t m_hListenSocket; + + public CSteamID m_steamIDRemote; + + public int m_eSNetSocketState; +} diff --git a/Assembly_Firstpass/Steamworks/StartPlaytimeTrackingResult_t.cs b/Assembly_Firstpass/Steamworks/StartPlaytimeTrackingResult_t.cs new file mode 100644 index 0000000..6da6d8d --- /dev/null +++ b/Assembly_Firstpass/Steamworks/StartPlaytimeTrackingResult_t.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(3410)] +public struct StartPlaytimeTrackingResult_t +{ + public const int k_iCallback = 3410; + + public EResult m_eResult; +} diff --git a/Assembly_Firstpass/Steamworks/SteamAPI.cs b/Assembly_Firstpass/Steamworks/SteamAPI.cs new file mode 100644 index 0000000..73cbebd --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamAPI.cs @@ -0,0 +1,62 @@ +namespace Steamworks; + +public static class SteamAPI +{ + public static bool Init() + { + InteropHelp.TestIfPlatformSupported(); + bool flag = NativeMethods.SteamAPI_Init(); + if (flag) + { + flag = CSteamAPIContext.Init(); + } + if (flag) + { + CallbackDispatcher.Initialize(); + } + return flag; + } + + public static void Shutdown() + { + InteropHelp.TestIfPlatformSupported(); + NativeMethods.SteamAPI_Shutdown(); + CSteamAPIContext.Clear(); + CallbackDispatcher.Shutdown(); + } + + public static bool RestartAppIfNecessary(AppId_t unOwnAppID) + { + InteropHelp.TestIfPlatformSupported(); + return NativeMethods.SteamAPI_RestartAppIfNecessary(unOwnAppID); + } + + public static void ReleaseCurrentThreadMemory() + { + InteropHelp.TestIfPlatformSupported(); + NativeMethods.SteamAPI_ReleaseCurrentThreadMemory(); + } + + public static void RunCallbacks() + { + CallbackDispatcher.RunFrame(isGameServer: false); + } + + public static bool IsSteamRunning() + { + InteropHelp.TestIfPlatformSupported(); + return NativeMethods.SteamAPI_IsSteamRunning(); + } + + public static HSteamPipe GetHSteamPipe() + { + InteropHelp.TestIfPlatformSupported(); + return (HSteamPipe)NativeMethods.SteamAPI_GetHSteamPipe(); + } + + public static HSteamUser GetHSteamUser() + { + InteropHelp.TestIfPlatformSupported(); + return (HSteamUser)NativeMethods.SteamAPI_GetHSteamUser(); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamAPICallCompleted_t.cs b/Assembly_Firstpass/Steamworks/SteamAPICallCompleted_t.cs new file mode 100644 index 0000000..fb625bd --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamAPICallCompleted_t.cs @@ -0,0 +1,16 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(703)] +public struct SteamAPICallCompleted_t +{ + public const int k_iCallback = 703; + + public SteamAPICall_t m_hAsyncCall; + + public int m_iCallback; + + public uint m_cubParam; +} diff --git a/Assembly_Firstpass/Steamworks/SteamAPICall_t.cs b/Assembly_Firstpass/Steamworks/SteamAPICall_t.cs new file mode 100644 index 0000000..cd900b3 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamAPICall_t.cs @@ -0,0 +1,65 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct SteamAPICall_t : IEquatable<SteamAPICall_t>, IComparable<SteamAPICall_t> +{ + public static readonly SteamAPICall_t Invalid = new SteamAPICall_t(0uL); + + public ulong m_SteamAPICall; + + public SteamAPICall_t(ulong value) + { + m_SteamAPICall = value; + } + + public override string ToString() + { + return m_SteamAPICall.ToString(); + } + + public override bool Equals(object other) + { + if (other is SteamAPICall_t) + { + return this == (SteamAPICall_t)other; + } + return false; + } + + public override int GetHashCode() + { + return m_SteamAPICall.GetHashCode(); + } + + public static bool operator ==(SteamAPICall_t x, SteamAPICall_t y) + { + return x.m_SteamAPICall == y.m_SteamAPICall; + } + + public static bool operator !=(SteamAPICall_t x, SteamAPICall_t y) + { + return !(x == y); + } + + public static explicit operator SteamAPICall_t(ulong value) + { + return new SteamAPICall_t(value); + } + + public static explicit operator ulong(SteamAPICall_t that) + { + return that.m_SteamAPICall; + } + + public bool Equals(SteamAPICall_t other) + { + return m_SteamAPICall == other.m_SteamAPICall; + } + + public int CompareTo(SteamAPICall_t other) + { + return m_SteamAPICall.CompareTo(other.m_SteamAPICall); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamAPIWarningMessageHook_t.cs b/Assembly_Firstpass/Steamworks/SteamAPIWarningMessageHook_t.cs new file mode 100644 index 0000000..aea757a --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamAPIWarningMessageHook_t.cs @@ -0,0 +1,7 @@ +using System.Runtime.InteropServices; +using System.Text; + +namespace Steamworks; + +[UnmanagedFunctionPointer(CallingConvention.Cdecl)] +public delegate void SteamAPIWarningMessageHook_t(int nSeverity, StringBuilder pchDebugText); diff --git a/Assembly_Firstpass/Steamworks/SteamAPI_CheckCallbackRegistered_t.cs b/Assembly_Firstpass/Steamworks/SteamAPI_CheckCallbackRegistered_t.cs new file mode 100644 index 0000000..69906a8 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamAPI_CheckCallbackRegistered_t.cs @@ -0,0 +1,6 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[UnmanagedFunctionPointer(CallingConvention.StdCall)] +public delegate void SteamAPI_CheckCallbackRegistered_t(int iCallbackNum); diff --git a/Assembly_Firstpass/Steamworks/SteamAppInstalled_t.cs b/Assembly_Firstpass/Steamworks/SteamAppInstalled_t.cs new file mode 100644 index 0000000..869c384 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamAppInstalled_t.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(3901)] +public struct SteamAppInstalled_t +{ + public const int k_iCallback = 3901; + + public AppId_t m_nAppID; +} diff --git a/Assembly_Firstpass/Steamworks/SteamAppList.cs b/Assembly_Firstpass/Steamworks/SteamAppList.cs new file mode 100644 index 0000000..fcdfb7f --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamAppList.cs @@ -0,0 +1,45 @@ +using System; +using System.Runtime.InteropServices; + +namespace Steamworks; + +public static class SteamAppList +{ + public static uint GetNumInstalledApps() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamAppList_GetNumInstalledApps(CSteamAPIContext.GetSteamAppList()); + } + + public static uint GetInstalledApps(AppId_t[] pvecAppID, uint unMaxAppIDs) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamAppList_GetInstalledApps(CSteamAPIContext.GetSteamAppList(), pvecAppID, unMaxAppIDs); + } + + public static int GetAppName(AppId_t nAppID, out string pchName, int cchNameMax) + { + InteropHelp.TestIfAvailableClient(); + IntPtr intPtr = Marshal.AllocHGlobal(cchNameMax); + int num = NativeMethods.ISteamAppList_GetAppName(CSteamAPIContext.GetSteamAppList(), nAppID, intPtr, cchNameMax); + pchName = ((num != -1) ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return num; + } + + public static int GetAppInstallDir(AppId_t nAppID, out string pchDirectory, int cchNameMax) + { + InteropHelp.TestIfAvailableClient(); + IntPtr intPtr = Marshal.AllocHGlobal(cchNameMax); + int num = NativeMethods.ISteamAppList_GetAppInstallDir(CSteamAPIContext.GetSteamAppList(), nAppID, intPtr, cchNameMax); + pchDirectory = ((num != -1) ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return num; + } + + public static int GetAppBuildId(AppId_t nAppID) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamAppList_GetAppBuildId(CSteamAPIContext.GetSteamAppList(), nAppID); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamAppUninstalled_t.cs b/Assembly_Firstpass/Steamworks/SteamAppUninstalled_t.cs new file mode 100644 index 0000000..4a44a40 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamAppUninstalled_t.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(3902)] +public struct SteamAppUninstalled_t +{ + public const int k_iCallback = 3902; + + public AppId_t m_nAppID; +} diff --git a/Assembly_Firstpass/Steamworks/SteamApps.cs b/Assembly_Firstpass/Steamworks/SteamApps.cs new file mode 100644 index 0000000..6e04f3b --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamApps.cs @@ -0,0 +1,199 @@ +using System; +using System.Runtime.InteropServices; + +namespace Steamworks; + +public static class SteamApps +{ + public static bool BIsSubscribed() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamApps_BIsSubscribed(CSteamAPIContext.GetSteamApps()); + } + + public static bool BIsLowViolence() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamApps_BIsLowViolence(CSteamAPIContext.GetSteamApps()); + } + + public static bool BIsCybercafe() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamApps_BIsCybercafe(CSteamAPIContext.GetSteamApps()); + } + + public static bool BIsVACBanned() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamApps_BIsVACBanned(CSteamAPIContext.GetSteamApps()); + } + + public static string GetCurrentGameLanguage() + { + InteropHelp.TestIfAvailableClient(); + return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamApps_GetCurrentGameLanguage(CSteamAPIContext.GetSteamApps())); + } + + public static string GetAvailableGameLanguages() + { + InteropHelp.TestIfAvailableClient(); + return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamApps_GetAvailableGameLanguages(CSteamAPIContext.GetSteamApps())); + } + + public static bool BIsSubscribedApp(AppId_t appID) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamApps_BIsSubscribedApp(CSteamAPIContext.GetSteamApps(), appID); + } + + public static bool BIsDlcInstalled(AppId_t appID) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamApps_BIsDlcInstalled(CSteamAPIContext.GetSteamApps(), appID); + } + + public static uint GetEarliestPurchaseUnixTime(AppId_t nAppID) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamApps_GetEarliestPurchaseUnixTime(CSteamAPIContext.GetSteamApps(), nAppID); + } + + public static bool BIsSubscribedFromFreeWeekend() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamApps_BIsSubscribedFromFreeWeekend(CSteamAPIContext.GetSteamApps()); + } + + public static int GetDLCCount() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamApps_GetDLCCount(CSteamAPIContext.GetSteamApps()); + } + + public static bool BGetDLCDataByIndex(int iDLC, out AppId_t pAppID, out bool pbAvailable, out string pchName, int cchNameBufferSize) + { + InteropHelp.TestIfAvailableClient(); + IntPtr intPtr = Marshal.AllocHGlobal(cchNameBufferSize); + bool flag = NativeMethods.ISteamApps_BGetDLCDataByIndex(CSteamAPIContext.GetSteamApps(), iDLC, out pAppID, out pbAvailable, intPtr, cchNameBufferSize); + pchName = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return flag; + } + + public static void InstallDLC(AppId_t nAppID) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamApps_InstallDLC(CSteamAPIContext.GetSteamApps(), nAppID); + } + + public static void UninstallDLC(AppId_t nAppID) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamApps_UninstallDLC(CSteamAPIContext.GetSteamApps(), nAppID); + } + + public static void RequestAppProofOfPurchaseKey(AppId_t nAppID) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamApps_RequestAppProofOfPurchaseKey(CSteamAPIContext.GetSteamApps(), nAppID); + } + + public static bool GetCurrentBetaName(out string pchName, int cchNameBufferSize) + { + InteropHelp.TestIfAvailableClient(); + IntPtr intPtr = Marshal.AllocHGlobal(cchNameBufferSize); + bool flag = NativeMethods.ISteamApps_GetCurrentBetaName(CSteamAPIContext.GetSteamApps(), intPtr, cchNameBufferSize); + pchName = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return flag; + } + + public static bool MarkContentCorrupt(bool bMissingFilesOnly) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamApps_MarkContentCorrupt(CSteamAPIContext.GetSteamApps(), bMissingFilesOnly); + } + + public static uint GetInstalledDepots(AppId_t appID, DepotId_t[] pvecDepots, uint cMaxDepots) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamApps_GetInstalledDepots(CSteamAPIContext.GetSteamApps(), appID, pvecDepots, cMaxDepots); + } + + public static uint GetAppInstallDir(AppId_t appID, out string pchFolder, uint cchFolderBufferSize) + { + InteropHelp.TestIfAvailableClient(); + IntPtr intPtr = Marshal.AllocHGlobal((int)cchFolderBufferSize); + uint num = NativeMethods.ISteamApps_GetAppInstallDir(CSteamAPIContext.GetSteamApps(), appID, intPtr, cchFolderBufferSize); + pchFolder = ((num != 0) ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return num; + } + + public static bool BIsAppInstalled(AppId_t appID) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamApps_BIsAppInstalled(CSteamAPIContext.GetSteamApps(), appID); + } + + public static CSteamID GetAppOwner() + { + InteropHelp.TestIfAvailableClient(); + return (CSteamID)NativeMethods.ISteamApps_GetAppOwner(CSteamAPIContext.GetSteamApps()); + } + + public static string GetLaunchQueryParam(string pchKey) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchKey2 = new InteropHelp.UTF8StringHandle(pchKey); + return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamApps_GetLaunchQueryParam(CSteamAPIContext.GetSteamApps(), pchKey2)); + } + + public static bool GetDlcDownloadProgress(AppId_t nAppID, out ulong punBytesDownloaded, out ulong punBytesTotal) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamApps_GetDlcDownloadProgress(CSteamAPIContext.GetSteamApps(), nAppID, out punBytesDownloaded, out punBytesTotal); + } + + public static int GetAppBuildId() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamApps_GetAppBuildId(CSteamAPIContext.GetSteamApps()); + } + + public static void RequestAllProofOfPurchaseKeys() + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamApps_RequestAllProofOfPurchaseKeys(CSteamAPIContext.GetSteamApps()); + } + + public static SteamAPICall_t GetFileDetails(string pszFileName) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pszFileName2 = new InteropHelp.UTF8StringHandle(pszFileName); + return (SteamAPICall_t)NativeMethods.ISteamApps_GetFileDetails(CSteamAPIContext.GetSteamApps(), pszFileName2); + } + + public static int GetLaunchCommandLine(out string pszCommandLine, int cubCommandLine) + { + InteropHelp.TestIfAvailableClient(); + IntPtr intPtr = Marshal.AllocHGlobal(cubCommandLine); + int num = NativeMethods.ISteamApps_GetLaunchCommandLine(CSteamAPIContext.GetSteamApps(), intPtr, cubCommandLine); + pszCommandLine = ((num != -1) ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return num; + } + + public static bool BIsSubscribedFromFamilySharing() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamApps_BIsSubscribedFromFamilySharing(CSteamAPIContext.GetSteamApps()); + } + + public static bool BIsTimedTrial(out uint punSecondsAllowed, out uint punSecondsPlayed) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamApps_BIsTimedTrial(CSteamAPIContext.GetSteamApps(), out punSecondsAllowed, out punSecondsPlayed); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamClient.cs b/Assembly_Firstpass/Steamworks/SteamClient.cs new file mode 100644 index 0000000..b9a1cfa --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamClient.cs @@ -0,0 +1,249 @@ +using System; + +namespace Steamworks; + +public static class SteamClient +{ + public static HSteamPipe CreateSteamPipe() + { + InteropHelp.TestIfAvailableClient(); + return (HSteamPipe)NativeMethods.ISteamClient_CreateSteamPipe(CSteamAPIContext.GetSteamClient()); + } + + public static bool BReleaseSteamPipe(HSteamPipe hSteamPipe) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamClient_BReleaseSteamPipe(CSteamAPIContext.GetSteamClient(), hSteamPipe); + } + + public static HSteamUser ConnectToGlobalUser(HSteamPipe hSteamPipe) + { + InteropHelp.TestIfAvailableClient(); + return (HSteamUser)NativeMethods.ISteamClient_ConnectToGlobalUser(CSteamAPIContext.GetSteamClient(), hSteamPipe); + } + + public static HSteamUser CreateLocalUser(out HSteamPipe phSteamPipe, EAccountType eAccountType) + { + InteropHelp.TestIfAvailableClient(); + return (HSteamUser)NativeMethods.ISteamClient_CreateLocalUser(CSteamAPIContext.GetSteamClient(), out phSteamPipe, eAccountType); + } + + public static void ReleaseUser(HSteamPipe hSteamPipe, HSteamUser hUser) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamClient_ReleaseUser(CSteamAPIContext.GetSteamClient(), hSteamPipe, hUser); + } + + public static IntPtr GetISteamUser(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamUser(CSteamAPIContext.GetSteamClient(), hSteamUser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamGameServer(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamGameServer(CSteamAPIContext.GetSteamClient(), hSteamUser, hSteamPipe, pchVersion2); + } + + public static void SetLocalIPBinding(ref SteamIPAddress_t unIP, ushort usPort) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamClient_SetLocalIPBinding(CSteamAPIContext.GetSteamClient(), ref unIP, usPort); + } + + public static IntPtr GetISteamFriends(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamFriends(CSteamAPIContext.GetSteamClient(), hSteamUser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamUtils(HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamUtils(CSteamAPIContext.GetSteamClient(), hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamMatchmaking(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamMatchmaking(CSteamAPIContext.GetSteamClient(), hSteamUser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamMatchmakingServers(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamMatchmakingServers(CSteamAPIContext.GetSteamClient(), hSteamUser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamGenericInterface(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamGenericInterface(CSteamAPIContext.GetSteamClient(), hSteamUser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamUserStats(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamUserStats(CSteamAPIContext.GetSteamClient(), hSteamUser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamGameServerStats(HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamGameServerStats(CSteamAPIContext.GetSteamClient(), hSteamuser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamApps(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamApps(CSteamAPIContext.GetSteamClient(), hSteamUser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamNetworking(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamNetworking(CSteamAPIContext.GetSteamClient(), hSteamUser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamRemoteStorage(HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamRemoteStorage(CSteamAPIContext.GetSteamClient(), hSteamuser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamScreenshots(HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamScreenshots(CSteamAPIContext.GetSteamClient(), hSteamuser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamGameSearch(HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamGameSearch(CSteamAPIContext.GetSteamClient(), hSteamuser, hSteamPipe, pchVersion2); + } + + public static uint GetIPCCallCount() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamClient_GetIPCCallCount(CSteamAPIContext.GetSteamClient()); + } + + public static void SetWarningMessageHook(SteamAPIWarningMessageHook_t pFunction) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamClient_SetWarningMessageHook(CSteamAPIContext.GetSteamClient(), pFunction); + } + + public static bool BShutdownIfAllPipesClosed() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamClient_BShutdownIfAllPipesClosed(CSteamAPIContext.GetSteamClient()); + } + + public static IntPtr GetISteamHTTP(HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamHTTP(CSteamAPIContext.GetSteamClient(), hSteamuser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamController(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamController(CSteamAPIContext.GetSteamClient(), hSteamUser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamUGC(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamUGC(CSteamAPIContext.GetSteamClient(), hSteamUser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamAppList(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamAppList(CSteamAPIContext.GetSteamClient(), hSteamUser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamMusic(HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamMusic(CSteamAPIContext.GetSteamClient(), hSteamuser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamMusicRemote(HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamMusicRemote(CSteamAPIContext.GetSteamClient(), hSteamuser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamHTMLSurface(HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamHTMLSurface(CSteamAPIContext.GetSteamClient(), hSteamuser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamInventory(HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamInventory(CSteamAPIContext.GetSteamClient(), hSteamuser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamVideo(HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamVideo(CSteamAPIContext.GetSteamClient(), hSteamuser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamParentalSettings(HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamParentalSettings(CSteamAPIContext.GetSteamClient(), hSteamuser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamInput(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamInput(CSteamAPIContext.GetSteamClient(), hSteamUser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamParties(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamParties(CSteamAPIContext.GetSteamClient(), hSteamUser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamRemotePlay(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamRemotePlay(CSteamAPIContext.GetSteamClient(), hSteamUser, hSteamPipe, pchVersion2); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamDatagramGameCoordinatorServerLogin.cs b/Assembly_Firstpass/Steamworks/SteamDatagramGameCoordinatorServerLogin.cs new file mode 100644 index 0000000..6ca0b5f --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamDatagramGameCoordinatorServerLogin.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +public struct SteamDatagramGameCoordinatorServerLogin +{ + public SteamNetworkingIdentity m_identity; + + public SteamDatagramHostedAddress m_routing; + + public AppId_t m_nAppID; + + public RTime32 m_rtime; + + public int m_cbAppData; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2048)] + public byte[] m_appData; +} diff --git a/Assembly_Firstpass/Steamworks/SteamDatagramHostedAddress.cs b/Assembly_Firstpass/Steamworks/SteamDatagramHostedAddress.cs new file mode 100644 index 0000000..173dc8f --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamDatagramHostedAddress.cs @@ -0,0 +1,20 @@ +using System; +using System.Runtime.InteropServices; + +namespace Steamworks; + +[Serializable] +[StructLayout(LayoutKind.Sequential, Pack = 8)] +public struct SteamDatagramHostedAddress +{ + public int m_cbSize; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] + public byte[] m_data; + + public void Clear() + { + m_cbSize = 0; + m_data = new byte[128]; + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamDatagramRelayAuthTicket.cs b/Assembly_Firstpass/Steamworks/SteamDatagramRelayAuthTicket.cs new file mode 100644 index 0000000..e57b4c4 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamDatagramRelayAuthTicket.cs @@ -0,0 +1,66 @@ +using System; +using System.Runtime.InteropServices; + +namespace Steamworks; + +[Serializable] +[StructLayout(LayoutKind.Sequential, Pack = 8)] +public struct SteamDatagramRelayAuthTicket +{ + [StructLayout(LayoutKind.Sequential, Pack = 8)] + private struct ExtraField + { + private enum EType + { + k_EType_String, + k_EType_Int, + k_EType_Fixed64 + } + + [StructLayout(LayoutKind.Explicit)] + private struct OptionValue + { + [FieldOffset(0)] + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] + private byte[] m_szStringValue; + + [FieldOffset(0)] + private long m_nIntValue; + + [FieldOffset(0)] + private ulong m_nFixed64Value; + } + + private EType m_eType; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 28)] + private byte[] m_szName; + + private OptionValue m_val; + } + + private SteamNetworkingIdentity m_identityGameserver; + + private SteamNetworkingIdentity m_identityAuthorizedClient; + + private uint m_unPublicIP; + + private RTime32 m_rtimeTicketExpiry; + + private SteamDatagramHostedAddress m_routing; + + private uint m_nAppID; + + private int m_nRestrictToVirtualPort; + + private const int k_nMaxExtraFields = 16; + + private int m_nExtraFields; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] + private ExtraField[] m_vecExtraFields; + + public void Clear() + { + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamEncryptedAppTicket.cs b/Assembly_Firstpass/Steamworks/SteamEncryptedAppTicket.cs new file mode 100644 index 0000000..6da8710 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamEncryptedAppTicket.cs @@ -0,0 +1,64 @@ +using System; +using System.Runtime.InteropServices; + +namespace Steamworks; + +public static class SteamEncryptedAppTicket +{ + public static bool BDecryptTicket(byte[] rgubTicketEncrypted, uint cubTicketEncrypted, byte[] rgubTicketDecrypted, ref uint pcubTicketDecrypted, byte[] rgubKey, int cubKey) + { + InteropHelp.TestIfPlatformSupported(); + return NativeMethods.SteamEncryptedAppTicket_BDecryptTicket(rgubTicketEncrypted, cubTicketEncrypted, rgubTicketDecrypted, ref pcubTicketDecrypted, rgubKey, cubKey); + } + + public static bool BIsTicketForApp(byte[] rgubTicketDecrypted, uint cubTicketDecrypted, AppId_t nAppID) + { + InteropHelp.TestIfPlatformSupported(); + return NativeMethods.SteamEncryptedAppTicket_BIsTicketForApp(rgubTicketDecrypted, cubTicketDecrypted, nAppID); + } + + public static uint GetTicketIssueTime(byte[] rgubTicketDecrypted, uint cubTicketDecrypted) + { + InteropHelp.TestIfPlatformSupported(); + return NativeMethods.SteamEncryptedAppTicket_GetTicketIssueTime(rgubTicketDecrypted, cubTicketDecrypted); + } + + public static void GetTicketSteamID(byte[] rgubTicketDecrypted, uint cubTicketDecrypted, out CSteamID psteamID) + { + InteropHelp.TestIfPlatformSupported(); + NativeMethods.SteamEncryptedAppTicket_GetTicketSteamID(rgubTicketDecrypted, cubTicketDecrypted, out psteamID); + } + + public static uint GetTicketAppID(byte[] rgubTicketDecrypted, uint cubTicketDecrypted) + { + InteropHelp.TestIfPlatformSupported(); + return NativeMethods.SteamEncryptedAppTicket_GetTicketAppID(rgubTicketDecrypted, cubTicketDecrypted); + } + + public static bool BUserOwnsAppInTicket(byte[] rgubTicketDecrypted, uint cubTicketDecrypted, AppId_t nAppID) + { + InteropHelp.TestIfPlatformSupported(); + return NativeMethods.SteamEncryptedAppTicket_BUserOwnsAppInTicket(rgubTicketDecrypted, cubTicketDecrypted, nAppID); + } + + public static bool BUserIsVacBanned(byte[] rgubTicketDecrypted, uint cubTicketDecrypted) + { + InteropHelp.TestIfPlatformSupported(); + return NativeMethods.SteamEncryptedAppTicket_BUserIsVacBanned(rgubTicketDecrypted, cubTicketDecrypted); + } + + public static byte[] GetUserVariableData(byte[] rgubTicketDecrypted, uint cubTicketDecrypted, out uint pcubUserData) + { + InteropHelp.TestIfPlatformSupported(); + IntPtr source = NativeMethods.SteamEncryptedAppTicket_GetUserVariableData(rgubTicketDecrypted, cubTicketDecrypted, out pcubUserData); + byte[] array = new byte[pcubUserData]; + Marshal.Copy(source, array, 0, (int)pcubUserData); + return array; + } + + public static bool BIsTicketSigned(byte[] rgubTicketDecrypted, uint cubTicketDecrypted, byte[] pubRSAKey, uint cubRSAKey) + { + InteropHelp.TestIfPlatformSupported(); + return NativeMethods.SteamEncryptedAppTicket_BIsTicketSigned(rgubTicketDecrypted, cubTicketDecrypted, pubRSAKey, cubRSAKey); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamFriends.cs b/Assembly_Firstpass/Steamworks/SteamFriends.cs new file mode 100644 index 0000000..5bc011e --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamFriends.cs @@ -0,0 +1,483 @@ +using System; +using System.Runtime.InteropServices; + +namespace Steamworks; + +public static class SteamFriends +{ + public static string GetPersonaName() + { + InteropHelp.TestIfAvailableClient(); + return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamFriends_GetPersonaName(CSteamAPIContext.GetSteamFriends())); + } + + public static SteamAPICall_t SetPersonaName(string pchPersonaName) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchPersonaName2 = new InteropHelp.UTF8StringHandle(pchPersonaName); + return (SteamAPICall_t)NativeMethods.ISteamFriends_SetPersonaName(CSteamAPIContext.GetSteamFriends(), pchPersonaName2); + } + + public static EPersonaState GetPersonaState() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamFriends_GetPersonaState(CSteamAPIContext.GetSteamFriends()); + } + + public static int GetFriendCount(EFriendFlags iFriendFlags) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamFriends_GetFriendCount(CSteamAPIContext.GetSteamFriends(), iFriendFlags); + } + + public static CSteamID GetFriendByIndex(int iFriend, EFriendFlags iFriendFlags) + { + InteropHelp.TestIfAvailableClient(); + return (CSteamID)NativeMethods.ISteamFriends_GetFriendByIndex(CSteamAPIContext.GetSteamFriends(), iFriend, iFriendFlags); + } + + public static EFriendRelationship GetFriendRelationship(CSteamID steamIDFriend) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamFriends_GetFriendRelationship(CSteamAPIContext.GetSteamFriends(), steamIDFriend); + } + + public static EPersonaState GetFriendPersonaState(CSteamID steamIDFriend) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamFriends_GetFriendPersonaState(CSteamAPIContext.GetSteamFriends(), steamIDFriend); + } + + public static string GetFriendPersonaName(CSteamID steamIDFriend) + { + InteropHelp.TestIfAvailableClient(); + return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamFriends_GetFriendPersonaName(CSteamAPIContext.GetSteamFriends(), steamIDFriend)); + } + + public static bool GetFriendGamePlayed(CSteamID steamIDFriend, out FriendGameInfo_t pFriendGameInfo) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamFriends_GetFriendGamePlayed(CSteamAPIContext.GetSteamFriends(), steamIDFriend, out pFriendGameInfo); + } + + public static string GetFriendPersonaNameHistory(CSteamID steamIDFriend, int iPersonaName) + { + InteropHelp.TestIfAvailableClient(); + return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamFriends_GetFriendPersonaNameHistory(CSteamAPIContext.GetSteamFriends(), steamIDFriend, iPersonaName)); + } + + public static int GetFriendSteamLevel(CSteamID steamIDFriend) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamFriends_GetFriendSteamLevel(CSteamAPIContext.GetSteamFriends(), steamIDFriend); + } + + public static string GetPlayerNickname(CSteamID steamIDPlayer) + { + InteropHelp.TestIfAvailableClient(); + return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamFriends_GetPlayerNickname(CSteamAPIContext.GetSteamFriends(), steamIDPlayer)); + } + + public static int GetFriendsGroupCount() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamFriends_GetFriendsGroupCount(CSteamAPIContext.GetSteamFriends()); + } + + public static FriendsGroupID_t GetFriendsGroupIDByIndex(int iFG) + { + InteropHelp.TestIfAvailableClient(); + return (FriendsGroupID_t)NativeMethods.ISteamFriends_GetFriendsGroupIDByIndex(CSteamAPIContext.GetSteamFriends(), iFG); + } + + public static string GetFriendsGroupName(FriendsGroupID_t friendsGroupID) + { + InteropHelp.TestIfAvailableClient(); + return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamFriends_GetFriendsGroupName(CSteamAPIContext.GetSteamFriends(), friendsGroupID)); + } + + public static int GetFriendsGroupMembersCount(FriendsGroupID_t friendsGroupID) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamFriends_GetFriendsGroupMembersCount(CSteamAPIContext.GetSteamFriends(), friendsGroupID); + } + + public static void GetFriendsGroupMembersList(FriendsGroupID_t friendsGroupID, CSteamID[] pOutSteamIDMembers, int nMembersCount) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamFriends_GetFriendsGroupMembersList(CSteamAPIContext.GetSteamFriends(), friendsGroupID, pOutSteamIDMembers, nMembersCount); + } + + public static bool HasFriend(CSteamID steamIDFriend, EFriendFlags iFriendFlags) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamFriends_HasFriend(CSteamAPIContext.GetSteamFriends(), steamIDFriend, iFriendFlags); + } + + public static int GetClanCount() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamFriends_GetClanCount(CSteamAPIContext.GetSteamFriends()); + } + + public static CSteamID GetClanByIndex(int iClan) + { + InteropHelp.TestIfAvailableClient(); + return (CSteamID)NativeMethods.ISteamFriends_GetClanByIndex(CSteamAPIContext.GetSteamFriends(), iClan); + } + + public static string GetClanName(CSteamID steamIDClan) + { + InteropHelp.TestIfAvailableClient(); + return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamFriends_GetClanName(CSteamAPIContext.GetSteamFriends(), steamIDClan)); + } + + public static string GetClanTag(CSteamID steamIDClan) + { + InteropHelp.TestIfAvailableClient(); + return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamFriends_GetClanTag(CSteamAPIContext.GetSteamFriends(), steamIDClan)); + } + + public static bool GetClanActivityCounts(CSteamID steamIDClan, out int pnOnline, out int pnInGame, out int pnChatting) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamFriends_GetClanActivityCounts(CSteamAPIContext.GetSteamFriends(), steamIDClan, out pnOnline, out pnInGame, out pnChatting); + } + + public static SteamAPICall_t DownloadClanActivityCounts(CSteamID[] psteamIDClans, int cClansToRequest) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamFriends_DownloadClanActivityCounts(CSteamAPIContext.GetSteamFriends(), psteamIDClans, cClansToRequest); + } + + public static int GetFriendCountFromSource(CSteamID steamIDSource) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamFriends_GetFriendCountFromSource(CSteamAPIContext.GetSteamFriends(), steamIDSource); + } + + public static CSteamID GetFriendFromSourceByIndex(CSteamID steamIDSource, int iFriend) + { + InteropHelp.TestIfAvailableClient(); + return (CSteamID)NativeMethods.ISteamFriends_GetFriendFromSourceByIndex(CSteamAPIContext.GetSteamFriends(), steamIDSource, iFriend); + } + + public static bool IsUserInSource(CSteamID steamIDUser, CSteamID steamIDSource) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamFriends_IsUserInSource(CSteamAPIContext.GetSteamFriends(), steamIDUser, steamIDSource); + } + + public static void SetInGameVoiceSpeaking(CSteamID steamIDUser, bool bSpeaking) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamFriends_SetInGameVoiceSpeaking(CSteamAPIContext.GetSteamFriends(), steamIDUser, bSpeaking); + } + + public static void ActivateGameOverlay(string pchDialog) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchDialog2 = new InteropHelp.UTF8StringHandle(pchDialog); + NativeMethods.ISteamFriends_ActivateGameOverlay(CSteamAPIContext.GetSteamFriends(), pchDialog2); + } + + public static void ActivateGameOverlayToUser(string pchDialog, CSteamID steamID) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchDialog2 = new InteropHelp.UTF8StringHandle(pchDialog); + NativeMethods.ISteamFriends_ActivateGameOverlayToUser(CSteamAPIContext.GetSteamFriends(), pchDialog2, steamID); + } + + public static void ActivateGameOverlayToWebPage(string pchURL, EActivateGameOverlayToWebPageMode eMode = EActivateGameOverlayToWebPageMode.k_EActivateGameOverlayToWebPageMode_Default) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchURL2 = new InteropHelp.UTF8StringHandle(pchURL); + NativeMethods.ISteamFriends_ActivateGameOverlayToWebPage(CSteamAPIContext.GetSteamFriends(), pchURL2, eMode); + } + + public static void ActivateGameOverlayToStore(AppId_t nAppID, EOverlayToStoreFlag eFlag) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamFriends_ActivateGameOverlayToStore(CSteamAPIContext.GetSteamFriends(), nAppID, eFlag); + } + + public static void SetPlayedWith(CSteamID steamIDUserPlayedWith) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamFriends_SetPlayedWith(CSteamAPIContext.GetSteamFriends(), steamIDUserPlayedWith); + } + + public static void ActivateGameOverlayInviteDialog(CSteamID steamIDLobby) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamFriends_ActivateGameOverlayInviteDialog(CSteamAPIContext.GetSteamFriends(), steamIDLobby); + } + + public static int GetSmallFriendAvatar(CSteamID steamIDFriend) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamFriends_GetSmallFriendAvatar(CSteamAPIContext.GetSteamFriends(), steamIDFriend); + } + + public static int GetMediumFriendAvatar(CSteamID steamIDFriend) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamFriends_GetMediumFriendAvatar(CSteamAPIContext.GetSteamFriends(), steamIDFriend); + } + + public static int GetLargeFriendAvatar(CSteamID steamIDFriend) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamFriends_GetLargeFriendAvatar(CSteamAPIContext.GetSteamFriends(), steamIDFriend); + } + + public static bool RequestUserInformation(CSteamID steamIDUser, bool bRequireNameOnly) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamFriends_RequestUserInformation(CSteamAPIContext.GetSteamFriends(), steamIDUser, bRequireNameOnly); + } + + public static SteamAPICall_t RequestClanOfficerList(CSteamID steamIDClan) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamFriends_RequestClanOfficerList(CSteamAPIContext.GetSteamFriends(), steamIDClan); + } + + public static CSteamID GetClanOwner(CSteamID steamIDClan) + { + InteropHelp.TestIfAvailableClient(); + return (CSteamID)NativeMethods.ISteamFriends_GetClanOwner(CSteamAPIContext.GetSteamFriends(), steamIDClan); + } + + public static int GetClanOfficerCount(CSteamID steamIDClan) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamFriends_GetClanOfficerCount(CSteamAPIContext.GetSteamFriends(), steamIDClan); + } + + public static CSteamID GetClanOfficerByIndex(CSteamID steamIDClan, int iOfficer) + { + InteropHelp.TestIfAvailableClient(); + return (CSteamID)NativeMethods.ISteamFriends_GetClanOfficerByIndex(CSteamAPIContext.GetSteamFriends(), steamIDClan, iOfficer); + } + + public static uint GetUserRestrictions() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamFriends_GetUserRestrictions(CSteamAPIContext.GetSteamFriends()); + } + + public static bool SetRichPresence(string pchKey, string pchValue) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchKey2 = new InteropHelp.UTF8StringHandle(pchKey); + using InteropHelp.UTF8StringHandle pchValue2 = new InteropHelp.UTF8StringHandle(pchValue); + return NativeMethods.ISteamFriends_SetRichPresence(CSteamAPIContext.GetSteamFriends(), pchKey2, pchValue2); + } + + public static void ClearRichPresence() + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamFriends_ClearRichPresence(CSteamAPIContext.GetSteamFriends()); + } + + public static string GetFriendRichPresence(CSteamID steamIDFriend, string pchKey) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchKey2 = new InteropHelp.UTF8StringHandle(pchKey); + return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamFriends_GetFriendRichPresence(CSteamAPIContext.GetSteamFriends(), steamIDFriend, pchKey2)); + } + + public static int GetFriendRichPresenceKeyCount(CSteamID steamIDFriend) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamFriends_GetFriendRichPresenceKeyCount(CSteamAPIContext.GetSteamFriends(), steamIDFriend); + } + + public static string GetFriendRichPresenceKeyByIndex(CSteamID steamIDFriend, int iKey) + { + InteropHelp.TestIfAvailableClient(); + return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamFriends_GetFriendRichPresenceKeyByIndex(CSteamAPIContext.GetSteamFriends(), steamIDFriend, iKey)); + } + + public static void RequestFriendRichPresence(CSteamID steamIDFriend) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamFriends_RequestFriendRichPresence(CSteamAPIContext.GetSteamFriends(), steamIDFriend); + } + + public static bool InviteUserToGame(CSteamID steamIDFriend, string pchConnectString) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchConnectString2 = new InteropHelp.UTF8StringHandle(pchConnectString); + return NativeMethods.ISteamFriends_InviteUserToGame(CSteamAPIContext.GetSteamFriends(), steamIDFriend, pchConnectString2); + } + + public static int GetCoplayFriendCount() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamFriends_GetCoplayFriendCount(CSteamAPIContext.GetSteamFriends()); + } + + public static CSteamID GetCoplayFriend(int iCoplayFriend) + { + InteropHelp.TestIfAvailableClient(); + return (CSteamID)NativeMethods.ISteamFriends_GetCoplayFriend(CSteamAPIContext.GetSteamFriends(), iCoplayFriend); + } + + public static int GetFriendCoplayTime(CSteamID steamIDFriend) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamFriends_GetFriendCoplayTime(CSteamAPIContext.GetSteamFriends(), steamIDFriend); + } + + public static AppId_t GetFriendCoplayGame(CSteamID steamIDFriend) + { + InteropHelp.TestIfAvailableClient(); + return (AppId_t)NativeMethods.ISteamFriends_GetFriendCoplayGame(CSteamAPIContext.GetSteamFriends(), steamIDFriend); + } + + public static SteamAPICall_t JoinClanChatRoom(CSteamID steamIDClan) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamFriends_JoinClanChatRoom(CSteamAPIContext.GetSteamFriends(), steamIDClan); + } + + public static bool LeaveClanChatRoom(CSteamID steamIDClan) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamFriends_LeaveClanChatRoom(CSteamAPIContext.GetSteamFriends(), steamIDClan); + } + + public static int GetClanChatMemberCount(CSteamID steamIDClan) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamFriends_GetClanChatMemberCount(CSteamAPIContext.GetSteamFriends(), steamIDClan); + } + + public static CSteamID GetChatMemberByIndex(CSteamID steamIDClan, int iUser) + { + InteropHelp.TestIfAvailableClient(); + return (CSteamID)NativeMethods.ISteamFriends_GetChatMemberByIndex(CSteamAPIContext.GetSteamFriends(), steamIDClan, iUser); + } + + public static bool SendClanChatMessage(CSteamID steamIDClanChat, string pchText) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchText2 = new InteropHelp.UTF8StringHandle(pchText); + return NativeMethods.ISteamFriends_SendClanChatMessage(CSteamAPIContext.GetSteamFriends(), steamIDClanChat, pchText2); + } + + public static int GetClanChatMessage(CSteamID steamIDClanChat, int iMessage, out string prgchText, int cchTextMax, out EChatEntryType peChatEntryType, out CSteamID psteamidChatter) + { + InteropHelp.TestIfAvailableClient(); + IntPtr intPtr = Marshal.AllocHGlobal(cchTextMax); + int num = NativeMethods.ISteamFriends_GetClanChatMessage(CSteamAPIContext.GetSteamFriends(), steamIDClanChat, iMessage, intPtr, cchTextMax, out peChatEntryType, out psteamidChatter); + prgchText = ((num != 0) ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return num; + } + + public static bool IsClanChatAdmin(CSteamID steamIDClanChat, CSteamID steamIDUser) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamFriends_IsClanChatAdmin(CSteamAPIContext.GetSteamFriends(), steamIDClanChat, steamIDUser); + } + + public static bool IsClanChatWindowOpenInSteam(CSteamID steamIDClanChat) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamFriends_IsClanChatWindowOpenInSteam(CSteamAPIContext.GetSteamFriends(), steamIDClanChat); + } + + public static bool OpenClanChatWindowInSteam(CSteamID steamIDClanChat) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamFriends_OpenClanChatWindowInSteam(CSteamAPIContext.GetSteamFriends(), steamIDClanChat); + } + + public static bool CloseClanChatWindowInSteam(CSteamID steamIDClanChat) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamFriends_CloseClanChatWindowInSteam(CSteamAPIContext.GetSteamFriends(), steamIDClanChat); + } + + public static bool SetListenForFriendsMessages(bool bInterceptEnabled) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamFriends_SetListenForFriendsMessages(CSteamAPIContext.GetSteamFriends(), bInterceptEnabled); + } + + public static bool ReplyToFriendMessage(CSteamID steamIDFriend, string pchMsgToSend) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchMsgToSend2 = new InteropHelp.UTF8StringHandle(pchMsgToSend); + return NativeMethods.ISteamFriends_ReplyToFriendMessage(CSteamAPIContext.GetSteamFriends(), steamIDFriend, pchMsgToSend2); + } + + public static int GetFriendMessage(CSteamID steamIDFriend, int iMessageID, out string pvData, int cubData, out EChatEntryType peChatEntryType) + { + InteropHelp.TestIfAvailableClient(); + IntPtr intPtr = Marshal.AllocHGlobal(cubData); + int num = NativeMethods.ISteamFriends_GetFriendMessage(CSteamAPIContext.GetSteamFriends(), steamIDFriend, iMessageID, intPtr, cubData, out peChatEntryType); + pvData = ((num != 0) ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return num; + } + + public static SteamAPICall_t GetFollowerCount(CSteamID steamID) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamFriends_GetFollowerCount(CSteamAPIContext.GetSteamFriends(), steamID); + } + + public static SteamAPICall_t IsFollowing(CSteamID steamID) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamFriends_IsFollowing(CSteamAPIContext.GetSteamFriends(), steamID); + } + + public static SteamAPICall_t EnumerateFollowingList(uint unStartIndex) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamFriends_EnumerateFollowingList(CSteamAPIContext.GetSteamFriends(), unStartIndex); + } + + public static bool IsClanPublic(CSteamID steamIDClan) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamFriends_IsClanPublic(CSteamAPIContext.GetSteamFriends(), steamIDClan); + } + + public static bool IsClanOfficialGameGroup(CSteamID steamIDClan) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamFriends_IsClanOfficialGameGroup(CSteamAPIContext.GetSteamFriends(), steamIDClan); + } + + public static int GetNumChatsWithUnreadPriorityMessages() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamFriends_GetNumChatsWithUnreadPriorityMessages(CSteamAPIContext.GetSteamFriends()); + } + + public static void ActivateGameOverlayRemotePlayTogetherInviteDialog(CSteamID steamIDLobby) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamFriends_ActivateGameOverlayRemotePlayTogetherInviteDialog(CSteamAPIContext.GetSteamFriends(), steamIDLobby); + } + + public static bool RegisterProtocolInOverlayBrowser(string pchProtocol) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchProtocol2 = new InteropHelp.UTF8StringHandle(pchProtocol); + return NativeMethods.ISteamFriends_RegisterProtocolInOverlayBrowser(CSteamAPIContext.GetSteamFriends(), pchProtocol2); + } + + public static void ActivateGameOverlayInviteDialogConnectString(string pchConnectString) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchConnectString2 = new InteropHelp.UTF8StringHandle(pchConnectString); + NativeMethods.ISteamFriends_ActivateGameOverlayInviteDialogConnectString(CSteamAPIContext.GetSteamFriends(), pchConnectString2); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamGameSearch.cs b/Assembly_Firstpass/Steamworks/SteamGameSearch.cs new file mode 100644 index 0000000..7c55eef --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamGameSearch.cs @@ -0,0 +1,100 @@ +using System; +using System.Runtime.InteropServices; + +namespace Steamworks; + +public static class SteamGameSearch +{ + public static EGameSearchErrorCode_t AddGameSearchParams(string pchKeyToFind, string pchValuesToFind) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchKeyToFind2 = new InteropHelp.UTF8StringHandle(pchKeyToFind); + using InteropHelp.UTF8StringHandle pchValuesToFind2 = new InteropHelp.UTF8StringHandle(pchValuesToFind); + return NativeMethods.ISteamGameSearch_AddGameSearchParams(CSteamAPIContext.GetSteamGameSearch(), pchKeyToFind2, pchValuesToFind2); + } + + public static EGameSearchErrorCode_t SearchForGameWithLobby(CSteamID steamIDLobby, int nPlayerMin, int nPlayerMax) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamGameSearch_SearchForGameWithLobby(CSteamAPIContext.GetSteamGameSearch(), steamIDLobby, nPlayerMin, nPlayerMax); + } + + public static EGameSearchErrorCode_t SearchForGameSolo(int nPlayerMin, int nPlayerMax) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamGameSearch_SearchForGameSolo(CSteamAPIContext.GetSteamGameSearch(), nPlayerMin, nPlayerMax); + } + + public static EGameSearchErrorCode_t AcceptGame() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamGameSearch_AcceptGame(CSteamAPIContext.GetSteamGameSearch()); + } + + public static EGameSearchErrorCode_t DeclineGame() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamGameSearch_DeclineGame(CSteamAPIContext.GetSteamGameSearch()); + } + + public static EGameSearchErrorCode_t RetrieveConnectionDetails(CSteamID steamIDHost, out string pchConnectionDetails, int cubConnectionDetails) + { + InteropHelp.TestIfAvailableClient(); + IntPtr intPtr = Marshal.AllocHGlobal(cubConnectionDetails); + EGameSearchErrorCode_t eGameSearchErrorCode_t = NativeMethods.ISteamGameSearch_RetrieveConnectionDetails(CSteamAPIContext.GetSteamGameSearch(), steamIDHost, intPtr, cubConnectionDetails); + pchConnectionDetails = ((eGameSearchErrorCode_t != 0) ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return eGameSearchErrorCode_t; + } + + public static EGameSearchErrorCode_t EndGameSearch() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamGameSearch_EndGameSearch(CSteamAPIContext.GetSteamGameSearch()); + } + + public static EGameSearchErrorCode_t SetGameHostParams(string pchKey, string pchValue) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchKey2 = new InteropHelp.UTF8StringHandle(pchKey); + using InteropHelp.UTF8StringHandle pchValue2 = new InteropHelp.UTF8StringHandle(pchValue); + return NativeMethods.ISteamGameSearch_SetGameHostParams(CSteamAPIContext.GetSteamGameSearch(), pchKey2, pchValue2); + } + + public static EGameSearchErrorCode_t SetConnectionDetails(string pchConnectionDetails, int cubConnectionDetails) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchConnectionDetails2 = new InteropHelp.UTF8StringHandle(pchConnectionDetails); + return NativeMethods.ISteamGameSearch_SetConnectionDetails(CSteamAPIContext.GetSteamGameSearch(), pchConnectionDetails2, cubConnectionDetails); + } + + public static EGameSearchErrorCode_t RequestPlayersForGame(int nPlayerMin, int nPlayerMax, int nMaxTeamSize) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamGameSearch_RequestPlayersForGame(CSteamAPIContext.GetSteamGameSearch(), nPlayerMin, nPlayerMax, nMaxTeamSize); + } + + public static EGameSearchErrorCode_t HostConfirmGameStart(ulong ullUniqueGameID) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamGameSearch_HostConfirmGameStart(CSteamAPIContext.GetSteamGameSearch(), ullUniqueGameID); + } + + public static EGameSearchErrorCode_t CancelRequestPlayersForGame() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamGameSearch_CancelRequestPlayersForGame(CSteamAPIContext.GetSteamGameSearch()); + } + + public static EGameSearchErrorCode_t SubmitPlayerResult(ulong ullUniqueGameID, CSteamID steamIDPlayer, EPlayerResult_t EPlayerResult) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamGameSearch_SubmitPlayerResult(CSteamAPIContext.GetSteamGameSearch(), ullUniqueGameID, steamIDPlayer, EPlayerResult); + } + + public static EGameSearchErrorCode_t EndGame(ulong ullUniqueGameID) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamGameSearch_EndGame(CSteamAPIContext.GetSteamGameSearch(), ullUniqueGameID); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamGameServer.cs b/Assembly_Firstpass/Steamworks/SteamGameServer.cs new file mode 100644 index 0000000..fee5731 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamGameServer.cs @@ -0,0 +1,275 @@ +namespace Steamworks; + +public static class SteamGameServer +{ + public static void SetProduct(string pszProduct) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pszProduct2 = new InteropHelp.UTF8StringHandle(pszProduct); + NativeMethods.ISteamGameServer_SetProduct(CSteamGameServerAPIContext.GetSteamGameServer(), pszProduct2); + } + + public static void SetGameDescription(string pszGameDescription) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pszGameDescription2 = new InteropHelp.UTF8StringHandle(pszGameDescription); + NativeMethods.ISteamGameServer_SetGameDescription(CSteamGameServerAPIContext.GetSteamGameServer(), pszGameDescription2); + } + + public static void SetModDir(string pszModDir) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pszModDir2 = new InteropHelp.UTF8StringHandle(pszModDir); + NativeMethods.ISteamGameServer_SetModDir(CSteamGameServerAPIContext.GetSteamGameServer(), pszModDir2); + } + + public static void SetDedicatedServer(bool bDedicated) + { + InteropHelp.TestIfAvailableGameServer(); + NativeMethods.ISteamGameServer_SetDedicatedServer(CSteamGameServerAPIContext.GetSteamGameServer(), bDedicated); + } + + public static void LogOn(string pszToken) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pszToken2 = new InteropHelp.UTF8StringHandle(pszToken); + NativeMethods.ISteamGameServer_LogOn(CSteamGameServerAPIContext.GetSteamGameServer(), pszToken2); + } + + public static void LogOnAnonymous() + { + InteropHelp.TestIfAvailableGameServer(); + NativeMethods.ISteamGameServer_LogOnAnonymous(CSteamGameServerAPIContext.GetSteamGameServer()); + } + + public static void LogOff() + { + InteropHelp.TestIfAvailableGameServer(); + NativeMethods.ISteamGameServer_LogOff(CSteamGameServerAPIContext.GetSteamGameServer()); + } + + public static bool BLoggedOn() + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamGameServer_BLoggedOn(CSteamGameServerAPIContext.GetSteamGameServer()); + } + + public static bool BSecure() + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamGameServer_BSecure(CSteamGameServerAPIContext.GetSteamGameServer()); + } + + public static CSteamID GetSteamID() + { + InteropHelp.TestIfAvailableGameServer(); + return (CSteamID)NativeMethods.ISteamGameServer_GetSteamID(CSteamGameServerAPIContext.GetSteamGameServer()); + } + + public static bool WasRestartRequested() + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamGameServer_WasRestartRequested(CSteamGameServerAPIContext.GetSteamGameServer()); + } + + public static void SetMaxPlayerCount(int cPlayersMax) + { + InteropHelp.TestIfAvailableGameServer(); + NativeMethods.ISteamGameServer_SetMaxPlayerCount(CSteamGameServerAPIContext.GetSteamGameServer(), cPlayersMax); + } + + public static void SetBotPlayerCount(int cBotplayers) + { + InteropHelp.TestIfAvailableGameServer(); + NativeMethods.ISteamGameServer_SetBotPlayerCount(CSteamGameServerAPIContext.GetSteamGameServer(), cBotplayers); + } + + public static void SetServerName(string pszServerName) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pszServerName2 = new InteropHelp.UTF8StringHandle(pszServerName); + NativeMethods.ISteamGameServer_SetServerName(CSteamGameServerAPIContext.GetSteamGameServer(), pszServerName2); + } + + public static void SetMapName(string pszMapName) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pszMapName2 = new InteropHelp.UTF8StringHandle(pszMapName); + NativeMethods.ISteamGameServer_SetMapName(CSteamGameServerAPIContext.GetSteamGameServer(), pszMapName2); + } + + public static void SetPasswordProtected(bool bPasswordProtected) + { + InteropHelp.TestIfAvailableGameServer(); + NativeMethods.ISteamGameServer_SetPasswordProtected(CSteamGameServerAPIContext.GetSteamGameServer(), bPasswordProtected); + } + + public static void SetSpectatorPort(ushort unSpectatorPort) + { + InteropHelp.TestIfAvailableGameServer(); + NativeMethods.ISteamGameServer_SetSpectatorPort(CSteamGameServerAPIContext.GetSteamGameServer(), unSpectatorPort); + } + + public static void SetSpectatorServerName(string pszSpectatorServerName) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pszSpectatorServerName2 = new InteropHelp.UTF8StringHandle(pszSpectatorServerName); + NativeMethods.ISteamGameServer_SetSpectatorServerName(CSteamGameServerAPIContext.GetSteamGameServer(), pszSpectatorServerName2); + } + + public static void ClearAllKeyValues() + { + InteropHelp.TestIfAvailableGameServer(); + NativeMethods.ISteamGameServer_ClearAllKeyValues(CSteamGameServerAPIContext.GetSteamGameServer()); + } + + public static void SetKeyValue(string pKey, string pValue) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pKey2 = new InteropHelp.UTF8StringHandle(pKey); + using InteropHelp.UTF8StringHandle pValue2 = new InteropHelp.UTF8StringHandle(pValue); + NativeMethods.ISteamGameServer_SetKeyValue(CSteamGameServerAPIContext.GetSteamGameServer(), pKey2, pValue2); + } + + public static void SetGameTags(string pchGameTags) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchGameTags2 = new InteropHelp.UTF8StringHandle(pchGameTags); + NativeMethods.ISteamGameServer_SetGameTags(CSteamGameServerAPIContext.GetSteamGameServer(), pchGameTags2); + } + + public static void SetGameData(string pchGameData) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchGameData2 = new InteropHelp.UTF8StringHandle(pchGameData); + NativeMethods.ISteamGameServer_SetGameData(CSteamGameServerAPIContext.GetSteamGameServer(), pchGameData2); + } + + public static void SetRegion(string pszRegion) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pszRegion2 = new InteropHelp.UTF8StringHandle(pszRegion); + NativeMethods.ISteamGameServer_SetRegion(CSteamGameServerAPIContext.GetSteamGameServer(), pszRegion2); + } + + public static bool SendUserConnectAndAuthenticate(uint unIPClient, byte[] pvAuthBlob, uint cubAuthBlobSize, out CSteamID pSteamIDUser) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamGameServer_SendUserConnectAndAuthenticate(CSteamGameServerAPIContext.GetSteamGameServer(), unIPClient, pvAuthBlob, cubAuthBlobSize, out pSteamIDUser); + } + + public static CSteamID CreateUnauthenticatedUserConnection() + { + InteropHelp.TestIfAvailableGameServer(); + return (CSteamID)NativeMethods.ISteamGameServer_CreateUnauthenticatedUserConnection(CSteamGameServerAPIContext.GetSteamGameServer()); + } + + public static void SendUserDisconnect(CSteamID steamIDUser) + { + InteropHelp.TestIfAvailableGameServer(); + NativeMethods.ISteamGameServer_SendUserDisconnect(CSteamGameServerAPIContext.GetSteamGameServer(), steamIDUser); + } + + public static bool BUpdateUserData(CSteamID steamIDUser, string pchPlayerName, uint uScore) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchPlayerName2 = new InteropHelp.UTF8StringHandle(pchPlayerName); + return NativeMethods.ISteamGameServer_BUpdateUserData(CSteamGameServerAPIContext.GetSteamGameServer(), steamIDUser, pchPlayerName2, uScore); + } + + public static HAuthTicket GetAuthSessionTicket(byte[] pTicket, int cbMaxTicket, out uint pcbTicket) + { + InteropHelp.TestIfAvailableGameServer(); + return (HAuthTicket)NativeMethods.ISteamGameServer_GetAuthSessionTicket(CSteamGameServerAPIContext.GetSteamGameServer(), pTicket, cbMaxTicket, out pcbTicket); + } + + public static EBeginAuthSessionResult BeginAuthSession(byte[] pAuthTicket, int cbAuthTicket, CSteamID steamID) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamGameServer_BeginAuthSession(CSteamGameServerAPIContext.GetSteamGameServer(), pAuthTicket, cbAuthTicket, steamID); + } + + public static void EndAuthSession(CSteamID steamID) + { + InteropHelp.TestIfAvailableGameServer(); + NativeMethods.ISteamGameServer_EndAuthSession(CSteamGameServerAPIContext.GetSteamGameServer(), steamID); + } + + public static void CancelAuthTicket(HAuthTicket hAuthTicket) + { + InteropHelp.TestIfAvailableGameServer(); + NativeMethods.ISteamGameServer_CancelAuthTicket(CSteamGameServerAPIContext.GetSteamGameServer(), hAuthTicket); + } + + public static EUserHasLicenseForAppResult UserHasLicenseForApp(CSteamID steamID, AppId_t appID) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamGameServer_UserHasLicenseForApp(CSteamGameServerAPIContext.GetSteamGameServer(), steamID, appID); + } + + public static bool RequestUserGroupStatus(CSteamID steamIDUser, CSteamID steamIDGroup) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamGameServer_RequestUserGroupStatus(CSteamGameServerAPIContext.GetSteamGameServer(), steamIDUser, steamIDGroup); + } + + public static void GetGameplayStats() + { + InteropHelp.TestIfAvailableGameServer(); + NativeMethods.ISteamGameServer_GetGameplayStats(CSteamGameServerAPIContext.GetSteamGameServer()); + } + + public static SteamAPICall_t GetServerReputation() + { + InteropHelp.TestIfAvailableGameServer(); + return (SteamAPICall_t)NativeMethods.ISteamGameServer_GetServerReputation(CSteamGameServerAPIContext.GetSteamGameServer()); + } + + public static SteamIPAddress_t GetPublicIP() + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamGameServer_GetPublicIP(CSteamGameServerAPIContext.GetSteamGameServer()); + } + + public static bool HandleIncomingPacket(byte[] pData, int cbData, uint srcIP, ushort srcPort) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamGameServer_HandleIncomingPacket(CSteamGameServerAPIContext.GetSteamGameServer(), pData, cbData, srcIP, srcPort); + } + + public static int GetNextOutgoingPacket(byte[] pOut, int cbMaxOut, out uint pNetAdr, out ushort pPort) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamGameServer_GetNextOutgoingPacket(CSteamGameServerAPIContext.GetSteamGameServer(), pOut, cbMaxOut, out pNetAdr, out pPort); + } + + public static void EnableHeartbeats(bool bActive) + { + InteropHelp.TestIfAvailableGameServer(); + NativeMethods.ISteamGameServer_EnableHeartbeats(CSteamGameServerAPIContext.GetSteamGameServer(), bActive); + } + + public static void SetHeartbeatInterval(int iHeartbeatInterval) + { + InteropHelp.TestIfAvailableGameServer(); + NativeMethods.ISteamGameServer_SetHeartbeatInterval(CSteamGameServerAPIContext.GetSteamGameServer(), iHeartbeatInterval); + } + + public static void ForceHeartbeat() + { + InteropHelp.TestIfAvailableGameServer(); + NativeMethods.ISteamGameServer_ForceHeartbeat(CSteamGameServerAPIContext.GetSteamGameServer()); + } + + public static SteamAPICall_t AssociateWithClan(CSteamID steamIDClan) + { + InteropHelp.TestIfAvailableGameServer(); + return (SteamAPICall_t)NativeMethods.ISteamGameServer_AssociateWithClan(CSteamGameServerAPIContext.GetSteamGameServer(), steamIDClan); + } + + public static SteamAPICall_t ComputeNewPlayerCompatibility(CSteamID steamIDNewPlayer) + { + InteropHelp.TestIfAvailableGameServer(); + return (SteamAPICall_t)NativeMethods.ISteamGameServer_ComputeNewPlayerCompatibility(CSteamGameServerAPIContext.GetSteamGameServer(), steamIDNewPlayer); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamGameServerApps.cs b/Assembly_Firstpass/Steamworks/SteamGameServerApps.cs new file mode 100644 index 0000000..9b91467 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamGameServerApps.cs @@ -0,0 +1,199 @@ +using System; +using System.Runtime.InteropServices; + +namespace Steamworks; + +public static class SteamGameServerApps +{ + public static bool BIsSubscribed() + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamApps_BIsSubscribed(CSteamGameServerAPIContext.GetSteamApps()); + } + + public static bool BIsLowViolence() + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamApps_BIsLowViolence(CSteamGameServerAPIContext.GetSteamApps()); + } + + public static bool BIsCybercafe() + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamApps_BIsCybercafe(CSteamGameServerAPIContext.GetSteamApps()); + } + + public static bool BIsVACBanned() + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamApps_BIsVACBanned(CSteamGameServerAPIContext.GetSteamApps()); + } + + public static string GetCurrentGameLanguage() + { + InteropHelp.TestIfAvailableGameServer(); + return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamApps_GetCurrentGameLanguage(CSteamGameServerAPIContext.GetSteamApps())); + } + + public static string GetAvailableGameLanguages() + { + InteropHelp.TestIfAvailableGameServer(); + return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamApps_GetAvailableGameLanguages(CSteamGameServerAPIContext.GetSteamApps())); + } + + public static bool BIsSubscribedApp(AppId_t appID) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamApps_BIsSubscribedApp(CSteamGameServerAPIContext.GetSteamApps(), appID); + } + + public static bool BIsDlcInstalled(AppId_t appID) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamApps_BIsDlcInstalled(CSteamGameServerAPIContext.GetSteamApps(), appID); + } + + public static uint GetEarliestPurchaseUnixTime(AppId_t nAppID) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamApps_GetEarliestPurchaseUnixTime(CSteamGameServerAPIContext.GetSteamApps(), nAppID); + } + + public static bool BIsSubscribedFromFreeWeekend() + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamApps_BIsSubscribedFromFreeWeekend(CSteamGameServerAPIContext.GetSteamApps()); + } + + public static int GetDLCCount() + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamApps_GetDLCCount(CSteamGameServerAPIContext.GetSteamApps()); + } + + public static bool BGetDLCDataByIndex(int iDLC, out AppId_t pAppID, out bool pbAvailable, out string pchName, int cchNameBufferSize) + { + InteropHelp.TestIfAvailableGameServer(); + IntPtr intPtr = Marshal.AllocHGlobal(cchNameBufferSize); + bool flag = NativeMethods.ISteamApps_BGetDLCDataByIndex(CSteamGameServerAPIContext.GetSteamApps(), iDLC, out pAppID, out pbAvailable, intPtr, cchNameBufferSize); + pchName = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return flag; + } + + public static void InstallDLC(AppId_t nAppID) + { + InteropHelp.TestIfAvailableGameServer(); + NativeMethods.ISteamApps_InstallDLC(CSteamGameServerAPIContext.GetSteamApps(), nAppID); + } + + public static void UninstallDLC(AppId_t nAppID) + { + InteropHelp.TestIfAvailableGameServer(); + NativeMethods.ISteamApps_UninstallDLC(CSteamGameServerAPIContext.GetSteamApps(), nAppID); + } + + public static void RequestAppProofOfPurchaseKey(AppId_t nAppID) + { + InteropHelp.TestIfAvailableGameServer(); + NativeMethods.ISteamApps_RequestAppProofOfPurchaseKey(CSteamGameServerAPIContext.GetSteamApps(), nAppID); + } + + public static bool GetCurrentBetaName(out string pchName, int cchNameBufferSize) + { + InteropHelp.TestIfAvailableGameServer(); + IntPtr intPtr = Marshal.AllocHGlobal(cchNameBufferSize); + bool flag = NativeMethods.ISteamApps_GetCurrentBetaName(CSteamGameServerAPIContext.GetSteamApps(), intPtr, cchNameBufferSize); + pchName = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return flag; + } + + public static bool MarkContentCorrupt(bool bMissingFilesOnly) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamApps_MarkContentCorrupt(CSteamGameServerAPIContext.GetSteamApps(), bMissingFilesOnly); + } + + public static uint GetInstalledDepots(AppId_t appID, DepotId_t[] pvecDepots, uint cMaxDepots) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamApps_GetInstalledDepots(CSteamGameServerAPIContext.GetSteamApps(), appID, pvecDepots, cMaxDepots); + } + + public static uint GetAppInstallDir(AppId_t appID, out string pchFolder, uint cchFolderBufferSize) + { + InteropHelp.TestIfAvailableGameServer(); + IntPtr intPtr = Marshal.AllocHGlobal((int)cchFolderBufferSize); + uint num = NativeMethods.ISteamApps_GetAppInstallDir(CSteamGameServerAPIContext.GetSteamApps(), appID, intPtr, cchFolderBufferSize); + pchFolder = ((num != 0) ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return num; + } + + public static bool BIsAppInstalled(AppId_t appID) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamApps_BIsAppInstalled(CSteamGameServerAPIContext.GetSteamApps(), appID); + } + + public static CSteamID GetAppOwner() + { + InteropHelp.TestIfAvailableGameServer(); + return (CSteamID)NativeMethods.ISteamApps_GetAppOwner(CSteamGameServerAPIContext.GetSteamApps()); + } + + public static string GetLaunchQueryParam(string pchKey) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchKey2 = new InteropHelp.UTF8StringHandle(pchKey); + return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamApps_GetLaunchQueryParam(CSteamGameServerAPIContext.GetSteamApps(), pchKey2)); + } + + public static bool GetDlcDownloadProgress(AppId_t nAppID, out ulong punBytesDownloaded, out ulong punBytesTotal) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamApps_GetDlcDownloadProgress(CSteamGameServerAPIContext.GetSteamApps(), nAppID, out punBytesDownloaded, out punBytesTotal); + } + + public static int GetAppBuildId() + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamApps_GetAppBuildId(CSteamGameServerAPIContext.GetSteamApps()); + } + + public static void RequestAllProofOfPurchaseKeys() + { + InteropHelp.TestIfAvailableGameServer(); + NativeMethods.ISteamApps_RequestAllProofOfPurchaseKeys(CSteamGameServerAPIContext.GetSteamApps()); + } + + public static SteamAPICall_t GetFileDetails(string pszFileName) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pszFileName2 = new InteropHelp.UTF8StringHandle(pszFileName); + return (SteamAPICall_t)NativeMethods.ISteamApps_GetFileDetails(CSteamGameServerAPIContext.GetSteamApps(), pszFileName2); + } + + public static int GetLaunchCommandLine(out string pszCommandLine, int cubCommandLine) + { + InteropHelp.TestIfAvailableGameServer(); + IntPtr intPtr = Marshal.AllocHGlobal(cubCommandLine); + int num = NativeMethods.ISteamApps_GetLaunchCommandLine(CSteamGameServerAPIContext.GetSteamApps(), intPtr, cubCommandLine); + pszCommandLine = ((num != -1) ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return num; + } + + public static bool BIsSubscribedFromFamilySharing() + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamApps_BIsSubscribedFromFamilySharing(CSteamGameServerAPIContext.GetSteamApps()); + } + + public static bool BIsTimedTrial(out uint punSecondsAllowed, out uint punSecondsPlayed) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamApps_BIsTimedTrial(CSteamGameServerAPIContext.GetSteamApps(), out punSecondsAllowed, out punSecondsPlayed); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamGameServerClient.cs b/Assembly_Firstpass/Steamworks/SteamGameServerClient.cs new file mode 100644 index 0000000..dd2c59b --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamGameServerClient.cs @@ -0,0 +1,249 @@ +using System; + +namespace Steamworks; + +public static class SteamGameServerClient +{ + public static HSteamPipe CreateSteamPipe() + { + InteropHelp.TestIfAvailableGameServer(); + return (HSteamPipe)NativeMethods.ISteamClient_CreateSteamPipe(CSteamGameServerAPIContext.GetSteamClient()); + } + + public static bool BReleaseSteamPipe(HSteamPipe hSteamPipe) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamClient_BReleaseSteamPipe(CSteamGameServerAPIContext.GetSteamClient(), hSteamPipe); + } + + public static HSteamUser ConnectToGlobalUser(HSteamPipe hSteamPipe) + { + InteropHelp.TestIfAvailableGameServer(); + return (HSteamUser)NativeMethods.ISteamClient_ConnectToGlobalUser(CSteamGameServerAPIContext.GetSteamClient(), hSteamPipe); + } + + public static HSteamUser CreateLocalUser(out HSteamPipe phSteamPipe, EAccountType eAccountType) + { + InteropHelp.TestIfAvailableGameServer(); + return (HSteamUser)NativeMethods.ISteamClient_CreateLocalUser(CSteamGameServerAPIContext.GetSteamClient(), out phSteamPipe, eAccountType); + } + + public static void ReleaseUser(HSteamPipe hSteamPipe, HSteamUser hUser) + { + InteropHelp.TestIfAvailableGameServer(); + NativeMethods.ISteamClient_ReleaseUser(CSteamGameServerAPIContext.GetSteamClient(), hSteamPipe, hUser); + } + + public static IntPtr GetISteamUser(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamUser(CSteamGameServerAPIContext.GetSteamClient(), hSteamUser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamGameServer(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamGameServer(CSteamGameServerAPIContext.GetSteamClient(), hSteamUser, hSteamPipe, pchVersion2); + } + + public static void SetLocalIPBinding(ref SteamIPAddress_t unIP, ushort usPort) + { + InteropHelp.TestIfAvailableGameServer(); + NativeMethods.ISteamClient_SetLocalIPBinding(CSteamGameServerAPIContext.GetSteamClient(), ref unIP, usPort); + } + + public static IntPtr GetISteamFriends(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamFriends(CSteamGameServerAPIContext.GetSteamClient(), hSteamUser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamUtils(HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamUtils(CSteamGameServerAPIContext.GetSteamClient(), hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamMatchmaking(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamMatchmaking(CSteamGameServerAPIContext.GetSteamClient(), hSteamUser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamMatchmakingServers(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamMatchmakingServers(CSteamGameServerAPIContext.GetSteamClient(), hSteamUser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamGenericInterface(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamGenericInterface(CSteamGameServerAPIContext.GetSteamClient(), hSteamUser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamUserStats(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamUserStats(CSteamGameServerAPIContext.GetSteamClient(), hSteamUser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamGameServerStats(HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamGameServerStats(CSteamGameServerAPIContext.GetSteamClient(), hSteamuser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamApps(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamApps(CSteamGameServerAPIContext.GetSteamClient(), hSteamUser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamNetworking(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamNetworking(CSteamGameServerAPIContext.GetSteamClient(), hSteamUser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamRemoteStorage(HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamRemoteStorage(CSteamGameServerAPIContext.GetSteamClient(), hSteamuser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamScreenshots(HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamScreenshots(CSteamGameServerAPIContext.GetSteamClient(), hSteamuser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamGameSearch(HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamGameSearch(CSteamGameServerAPIContext.GetSteamClient(), hSteamuser, hSteamPipe, pchVersion2); + } + + public static uint GetIPCCallCount() + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamClient_GetIPCCallCount(CSteamGameServerAPIContext.GetSteamClient()); + } + + public static void SetWarningMessageHook(SteamAPIWarningMessageHook_t pFunction) + { + InteropHelp.TestIfAvailableGameServer(); + NativeMethods.ISteamClient_SetWarningMessageHook(CSteamGameServerAPIContext.GetSteamClient(), pFunction); + } + + public static bool BShutdownIfAllPipesClosed() + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamClient_BShutdownIfAllPipesClosed(CSteamGameServerAPIContext.GetSteamClient()); + } + + public static IntPtr GetISteamHTTP(HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamHTTP(CSteamGameServerAPIContext.GetSteamClient(), hSteamuser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamController(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamController(CSteamGameServerAPIContext.GetSteamClient(), hSteamUser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamUGC(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamUGC(CSteamGameServerAPIContext.GetSteamClient(), hSteamUser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamAppList(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamAppList(CSteamGameServerAPIContext.GetSteamClient(), hSteamUser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamMusic(HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamMusic(CSteamGameServerAPIContext.GetSteamClient(), hSteamuser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamMusicRemote(HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamMusicRemote(CSteamGameServerAPIContext.GetSteamClient(), hSteamuser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamHTMLSurface(HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamHTMLSurface(CSteamGameServerAPIContext.GetSteamClient(), hSteamuser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamInventory(HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamInventory(CSteamGameServerAPIContext.GetSteamClient(), hSteamuser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamVideo(HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamVideo(CSteamGameServerAPIContext.GetSteamClient(), hSteamuser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamParentalSettings(HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamParentalSettings(CSteamGameServerAPIContext.GetSteamClient(), hSteamuser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamInput(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamInput(CSteamGameServerAPIContext.GetSteamClient(), hSteamUser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamParties(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamParties(CSteamGameServerAPIContext.GetSteamClient(), hSteamUser, hSteamPipe, pchVersion2); + } + + public static IntPtr GetISteamRemotePlay(HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchVersion2 = new InteropHelp.UTF8StringHandle(pchVersion); + return NativeMethods.ISteamClient_GetISteamRemotePlay(CSteamGameServerAPIContext.GetSteamClient(), hSteamUser, hSteamPipe, pchVersion2); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamGameServerHTTP.cs b/Assembly_Firstpass/Steamworks/SteamGameServerHTTP.cs new file mode 100644 index 0000000..be732d0 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamGameServerHTTP.cs @@ -0,0 +1,166 @@ +namespace Steamworks; + +public static class SteamGameServerHTTP +{ + public static HTTPRequestHandle CreateHTTPRequest(EHTTPMethod eHTTPRequestMethod, string pchAbsoluteURL) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchAbsoluteURL2 = new InteropHelp.UTF8StringHandle(pchAbsoluteURL); + return (HTTPRequestHandle)NativeMethods.ISteamHTTP_CreateHTTPRequest(CSteamGameServerAPIContext.GetSteamHTTP(), eHTTPRequestMethod, pchAbsoluteURL2); + } + + public static bool SetHTTPRequestContextValue(HTTPRequestHandle hRequest, ulong ulContextValue) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamHTTP_SetHTTPRequestContextValue(CSteamGameServerAPIContext.GetSteamHTTP(), hRequest, ulContextValue); + } + + public static bool SetHTTPRequestNetworkActivityTimeout(HTTPRequestHandle hRequest, uint unTimeoutSeconds) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamHTTP_SetHTTPRequestNetworkActivityTimeout(CSteamGameServerAPIContext.GetSteamHTTP(), hRequest, unTimeoutSeconds); + } + + public static bool SetHTTPRequestHeaderValue(HTTPRequestHandle hRequest, string pchHeaderName, string pchHeaderValue) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchHeaderName2 = new InteropHelp.UTF8StringHandle(pchHeaderName); + using InteropHelp.UTF8StringHandle pchHeaderValue2 = new InteropHelp.UTF8StringHandle(pchHeaderValue); + return NativeMethods.ISteamHTTP_SetHTTPRequestHeaderValue(CSteamGameServerAPIContext.GetSteamHTTP(), hRequest, pchHeaderName2, pchHeaderValue2); + } + + public static bool SetHTTPRequestGetOrPostParameter(HTTPRequestHandle hRequest, string pchParamName, string pchParamValue) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchParamName2 = new InteropHelp.UTF8StringHandle(pchParamName); + using InteropHelp.UTF8StringHandle pchParamValue2 = new InteropHelp.UTF8StringHandle(pchParamValue); + return NativeMethods.ISteamHTTP_SetHTTPRequestGetOrPostParameter(CSteamGameServerAPIContext.GetSteamHTTP(), hRequest, pchParamName2, pchParamValue2); + } + + public static bool SendHTTPRequest(HTTPRequestHandle hRequest, out SteamAPICall_t pCallHandle) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamHTTP_SendHTTPRequest(CSteamGameServerAPIContext.GetSteamHTTP(), hRequest, out pCallHandle); + } + + public static bool SendHTTPRequestAndStreamResponse(HTTPRequestHandle hRequest, out SteamAPICall_t pCallHandle) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamHTTP_SendHTTPRequestAndStreamResponse(CSteamGameServerAPIContext.GetSteamHTTP(), hRequest, out pCallHandle); + } + + public static bool DeferHTTPRequest(HTTPRequestHandle hRequest) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamHTTP_DeferHTTPRequest(CSteamGameServerAPIContext.GetSteamHTTP(), hRequest); + } + + public static bool PrioritizeHTTPRequest(HTTPRequestHandle hRequest) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamHTTP_PrioritizeHTTPRequest(CSteamGameServerAPIContext.GetSteamHTTP(), hRequest); + } + + public static bool GetHTTPResponseHeaderSize(HTTPRequestHandle hRequest, string pchHeaderName, out uint unResponseHeaderSize) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchHeaderName2 = new InteropHelp.UTF8StringHandle(pchHeaderName); + return NativeMethods.ISteamHTTP_GetHTTPResponseHeaderSize(CSteamGameServerAPIContext.GetSteamHTTP(), hRequest, pchHeaderName2, out unResponseHeaderSize); + } + + public static bool GetHTTPResponseHeaderValue(HTTPRequestHandle hRequest, string pchHeaderName, byte[] pHeaderValueBuffer, uint unBufferSize) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchHeaderName2 = new InteropHelp.UTF8StringHandle(pchHeaderName); + return NativeMethods.ISteamHTTP_GetHTTPResponseHeaderValue(CSteamGameServerAPIContext.GetSteamHTTP(), hRequest, pchHeaderName2, pHeaderValueBuffer, unBufferSize); + } + + public static bool GetHTTPResponseBodySize(HTTPRequestHandle hRequest, out uint unBodySize) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamHTTP_GetHTTPResponseBodySize(CSteamGameServerAPIContext.GetSteamHTTP(), hRequest, out unBodySize); + } + + public static bool GetHTTPResponseBodyData(HTTPRequestHandle hRequest, byte[] pBodyDataBuffer, uint unBufferSize) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamHTTP_GetHTTPResponseBodyData(CSteamGameServerAPIContext.GetSteamHTTP(), hRequest, pBodyDataBuffer, unBufferSize); + } + + public static bool GetHTTPStreamingResponseBodyData(HTTPRequestHandle hRequest, uint cOffset, byte[] pBodyDataBuffer, uint unBufferSize) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamHTTP_GetHTTPStreamingResponseBodyData(CSteamGameServerAPIContext.GetSteamHTTP(), hRequest, cOffset, pBodyDataBuffer, unBufferSize); + } + + public static bool ReleaseHTTPRequest(HTTPRequestHandle hRequest) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamHTTP_ReleaseHTTPRequest(CSteamGameServerAPIContext.GetSteamHTTP(), hRequest); + } + + public static bool GetHTTPDownloadProgressPct(HTTPRequestHandle hRequest, out float pflPercentOut) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamHTTP_GetHTTPDownloadProgressPct(CSteamGameServerAPIContext.GetSteamHTTP(), hRequest, out pflPercentOut); + } + + public static bool SetHTTPRequestRawPostBody(HTTPRequestHandle hRequest, string pchContentType, byte[] pubBody, uint unBodyLen) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchContentType2 = new InteropHelp.UTF8StringHandle(pchContentType); + return NativeMethods.ISteamHTTP_SetHTTPRequestRawPostBody(CSteamGameServerAPIContext.GetSteamHTTP(), hRequest, pchContentType2, pubBody, unBodyLen); + } + + public static HTTPCookieContainerHandle CreateCookieContainer(bool bAllowResponsesToModify) + { + InteropHelp.TestIfAvailableGameServer(); + return (HTTPCookieContainerHandle)NativeMethods.ISteamHTTP_CreateCookieContainer(CSteamGameServerAPIContext.GetSteamHTTP(), bAllowResponsesToModify); + } + + public static bool ReleaseCookieContainer(HTTPCookieContainerHandle hCookieContainer) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamHTTP_ReleaseCookieContainer(CSteamGameServerAPIContext.GetSteamHTTP(), hCookieContainer); + } + + public static bool SetCookie(HTTPCookieContainerHandle hCookieContainer, string pchHost, string pchUrl, string pchCookie) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchHost2 = new InteropHelp.UTF8StringHandle(pchHost); + using InteropHelp.UTF8StringHandle pchUrl2 = new InteropHelp.UTF8StringHandle(pchUrl); + using InteropHelp.UTF8StringHandle pchCookie2 = new InteropHelp.UTF8StringHandle(pchCookie); + return NativeMethods.ISteamHTTP_SetCookie(CSteamGameServerAPIContext.GetSteamHTTP(), hCookieContainer, pchHost2, pchUrl2, pchCookie2); + } + + public static bool SetHTTPRequestCookieContainer(HTTPRequestHandle hRequest, HTTPCookieContainerHandle hCookieContainer) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamHTTP_SetHTTPRequestCookieContainer(CSteamGameServerAPIContext.GetSteamHTTP(), hRequest, hCookieContainer); + } + + public static bool SetHTTPRequestUserAgentInfo(HTTPRequestHandle hRequest, string pchUserAgentInfo) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchUserAgentInfo2 = new InteropHelp.UTF8StringHandle(pchUserAgentInfo); + return NativeMethods.ISteamHTTP_SetHTTPRequestUserAgentInfo(CSteamGameServerAPIContext.GetSteamHTTP(), hRequest, pchUserAgentInfo2); + } + + public static bool SetHTTPRequestRequiresVerifiedCertificate(HTTPRequestHandle hRequest, bool bRequireVerifiedCertificate) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamHTTP_SetHTTPRequestRequiresVerifiedCertificate(CSteamGameServerAPIContext.GetSteamHTTP(), hRequest, bRequireVerifiedCertificate); + } + + public static bool SetHTTPRequestAbsoluteTimeoutMS(HTTPRequestHandle hRequest, uint unMilliseconds) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamHTTP_SetHTTPRequestAbsoluteTimeoutMS(CSteamGameServerAPIContext.GetSteamHTTP(), hRequest, unMilliseconds); + } + + public static bool GetHTTPRequestWasTimedOut(HTTPRequestHandle hRequest, out bool pbWasTimedOut) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamHTTP_GetHTTPRequestWasTimedOut(CSteamGameServerAPIContext.GetSteamHTTP(), hRequest, out pbWasTimedOut); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamGameServerInventory.cs b/Assembly_Firstpass/Steamworks/SteamGameServerInventory.cs new file mode 100644 index 0000000..4e16237 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamGameServerInventory.cs @@ -0,0 +1,276 @@ +using System; +using System.Runtime.InteropServices; + +namespace Steamworks; + +public static class SteamGameServerInventory +{ + public static EResult GetResultStatus(SteamInventoryResult_t resultHandle) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamInventory_GetResultStatus(CSteamGameServerAPIContext.GetSteamInventory(), resultHandle); + } + + public static bool GetResultItems(SteamInventoryResult_t resultHandle, SteamItemDetails_t[] pOutItemsArray, ref uint punOutItemsArraySize) + { + InteropHelp.TestIfAvailableGameServer(); + if (pOutItemsArray != null && pOutItemsArray.Length != punOutItemsArraySize) + { + throw new ArgumentException("pOutItemsArray must be the same size as punOutItemsArraySize!"); + } + return NativeMethods.ISteamInventory_GetResultItems(CSteamGameServerAPIContext.GetSteamInventory(), resultHandle, pOutItemsArray, ref punOutItemsArraySize); + } + + public static bool GetResultItemProperty(SteamInventoryResult_t resultHandle, uint unItemIndex, string pchPropertyName, out string pchValueBuffer, ref uint punValueBufferSizeOut) + { + InteropHelp.TestIfAvailableGameServer(); + IntPtr intPtr = Marshal.AllocHGlobal((int)punValueBufferSizeOut); + using InteropHelp.UTF8StringHandle pchPropertyName2 = new InteropHelp.UTF8StringHandle(pchPropertyName); + bool flag = NativeMethods.ISteamInventory_GetResultItemProperty(CSteamGameServerAPIContext.GetSteamInventory(), resultHandle, unItemIndex, pchPropertyName2, intPtr, ref punValueBufferSizeOut); + pchValueBuffer = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return flag; + } + + public static uint GetResultTimestamp(SteamInventoryResult_t resultHandle) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamInventory_GetResultTimestamp(CSteamGameServerAPIContext.GetSteamInventory(), resultHandle); + } + + public static bool CheckResultSteamID(SteamInventoryResult_t resultHandle, CSteamID steamIDExpected) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamInventory_CheckResultSteamID(CSteamGameServerAPIContext.GetSteamInventory(), resultHandle, steamIDExpected); + } + + public static void DestroyResult(SteamInventoryResult_t resultHandle) + { + InteropHelp.TestIfAvailableGameServer(); + NativeMethods.ISteamInventory_DestroyResult(CSteamGameServerAPIContext.GetSteamInventory(), resultHandle); + } + + public static bool GetAllItems(out SteamInventoryResult_t pResultHandle) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamInventory_GetAllItems(CSteamGameServerAPIContext.GetSteamInventory(), out pResultHandle); + } + + public static bool GetItemsByID(out SteamInventoryResult_t pResultHandle, SteamItemInstanceID_t[] pInstanceIDs, uint unCountInstanceIDs) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamInventory_GetItemsByID(CSteamGameServerAPIContext.GetSteamInventory(), out pResultHandle, pInstanceIDs, unCountInstanceIDs); + } + + public static bool SerializeResult(SteamInventoryResult_t resultHandle, byte[] pOutBuffer, out uint punOutBufferSize) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamInventory_SerializeResult(CSteamGameServerAPIContext.GetSteamInventory(), resultHandle, pOutBuffer, out punOutBufferSize); + } + + public static bool DeserializeResult(out SteamInventoryResult_t pOutResultHandle, byte[] pBuffer, uint unBufferSize, bool bRESERVED_MUST_BE_FALSE = false) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamInventory_DeserializeResult(CSteamGameServerAPIContext.GetSteamInventory(), out pOutResultHandle, pBuffer, unBufferSize, bRESERVED_MUST_BE_FALSE); + } + + public static bool GenerateItems(out SteamInventoryResult_t pResultHandle, SteamItemDef_t[] pArrayItemDefs, uint[] punArrayQuantity, uint unArrayLength) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamInventory_GenerateItems(CSteamGameServerAPIContext.GetSteamInventory(), out pResultHandle, pArrayItemDefs, punArrayQuantity, unArrayLength); + } + + public static bool GrantPromoItems(out SteamInventoryResult_t pResultHandle) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamInventory_GrantPromoItems(CSteamGameServerAPIContext.GetSteamInventory(), out pResultHandle); + } + + public static bool AddPromoItem(out SteamInventoryResult_t pResultHandle, SteamItemDef_t itemDef) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamInventory_AddPromoItem(CSteamGameServerAPIContext.GetSteamInventory(), out pResultHandle, itemDef); + } + + public static bool AddPromoItems(out SteamInventoryResult_t pResultHandle, SteamItemDef_t[] pArrayItemDefs, uint unArrayLength) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamInventory_AddPromoItems(CSteamGameServerAPIContext.GetSteamInventory(), out pResultHandle, pArrayItemDefs, unArrayLength); + } + + public static bool ConsumeItem(out SteamInventoryResult_t pResultHandle, SteamItemInstanceID_t itemConsume, uint unQuantity) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamInventory_ConsumeItem(CSteamGameServerAPIContext.GetSteamInventory(), out pResultHandle, itemConsume, unQuantity); + } + + public static bool ExchangeItems(out SteamInventoryResult_t pResultHandle, SteamItemDef_t[] pArrayGenerate, uint[] punArrayGenerateQuantity, uint unArrayGenerateLength, SteamItemInstanceID_t[] pArrayDestroy, uint[] punArrayDestroyQuantity, uint unArrayDestroyLength) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamInventory_ExchangeItems(CSteamGameServerAPIContext.GetSteamInventory(), out pResultHandle, pArrayGenerate, punArrayGenerateQuantity, unArrayGenerateLength, pArrayDestroy, punArrayDestroyQuantity, unArrayDestroyLength); + } + + public static bool TransferItemQuantity(out SteamInventoryResult_t pResultHandle, SteamItemInstanceID_t itemIdSource, uint unQuantity, SteamItemInstanceID_t itemIdDest) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamInventory_TransferItemQuantity(CSteamGameServerAPIContext.GetSteamInventory(), out pResultHandle, itemIdSource, unQuantity, itemIdDest); + } + + public static void SendItemDropHeartbeat() + { + InteropHelp.TestIfAvailableGameServer(); + NativeMethods.ISteamInventory_SendItemDropHeartbeat(CSteamGameServerAPIContext.GetSteamInventory()); + } + + public static bool TriggerItemDrop(out SteamInventoryResult_t pResultHandle, SteamItemDef_t dropListDefinition) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamInventory_TriggerItemDrop(CSteamGameServerAPIContext.GetSteamInventory(), out pResultHandle, dropListDefinition); + } + + public static bool TradeItems(out SteamInventoryResult_t pResultHandle, CSteamID steamIDTradePartner, SteamItemInstanceID_t[] pArrayGive, uint[] pArrayGiveQuantity, uint nArrayGiveLength, SteamItemInstanceID_t[] pArrayGet, uint[] pArrayGetQuantity, uint nArrayGetLength) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamInventory_TradeItems(CSteamGameServerAPIContext.GetSteamInventory(), out pResultHandle, steamIDTradePartner, pArrayGive, pArrayGiveQuantity, nArrayGiveLength, pArrayGet, pArrayGetQuantity, nArrayGetLength); + } + + public static bool LoadItemDefinitions() + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamInventory_LoadItemDefinitions(CSteamGameServerAPIContext.GetSteamInventory()); + } + + public static bool GetItemDefinitionIDs(SteamItemDef_t[] pItemDefIDs, ref uint punItemDefIDsArraySize) + { + InteropHelp.TestIfAvailableGameServer(); + if (pItemDefIDs != null && pItemDefIDs.Length != punItemDefIDsArraySize) + { + throw new ArgumentException("pItemDefIDs must be the same size as punItemDefIDsArraySize!"); + } + return NativeMethods.ISteamInventory_GetItemDefinitionIDs(CSteamGameServerAPIContext.GetSteamInventory(), pItemDefIDs, ref punItemDefIDsArraySize); + } + + public static bool GetItemDefinitionProperty(SteamItemDef_t iDefinition, string pchPropertyName, out string pchValueBuffer, ref uint punValueBufferSizeOut) + { + InteropHelp.TestIfAvailableGameServer(); + IntPtr intPtr = Marshal.AllocHGlobal((int)punValueBufferSizeOut); + using InteropHelp.UTF8StringHandle pchPropertyName2 = new InteropHelp.UTF8StringHandle(pchPropertyName); + bool flag = NativeMethods.ISteamInventory_GetItemDefinitionProperty(CSteamGameServerAPIContext.GetSteamInventory(), iDefinition, pchPropertyName2, intPtr, ref punValueBufferSizeOut); + pchValueBuffer = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return flag; + } + + public static SteamAPICall_t RequestEligiblePromoItemDefinitionsIDs(CSteamID steamID) + { + InteropHelp.TestIfAvailableGameServer(); + return (SteamAPICall_t)NativeMethods.ISteamInventory_RequestEligiblePromoItemDefinitionsIDs(CSteamGameServerAPIContext.GetSteamInventory(), steamID); + } + + public static bool GetEligiblePromoItemDefinitionIDs(CSteamID steamID, SteamItemDef_t[] pItemDefIDs, ref uint punItemDefIDsArraySize) + { + InteropHelp.TestIfAvailableGameServer(); + if (pItemDefIDs != null && pItemDefIDs.Length != punItemDefIDsArraySize) + { + throw new ArgumentException("pItemDefIDs must be the same size as punItemDefIDsArraySize!"); + } + return NativeMethods.ISteamInventory_GetEligiblePromoItemDefinitionIDs(CSteamGameServerAPIContext.GetSteamInventory(), steamID, pItemDefIDs, ref punItemDefIDsArraySize); + } + + public static SteamAPICall_t StartPurchase(SteamItemDef_t[] pArrayItemDefs, uint[] punArrayQuantity, uint unArrayLength) + { + InteropHelp.TestIfAvailableGameServer(); + return (SteamAPICall_t)NativeMethods.ISteamInventory_StartPurchase(CSteamGameServerAPIContext.GetSteamInventory(), pArrayItemDefs, punArrayQuantity, unArrayLength); + } + + public static SteamAPICall_t RequestPrices() + { + InteropHelp.TestIfAvailableGameServer(); + return (SteamAPICall_t)NativeMethods.ISteamInventory_RequestPrices(CSteamGameServerAPIContext.GetSteamInventory()); + } + + public static uint GetNumItemsWithPrices() + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamInventory_GetNumItemsWithPrices(CSteamGameServerAPIContext.GetSteamInventory()); + } + + public static bool GetItemsWithPrices(SteamItemDef_t[] pArrayItemDefs, ulong[] pCurrentPrices, ulong[] pBasePrices, uint unArrayLength) + { + InteropHelp.TestIfAvailableGameServer(); + if (pArrayItemDefs != null && pArrayItemDefs.Length != unArrayLength) + { + throw new ArgumentException("pArrayItemDefs must be the same size as unArrayLength!"); + } + if (pCurrentPrices != null && pCurrentPrices.Length != unArrayLength) + { + throw new ArgumentException("pCurrentPrices must be the same size as unArrayLength!"); + } + if (pBasePrices != null && pBasePrices.Length != unArrayLength) + { + throw new ArgumentException("pBasePrices must be the same size as unArrayLength!"); + } + return NativeMethods.ISteamInventory_GetItemsWithPrices(CSteamGameServerAPIContext.GetSteamInventory(), pArrayItemDefs, pCurrentPrices, pBasePrices, unArrayLength); + } + + public static bool GetItemPrice(SteamItemDef_t iDefinition, out ulong pCurrentPrice, out ulong pBasePrice) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamInventory_GetItemPrice(CSteamGameServerAPIContext.GetSteamInventory(), iDefinition, out pCurrentPrice, out pBasePrice); + } + + public static SteamInventoryUpdateHandle_t StartUpdateProperties() + { + InteropHelp.TestIfAvailableGameServer(); + return (SteamInventoryUpdateHandle_t)NativeMethods.ISteamInventory_StartUpdateProperties(CSteamGameServerAPIContext.GetSteamInventory()); + } + + public static bool RemoveProperty(SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, string pchPropertyName) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchPropertyName2 = new InteropHelp.UTF8StringHandle(pchPropertyName); + return NativeMethods.ISteamInventory_RemoveProperty(CSteamGameServerAPIContext.GetSteamInventory(), handle, nItemID, pchPropertyName2); + } + + public static bool SetProperty(SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, string pchPropertyName, string pchPropertyValue) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchPropertyName2 = new InteropHelp.UTF8StringHandle(pchPropertyName); + using InteropHelp.UTF8StringHandle pchPropertyValue2 = new InteropHelp.UTF8StringHandle(pchPropertyValue); + return NativeMethods.ISteamInventory_SetPropertyString(CSteamGameServerAPIContext.GetSteamInventory(), handle, nItemID, pchPropertyName2, pchPropertyValue2); + } + + public static bool SetProperty(SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, string pchPropertyName, bool bValue) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchPropertyName2 = new InteropHelp.UTF8StringHandle(pchPropertyName); + return NativeMethods.ISteamInventory_SetPropertyBool(CSteamGameServerAPIContext.GetSteamInventory(), handle, nItemID, pchPropertyName2, bValue); + } + + public static bool SetProperty(SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, string pchPropertyName, long nValue) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchPropertyName2 = new InteropHelp.UTF8StringHandle(pchPropertyName); + return NativeMethods.ISteamInventory_SetPropertyInt64(CSteamGameServerAPIContext.GetSteamInventory(), handle, nItemID, pchPropertyName2, nValue); + } + + public static bool SetProperty(SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, string pchPropertyName, float flValue) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchPropertyName2 = new InteropHelp.UTF8StringHandle(pchPropertyName); + return NativeMethods.ISteamInventory_SetPropertyFloat(CSteamGameServerAPIContext.GetSteamInventory(), handle, nItemID, pchPropertyName2, flValue); + } + + public static bool SubmitUpdateProperties(SteamInventoryUpdateHandle_t handle, out SteamInventoryResult_t pResultHandle) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamInventory_SubmitUpdateProperties(CSteamGameServerAPIContext.GetSteamInventory(), handle, out pResultHandle); + } + + public static bool InspectItem(out SteamInventoryResult_t pResultHandle, string pchItemToken) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchItemToken2 = new InteropHelp.UTF8StringHandle(pchItemToken); + return NativeMethods.ISteamInventory_InspectItem(CSteamGameServerAPIContext.GetSteamInventory(), out pResultHandle, pchItemToken2); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamGameServerNetworking.cs b/Assembly_Firstpass/Steamworks/SteamGameServerNetworking.cs new file mode 100644 index 0000000..8072d04 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamGameServerNetworking.cs @@ -0,0 +1,136 @@ +namespace Steamworks; + +public static class SteamGameServerNetworking +{ + public static bool SendP2PPacket(CSteamID steamIDRemote, byte[] pubData, uint cubData, EP2PSend eP2PSendType, int nChannel = 0) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworking_SendP2PPacket(CSteamGameServerAPIContext.GetSteamNetworking(), steamIDRemote, pubData, cubData, eP2PSendType, nChannel); + } + + public static bool IsP2PPacketAvailable(out uint pcubMsgSize, int nChannel = 0) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworking_IsP2PPacketAvailable(CSteamGameServerAPIContext.GetSteamNetworking(), out pcubMsgSize, nChannel); + } + + public static bool ReadP2PPacket(byte[] pubDest, uint cubDest, out uint pcubMsgSize, out CSteamID psteamIDRemote, int nChannel = 0) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworking_ReadP2PPacket(CSteamGameServerAPIContext.GetSteamNetworking(), pubDest, cubDest, out pcubMsgSize, out psteamIDRemote, nChannel); + } + + public static bool AcceptP2PSessionWithUser(CSteamID steamIDRemote) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworking_AcceptP2PSessionWithUser(CSteamGameServerAPIContext.GetSteamNetworking(), steamIDRemote); + } + + public static bool CloseP2PSessionWithUser(CSteamID steamIDRemote) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworking_CloseP2PSessionWithUser(CSteamGameServerAPIContext.GetSteamNetworking(), steamIDRemote); + } + + public static bool CloseP2PChannelWithUser(CSteamID steamIDRemote, int nChannel) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworking_CloseP2PChannelWithUser(CSteamGameServerAPIContext.GetSteamNetworking(), steamIDRemote, nChannel); + } + + public static bool GetP2PSessionState(CSteamID steamIDRemote, out P2PSessionState_t pConnectionState) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworking_GetP2PSessionState(CSteamGameServerAPIContext.GetSteamNetworking(), steamIDRemote, out pConnectionState); + } + + public static bool AllowP2PPacketRelay(bool bAllow) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworking_AllowP2PPacketRelay(CSteamGameServerAPIContext.GetSteamNetworking(), bAllow); + } + + public static SNetListenSocket_t CreateListenSocket(int nVirtualP2PPort, SteamIPAddress_t nIP, ushort nPort, bool bAllowUseOfPacketRelay) + { + InteropHelp.TestIfAvailableGameServer(); + return (SNetListenSocket_t)NativeMethods.ISteamNetworking_CreateListenSocket(CSteamGameServerAPIContext.GetSteamNetworking(), nVirtualP2PPort, nIP, nPort, bAllowUseOfPacketRelay); + } + + public static SNetSocket_t CreateP2PConnectionSocket(CSteamID steamIDTarget, int nVirtualPort, int nTimeoutSec, bool bAllowUseOfPacketRelay) + { + InteropHelp.TestIfAvailableGameServer(); + return (SNetSocket_t)NativeMethods.ISteamNetworking_CreateP2PConnectionSocket(CSteamGameServerAPIContext.GetSteamNetworking(), steamIDTarget, nVirtualPort, nTimeoutSec, bAllowUseOfPacketRelay); + } + + public static SNetSocket_t CreateConnectionSocket(SteamIPAddress_t nIP, ushort nPort, int nTimeoutSec) + { + InteropHelp.TestIfAvailableGameServer(); + return (SNetSocket_t)NativeMethods.ISteamNetworking_CreateConnectionSocket(CSteamGameServerAPIContext.GetSteamNetworking(), nIP, nPort, nTimeoutSec); + } + + public static bool DestroySocket(SNetSocket_t hSocket, bool bNotifyRemoteEnd) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworking_DestroySocket(CSteamGameServerAPIContext.GetSteamNetworking(), hSocket, bNotifyRemoteEnd); + } + + public static bool DestroyListenSocket(SNetListenSocket_t hSocket, bool bNotifyRemoteEnd) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworking_DestroyListenSocket(CSteamGameServerAPIContext.GetSteamNetworking(), hSocket, bNotifyRemoteEnd); + } + + public static bool SendDataOnSocket(SNetSocket_t hSocket, byte[] pubData, uint cubData, bool bReliable) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworking_SendDataOnSocket(CSteamGameServerAPIContext.GetSteamNetworking(), hSocket, pubData, cubData, bReliable); + } + + public static bool IsDataAvailableOnSocket(SNetSocket_t hSocket, out uint pcubMsgSize) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworking_IsDataAvailableOnSocket(CSteamGameServerAPIContext.GetSteamNetworking(), hSocket, out pcubMsgSize); + } + + public static bool RetrieveDataFromSocket(SNetSocket_t hSocket, byte[] pubDest, uint cubDest, out uint pcubMsgSize) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworking_RetrieveDataFromSocket(CSteamGameServerAPIContext.GetSteamNetworking(), hSocket, pubDest, cubDest, out pcubMsgSize); + } + + public static bool IsDataAvailable(SNetListenSocket_t hListenSocket, out uint pcubMsgSize, out SNetSocket_t phSocket) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworking_IsDataAvailable(CSteamGameServerAPIContext.GetSteamNetworking(), hListenSocket, out pcubMsgSize, out phSocket); + } + + public static bool RetrieveData(SNetListenSocket_t hListenSocket, byte[] pubDest, uint cubDest, out uint pcubMsgSize, out SNetSocket_t phSocket) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworking_RetrieveData(CSteamGameServerAPIContext.GetSteamNetworking(), hListenSocket, pubDest, cubDest, out pcubMsgSize, out phSocket); + } + + public static bool GetSocketInfo(SNetSocket_t hSocket, out CSteamID pSteamIDRemote, out int peSocketStatus, out SteamIPAddress_t punIPRemote, out ushort punPortRemote) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworking_GetSocketInfo(CSteamGameServerAPIContext.GetSteamNetworking(), hSocket, out pSteamIDRemote, out peSocketStatus, out punIPRemote, out punPortRemote); + } + + public static bool GetListenSocketInfo(SNetListenSocket_t hListenSocket, out SteamIPAddress_t pnIP, out ushort pnPort) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworking_GetListenSocketInfo(CSteamGameServerAPIContext.GetSteamNetworking(), hListenSocket, out pnIP, out pnPort); + } + + public static ESNetSocketConnectionType GetSocketConnectionType(SNetSocket_t hSocket) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworking_GetSocketConnectionType(CSteamGameServerAPIContext.GetSteamNetworking(), hSocket); + } + + public static int GetMaxPacketSize(SNetSocket_t hSocket) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworking_GetMaxPacketSize(CSteamGameServerAPIContext.GetSteamNetworking(), hSocket); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamGameServerNetworkingSockets.cs b/Assembly_Firstpass/Steamworks/SteamGameServerNetworkingSockets.cs new file mode 100644 index 0000000..ab7f1c3 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamGameServerNetworkingSockets.cs @@ -0,0 +1,257 @@ +using System; +using System.Runtime.InteropServices; + +namespace Steamworks; + +public static class SteamGameServerNetworkingSockets +{ + public static HSteamListenSocket CreateListenSocketIP(ref SteamNetworkingIPAddr localAddress, int nOptions, SteamNetworkingConfigValue_t[] pOptions) + { + InteropHelp.TestIfAvailableGameServer(); + return (HSteamListenSocket)NativeMethods.ISteamNetworkingSockets_CreateListenSocketIP(CSteamGameServerAPIContext.GetSteamNetworkingSockets(), ref localAddress, nOptions, pOptions); + } + + public static HSteamNetConnection ConnectByIPAddress(ref SteamNetworkingIPAddr address, int nOptions, SteamNetworkingConfigValue_t[] pOptions) + { + InteropHelp.TestIfAvailableGameServer(); + return (HSteamNetConnection)NativeMethods.ISteamNetworkingSockets_ConnectByIPAddress(CSteamGameServerAPIContext.GetSteamNetworkingSockets(), ref address, nOptions, pOptions); + } + + public static HSteamListenSocket CreateListenSocketP2P(int nLocalVirtualPort, int nOptions, SteamNetworkingConfigValue_t[] pOptions) + { + InteropHelp.TestIfAvailableGameServer(); + return (HSteamListenSocket)NativeMethods.ISteamNetworkingSockets_CreateListenSocketP2P(CSteamGameServerAPIContext.GetSteamNetworkingSockets(), nLocalVirtualPort, nOptions, pOptions); + } + + public static HSteamNetConnection ConnectP2P(ref SteamNetworkingIdentity identityRemote, int nRemoteVirtualPort, int nOptions, SteamNetworkingConfigValue_t[] pOptions) + { + InteropHelp.TestIfAvailableGameServer(); + return (HSteamNetConnection)NativeMethods.ISteamNetworkingSockets_ConnectP2P(CSteamGameServerAPIContext.GetSteamNetworkingSockets(), ref identityRemote, nRemoteVirtualPort, nOptions, pOptions); + } + + public static EResult AcceptConnection(HSteamNetConnection hConn) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingSockets_AcceptConnection(CSteamGameServerAPIContext.GetSteamNetworkingSockets(), hConn); + } + + public static bool CloseConnection(HSteamNetConnection hPeer, int nReason, string pszDebug, bool bEnableLinger) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pszDebug2 = new InteropHelp.UTF8StringHandle(pszDebug); + return NativeMethods.ISteamNetworkingSockets_CloseConnection(CSteamGameServerAPIContext.GetSteamNetworkingSockets(), hPeer, nReason, pszDebug2, bEnableLinger); + } + + public static bool CloseListenSocket(HSteamListenSocket hSocket) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingSockets_CloseListenSocket(CSteamGameServerAPIContext.GetSteamNetworkingSockets(), hSocket); + } + + public static bool SetConnectionUserData(HSteamNetConnection hPeer, long nUserData) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingSockets_SetConnectionUserData(CSteamGameServerAPIContext.GetSteamNetworkingSockets(), hPeer, nUserData); + } + + public static long GetConnectionUserData(HSteamNetConnection hPeer) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingSockets_GetConnectionUserData(CSteamGameServerAPIContext.GetSteamNetworkingSockets(), hPeer); + } + + public static void SetConnectionName(HSteamNetConnection hPeer, string pszName) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pszName2 = new InteropHelp.UTF8StringHandle(pszName); + NativeMethods.ISteamNetworkingSockets_SetConnectionName(CSteamGameServerAPIContext.GetSteamNetworkingSockets(), hPeer, pszName2); + } + + public static bool GetConnectionName(HSteamNetConnection hPeer, out string pszName, int nMaxLen) + { + InteropHelp.TestIfAvailableGameServer(); + IntPtr intPtr = Marshal.AllocHGlobal(nMaxLen); + bool flag = NativeMethods.ISteamNetworkingSockets_GetConnectionName(CSteamGameServerAPIContext.GetSteamNetworkingSockets(), hPeer, intPtr, nMaxLen); + pszName = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return flag; + } + + public static EResult SendMessageToConnection(HSteamNetConnection hConn, IntPtr pData, uint cbData, int nSendFlags, out long pOutMessageNumber) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingSockets_SendMessageToConnection(CSteamGameServerAPIContext.GetSteamNetworkingSockets(), hConn, pData, cbData, nSendFlags, out pOutMessageNumber); + } + + public static void SendMessages(int nMessages, SteamNetworkingMessage_t[] pMessages, long[] pOutMessageNumberOrResult) + { + InteropHelp.TestIfAvailableGameServer(); + NativeMethods.ISteamNetworkingSockets_SendMessages(CSteamGameServerAPIContext.GetSteamNetworkingSockets(), nMessages, pMessages, pOutMessageNumberOrResult); + } + + public static EResult FlushMessagesOnConnection(HSteamNetConnection hConn) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingSockets_FlushMessagesOnConnection(CSteamGameServerAPIContext.GetSteamNetworkingSockets(), hConn); + } + + public static int ReceiveMessagesOnConnection(HSteamNetConnection hConn, IntPtr[] ppOutMessages, int nMaxMessages) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingSockets_ReceiveMessagesOnConnection(CSteamGameServerAPIContext.GetSteamNetworkingSockets(), hConn, ppOutMessages, nMaxMessages); + } + + public static bool GetConnectionInfo(HSteamNetConnection hConn, out SteamNetConnectionInfo_t pInfo) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingSockets_GetConnectionInfo(CSteamGameServerAPIContext.GetSteamNetworkingSockets(), hConn, out pInfo); + } + + public static bool GetQuickConnectionStatus(HSteamNetConnection hConn, out SteamNetworkingQuickConnectionStatus pStats) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingSockets_GetQuickConnectionStatus(CSteamGameServerAPIContext.GetSteamNetworkingSockets(), hConn, out pStats); + } + + public static int GetDetailedConnectionStatus(HSteamNetConnection hConn, out string pszBuf, int cbBuf) + { + InteropHelp.TestIfAvailableGameServer(); + IntPtr intPtr = Marshal.AllocHGlobal(cbBuf); + int num = NativeMethods.ISteamNetworkingSockets_GetDetailedConnectionStatus(CSteamGameServerAPIContext.GetSteamNetworkingSockets(), hConn, intPtr, cbBuf); + pszBuf = ((num != -1) ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return num; + } + + public static bool GetListenSocketAddress(HSteamListenSocket hSocket, out SteamNetworkingIPAddr address) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingSockets_GetListenSocketAddress(CSteamGameServerAPIContext.GetSteamNetworkingSockets(), hSocket, out address); + } + + public static bool CreateSocketPair(out HSteamNetConnection pOutConnection1, out HSteamNetConnection pOutConnection2, bool bUseNetworkLoopback, ref SteamNetworkingIdentity pIdentity1, ref SteamNetworkingIdentity pIdentity2) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingSockets_CreateSocketPair(CSteamGameServerAPIContext.GetSteamNetworkingSockets(), out pOutConnection1, out pOutConnection2, bUseNetworkLoopback, ref pIdentity1, ref pIdentity2); + } + + public static bool GetIdentity(out SteamNetworkingIdentity pIdentity) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingSockets_GetIdentity(CSteamGameServerAPIContext.GetSteamNetworkingSockets(), out pIdentity); + } + + public static ESteamNetworkingAvailability InitAuthentication() + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingSockets_InitAuthentication(CSteamGameServerAPIContext.GetSteamNetworkingSockets()); + } + + public static ESteamNetworkingAvailability GetAuthenticationStatus(out SteamNetAuthenticationStatus_t pDetails) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingSockets_GetAuthenticationStatus(CSteamGameServerAPIContext.GetSteamNetworkingSockets(), out pDetails); + } + + public static HSteamNetPollGroup CreatePollGroup() + { + InteropHelp.TestIfAvailableGameServer(); + return (HSteamNetPollGroup)NativeMethods.ISteamNetworkingSockets_CreatePollGroup(CSteamGameServerAPIContext.GetSteamNetworkingSockets()); + } + + public static bool DestroyPollGroup(HSteamNetPollGroup hPollGroup) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingSockets_DestroyPollGroup(CSteamGameServerAPIContext.GetSteamNetworkingSockets(), hPollGroup); + } + + public static bool SetConnectionPollGroup(HSteamNetConnection hConn, HSteamNetPollGroup hPollGroup) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingSockets_SetConnectionPollGroup(CSteamGameServerAPIContext.GetSteamNetworkingSockets(), hConn, hPollGroup); + } + + public static int ReceiveMessagesOnPollGroup(HSteamNetPollGroup hPollGroup, IntPtr[] ppOutMessages, int nMaxMessages) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingSockets_ReceiveMessagesOnPollGroup(CSteamGameServerAPIContext.GetSteamNetworkingSockets(), hPollGroup, ppOutMessages, nMaxMessages); + } + + public static bool ReceivedRelayAuthTicket(IntPtr pvTicket, int cbTicket, out SteamDatagramRelayAuthTicket pOutParsedTicket) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingSockets_ReceivedRelayAuthTicket(CSteamGameServerAPIContext.GetSteamNetworkingSockets(), pvTicket, cbTicket, out pOutParsedTicket); + } + + public static int FindRelayAuthTicketForServer(ref SteamNetworkingIdentity identityGameServer, int nRemoteVirtualPort, out SteamDatagramRelayAuthTicket pOutParsedTicket) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingSockets_FindRelayAuthTicketForServer(CSteamGameServerAPIContext.GetSteamNetworkingSockets(), ref identityGameServer, nRemoteVirtualPort, out pOutParsedTicket); + } + + public static HSteamNetConnection ConnectToHostedDedicatedServer(ref SteamNetworkingIdentity identityTarget, int nRemoteVirtualPort, int nOptions, SteamNetworkingConfigValue_t[] pOptions) + { + InteropHelp.TestIfAvailableGameServer(); + return (HSteamNetConnection)NativeMethods.ISteamNetworkingSockets_ConnectToHostedDedicatedServer(CSteamGameServerAPIContext.GetSteamNetworkingSockets(), ref identityTarget, nRemoteVirtualPort, nOptions, pOptions); + } + + public static ushort GetHostedDedicatedServerPort() + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingSockets_GetHostedDedicatedServerPort(CSteamGameServerAPIContext.GetSteamNetworkingSockets()); + } + + public static SteamNetworkingPOPID GetHostedDedicatedServerPOPID() + { + InteropHelp.TestIfAvailableGameServer(); + return (SteamNetworkingPOPID)NativeMethods.ISteamNetworkingSockets_GetHostedDedicatedServerPOPID(CSteamGameServerAPIContext.GetSteamNetworkingSockets()); + } + + public static EResult GetHostedDedicatedServerAddress(out SteamDatagramHostedAddress pRouting) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingSockets_GetHostedDedicatedServerAddress(CSteamGameServerAPIContext.GetSteamNetworkingSockets(), out pRouting); + } + + public static HSteamListenSocket CreateHostedDedicatedServerListenSocket(int nLocalVirtualPort, int nOptions, SteamNetworkingConfigValue_t[] pOptions) + { + InteropHelp.TestIfAvailableGameServer(); + return (HSteamListenSocket)NativeMethods.ISteamNetworkingSockets_CreateHostedDedicatedServerListenSocket(CSteamGameServerAPIContext.GetSteamNetworkingSockets(), nLocalVirtualPort, nOptions, pOptions); + } + + public static EResult GetGameCoordinatorServerLogin(out SteamDatagramGameCoordinatorServerLogin pLoginInfo, out int pcbSignedBlob, IntPtr pBlob) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingSockets_GetGameCoordinatorServerLogin(CSteamGameServerAPIContext.GetSteamNetworkingSockets(), out pLoginInfo, out pcbSignedBlob, pBlob); + } + + public static HSteamNetConnection ConnectP2PCustomSignaling(out ISteamNetworkingConnectionSignaling pSignaling, ref SteamNetworkingIdentity pPeerIdentity, int nRemoteVirtualPort, int nOptions, SteamNetworkingConfigValue_t[] pOptions) + { + InteropHelp.TestIfAvailableGameServer(); + return (HSteamNetConnection)NativeMethods.ISteamNetworkingSockets_ConnectP2PCustomSignaling(CSteamGameServerAPIContext.GetSteamNetworkingSockets(), out pSignaling, ref pPeerIdentity, nRemoteVirtualPort, nOptions, pOptions); + } + + public static bool ReceivedP2PCustomSignal(IntPtr pMsg, int cbMsg, out ISteamNetworkingSignalingRecvContext pContext) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingSockets_ReceivedP2PCustomSignal(CSteamGameServerAPIContext.GetSteamNetworkingSockets(), pMsg, cbMsg, out pContext); + } + + public static bool GetCertificateRequest(out int pcbBlob, IntPtr pBlob, out SteamNetworkingErrMsg errMsg) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingSockets_GetCertificateRequest(CSteamGameServerAPIContext.GetSteamNetworkingSockets(), out pcbBlob, pBlob, out errMsg); + } + + public static bool SetCertificate(IntPtr pCertificate, int cbCertificate, out SteamNetworkingErrMsg errMsg) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingSockets_SetCertificate(CSteamGameServerAPIContext.GetSteamNetworkingSockets(), pCertificate, cbCertificate, out errMsg); + } + + public static void RunCallbacks() + { + InteropHelp.TestIfAvailableGameServer(); + NativeMethods.ISteamNetworkingSockets_RunCallbacks(CSteamGameServerAPIContext.GetSteamNetworkingSockets()); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamGameServerNetworkingUtils.cs b/Assembly_Firstpass/Steamworks/SteamGameServerNetworkingUtils.cs new file mode 100644 index 0000000..6508556 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamGameServerNetworkingUtils.cs @@ -0,0 +1,157 @@ +using System; +using System.Runtime.InteropServices; + +namespace Steamworks; + +public static class SteamGameServerNetworkingUtils +{ + public static IntPtr AllocateMessage(int cbAllocateBuffer) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingUtils_AllocateMessage(CSteamGameServerAPIContext.GetSteamNetworkingUtils(), cbAllocateBuffer); + } + + public static void InitRelayNetworkAccess() + { + InteropHelp.TestIfAvailableGameServer(); + NativeMethods.ISteamNetworkingUtils_InitRelayNetworkAccess(CSteamGameServerAPIContext.GetSteamNetworkingUtils()); + } + + public static ESteamNetworkingAvailability GetRelayNetworkStatus(out SteamRelayNetworkStatus_t pDetails) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingUtils_GetRelayNetworkStatus(CSteamGameServerAPIContext.GetSteamNetworkingUtils(), out pDetails); + } + + public static float GetLocalPingLocation(out SteamNetworkPingLocation_t result) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingUtils_GetLocalPingLocation(CSteamGameServerAPIContext.GetSteamNetworkingUtils(), out result); + } + + public static int EstimatePingTimeBetweenTwoLocations(ref SteamNetworkPingLocation_t location1, ref SteamNetworkPingLocation_t location2) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingUtils_EstimatePingTimeBetweenTwoLocations(CSteamGameServerAPIContext.GetSteamNetworkingUtils(), ref location1, ref location2); + } + + public static int EstimatePingTimeFromLocalHost(ref SteamNetworkPingLocation_t remoteLocation) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingUtils_EstimatePingTimeFromLocalHost(CSteamGameServerAPIContext.GetSteamNetworkingUtils(), ref remoteLocation); + } + + public static void ConvertPingLocationToString(ref SteamNetworkPingLocation_t location, out string pszBuf, int cchBufSize) + { + InteropHelp.TestIfAvailableGameServer(); + IntPtr intPtr = Marshal.AllocHGlobal(cchBufSize); + NativeMethods.ISteamNetworkingUtils_ConvertPingLocationToString(CSteamGameServerAPIContext.GetSteamNetworkingUtils(), ref location, intPtr, cchBufSize); + pszBuf = InteropHelp.PtrToStringUTF8(intPtr); + Marshal.FreeHGlobal(intPtr); + } + + public static bool ParsePingLocationString(string pszString, out SteamNetworkPingLocation_t result) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pszString2 = new InteropHelp.UTF8StringHandle(pszString); + return NativeMethods.ISteamNetworkingUtils_ParsePingLocationString(CSteamGameServerAPIContext.GetSteamNetworkingUtils(), pszString2, out result); + } + + public static bool CheckPingDataUpToDate(float flMaxAgeSeconds) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingUtils_CheckPingDataUpToDate(CSteamGameServerAPIContext.GetSteamNetworkingUtils(), flMaxAgeSeconds); + } + + public static int GetPingToDataCenter(SteamNetworkingPOPID popID, out SteamNetworkingPOPID pViaRelayPoP) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingUtils_GetPingToDataCenter(CSteamGameServerAPIContext.GetSteamNetworkingUtils(), popID, out pViaRelayPoP); + } + + public static int GetDirectPingToPOP(SteamNetworkingPOPID popID) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingUtils_GetDirectPingToPOP(CSteamGameServerAPIContext.GetSteamNetworkingUtils(), popID); + } + + public static int GetPOPCount() + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingUtils_GetPOPCount(CSteamGameServerAPIContext.GetSteamNetworkingUtils()); + } + + public static int GetPOPList(out SteamNetworkingPOPID list, int nListSz) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingUtils_GetPOPList(CSteamGameServerAPIContext.GetSteamNetworkingUtils(), out list, nListSz); + } + + public static SteamNetworkingMicroseconds GetLocalTimestamp() + { + InteropHelp.TestIfAvailableGameServer(); + return (SteamNetworkingMicroseconds)NativeMethods.ISteamNetworkingUtils_GetLocalTimestamp(CSteamGameServerAPIContext.GetSteamNetworkingUtils()); + } + + public static void SetDebugOutputFunction(ESteamNetworkingSocketsDebugOutputType eDetailLevel, FSteamNetworkingSocketsDebugOutput pfnFunc) + { + InteropHelp.TestIfAvailableGameServer(); + NativeMethods.ISteamNetworkingUtils_SetDebugOutputFunction(CSteamGameServerAPIContext.GetSteamNetworkingUtils(), eDetailLevel, pfnFunc); + } + + public static bool SetConfigValue(ESteamNetworkingConfigValue eValue, ESteamNetworkingConfigScope eScopeType, IntPtr scopeObj, ESteamNetworkingConfigDataType eDataType, IntPtr pArg) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingUtils_SetConfigValue(CSteamGameServerAPIContext.GetSteamNetworkingUtils(), eValue, eScopeType, scopeObj, eDataType, pArg); + } + + public static ESteamNetworkingGetConfigValueResult GetConfigValue(ESteamNetworkingConfigValue eValue, ESteamNetworkingConfigScope eScopeType, IntPtr scopeObj, out ESteamNetworkingConfigDataType pOutDataType, IntPtr pResult, out ulong cbResult) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingUtils_GetConfigValue(CSteamGameServerAPIContext.GetSteamNetworkingUtils(), eValue, eScopeType, scopeObj, out pOutDataType, pResult, out cbResult); + } + + public static bool GetConfigValueInfo(ESteamNetworkingConfigValue eValue, IntPtr pOutName, out ESteamNetworkingConfigDataType pOutDataType, out ESteamNetworkingConfigScope pOutScope, out ESteamNetworkingConfigValue pOutNextValue) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingUtils_GetConfigValueInfo(CSteamGameServerAPIContext.GetSteamNetworkingUtils(), eValue, pOutName, out pOutDataType, out pOutScope, out pOutNextValue); + } + + public static ESteamNetworkingConfigValue GetFirstConfigValue() + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamNetworkingUtils_GetFirstConfigValue(CSteamGameServerAPIContext.GetSteamNetworkingUtils()); + } + + public static void SteamNetworkingIPAddr_ToString(ref SteamNetworkingIPAddr addr, out string buf, uint cbBuf, bool bWithPort) + { + InteropHelp.TestIfAvailableGameServer(); + IntPtr intPtr = Marshal.AllocHGlobal((int)cbBuf); + NativeMethods.ISteamNetworkingUtils_SteamNetworkingIPAddr_ToString(CSteamGameServerAPIContext.GetSteamNetworkingUtils(), ref addr, intPtr, cbBuf, bWithPort); + buf = InteropHelp.PtrToStringUTF8(intPtr); + Marshal.FreeHGlobal(intPtr); + } + + public static bool SteamNetworkingIPAddr_ParseString(out SteamNetworkingIPAddr pAddr, string pszStr) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pszStr2 = new InteropHelp.UTF8StringHandle(pszStr); + return NativeMethods.ISteamNetworkingUtils_SteamNetworkingIPAddr_ParseString(CSteamGameServerAPIContext.GetSteamNetworkingUtils(), out pAddr, pszStr2); + } + + public static void SteamNetworkingIdentity_ToString(ref SteamNetworkingIdentity identity, out string buf, uint cbBuf) + { + InteropHelp.TestIfAvailableGameServer(); + IntPtr intPtr = Marshal.AllocHGlobal((int)cbBuf); + NativeMethods.ISteamNetworkingUtils_SteamNetworkingIdentity_ToString(CSteamGameServerAPIContext.GetSteamNetworkingUtils(), ref identity, intPtr, cbBuf); + buf = InteropHelp.PtrToStringUTF8(intPtr); + Marshal.FreeHGlobal(intPtr); + } + + public static bool SteamNetworkingIdentity_ParseString(out SteamNetworkingIdentity pIdentity, string pszStr) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pszStr2 = new InteropHelp.UTF8StringHandle(pszStr); + return NativeMethods.ISteamNetworkingUtils_SteamNetworkingIdentity_ParseString(CSteamGameServerAPIContext.GetSteamNetworkingUtils(), out pIdentity, pszStr2); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamGameServerStats.cs b/Assembly_Firstpass/Steamworks/SteamGameServerStats.cs new file mode 100644 index 0000000..595a9ab --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamGameServerStats.cs @@ -0,0 +1,72 @@ +namespace Steamworks; + +public static class SteamGameServerStats +{ + public static SteamAPICall_t RequestUserStats(CSteamID steamIDUser) + { + InteropHelp.TestIfAvailableGameServer(); + return (SteamAPICall_t)NativeMethods.ISteamGameServerStats_RequestUserStats(CSteamGameServerAPIContext.GetSteamGameServerStats(), steamIDUser); + } + + public static bool GetUserStat(CSteamID steamIDUser, string pchName, out int pData) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchName2 = new InteropHelp.UTF8StringHandle(pchName); + return NativeMethods.ISteamGameServerStats_GetUserStatInt32(CSteamGameServerAPIContext.GetSteamGameServerStats(), steamIDUser, pchName2, out pData); + } + + public static bool GetUserStat(CSteamID steamIDUser, string pchName, out float pData) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchName2 = new InteropHelp.UTF8StringHandle(pchName); + return NativeMethods.ISteamGameServerStats_GetUserStatFloat(CSteamGameServerAPIContext.GetSteamGameServerStats(), steamIDUser, pchName2, out pData); + } + + public static bool GetUserAchievement(CSteamID steamIDUser, string pchName, out bool pbAchieved) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchName2 = new InteropHelp.UTF8StringHandle(pchName); + return NativeMethods.ISteamGameServerStats_GetUserAchievement(CSteamGameServerAPIContext.GetSteamGameServerStats(), steamIDUser, pchName2, out pbAchieved); + } + + public static bool SetUserStat(CSteamID steamIDUser, string pchName, int nData) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchName2 = new InteropHelp.UTF8StringHandle(pchName); + return NativeMethods.ISteamGameServerStats_SetUserStatInt32(CSteamGameServerAPIContext.GetSteamGameServerStats(), steamIDUser, pchName2, nData); + } + + public static bool SetUserStat(CSteamID steamIDUser, string pchName, float fData) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchName2 = new InteropHelp.UTF8StringHandle(pchName); + return NativeMethods.ISteamGameServerStats_SetUserStatFloat(CSteamGameServerAPIContext.GetSteamGameServerStats(), steamIDUser, pchName2, fData); + } + + public static bool UpdateUserAvgRateStat(CSteamID steamIDUser, string pchName, float flCountThisSession, double dSessionLength) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchName2 = new InteropHelp.UTF8StringHandle(pchName); + return NativeMethods.ISteamGameServerStats_UpdateUserAvgRateStat(CSteamGameServerAPIContext.GetSteamGameServerStats(), steamIDUser, pchName2, flCountThisSession, dSessionLength); + } + + public static bool SetUserAchievement(CSteamID steamIDUser, string pchName) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchName2 = new InteropHelp.UTF8StringHandle(pchName); + return NativeMethods.ISteamGameServerStats_SetUserAchievement(CSteamGameServerAPIContext.GetSteamGameServerStats(), steamIDUser, pchName2); + } + + public static bool ClearUserAchievement(CSteamID steamIDUser, string pchName) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchName2 = new InteropHelp.UTF8StringHandle(pchName); + return NativeMethods.ISteamGameServerStats_ClearUserAchievement(CSteamGameServerAPIContext.GetSteamGameServerStats(), steamIDUser, pchName2); + } + + public static SteamAPICall_t StoreUserStats(CSteamID steamIDUser) + { + InteropHelp.TestIfAvailableGameServer(); + return (SteamAPICall_t)NativeMethods.ISteamGameServerStats_StoreUserStats(CSteamGameServerAPIContext.GetSteamGameServerStats(), steamIDUser); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamGameServerUGC.cs b/Assembly_Firstpass/Steamworks/SteamGameServerUGC.cs new file mode 100644 index 0000000..a7c0c59 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamGameServerUGC.cs @@ -0,0 +1,562 @@ +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; + +namespace Steamworks; + +public static class SteamGameServerUGC +{ + public static UGCQueryHandle_t CreateQueryUserUGCRequest(AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint unPage) + { + InteropHelp.TestIfAvailableGameServer(); + return (UGCQueryHandle_t)NativeMethods.ISteamUGC_CreateQueryUserUGCRequest(CSteamGameServerAPIContext.GetSteamUGC(), unAccountID, eListType, eMatchingUGCType, eSortOrder, nCreatorAppID, nConsumerAppID, unPage); + } + + public static UGCQueryHandle_t CreateQueryAllUGCRequest(EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint unPage) + { + InteropHelp.TestIfAvailableGameServer(); + return (UGCQueryHandle_t)NativeMethods.ISteamUGC_CreateQueryAllUGCRequestPage(CSteamGameServerAPIContext.GetSteamUGC(), eQueryType, eMatchingeMatchingUGCTypeFileType, nCreatorAppID, nConsumerAppID, unPage); + } + + public static UGCQueryHandle_t CreateQueryAllUGCRequest(EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, string pchCursor = null) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchCursor2 = new InteropHelp.UTF8StringHandle(pchCursor); + return (UGCQueryHandle_t)NativeMethods.ISteamUGC_CreateQueryAllUGCRequestCursor(CSteamGameServerAPIContext.GetSteamUGC(), eQueryType, eMatchingeMatchingUGCTypeFileType, nCreatorAppID, nConsumerAppID, pchCursor2); + } + + public static UGCQueryHandle_t CreateQueryUGCDetailsRequest(PublishedFileId_t[] pvecPublishedFileID, uint unNumPublishedFileIDs) + { + InteropHelp.TestIfAvailableGameServer(); + return (UGCQueryHandle_t)NativeMethods.ISteamUGC_CreateQueryUGCDetailsRequest(CSteamGameServerAPIContext.GetSteamUGC(), pvecPublishedFileID, unNumPublishedFileIDs); + } + + public static SteamAPICall_t SendQueryUGCRequest(UGCQueryHandle_t handle) + { + InteropHelp.TestIfAvailableGameServer(); + return (SteamAPICall_t)NativeMethods.ISteamUGC_SendQueryUGCRequest(CSteamGameServerAPIContext.GetSteamUGC(), handle); + } + + public static bool GetQueryUGCResult(UGCQueryHandle_t handle, uint index, out SteamUGCDetails_t pDetails) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUGC_GetQueryUGCResult(CSteamGameServerAPIContext.GetSteamUGC(), handle, index, out pDetails); + } + + public static uint GetQueryUGCNumTags(UGCQueryHandle_t handle, uint index) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUGC_GetQueryUGCNumTags(CSteamGameServerAPIContext.GetSteamUGC(), handle, index); + } + + public static bool GetQueryUGCTag(UGCQueryHandle_t handle, uint index, uint indexTag, out string pchValue, uint cchValueSize) + { + InteropHelp.TestIfAvailableGameServer(); + IntPtr intPtr = Marshal.AllocHGlobal((int)cchValueSize); + bool flag = NativeMethods.ISteamUGC_GetQueryUGCTag(CSteamGameServerAPIContext.GetSteamUGC(), handle, index, indexTag, intPtr, cchValueSize); + pchValue = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return flag; + } + + public static bool GetQueryUGCTagDisplayName(UGCQueryHandle_t handle, uint index, uint indexTag, out string pchValue, uint cchValueSize) + { + InteropHelp.TestIfAvailableGameServer(); + IntPtr intPtr = Marshal.AllocHGlobal((int)cchValueSize); + bool flag = NativeMethods.ISteamUGC_GetQueryUGCTagDisplayName(CSteamGameServerAPIContext.GetSteamUGC(), handle, index, indexTag, intPtr, cchValueSize); + pchValue = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return flag; + } + + public static bool GetQueryUGCPreviewURL(UGCQueryHandle_t handle, uint index, out string pchURL, uint cchURLSize) + { + InteropHelp.TestIfAvailableGameServer(); + IntPtr intPtr = Marshal.AllocHGlobal((int)cchURLSize); + bool flag = NativeMethods.ISteamUGC_GetQueryUGCPreviewURL(CSteamGameServerAPIContext.GetSteamUGC(), handle, index, intPtr, cchURLSize); + pchURL = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return flag; + } + + public static bool GetQueryUGCMetadata(UGCQueryHandle_t handle, uint index, out string pchMetadata, uint cchMetadatasize) + { + InteropHelp.TestIfAvailableGameServer(); + IntPtr intPtr = Marshal.AllocHGlobal((int)cchMetadatasize); + bool flag = NativeMethods.ISteamUGC_GetQueryUGCMetadata(CSteamGameServerAPIContext.GetSteamUGC(), handle, index, intPtr, cchMetadatasize); + pchMetadata = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return flag; + } + + public static bool GetQueryUGCChildren(UGCQueryHandle_t handle, uint index, PublishedFileId_t[] pvecPublishedFileID, uint cMaxEntries) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUGC_GetQueryUGCChildren(CSteamGameServerAPIContext.GetSteamUGC(), handle, index, pvecPublishedFileID, cMaxEntries); + } + + public static bool GetQueryUGCStatistic(UGCQueryHandle_t handle, uint index, EItemStatistic eStatType, out ulong pStatValue) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUGC_GetQueryUGCStatistic(CSteamGameServerAPIContext.GetSteamUGC(), handle, index, eStatType, out pStatValue); + } + + public static uint GetQueryUGCNumAdditionalPreviews(UGCQueryHandle_t handle, uint index) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUGC_GetQueryUGCNumAdditionalPreviews(CSteamGameServerAPIContext.GetSteamUGC(), handle, index); + } + + public static bool GetQueryUGCAdditionalPreview(UGCQueryHandle_t handle, uint index, uint previewIndex, out string pchURLOrVideoID, uint cchURLSize, out string pchOriginalFileName, uint cchOriginalFileNameSize, out EItemPreviewType pPreviewType) + { + InteropHelp.TestIfAvailableGameServer(); + IntPtr intPtr = Marshal.AllocHGlobal((int)cchURLSize); + IntPtr intPtr2 = Marshal.AllocHGlobal((int)cchOriginalFileNameSize); + bool flag = NativeMethods.ISteamUGC_GetQueryUGCAdditionalPreview(CSteamGameServerAPIContext.GetSteamUGC(), handle, index, previewIndex, intPtr, cchURLSize, intPtr2, cchOriginalFileNameSize, out pPreviewType); + pchURLOrVideoID = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + pchOriginalFileName = (flag ? InteropHelp.PtrToStringUTF8(intPtr2) : null); + Marshal.FreeHGlobal(intPtr2); + return flag; + } + + public static uint GetQueryUGCNumKeyValueTags(UGCQueryHandle_t handle, uint index) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUGC_GetQueryUGCNumKeyValueTags(CSteamGameServerAPIContext.GetSteamUGC(), handle, index); + } + + public static bool GetQueryUGCKeyValueTag(UGCQueryHandle_t handle, uint index, uint keyValueTagIndex, out string pchKey, uint cchKeySize, out string pchValue, uint cchValueSize) + { + InteropHelp.TestIfAvailableGameServer(); + IntPtr intPtr = Marshal.AllocHGlobal((int)cchKeySize); + IntPtr intPtr2 = Marshal.AllocHGlobal((int)cchValueSize); + bool flag = NativeMethods.ISteamUGC_GetQueryUGCKeyValueTag(CSteamGameServerAPIContext.GetSteamUGC(), handle, index, keyValueTagIndex, intPtr, cchKeySize, intPtr2, cchValueSize); + pchKey = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + pchValue = (flag ? InteropHelp.PtrToStringUTF8(intPtr2) : null); + Marshal.FreeHGlobal(intPtr2); + return flag; + } + + public static bool GetQueryUGCKeyValueTag(UGCQueryHandle_t handle, uint index, string pchKey, out string pchValue, uint cchValueSize) + { + InteropHelp.TestIfAvailableGameServer(); + IntPtr intPtr = Marshal.AllocHGlobal((int)cchValueSize); + using InteropHelp.UTF8StringHandle pchKey2 = new InteropHelp.UTF8StringHandle(pchKey); + bool flag = NativeMethods.ISteamUGC_GetQueryFirstUGCKeyValueTag(CSteamGameServerAPIContext.GetSteamUGC(), handle, index, pchKey2, intPtr, cchValueSize); + pchValue = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return flag; + } + + public static bool ReleaseQueryUGCRequest(UGCQueryHandle_t handle) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUGC_ReleaseQueryUGCRequest(CSteamGameServerAPIContext.GetSteamUGC(), handle); + } + + public static bool AddRequiredTag(UGCQueryHandle_t handle, string pTagName) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pTagName2 = new InteropHelp.UTF8StringHandle(pTagName); + return NativeMethods.ISteamUGC_AddRequiredTag(CSteamGameServerAPIContext.GetSteamUGC(), handle, pTagName2); + } + + public static bool AddRequiredTagGroup(UGCQueryHandle_t handle, IList<string> pTagGroups) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUGC_AddRequiredTagGroup(CSteamGameServerAPIContext.GetSteamUGC(), handle, new InteropHelp.SteamParamStringArray(pTagGroups)); + } + + public static bool AddExcludedTag(UGCQueryHandle_t handle, string pTagName) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pTagName2 = new InteropHelp.UTF8StringHandle(pTagName); + return NativeMethods.ISteamUGC_AddExcludedTag(CSteamGameServerAPIContext.GetSteamUGC(), handle, pTagName2); + } + + public static bool SetReturnOnlyIDs(UGCQueryHandle_t handle, bool bReturnOnlyIDs) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUGC_SetReturnOnlyIDs(CSteamGameServerAPIContext.GetSteamUGC(), handle, bReturnOnlyIDs); + } + + public static bool SetReturnKeyValueTags(UGCQueryHandle_t handle, bool bReturnKeyValueTags) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUGC_SetReturnKeyValueTags(CSteamGameServerAPIContext.GetSteamUGC(), handle, bReturnKeyValueTags); + } + + public static bool SetReturnLongDescription(UGCQueryHandle_t handle, bool bReturnLongDescription) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUGC_SetReturnLongDescription(CSteamGameServerAPIContext.GetSteamUGC(), handle, bReturnLongDescription); + } + + public static bool SetReturnMetadata(UGCQueryHandle_t handle, bool bReturnMetadata) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUGC_SetReturnMetadata(CSteamGameServerAPIContext.GetSteamUGC(), handle, bReturnMetadata); + } + + public static bool SetReturnChildren(UGCQueryHandle_t handle, bool bReturnChildren) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUGC_SetReturnChildren(CSteamGameServerAPIContext.GetSteamUGC(), handle, bReturnChildren); + } + + public static bool SetReturnAdditionalPreviews(UGCQueryHandle_t handle, bool bReturnAdditionalPreviews) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUGC_SetReturnAdditionalPreviews(CSteamGameServerAPIContext.GetSteamUGC(), handle, bReturnAdditionalPreviews); + } + + public static bool SetReturnTotalOnly(UGCQueryHandle_t handle, bool bReturnTotalOnly) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUGC_SetReturnTotalOnly(CSteamGameServerAPIContext.GetSteamUGC(), handle, bReturnTotalOnly); + } + + public static bool SetReturnPlaytimeStats(UGCQueryHandle_t handle, uint unDays) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUGC_SetReturnPlaytimeStats(CSteamGameServerAPIContext.GetSteamUGC(), handle, unDays); + } + + public static bool SetLanguage(UGCQueryHandle_t handle, string pchLanguage) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchLanguage2 = new InteropHelp.UTF8StringHandle(pchLanguage); + return NativeMethods.ISteamUGC_SetLanguage(CSteamGameServerAPIContext.GetSteamUGC(), handle, pchLanguage2); + } + + public static bool SetAllowCachedResponse(UGCQueryHandle_t handle, uint unMaxAgeSeconds) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUGC_SetAllowCachedResponse(CSteamGameServerAPIContext.GetSteamUGC(), handle, unMaxAgeSeconds); + } + + public static bool SetCloudFileNameFilter(UGCQueryHandle_t handle, string pMatchCloudFileName) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pMatchCloudFileName2 = new InteropHelp.UTF8StringHandle(pMatchCloudFileName); + return NativeMethods.ISteamUGC_SetCloudFileNameFilter(CSteamGameServerAPIContext.GetSteamUGC(), handle, pMatchCloudFileName2); + } + + public static bool SetMatchAnyTag(UGCQueryHandle_t handle, bool bMatchAnyTag) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUGC_SetMatchAnyTag(CSteamGameServerAPIContext.GetSteamUGC(), handle, bMatchAnyTag); + } + + public static bool SetSearchText(UGCQueryHandle_t handle, string pSearchText) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pSearchText2 = new InteropHelp.UTF8StringHandle(pSearchText); + return NativeMethods.ISteamUGC_SetSearchText(CSteamGameServerAPIContext.GetSteamUGC(), handle, pSearchText2); + } + + public static bool SetRankedByTrendDays(UGCQueryHandle_t handle, uint unDays) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUGC_SetRankedByTrendDays(CSteamGameServerAPIContext.GetSteamUGC(), handle, unDays); + } + + public static bool AddRequiredKeyValueTag(UGCQueryHandle_t handle, string pKey, string pValue) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pKey2 = new InteropHelp.UTF8StringHandle(pKey); + using InteropHelp.UTF8StringHandle pValue2 = new InteropHelp.UTF8StringHandle(pValue); + return NativeMethods.ISteamUGC_AddRequiredKeyValueTag(CSteamGameServerAPIContext.GetSteamUGC(), handle, pKey2, pValue2); + } + + public static SteamAPICall_t RequestUGCDetails(PublishedFileId_t nPublishedFileID, uint unMaxAgeSeconds) + { + InteropHelp.TestIfAvailableGameServer(); + return (SteamAPICall_t)NativeMethods.ISteamUGC_RequestUGCDetails(CSteamGameServerAPIContext.GetSteamUGC(), nPublishedFileID, unMaxAgeSeconds); + } + + public static SteamAPICall_t CreateItem(AppId_t nConsumerAppId, EWorkshopFileType eFileType) + { + InteropHelp.TestIfAvailableGameServer(); + return (SteamAPICall_t)NativeMethods.ISteamUGC_CreateItem(CSteamGameServerAPIContext.GetSteamUGC(), nConsumerAppId, eFileType); + } + + public static UGCUpdateHandle_t StartItemUpdate(AppId_t nConsumerAppId, PublishedFileId_t nPublishedFileID) + { + InteropHelp.TestIfAvailableGameServer(); + return (UGCUpdateHandle_t)NativeMethods.ISteamUGC_StartItemUpdate(CSteamGameServerAPIContext.GetSteamUGC(), nConsumerAppId, nPublishedFileID); + } + + public static bool SetItemTitle(UGCUpdateHandle_t handle, string pchTitle) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchTitle2 = new InteropHelp.UTF8StringHandle(pchTitle); + return NativeMethods.ISteamUGC_SetItemTitle(CSteamGameServerAPIContext.GetSteamUGC(), handle, pchTitle2); + } + + public static bool SetItemDescription(UGCUpdateHandle_t handle, string pchDescription) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchDescription2 = new InteropHelp.UTF8StringHandle(pchDescription); + return NativeMethods.ISteamUGC_SetItemDescription(CSteamGameServerAPIContext.GetSteamUGC(), handle, pchDescription2); + } + + public static bool SetItemUpdateLanguage(UGCUpdateHandle_t handle, string pchLanguage) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchLanguage2 = new InteropHelp.UTF8StringHandle(pchLanguage); + return NativeMethods.ISteamUGC_SetItemUpdateLanguage(CSteamGameServerAPIContext.GetSteamUGC(), handle, pchLanguage2); + } + + public static bool SetItemMetadata(UGCUpdateHandle_t handle, string pchMetaData) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchMetaData2 = new InteropHelp.UTF8StringHandle(pchMetaData); + return NativeMethods.ISteamUGC_SetItemMetadata(CSteamGameServerAPIContext.GetSteamUGC(), handle, pchMetaData2); + } + + public static bool SetItemVisibility(UGCUpdateHandle_t handle, ERemoteStoragePublishedFileVisibility eVisibility) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUGC_SetItemVisibility(CSteamGameServerAPIContext.GetSteamUGC(), handle, eVisibility); + } + + public static bool SetItemTags(UGCUpdateHandle_t updateHandle, IList<string> pTags) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUGC_SetItemTags(CSteamGameServerAPIContext.GetSteamUGC(), updateHandle, new InteropHelp.SteamParamStringArray(pTags)); + } + + public static bool SetItemContent(UGCUpdateHandle_t handle, string pszContentFolder) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pszContentFolder2 = new InteropHelp.UTF8StringHandle(pszContentFolder); + return NativeMethods.ISteamUGC_SetItemContent(CSteamGameServerAPIContext.GetSteamUGC(), handle, pszContentFolder2); + } + + public static bool SetItemPreview(UGCUpdateHandle_t handle, string pszPreviewFile) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pszPreviewFile2 = new InteropHelp.UTF8StringHandle(pszPreviewFile); + return NativeMethods.ISteamUGC_SetItemPreview(CSteamGameServerAPIContext.GetSteamUGC(), handle, pszPreviewFile2); + } + + public static bool SetAllowLegacyUpload(UGCUpdateHandle_t handle, bool bAllowLegacyUpload) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUGC_SetAllowLegacyUpload(CSteamGameServerAPIContext.GetSteamUGC(), handle, bAllowLegacyUpload); + } + + public static bool RemoveAllItemKeyValueTags(UGCUpdateHandle_t handle) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUGC_RemoveAllItemKeyValueTags(CSteamGameServerAPIContext.GetSteamUGC(), handle); + } + + public static bool RemoveItemKeyValueTags(UGCUpdateHandle_t handle, string pchKey) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchKey2 = new InteropHelp.UTF8StringHandle(pchKey); + return NativeMethods.ISteamUGC_RemoveItemKeyValueTags(CSteamGameServerAPIContext.GetSteamUGC(), handle, pchKey2); + } + + public static bool AddItemKeyValueTag(UGCUpdateHandle_t handle, string pchKey, string pchValue) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchKey2 = new InteropHelp.UTF8StringHandle(pchKey); + using InteropHelp.UTF8StringHandle pchValue2 = new InteropHelp.UTF8StringHandle(pchValue); + return NativeMethods.ISteamUGC_AddItemKeyValueTag(CSteamGameServerAPIContext.GetSteamUGC(), handle, pchKey2, pchValue2); + } + + public static bool AddItemPreviewFile(UGCUpdateHandle_t handle, string pszPreviewFile, EItemPreviewType type) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pszPreviewFile2 = new InteropHelp.UTF8StringHandle(pszPreviewFile); + return NativeMethods.ISteamUGC_AddItemPreviewFile(CSteamGameServerAPIContext.GetSteamUGC(), handle, pszPreviewFile2, type); + } + + public static bool AddItemPreviewVideo(UGCUpdateHandle_t handle, string pszVideoID) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pszVideoID2 = new InteropHelp.UTF8StringHandle(pszVideoID); + return NativeMethods.ISteamUGC_AddItemPreviewVideo(CSteamGameServerAPIContext.GetSteamUGC(), handle, pszVideoID2); + } + + public static bool UpdateItemPreviewFile(UGCUpdateHandle_t handle, uint index, string pszPreviewFile) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pszPreviewFile2 = new InteropHelp.UTF8StringHandle(pszPreviewFile); + return NativeMethods.ISteamUGC_UpdateItemPreviewFile(CSteamGameServerAPIContext.GetSteamUGC(), handle, index, pszPreviewFile2); + } + + public static bool UpdateItemPreviewVideo(UGCUpdateHandle_t handle, uint index, string pszVideoID) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pszVideoID2 = new InteropHelp.UTF8StringHandle(pszVideoID); + return NativeMethods.ISteamUGC_UpdateItemPreviewVideo(CSteamGameServerAPIContext.GetSteamUGC(), handle, index, pszVideoID2); + } + + public static bool RemoveItemPreview(UGCUpdateHandle_t handle, uint index) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUGC_RemoveItemPreview(CSteamGameServerAPIContext.GetSteamUGC(), handle, index); + } + + public static SteamAPICall_t SubmitItemUpdate(UGCUpdateHandle_t handle, string pchChangeNote) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchChangeNote2 = new InteropHelp.UTF8StringHandle(pchChangeNote); + return (SteamAPICall_t)NativeMethods.ISteamUGC_SubmitItemUpdate(CSteamGameServerAPIContext.GetSteamUGC(), handle, pchChangeNote2); + } + + public static EItemUpdateStatus GetItemUpdateProgress(UGCUpdateHandle_t handle, out ulong punBytesProcessed, out ulong punBytesTotal) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUGC_GetItemUpdateProgress(CSteamGameServerAPIContext.GetSteamUGC(), handle, out punBytesProcessed, out punBytesTotal); + } + + public static SteamAPICall_t SetUserItemVote(PublishedFileId_t nPublishedFileID, bool bVoteUp) + { + InteropHelp.TestIfAvailableGameServer(); + return (SteamAPICall_t)NativeMethods.ISteamUGC_SetUserItemVote(CSteamGameServerAPIContext.GetSteamUGC(), nPublishedFileID, bVoteUp); + } + + public static SteamAPICall_t GetUserItemVote(PublishedFileId_t nPublishedFileID) + { + InteropHelp.TestIfAvailableGameServer(); + return (SteamAPICall_t)NativeMethods.ISteamUGC_GetUserItemVote(CSteamGameServerAPIContext.GetSteamUGC(), nPublishedFileID); + } + + public static SteamAPICall_t AddItemToFavorites(AppId_t nAppId, PublishedFileId_t nPublishedFileID) + { + InteropHelp.TestIfAvailableGameServer(); + return (SteamAPICall_t)NativeMethods.ISteamUGC_AddItemToFavorites(CSteamGameServerAPIContext.GetSteamUGC(), nAppId, nPublishedFileID); + } + + public static SteamAPICall_t RemoveItemFromFavorites(AppId_t nAppId, PublishedFileId_t nPublishedFileID) + { + InteropHelp.TestIfAvailableGameServer(); + return (SteamAPICall_t)NativeMethods.ISteamUGC_RemoveItemFromFavorites(CSteamGameServerAPIContext.GetSteamUGC(), nAppId, nPublishedFileID); + } + + public static SteamAPICall_t SubscribeItem(PublishedFileId_t nPublishedFileID) + { + InteropHelp.TestIfAvailableGameServer(); + return (SteamAPICall_t)NativeMethods.ISteamUGC_SubscribeItem(CSteamGameServerAPIContext.GetSteamUGC(), nPublishedFileID); + } + + public static SteamAPICall_t UnsubscribeItem(PublishedFileId_t nPublishedFileID) + { + InteropHelp.TestIfAvailableGameServer(); + return (SteamAPICall_t)NativeMethods.ISteamUGC_UnsubscribeItem(CSteamGameServerAPIContext.GetSteamUGC(), nPublishedFileID); + } + + public static uint GetNumSubscribedItems() + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUGC_GetNumSubscribedItems(CSteamGameServerAPIContext.GetSteamUGC()); + } + + public static uint GetSubscribedItems(PublishedFileId_t[] pvecPublishedFileID, uint cMaxEntries) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUGC_GetSubscribedItems(CSteamGameServerAPIContext.GetSteamUGC(), pvecPublishedFileID, cMaxEntries); + } + + public static uint GetItemState(PublishedFileId_t nPublishedFileID) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUGC_GetItemState(CSteamGameServerAPIContext.GetSteamUGC(), nPublishedFileID); + } + + public static bool GetItemInstallInfo(PublishedFileId_t nPublishedFileID, out ulong punSizeOnDisk, out string pchFolder, uint cchFolderSize, out uint punTimeStamp) + { + InteropHelp.TestIfAvailableGameServer(); + IntPtr intPtr = Marshal.AllocHGlobal((int)cchFolderSize); + bool flag = NativeMethods.ISteamUGC_GetItemInstallInfo(CSteamGameServerAPIContext.GetSteamUGC(), nPublishedFileID, out punSizeOnDisk, intPtr, cchFolderSize, out punTimeStamp); + pchFolder = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return flag; + } + + public static bool GetItemDownloadInfo(PublishedFileId_t nPublishedFileID, out ulong punBytesDownloaded, out ulong punBytesTotal) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUGC_GetItemDownloadInfo(CSteamGameServerAPIContext.GetSteamUGC(), nPublishedFileID, out punBytesDownloaded, out punBytesTotal); + } + + public static bool DownloadItem(PublishedFileId_t nPublishedFileID, bool bHighPriority) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUGC_DownloadItem(CSteamGameServerAPIContext.GetSteamUGC(), nPublishedFileID, bHighPriority); + } + + public static bool BInitWorkshopForGameServer(DepotId_t unWorkshopDepotID, string pszFolder) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pszFolder2 = new InteropHelp.UTF8StringHandle(pszFolder); + return NativeMethods.ISteamUGC_BInitWorkshopForGameServer(CSteamGameServerAPIContext.GetSteamUGC(), unWorkshopDepotID, pszFolder2); + } + + public static void SuspendDownloads(bool bSuspend) + { + InteropHelp.TestIfAvailableGameServer(); + NativeMethods.ISteamUGC_SuspendDownloads(CSteamGameServerAPIContext.GetSteamUGC(), bSuspend); + } + + public static SteamAPICall_t StartPlaytimeTracking(PublishedFileId_t[] pvecPublishedFileID, uint unNumPublishedFileIDs) + { + InteropHelp.TestIfAvailableGameServer(); + return (SteamAPICall_t)NativeMethods.ISteamUGC_StartPlaytimeTracking(CSteamGameServerAPIContext.GetSteamUGC(), pvecPublishedFileID, unNumPublishedFileIDs); + } + + public static SteamAPICall_t StopPlaytimeTracking(PublishedFileId_t[] pvecPublishedFileID, uint unNumPublishedFileIDs) + { + InteropHelp.TestIfAvailableGameServer(); + return (SteamAPICall_t)NativeMethods.ISteamUGC_StopPlaytimeTracking(CSteamGameServerAPIContext.GetSteamUGC(), pvecPublishedFileID, unNumPublishedFileIDs); + } + + public static SteamAPICall_t StopPlaytimeTrackingForAllItems() + { + InteropHelp.TestIfAvailableGameServer(); + return (SteamAPICall_t)NativeMethods.ISteamUGC_StopPlaytimeTrackingForAllItems(CSteamGameServerAPIContext.GetSteamUGC()); + } + + public static SteamAPICall_t AddDependency(PublishedFileId_t nParentPublishedFileID, PublishedFileId_t nChildPublishedFileID) + { + InteropHelp.TestIfAvailableGameServer(); + return (SteamAPICall_t)NativeMethods.ISteamUGC_AddDependency(CSteamGameServerAPIContext.GetSteamUGC(), nParentPublishedFileID, nChildPublishedFileID); + } + + public static SteamAPICall_t RemoveDependency(PublishedFileId_t nParentPublishedFileID, PublishedFileId_t nChildPublishedFileID) + { + InteropHelp.TestIfAvailableGameServer(); + return (SteamAPICall_t)NativeMethods.ISteamUGC_RemoveDependency(CSteamGameServerAPIContext.GetSteamUGC(), nParentPublishedFileID, nChildPublishedFileID); + } + + public static SteamAPICall_t AddAppDependency(PublishedFileId_t nPublishedFileID, AppId_t nAppID) + { + InteropHelp.TestIfAvailableGameServer(); + return (SteamAPICall_t)NativeMethods.ISteamUGC_AddAppDependency(CSteamGameServerAPIContext.GetSteamUGC(), nPublishedFileID, nAppID); + } + + public static SteamAPICall_t RemoveAppDependency(PublishedFileId_t nPublishedFileID, AppId_t nAppID) + { + InteropHelp.TestIfAvailableGameServer(); + return (SteamAPICall_t)NativeMethods.ISteamUGC_RemoveAppDependency(CSteamGameServerAPIContext.GetSteamUGC(), nPublishedFileID, nAppID); + } + + public static SteamAPICall_t GetAppDependencies(PublishedFileId_t nPublishedFileID) + { + InteropHelp.TestIfAvailableGameServer(); + return (SteamAPICall_t)NativeMethods.ISteamUGC_GetAppDependencies(CSteamGameServerAPIContext.GetSteamUGC(), nPublishedFileID); + } + + public static SteamAPICall_t DeleteItem(PublishedFileId_t nPublishedFileID) + { + InteropHelp.TestIfAvailableGameServer(); + return (SteamAPICall_t)NativeMethods.ISteamUGC_DeleteItem(CSteamGameServerAPIContext.GetSteamUGC(), nPublishedFileID); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamGameServerUtils.cs b/Assembly_Firstpass/Steamworks/SteamGameServerUtils.cs new file mode 100644 index 0000000..a9d225c --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamGameServerUtils.cs @@ -0,0 +1,211 @@ +using System; +using System.Runtime.InteropServices; + +namespace Steamworks; + +public static class SteamGameServerUtils +{ + public static uint GetSecondsSinceAppActive() + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUtils_GetSecondsSinceAppActive(CSteamGameServerAPIContext.GetSteamUtils()); + } + + public static uint GetSecondsSinceComputerActive() + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUtils_GetSecondsSinceComputerActive(CSteamGameServerAPIContext.GetSteamUtils()); + } + + public static EUniverse GetConnectedUniverse() + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUtils_GetConnectedUniverse(CSteamGameServerAPIContext.GetSteamUtils()); + } + + public static uint GetServerRealTime() + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUtils_GetServerRealTime(CSteamGameServerAPIContext.GetSteamUtils()); + } + + public static string GetIPCountry() + { + InteropHelp.TestIfAvailableGameServer(); + return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamUtils_GetIPCountry(CSteamGameServerAPIContext.GetSteamUtils())); + } + + public static bool GetImageSize(int iImage, out uint pnWidth, out uint pnHeight) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUtils_GetImageSize(CSteamGameServerAPIContext.GetSteamUtils(), iImage, out pnWidth, out pnHeight); + } + + public static bool GetImageRGBA(int iImage, byte[] pubDest, int nDestBufferSize) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUtils_GetImageRGBA(CSteamGameServerAPIContext.GetSteamUtils(), iImage, pubDest, nDestBufferSize); + } + + public static byte GetCurrentBatteryPower() + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUtils_GetCurrentBatteryPower(CSteamGameServerAPIContext.GetSteamUtils()); + } + + public static AppId_t GetAppID() + { + InteropHelp.TestIfAvailableGameServer(); + return (AppId_t)NativeMethods.ISteamUtils_GetAppID(CSteamGameServerAPIContext.GetSteamUtils()); + } + + public static void SetOverlayNotificationPosition(ENotificationPosition eNotificationPosition) + { + InteropHelp.TestIfAvailableGameServer(); + NativeMethods.ISteamUtils_SetOverlayNotificationPosition(CSteamGameServerAPIContext.GetSteamUtils(), eNotificationPosition); + } + + public static bool IsAPICallCompleted(SteamAPICall_t hSteamAPICall, out bool pbFailed) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUtils_IsAPICallCompleted(CSteamGameServerAPIContext.GetSteamUtils(), hSteamAPICall, out pbFailed); + } + + public static ESteamAPICallFailure GetAPICallFailureReason(SteamAPICall_t hSteamAPICall) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUtils_GetAPICallFailureReason(CSteamGameServerAPIContext.GetSteamUtils(), hSteamAPICall); + } + + public static bool GetAPICallResult(SteamAPICall_t hSteamAPICall, IntPtr pCallback, int cubCallback, int iCallbackExpected, out bool pbFailed) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUtils_GetAPICallResult(CSteamGameServerAPIContext.GetSteamUtils(), hSteamAPICall, pCallback, cubCallback, iCallbackExpected, out pbFailed); + } + + public static uint GetIPCCallCount() + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUtils_GetIPCCallCount(CSteamGameServerAPIContext.GetSteamUtils()); + } + + public static void SetWarningMessageHook(SteamAPIWarningMessageHook_t pFunction) + { + InteropHelp.TestIfAvailableGameServer(); + NativeMethods.ISteamUtils_SetWarningMessageHook(CSteamGameServerAPIContext.GetSteamUtils(), pFunction); + } + + public static bool IsOverlayEnabled() + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUtils_IsOverlayEnabled(CSteamGameServerAPIContext.GetSteamUtils()); + } + + public static bool BOverlayNeedsPresent() + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUtils_BOverlayNeedsPresent(CSteamGameServerAPIContext.GetSteamUtils()); + } + + public static SteamAPICall_t CheckFileSignature(string szFileName) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle szFileName2 = new InteropHelp.UTF8StringHandle(szFileName); + return (SteamAPICall_t)NativeMethods.ISteamUtils_CheckFileSignature(CSteamGameServerAPIContext.GetSteamUtils(), szFileName2); + } + + public static bool ShowGamepadTextInput(EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, string pchDescription, uint unCharMax, string pchExistingText) + { + InteropHelp.TestIfAvailableGameServer(); + using InteropHelp.UTF8StringHandle pchDescription2 = new InteropHelp.UTF8StringHandle(pchDescription); + using InteropHelp.UTF8StringHandle pchExistingText2 = new InteropHelp.UTF8StringHandle(pchExistingText); + return NativeMethods.ISteamUtils_ShowGamepadTextInput(CSteamGameServerAPIContext.GetSteamUtils(), eInputMode, eLineInputMode, pchDescription2, unCharMax, pchExistingText2); + } + + public static uint GetEnteredGamepadTextLength() + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUtils_GetEnteredGamepadTextLength(CSteamGameServerAPIContext.GetSteamUtils()); + } + + public static bool GetEnteredGamepadTextInput(out string pchText, uint cchText) + { + InteropHelp.TestIfAvailableGameServer(); + IntPtr intPtr = Marshal.AllocHGlobal((int)cchText); + bool flag = NativeMethods.ISteamUtils_GetEnteredGamepadTextInput(CSteamGameServerAPIContext.GetSteamUtils(), intPtr, cchText); + pchText = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return flag; + } + + public static string GetSteamUILanguage() + { + InteropHelp.TestIfAvailableGameServer(); + return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamUtils_GetSteamUILanguage(CSteamGameServerAPIContext.GetSteamUtils())); + } + + public static bool IsSteamRunningInVR() + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUtils_IsSteamRunningInVR(CSteamGameServerAPIContext.GetSteamUtils()); + } + + public static void SetOverlayNotificationInset(int nHorizontalInset, int nVerticalInset) + { + InteropHelp.TestIfAvailableGameServer(); + NativeMethods.ISteamUtils_SetOverlayNotificationInset(CSteamGameServerAPIContext.GetSteamUtils(), nHorizontalInset, nVerticalInset); + } + + public static bool IsSteamInBigPictureMode() + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUtils_IsSteamInBigPictureMode(CSteamGameServerAPIContext.GetSteamUtils()); + } + + public static void StartVRDashboard() + { + InteropHelp.TestIfAvailableGameServer(); + NativeMethods.ISteamUtils_StartVRDashboard(CSteamGameServerAPIContext.GetSteamUtils()); + } + + public static bool IsVRHeadsetStreamingEnabled() + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUtils_IsVRHeadsetStreamingEnabled(CSteamGameServerAPIContext.GetSteamUtils()); + } + + public static void SetVRHeadsetStreamingEnabled(bool bEnabled) + { + InteropHelp.TestIfAvailableGameServer(); + NativeMethods.ISteamUtils_SetVRHeadsetStreamingEnabled(CSteamGameServerAPIContext.GetSteamUtils(), bEnabled); + } + + public static bool IsSteamChinaLauncher() + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUtils_IsSteamChinaLauncher(CSteamGameServerAPIContext.GetSteamUtils()); + } + + public static bool InitFilterText(uint unFilterOptions = 0u) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUtils_InitFilterText(CSteamGameServerAPIContext.GetSteamUtils(), unFilterOptions); + } + + public static int FilterText(ETextFilteringContext eContext, CSteamID sourceSteamID, string pchInputMessage, out string pchOutFilteredText, uint nByteSizeOutFilteredText) + { + InteropHelp.TestIfAvailableGameServer(); + IntPtr intPtr = Marshal.AllocHGlobal((int)nByteSizeOutFilteredText); + using InteropHelp.UTF8StringHandle pchInputMessage2 = new InteropHelp.UTF8StringHandle(pchInputMessage); + int num = NativeMethods.ISteamUtils_FilterText(CSteamGameServerAPIContext.GetSteamUtils(), eContext, sourceSteamID, pchInputMessage2, intPtr, nByteSizeOutFilteredText); + pchOutFilteredText = ((num != -1) ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return num; + } + + public static ESteamIPv6ConnectivityState GetIPv6ConnectivityState(ESteamIPv6ConnectivityProtocol eProtocol) + { + InteropHelp.TestIfAvailableGameServer(); + return NativeMethods.ISteamUtils_GetIPv6ConnectivityState(CSteamGameServerAPIContext.GetSteamUtils(), eProtocol); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamHTMLSurface.cs b/Assembly_Firstpass/Steamworks/SteamHTMLSurface.cs new file mode 100644 index 0000000..d5c1794 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamHTMLSurface.cs @@ -0,0 +1,240 @@ +using System; + +namespace Steamworks; + +public static class SteamHTMLSurface +{ + public static bool Init() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamHTMLSurface_Init(CSteamAPIContext.GetSteamHTMLSurface()); + } + + public static bool Shutdown() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamHTMLSurface_Shutdown(CSteamAPIContext.GetSteamHTMLSurface()); + } + + public static SteamAPICall_t CreateBrowser(string pchUserAgent, string pchUserCSS) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchUserAgent2 = new InteropHelp.UTF8StringHandle(pchUserAgent); + using InteropHelp.UTF8StringHandle pchUserCSS2 = new InteropHelp.UTF8StringHandle(pchUserCSS); + return (SteamAPICall_t)NativeMethods.ISteamHTMLSurface_CreateBrowser(CSteamAPIContext.GetSteamHTMLSurface(), pchUserAgent2, pchUserCSS2); + } + + public static void RemoveBrowser(HHTMLBrowser unBrowserHandle) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamHTMLSurface_RemoveBrowser(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle); + } + + public static void LoadURL(HHTMLBrowser unBrowserHandle, string pchURL, string pchPostData) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchURL2 = new InteropHelp.UTF8StringHandle(pchURL); + using InteropHelp.UTF8StringHandle pchPostData2 = new InteropHelp.UTF8StringHandle(pchPostData); + NativeMethods.ISteamHTMLSurface_LoadURL(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, pchURL2, pchPostData2); + } + + public static void SetSize(HHTMLBrowser unBrowserHandle, uint unWidth, uint unHeight) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamHTMLSurface_SetSize(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, unWidth, unHeight); + } + + public static void StopLoad(HHTMLBrowser unBrowserHandle) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamHTMLSurface_StopLoad(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle); + } + + public static void Reload(HHTMLBrowser unBrowserHandle) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamHTMLSurface_Reload(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle); + } + + public static void GoBack(HHTMLBrowser unBrowserHandle) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamHTMLSurface_GoBack(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle); + } + + public static void GoForward(HHTMLBrowser unBrowserHandle) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamHTMLSurface_GoForward(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle); + } + + public static void AddHeader(HHTMLBrowser unBrowserHandle, string pchKey, string pchValue) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchKey2 = new InteropHelp.UTF8StringHandle(pchKey); + using InteropHelp.UTF8StringHandle pchValue2 = new InteropHelp.UTF8StringHandle(pchValue); + NativeMethods.ISteamHTMLSurface_AddHeader(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, pchKey2, pchValue2); + } + + public static void ExecuteJavascript(HHTMLBrowser unBrowserHandle, string pchScript) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchScript2 = new InteropHelp.UTF8StringHandle(pchScript); + NativeMethods.ISteamHTMLSurface_ExecuteJavascript(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, pchScript2); + } + + public static void MouseUp(HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamHTMLSurface_MouseUp(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, eMouseButton); + } + + public static void MouseDown(HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamHTMLSurface_MouseDown(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, eMouseButton); + } + + public static void MouseDoubleClick(HHTMLBrowser unBrowserHandle, EHTMLMouseButton eMouseButton) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamHTMLSurface_MouseDoubleClick(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, eMouseButton); + } + + public static void MouseMove(HHTMLBrowser unBrowserHandle, int x, int y) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamHTMLSurface_MouseMove(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, x, y); + } + + public static void MouseWheel(HHTMLBrowser unBrowserHandle, int nDelta) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamHTMLSurface_MouseWheel(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, nDelta); + } + + public static void KeyDown(HHTMLBrowser unBrowserHandle, uint nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers, bool bIsSystemKey = false) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamHTMLSurface_KeyDown(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, nNativeKeyCode, eHTMLKeyModifiers, bIsSystemKey); + } + + public static void KeyUp(HHTMLBrowser unBrowserHandle, uint nNativeKeyCode, EHTMLKeyModifiers eHTMLKeyModifiers) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamHTMLSurface_KeyUp(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, nNativeKeyCode, eHTMLKeyModifiers); + } + + public static void KeyChar(HHTMLBrowser unBrowserHandle, uint cUnicodeChar, EHTMLKeyModifiers eHTMLKeyModifiers) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamHTMLSurface_KeyChar(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, cUnicodeChar, eHTMLKeyModifiers); + } + + public static void SetHorizontalScroll(HHTMLBrowser unBrowserHandle, uint nAbsolutePixelScroll) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamHTMLSurface_SetHorizontalScroll(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, nAbsolutePixelScroll); + } + + public static void SetVerticalScroll(HHTMLBrowser unBrowserHandle, uint nAbsolutePixelScroll) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamHTMLSurface_SetVerticalScroll(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, nAbsolutePixelScroll); + } + + public static void SetKeyFocus(HHTMLBrowser unBrowserHandle, bool bHasKeyFocus) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamHTMLSurface_SetKeyFocus(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, bHasKeyFocus); + } + + public static void ViewSource(HHTMLBrowser unBrowserHandle) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamHTMLSurface_ViewSource(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle); + } + + public static void CopyToClipboard(HHTMLBrowser unBrowserHandle) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamHTMLSurface_CopyToClipboard(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle); + } + + public static void PasteFromClipboard(HHTMLBrowser unBrowserHandle) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamHTMLSurface_PasteFromClipboard(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle); + } + + public static void Find(HHTMLBrowser unBrowserHandle, string pchSearchStr, bool bCurrentlyInFind, bool bReverse) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchSearchStr2 = new InteropHelp.UTF8StringHandle(pchSearchStr); + NativeMethods.ISteamHTMLSurface_Find(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, pchSearchStr2, bCurrentlyInFind, bReverse); + } + + public static void StopFind(HHTMLBrowser unBrowserHandle) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamHTMLSurface_StopFind(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle); + } + + public static void GetLinkAtPosition(HHTMLBrowser unBrowserHandle, int x, int y) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamHTMLSurface_GetLinkAtPosition(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, x, y); + } + + public static void SetCookie(string pchHostname, string pchKey, string pchValue, string pchPath = "/", uint nExpires = 0u, bool bSecure = false, bool bHTTPOnly = false) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchHostname2 = new InteropHelp.UTF8StringHandle(pchHostname); + using InteropHelp.UTF8StringHandle pchKey2 = new InteropHelp.UTF8StringHandle(pchKey); + using InteropHelp.UTF8StringHandle pchValue2 = new InteropHelp.UTF8StringHandle(pchValue); + using InteropHelp.UTF8StringHandle pchPath2 = new InteropHelp.UTF8StringHandle(pchPath); + NativeMethods.ISteamHTMLSurface_SetCookie(CSteamAPIContext.GetSteamHTMLSurface(), pchHostname2, pchKey2, pchValue2, pchPath2, nExpires, bSecure, bHTTPOnly); + } + + public static void SetPageScaleFactor(HHTMLBrowser unBrowserHandle, float flZoom, int nPointX, int nPointY) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamHTMLSurface_SetPageScaleFactor(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, flZoom, nPointX, nPointY); + } + + public static void SetBackgroundMode(HHTMLBrowser unBrowserHandle, bool bBackgroundMode) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamHTMLSurface_SetBackgroundMode(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, bBackgroundMode); + } + + public static void SetDPIScalingFactor(HHTMLBrowser unBrowserHandle, float flDPIScaling) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamHTMLSurface_SetDPIScalingFactor(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, flDPIScaling); + } + + public static void OpenDeveloperTools(HHTMLBrowser unBrowserHandle) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamHTMLSurface_OpenDeveloperTools(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle); + } + + public static void AllowStartRequest(HHTMLBrowser unBrowserHandle, bool bAllowed) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamHTMLSurface_AllowStartRequest(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, bAllowed); + } + + public static void JSDialogResponse(HHTMLBrowser unBrowserHandle, bool bResult) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamHTMLSurface_JSDialogResponse(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, bResult); + } + + public static void FileLoadDialogResponse(HHTMLBrowser unBrowserHandle, IntPtr pchSelectedFiles) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamHTMLSurface_FileLoadDialogResponse(CSteamAPIContext.GetSteamHTMLSurface(), unBrowserHandle, pchSelectedFiles); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamHTTP.cs b/Assembly_Firstpass/Steamworks/SteamHTTP.cs new file mode 100644 index 0000000..f3f13cd --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamHTTP.cs @@ -0,0 +1,166 @@ +namespace Steamworks; + +public static class SteamHTTP +{ + public static HTTPRequestHandle CreateHTTPRequest(EHTTPMethod eHTTPRequestMethod, string pchAbsoluteURL) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchAbsoluteURL2 = new InteropHelp.UTF8StringHandle(pchAbsoluteURL); + return (HTTPRequestHandle)NativeMethods.ISteamHTTP_CreateHTTPRequest(CSteamAPIContext.GetSteamHTTP(), eHTTPRequestMethod, pchAbsoluteURL2); + } + + public static bool SetHTTPRequestContextValue(HTTPRequestHandle hRequest, ulong ulContextValue) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamHTTP_SetHTTPRequestContextValue(CSteamAPIContext.GetSteamHTTP(), hRequest, ulContextValue); + } + + public static bool SetHTTPRequestNetworkActivityTimeout(HTTPRequestHandle hRequest, uint unTimeoutSeconds) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamHTTP_SetHTTPRequestNetworkActivityTimeout(CSteamAPIContext.GetSteamHTTP(), hRequest, unTimeoutSeconds); + } + + public static bool SetHTTPRequestHeaderValue(HTTPRequestHandle hRequest, string pchHeaderName, string pchHeaderValue) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchHeaderName2 = new InteropHelp.UTF8StringHandle(pchHeaderName); + using InteropHelp.UTF8StringHandle pchHeaderValue2 = new InteropHelp.UTF8StringHandle(pchHeaderValue); + return NativeMethods.ISteamHTTP_SetHTTPRequestHeaderValue(CSteamAPIContext.GetSteamHTTP(), hRequest, pchHeaderName2, pchHeaderValue2); + } + + public static bool SetHTTPRequestGetOrPostParameter(HTTPRequestHandle hRequest, string pchParamName, string pchParamValue) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchParamName2 = new InteropHelp.UTF8StringHandle(pchParamName); + using InteropHelp.UTF8StringHandle pchParamValue2 = new InteropHelp.UTF8StringHandle(pchParamValue); + return NativeMethods.ISteamHTTP_SetHTTPRequestGetOrPostParameter(CSteamAPIContext.GetSteamHTTP(), hRequest, pchParamName2, pchParamValue2); + } + + public static bool SendHTTPRequest(HTTPRequestHandle hRequest, out SteamAPICall_t pCallHandle) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamHTTP_SendHTTPRequest(CSteamAPIContext.GetSteamHTTP(), hRequest, out pCallHandle); + } + + public static bool SendHTTPRequestAndStreamResponse(HTTPRequestHandle hRequest, out SteamAPICall_t pCallHandle) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamHTTP_SendHTTPRequestAndStreamResponse(CSteamAPIContext.GetSteamHTTP(), hRequest, out pCallHandle); + } + + public static bool DeferHTTPRequest(HTTPRequestHandle hRequest) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamHTTP_DeferHTTPRequest(CSteamAPIContext.GetSteamHTTP(), hRequest); + } + + public static bool PrioritizeHTTPRequest(HTTPRequestHandle hRequest) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamHTTP_PrioritizeHTTPRequest(CSteamAPIContext.GetSteamHTTP(), hRequest); + } + + public static bool GetHTTPResponseHeaderSize(HTTPRequestHandle hRequest, string pchHeaderName, out uint unResponseHeaderSize) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchHeaderName2 = new InteropHelp.UTF8StringHandle(pchHeaderName); + return NativeMethods.ISteamHTTP_GetHTTPResponseHeaderSize(CSteamAPIContext.GetSteamHTTP(), hRequest, pchHeaderName2, out unResponseHeaderSize); + } + + public static bool GetHTTPResponseHeaderValue(HTTPRequestHandle hRequest, string pchHeaderName, byte[] pHeaderValueBuffer, uint unBufferSize) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchHeaderName2 = new InteropHelp.UTF8StringHandle(pchHeaderName); + return NativeMethods.ISteamHTTP_GetHTTPResponseHeaderValue(CSteamAPIContext.GetSteamHTTP(), hRequest, pchHeaderName2, pHeaderValueBuffer, unBufferSize); + } + + public static bool GetHTTPResponseBodySize(HTTPRequestHandle hRequest, out uint unBodySize) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamHTTP_GetHTTPResponseBodySize(CSteamAPIContext.GetSteamHTTP(), hRequest, out unBodySize); + } + + public static bool GetHTTPResponseBodyData(HTTPRequestHandle hRequest, byte[] pBodyDataBuffer, uint unBufferSize) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamHTTP_GetHTTPResponseBodyData(CSteamAPIContext.GetSteamHTTP(), hRequest, pBodyDataBuffer, unBufferSize); + } + + public static bool GetHTTPStreamingResponseBodyData(HTTPRequestHandle hRequest, uint cOffset, byte[] pBodyDataBuffer, uint unBufferSize) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamHTTP_GetHTTPStreamingResponseBodyData(CSteamAPIContext.GetSteamHTTP(), hRequest, cOffset, pBodyDataBuffer, unBufferSize); + } + + public static bool ReleaseHTTPRequest(HTTPRequestHandle hRequest) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamHTTP_ReleaseHTTPRequest(CSteamAPIContext.GetSteamHTTP(), hRequest); + } + + public static bool GetHTTPDownloadProgressPct(HTTPRequestHandle hRequest, out float pflPercentOut) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamHTTP_GetHTTPDownloadProgressPct(CSteamAPIContext.GetSteamHTTP(), hRequest, out pflPercentOut); + } + + public static bool SetHTTPRequestRawPostBody(HTTPRequestHandle hRequest, string pchContentType, byte[] pubBody, uint unBodyLen) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchContentType2 = new InteropHelp.UTF8StringHandle(pchContentType); + return NativeMethods.ISteamHTTP_SetHTTPRequestRawPostBody(CSteamAPIContext.GetSteamHTTP(), hRequest, pchContentType2, pubBody, unBodyLen); + } + + public static HTTPCookieContainerHandle CreateCookieContainer(bool bAllowResponsesToModify) + { + InteropHelp.TestIfAvailableClient(); + return (HTTPCookieContainerHandle)NativeMethods.ISteamHTTP_CreateCookieContainer(CSteamAPIContext.GetSteamHTTP(), bAllowResponsesToModify); + } + + public static bool ReleaseCookieContainer(HTTPCookieContainerHandle hCookieContainer) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamHTTP_ReleaseCookieContainer(CSteamAPIContext.GetSteamHTTP(), hCookieContainer); + } + + public static bool SetCookie(HTTPCookieContainerHandle hCookieContainer, string pchHost, string pchUrl, string pchCookie) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchHost2 = new InteropHelp.UTF8StringHandle(pchHost); + using InteropHelp.UTF8StringHandle pchUrl2 = new InteropHelp.UTF8StringHandle(pchUrl); + using InteropHelp.UTF8StringHandle pchCookie2 = new InteropHelp.UTF8StringHandle(pchCookie); + return NativeMethods.ISteamHTTP_SetCookie(CSteamAPIContext.GetSteamHTTP(), hCookieContainer, pchHost2, pchUrl2, pchCookie2); + } + + public static bool SetHTTPRequestCookieContainer(HTTPRequestHandle hRequest, HTTPCookieContainerHandle hCookieContainer) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamHTTP_SetHTTPRequestCookieContainer(CSteamAPIContext.GetSteamHTTP(), hRequest, hCookieContainer); + } + + public static bool SetHTTPRequestUserAgentInfo(HTTPRequestHandle hRequest, string pchUserAgentInfo) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchUserAgentInfo2 = new InteropHelp.UTF8StringHandle(pchUserAgentInfo); + return NativeMethods.ISteamHTTP_SetHTTPRequestUserAgentInfo(CSteamAPIContext.GetSteamHTTP(), hRequest, pchUserAgentInfo2); + } + + public static bool SetHTTPRequestRequiresVerifiedCertificate(HTTPRequestHandle hRequest, bool bRequireVerifiedCertificate) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamHTTP_SetHTTPRequestRequiresVerifiedCertificate(CSteamAPIContext.GetSteamHTTP(), hRequest, bRequireVerifiedCertificate); + } + + public static bool SetHTTPRequestAbsoluteTimeoutMS(HTTPRequestHandle hRequest, uint unMilliseconds) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamHTTP_SetHTTPRequestAbsoluteTimeoutMS(CSteamAPIContext.GetSteamHTTP(), hRequest, unMilliseconds); + } + + public static bool GetHTTPRequestWasTimedOut(HTTPRequestHandle hRequest, out bool pbWasTimedOut) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamHTTP_GetHTTPRequestWasTimedOut(CSteamAPIContext.GetSteamHTTP(), hRequest, out pbWasTimedOut); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamIPAddress_t.cs b/Assembly_Firstpass/Steamworks/SteamIPAddress_t.cs new file mode 100644 index 0000000..5bc8fc0 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamIPAddress_t.cs @@ -0,0 +1,83 @@ +using System; +using System.Net; +using System.Net.Sockets; +using System.Runtime.InteropServices; + +namespace Steamworks; + +[Serializable] +[StructLayout(LayoutKind.Sequential, Pack = 1)] +public struct SteamIPAddress_t +{ + private long m_ip0; + + private long m_ip1; + + private ESteamIPType m_eType; + + public SteamIPAddress_t(IPAddress iPAddress) + { + byte[] addressBytes = iPAddress.GetAddressBytes(); + switch (iPAddress.AddressFamily) + { + case AddressFamily.InterNetwork: + if (addressBytes.Length != 4) + { + throw new TypeInitializationException("SteamIPAddress_t: Unexpected byte length for Ipv4." + addressBytes.Length, null); + } + m_ip0 = (addressBytes[0] << 24) | (addressBytes[1] << 16) | (addressBytes[2] << 8) | addressBytes[3]; + m_ip1 = 0L; + m_eType = ESteamIPType.k_ESteamIPTypeIPv4; + break; + case AddressFamily.InterNetworkV6: + if (addressBytes.Length != 16) + { + throw new TypeInitializationException("SteamIPAddress_t: Unexpected byte length for Ipv6: " + addressBytes.Length, null); + } + m_ip0 = (addressBytes[1] << 24) | (addressBytes[0] << 16) | (addressBytes[3] << 8) | addressBytes[2] | (addressBytes[5] << 24) | (addressBytes[4] << 16) | (addressBytes[7] << 8) | addressBytes[6]; + m_ip1 = (addressBytes[9] << 24) | (addressBytes[8] << 16) | (addressBytes[11] << 8) | addressBytes[10] | (addressBytes[13] << 24) | (addressBytes[12] << 16) | (addressBytes[15] << 8) | addressBytes[14]; + m_eType = ESteamIPType.k_ESteamIPTypeIPv6; + break; + default: + throw new TypeInitializationException("SteamIPAddress_t: Unexpected address family " + iPAddress.AddressFamily, null); + } + } + + public IPAddress ToIPAddress() + { + if (m_eType == ESteamIPType.k_ESteamIPTypeIPv4) + { + byte[] bytes = BitConverter.GetBytes(m_ip0); + return new IPAddress(new byte[4] + { + bytes[3], + bytes[2], + bytes[1], + bytes[0] + }); + } + byte[] array = new byte[16]; + BitConverter.GetBytes(m_ip0).CopyTo(array, 0); + BitConverter.GetBytes(m_ip1).CopyTo(array, 8); + return new IPAddress(array); + } + + public override string ToString() + { + return ToIPAddress().ToString(); + } + + public ESteamIPType GetIPType() + { + return m_eType; + } + + public bool IsSet() + { + if (m_ip0 == 0L) + { + return m_ip1 != 0; + } + return true; + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamInput.cs b/Assembly_Firstpass/Steamworks/SteamInput.cs new file mode 100644 index 0000000..61e8a3f --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamInput.cs @@ -0,0 +1,235 @@ +using System; + +namespace Steamworks; + +public static class SteamInput +{ + public static bool Init() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamInput_Init(CSteamAPIContext.GetSteamInput()); + } + + public static bool Shutdown() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamInput_Shutdown(CSteamAPIContext.GetSteamInput()); + } + + public static void RunFrame() + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamInput_RunFrame(CSteamAPIContext.GetSteamInput()); + } + + public static int GetConnectedControllers(InputHandle_t[] handlesOut) + { + InteropHelp.TestIfAvailableClient(); + if (handlesOut != null && handlesOut.Length != 16) + { + throw new ArgumentException("handlesOut must be the same size as Constants.STEAM_INPUT_MAX_COUNT!"); + } + return NativeMethods.ISteamInput_GetConnectedControllers(CSteamAPIContext.GetSteamInput(), handlesOut); + } + + public static InputActionSetHandle_t GetActionSetHandle(string pszActionSetName) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pszActionSetName2 = new InteropHelp.UTF8StringHandle(pszActionSetName); + return (InputActionSetHandle_t)NativeMethods.ISteamInput_GetActionSetHandle(CSteamAPIContext.GetSteamInput(), pszActionSetName2); + } + + public static void ActivateActionSet(InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamInput_ActivateActionSet(CSteamAPIContext.GetSteamInput(), inputHandle, actionSetHandle); + } + + public static InputActionSetHandle_t GetCurrentActionSet(InputHandle_t inputHandle) + { + InteropHelp.TestIfAvailableClient(); + return (InputActionSetHandle_t)NativeMethods.ISteamInput_GetCurrentActionSet(CSteamAPIContext.GetSteamInput(), inputHandle); + } + + public static void ActivateActionSetLayer(InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamInput_ActivateActionSetLayer(CSteamAPIContext.GetSteamInput(), inputHandle, actionSetLayerHandle); + } + + public static void DeactivateActionSetLayer(InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamInput_DeactivateActionSetLayer(CSteamAPIContext.GetSteamInput(), inputHandle, actionSetLayerHandle); + } + + public static void DeactivateAllActionSetLayers(InputHandle_t inputHandle) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamInput_DeactivateAllActionSetLayers(CSteamAPIContext.GetSteamInput(), inputHandle); + } + + public static int GetActiveActionSetLayers(InputHandle_t inputHandle, InputActionSetHandle_t[] handlesOut) + { + InteropHelp.TestIfAvailableClient(); + if (handlesOut != null && handlesOut.Length != 16) + { + throw new ArgumentException("handlesOut must be the same size as Constants.STEAM_INPUT_MAX_ACTIVE_LAYERS!"); + } + return NativeMethods.ISteamInput_GetActiveActionSetLayers(CSteamAPIContext.GetSteamInput(), inputHandle, handlesOut); + } + + public static InputDigitalActionHandle_t GetDigitalActionHandle(string pszActionName) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pszActionName2 = new InteropHelp.UTF8StringHandle(pszActionName); + return (InputDigitalActionHandle_t)NativeMethods.ISteamInput_GetDigitalActionHandle(CSteamAPIContext.GetSteamInput(), pszActionName2); + } + + public static InputDigitalActionData_t GetDigitalActionData(InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamInput_GetDigitalActionData(CSteamAPIContext.GetSteamInput(), inputHandle, digitalActionHandle); + } + + public static int GetDigitalActionOrigins(InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputDigitalActionHandle_t digitalActionHandle, EInputActionOrigin[] originsOut) + { + InteropHelp.TestIfAvailableClient(); + if (originsOut != null && originsOut.Length != 8) + { + throw new ArgumentException("originsOut must be the same size as Constants.STEAM_INPUT_MAX_ORIGINS!"); + } + return NativeMethods.ISteamInput_GetDigitalActionOrigins(CSteamAPIContext.GetSteamInput(), inputHandle, actionSetHandle, digitalActionHandle, originsOut); + } + + public static InputAnalogActionHandle_t GetAnalogActionHandle(string pszActionName) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pszActionName2 = new InteropHelp.UTF8StringHandle(pszActionName); + return (InputAnalogActionHandle_t)NativeMethods.ISteamInput_GetAnalogActionHandle(CSteamAPIContext.GetSteamInput(), pszActionName2); + } + + public static InputAnalogActionData_t GetAnalogActionData(InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamInput_GetAnalogActionData(CSteamAPIContext.GetSteamInput(), inputHandle, analogActionHandle); + } + + public static int GetAnalogActionOrigins(InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputAnalogActionHandle_t analogActionHandle, EInputActionOrigin[] originsOut) + { + InteropHelp.TestIfAvailableClient(); + if (originsOut != null && originsOut.Length != 8) + { + throw new ArgumentException("originsOut must be the same size as Constants.STEAM_INPUT_MAX_ORIGINS!"); + } + return NativeMethods.ISteamInput_GetAnalogActionOrigins(CSteamAPIContext.GetSteamInput(), inputHandle, actionSetHandle, analogActionHandle, originsOut); + } + + public static string GetGlyphForActionOrigin(EInputActionOrigin eOrigin) + { + InteropHelp.TestIfAvailableClient(); + return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamInput_GetGlyphForActionOrigin(CSteamAPIContext.GetSteamInput(), eOrigin)); + } + + public static string GetStringForActionOrigin(EInputActionOrigin eOrigin) + { + InteropHelp.TestIfAvailableClient(); + return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamInput_GetStringForActionOrigin(CSteamAPIContext.GetSteamInput(), eOrigin)); + } + + public static void StopAnalogActionMomentum(InputHandle_t inputHandle, InputAnalogActionHandle_t eAction) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamInput_StopAnalogActionMomentum(CSteamAPIContext.GetSteamInput(), inputHandle, eAction); + } + + public static InputMotionData_t GetMotionData(InputHandle_t inputHandle) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamInput_GetMotionData(CSteamAPIContext.GetSteamInput(), inputHandle); + } + + public static void TriggerVibration(InputHandle_t inputHandle, ushort usLeftSpeed, ushort usRightSpeed) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamInput_TriggerVibration(CSteamAPIContext.GetSteamInput(), inputHandle, usLeftSpeed, usRightSpeed); + } + + public static void SetLEDColor(InputHandle_t inputHandle, byte nColorR, byte nColorG, byte nColorB, uint nFlags) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamInput_SetLEDColor(CSteamAPIContext.GetSteamInput(), inputHandle, nColorR, nColorG, nColorB, nFlags); + } + + public static void TriggerHapticPulse(InputHandle_t inputHandle, ESteamControllerPad eTargetPad, ushort usDurationMicroSec) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamInput_TriggerHapticPulse(CSteamAPIContext.GetSteamInput(), inputHandle, eTargetPad, usDurationMicroSec); + } + + public static void TriggerRepeatedHapticPulse(InputHandle_t inputHandle, ESteamControllerPad eTargetPad, ushort usDurationMicroSec, ushort usOffMicroSec, ushort unRepeat, uint nFlags) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamInput_TriggerRepeatedHapticPulse(CSteamAPIContext.GetSteamInput(), inputHandle, eTargetPad, usDurationMicroSec, usOffMicroSec, unRepeat, nFlags); + } + + public static bool ShowBindingPanel(InputHandle_t inputHandle) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamInput_ShowBindingPanel(CSteamAPIContext.GetSteamInput(), inputHandle); + } + + public static ESteamInputType GetInputTypeForHandle(InputHandle_t inputHandle) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamInput_GetInputTypeForHandle(CSteamAPIContext.GetSteamInput(), inputHandle); + } + + public static InputHandle_t GetControllerForGamepadIndex(int nIndex) + { + InteropHelp.TestIfAvailableClient(); + return (InputHandle_t)NativeMethods.ISteamInput_GetControllerForGamepadIndex(CSteamAPIContext.GetSteamInput(), nIndex); + } + + public static int GetGamepadIndexForController(InputHandle_t ulinputHandle) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamInput_GetGamepadIndexForController(CSteamAPIContext.GetSteamInput(), ulinputHandle); + } + + public static string GetStringForXboxOrigin(EXboxOrigin eOrigin) + { + InteropHelp.TestIfAvailableClient(); + return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamInput_GetStringForXboxOrigin(CSteamAPIContext.GetSteamInput(), eOrigin)); + } + + public static string GetGlyphForXboxOrigin(EXboxOrigin eOrigin) + { + InteropHelp.TestIfAvailableClient(); + return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamInput_GetGlyphForXboxOrigin(CSteamAPIContext.GetSteamInput(), eOrigin)); + } + + public static EInputActionOrigin GetActionOriginFromXboxOrigin(InputHandle_t inputHandle, EXboxOrigin eOrigin) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamInput_GetActionOriginFromXboxOrigin(CSteamAPIContext.GetSteamInput(), inputHandle, eOrigin); + } + + public static EInputActionOrigin TranslateActionOrigin(ESteamInputType eDestinationInputType, EInputActionOrigin eSourceOrigin) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamInput_TranslateActionOrigin(CSteamAPIContext.GetSteamInput(), eDestinationInputType, eSourceOrigin); + } + + public static bool GetDeviceBindingRevision(InputHandle_t inputHandle, out int pMajor, out int pMinor) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamInput_GetDeviceBindingRevision(CSteamAPIContext.GetSteamInput(), inputHandle, out pMajor, out pMinor); + } + + public static uint GetRemotePlaySessionID(InputHandle_t inputHandle) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamInput_GetRemotePlaySessionID(CSteamAPIContext.GetSteamInput(), inputHandle); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamInventory.cs b/Assembly_Firstpass/Steamworks/SteamInventory.cs new file mode 100644 index 0000000..2ab501b --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamInventory.cs @@ -0,0 +1,276 @@ +using System; +using System.Runtime.InteropServices; + +namespace Steamworks; + +public static class SteamInventory +{ + public static EResult GetResultStatus(SteamInventoryResult_t resultHandle) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamInventory_GetResultStatus(CSteamAPIContext.GetSteamInventory(), resultHandle); + } + + public static bool GetResultItems(SteamInventoryResult_t resultHandle, SteamItemDetails_t[] pOutItemsArray, ref uint punOutItemsArraySize) + { + InteropHelp.TestIfAvailableClient(); + if (pOutItemsArray != null && pOutItemsArray.Length != punOutItemsArraySize) + { + throw new ArgumentException("pOutItemsArray must be the same size as punOutItemsArraySize!"); + } + return NativeMethods.ISteamInventory_GetResultItems(CSteamAPIContext.GetSteamInventory(), resultHandle, pOutItemsArray, ref punOutItemsArraySize); + } + + public static bool GetResultItemProperty(SteamInventoryResult_t resultHandle, uint unItemIndex, string pchPropertyName, out string pchValueBuffer, ref uint punValueBufferSizeOut) + { + InteropHelp.TestIfAvailableClient(); + IntPtr intPtr = Marshal.AllocHGlobal((int)punValueBufferSizeOut); + using InteropHelp.UTF8StringHandle pchPropertyName2 = new InteropHelp.UTF8StringHandle(pchPropertyName); + bool flag = NativeMethods.ISteamInventory_GetResultItemProperty(CSteamAPIContext.GetSteamInventory(), resultHandle, unItemIndex, pchPropertyName2, intPtr, ref punValueBufferSizeOut); + pchValueBuffer = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return flag; + } + + public static uint GetResultTimestamp(SteamInventoryResult_t resultHandle) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamInventory_GetResultTimestamp(CSteamAPIContext.GetSteamInventory(), resultHandle); + } + + public static bool CheckResultSteamID(SteamInventoryResult_t resultHandle, CSteamID steamIDExpected) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamInventory_CheckResultSteamID(CSteamAPIContext.GetSteamInventory(), resultHandle, steamIDExpected); + } + + public static void DestroyResult(SteamInventoryResult_t resultHandle) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamInventory_DestroyResult(CSteamAPIContext.GetSteamInventory(), resultHandle); + } + + public static bool GetAllItems(out SteamInventoryResult_t pResultHandle) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamInventory_GetAllItems(CSteamAPIContext.GetSteamInventory(), out pResultHandle); + } + + public static bool GetItemsByID(out SteamInventoryResult_t pResultHandle, SteamItemInstanceID_t[] pInstanceIDs, uint unCountInstanceIDs) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamInventory_GetItemsByID(CSteamAPIContext.GetSteamInventory(), out pResultHandle, pInstanceIDs, unCountInstanceIDs); + } + + public static bool SerializeResult(SteamInventoryResult_t resultHandle, byte[] pOutBuffer, out uint punOutBufferSize) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamInventory_SerializeResult(CSteamAPIContext.GetSteamInventory(), resultHandle, pOutBuffer, out punOutBufferSize); + } + + public static bool DeserializeResult(out SteamInventoryResult_t pOutResultHandle, byte[] pBuffer, uint unBufferSize, bool bRESERVED_MUST_BE_FALSE = false) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamInventory_DeserializeResult(CSteamAPIContext.GetSteamInventory(), out pOutResultHandle, pBuffer, unBufferSize, bRESERVED_MUST_BE_FALSE); + } + + public static bool GenerateItems(out SteamInventoryResult_t pResultHandle, SteamItemDef_t[] pArrayItemDefs, uint[] punArrayQuantity, uint unArrayLength) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamInventory_GenerateItems(CSteamAPIContext.GetSteamInventory(), out pResultHandle, pArrayItemDefs, punArrayQuantity, unArrayLength); + } + + public static bool GrantPromoItems(out SteamInventoryResult_t pResultHandle) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamInventory_GrantPromoItems(CSteamAPIContext.GetSteamInventory(), out pResultHandle); + } + + public static bool AddPromoItem(out SteamInventoryResult_t pResultHandle, SteamItemDef_t itemDef) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamInventory_AddPromoItem(CSteamAPIContext.GetSteamInventory(), out pResultHandle, itemDef); + } + + public static bool AddPromoItems(out SteamInventoryResult_t pResultHandle, SteamItemDef_t[] pArrayItemDefs, uint unArrayLength) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamInventory_AddPromoItems(CSteamAPIContext.GetSteamInventory(), out pResultHandle, pArrayItemDefs, unArrayLength); + } + + public static bool ConsumeItem(out SteamInventoryResult_t pResultHandle, SteamItemInstanceID_t itemConsume, uint unQuantity) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamInventory_ConsumeItem(CSteamAPIContext.GetSteamInventory(), out pResultHandle, itemConsume, unQuantity); + } + + public static bool ExchangeItems(out SteamInventoryResult_t pResultHandle, SteamItemDef_t[] pArrayGenerate, uint[] punArrayGenerateQuantity, uint unArrayGenerateLength, SteamItemInstanceID_t[] pArrayDestroy, uint[] punArrayDestroyQuantity, uint unArrayDestroyLength) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamInventory_ExchangeItems(CSteamAPIContext.GetSteamInventory(), out pResultHandle, pArrayGenerate, punArrayGenerateQuantity, unArrayGenerateLength, pArrayDestroy, punArrayDestroyQuantity, unArrayDestroyLength); + } + + public static bool TransferItemQuantity(out SteamInventoryResult_t pResultHandle, SteamItemInstanceID_t itemIdSource, uint unQuantity, SteamItemInstanceID_t itemIdDest) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamInventory_TransferItemQuantity(CSteamAPIContext.GetSteamInventory(), out pResultHandle, itemIdSource, unQuantity, itemIdDest); + } + + public static void SendItemDropHeartbeat() + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamInventory_SendItemDropHeartbeat(CSteamAPIContext.GetSteamInventory()); + } + + public static bool TriggerItemDrop(out SteamInventoryResult_t pResultHandle, SteamItemDef_t dropListDefinition) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamInventory_TriggerItemDrop(CSteamAPIContext.GetSteamInventory(), out pResultHandle, dropListDefinition); + } + + public static bool TradeItems(out SteamInventoryResult_t pResultHandle, CSteamID steamIDTradePartner, SteamItemInstanceID_t[] pArrayGive, uint[] pArrayGiveQuantity, uint nArrayGiveLength, SteamItemInstanceID_t[] pArrayGet, uint[] pArrayGetQuantity, uint nArrayGetLength) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamInventory_TradeItems(CSteamAPIContext.GetSteamInventory(), out pResultHandle, steamIDTradePartner, pArrayGive, pArrayGiveQuantity, nArrayGiveLength, pArrayGet, pArrayGetQuantity, nArrayGetLength); + } + + public static bool LoadItemDefinitions() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamInventory_LoadItemDefinitions(CSteamAPIContext.GetSteamInventory()); + } + + public static bool GetItemDefinitionIDs(SteamItemDef_t[] pItemDefIDs, ref uint punItemDefIDsArraySize) + { + InteropHelp.TestIfAvailableClient(); + if (pItemDefIDs != null && pItemDefIDs.Length != punItemDefIDsArraySize) + { + throw new ArgumentException("pItemDefIDs must be the same size as punItemDefIDsArraySize!"); + } + return NativeMethods.ISteamInventory_GetItemDefinitionIDs(CSteamAPIContext.GetSteamInventory(), pItemDefIDs, ref punItemDefIDsArraySize); + } + + public static bool GetItemDefinitionProperty(SteamItemDef_t iDefinition, string pchPropertyName, out string pchValueBuffer, ref uint punValueBufferSizeOut) + { + InteropHelp.TestIfAvailableClient(); + IntPtr intPtr = Marshal.AllocHGlobal((int)punValueBufferSizeOut); + using InteropHelp.UTF8StringHandle pchPropertyName2 = new InteropHelp.UTF8StringHandle(pchPropertyName); + bool flag = NativeMethods.ISteamInventory_GetItemDefinitionProperty(CSteamAPIContext.GetSteamInventory(), iDefinition, pchPropertyName2, intPtr, ref punValueBufferSizeOut); + pchValueBuffer = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return flag; + } + + public static SteamAPICall_t RequestEligiblePromoItemDefinitionsIDs(CSteamID steamID) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamInventory_RequestEligiblePromoItemDefinitionsIDs(CSteamAPIContext.GetSteamInventory(), steamID); + } + + public static bool GetEligiblePromoItemDefinitionIDs(CSteamID steamID, SteamItemDef_t[] pItemDefIDs, ref uint punItemDefIDsArraySize) + { + InteropHelp.TestIfAvailableClient(); + if (pItemDefIDs != null && pItemDefIDs.Length != punItemDefIDsArraySize) + { + throw new ArgumentException("pItemDefIDs must be the same size as punItemDefIDsArraySize!"); + } + return NativeMethods.ISteamInventory_GetEligiblePromoItemDefinitionIDs(CSteamAPIContext.GetSteamInventory(), steamID, pItemDefIDs, ref punItemDefIDsArraySize); + } + + public static SteamAPICall_t StartPurchase(SteamItemDef_t[] pArrayItemDefs, uint[] punArrayQuantity, uint unArrayLength) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamInventory_StartPurchase(CSteamAPIContext.GetSteamInventory(), pArrayItemDefs, punArrayQuantity, unArrayLength); + } + + public static SteamAPICall_t RequestPrices() + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamInventory_RequestPrices(CSteamAPIContext.GetSteamInventory()); + } + + public static uint GetNumItemsWithPrices() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamInventory_GetNumItemsWithPrices(CSteamAPIContext.GetSteamInventory()); + } + + public static bool GetItemsWithPrices(SteamItemDef_t[] pArrayItemDefs, ulong[] pCurrentPrices, ulong[] pBasePrices, uint unArrayLength) + { + InteropHelp.TestIfAvailableClient(); + if (pArrayItemDefs != null && pArrayItemDefs.Length != unArrayLength) + { + throw new ArgumentException("pArrayItemDefs must be the same size as unArrayLength!"); + } + if (pCurrentPrices != null && pCurrentPrices.Length != unArrayLength) + { + throw new ArgumentException("pCurrentPrices must be the same size as unArrayLength!"); + } + if (pBasePrices != null && pBasePrices.Length != unArrayLength) + { + throw new ArgumentException("pBasePrices must be the same size as unArrayLength!"); + } + return NativeMethods.ISteamInventory_GetItemsWithPrices(CSteamAPIContext.GetSteamInventory(), pArrayItemDefs, pCurrentPrices, pBasePrices, unArrayLength); + } + + public static bool GetItemPrice(SteamItemDef_t iDefinition, out ulong pCurrentPrice, out ulong pBasePrice) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamInventory_GetItemPrice(CSteamAPIContext.GetSteamInventory(), iDefinition, out pCurrentPrice, out pBasePrice); + } + + public static SteamInventoryUpdateHandle_t StartUpdateProperties() + { + InteropHelp.TestIfAvailableClient(); + return (SteamInventoryUpdateHandle_t)NativeMethods.ISteamInventory_StartUpdateProperties(CSteamAPIContext.GetSteamInventory()); + } + + public static bool RemoveProperty(SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, string pchPropertyName) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchPropertyName2 = new InteropHelp.UTF8StringHandle(pchPropertyName); + return NativeMethods.ISteamInventory_RemoveProperty(CSteamAPIContext.GetSteamInventory(), handle, nItemID, pchPropertyName2); + } + + public static bool SetProperty(SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, string pchPropertyName, string pchPropertyValue) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchPropertyName2 = new InteropHelp.UTF8StringHandle(pchPropertyName); + using InteropHelp.UTF8StringHandle pchPropertyValue2 = new InteropHelp.UTF8StringHandle(pchPropertyValue); + return NativeMethods.ISteamInventory_SetPropertyString(CSteamAPIContext.GetSteamInventory(), handle, nItemID, pchPropertyName2, pchPropertyValue2); + } + + public static bool SetProperty(SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, string pchPropertyName, bool bValue) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchPropertyName2 = new InteropHelp.UTF8StringHandle(pchPropertyName); + return NativeMethods.ISteamInventory_SetPropertyBool(CSteamAPIContext.GetSteamInventory(), handle, nItemID, pchPropertyName2, bValue); + } + + public static bool SetProperty(SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, string pchPropertyName, long nValue) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchPropertyName2 = new InteropHelp.UTF8StringHandle(pchPropertyName); + return NativeMethods.ISteamInventory_SetPropertyInt64(CSteamAPIContext.GetSteamInventory(), handle, nItemID, pchPropertyName2, nValue); + } + + public static bool SetProperty(SteamInventoryUpdateHandle_t handle, SteamItemInstanceID_t nItemID, string pchPropertyName, float flValue) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchPropertyName2 = new InteropHelp.UTF8StringHandle(pchPropertyName); + return NativeMethods.ISteamInventory_SetPropertyFloat(CSteamAPIContext.GetSteamInventory(), handle, nItemID, pchPropertyName2, flValue); + } + + public static bool SubmitUpdateProperties(SteamInventoryUpdateHandle_t handle, out SteamInventoryResult_t pResultHandle) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamInventory_SubmitUpdateProperties(CSteamAPIContext.GetSteamInventory(), handle, out pResultHandle); + } + + public static bool InspectItem(out SteamInventoryResult_t pResultHandle, string pchItemToken) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchItemToken2 = new InteropHelp.UTF8StringHandle(pchItemToken); + return NativeMethods.ISteamInventory_InspectItem(CSteamAPIContext.GetSteamInventory(), out pResultHandle, pchItemToken2); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamInventoryDefinitionUpdate_t.cs b/Assembly_Firstpass/Steamworks/SteamInventoryDefinitionUpdate_t.cs new file mode 100644 index 0000000..f6cba26 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamInventoryDefinitionUpdate_t.cs @@ -0,0 +1,10 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8, Size = 1)] +[CallbackIdentity(4702)] +public struct SteamInventoryDefinitionUpdate_t +{ + public const int k_iCallback = 4702; +} diff --git a/Assembly_Firstpass/Steamworks/SteamInventoryEligiblePromoItemDefIDs_t.cs b/Assembly_Firstpass/Steamworks/SteamInventoryEligiblePromoItemDefIDs_t.cs new file mode 100644 index 0000000..09eb75e --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamInventoryEligiblePromoItemDefIDs_t.cs @@ -0,0 +1,19 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(4703)] +public struct SteamInventoryEligiblePromoItemDefIDs_t +{ + public const int k_iCallback = 4703; + + public EResult m_result; + + public CSteamID m_steamID; + + public int m_numEligiblePromoItemDefs; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bCachedData; +} diff --git a/Assembly_Firstpass/Steamworks/SteamInventoryFullUpdate_t.cs b/Assembly_Firstpass/Steamworks/SteamInventoryFullUpdate_t.cs new file mode 100644 index 0000000..b6f2ee3 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamInventoryFullUpdate_t.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(4701)] +public struct SteamInventoryFullUpdate_t +{ + public const int k_iCallback = 4701; + + public SteamInventoryResult_t m_handle; +} diff --git a/Assembly_Firstpass/Steamworks/SteamInventoryRequestPricesResult_t.cs b/Assembly_Firstpass/Steamworks/SteamInventoryRequestPricesResult_t.cs new file mode 100644 index 0000000..bbf67b4 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamInventoryRequestPricesResult_t.cs @@ -0,0 +1,27 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(4705)] +public struct SteamInventoryRequestPricesResult_t +{ + public const int k_iCallback = 4705; + + public EResult m_result; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] + private byte[] m_rgchCurrency_; + + public string m_rgchCurrency + { + get + { + return InteropHelp.ByteArrayToStringUTF8(m_rgchCurrency_); + } + set + { + InteropHelp.StringToByteArrayUTF8(value, m_rgchCurrency_, 4); + } + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamInventoryResultReady_t.cs b/Assembly_Firstpass/Steamworks/SteamInventoryResultReady_t.cs new file mode 100644 index 0000000..9dd840d --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamInventoryResultReady_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(4700)] +public struct SteamInventoryResultReady_t +{ + public const int k_iCallback = 4700; + + public SteamInventoryResult_t m_handle; + + public EResult m_result; +} diff --git a/Assembly_Firstpass/Steamworks/SteamInventoryResult_t.cs b/Assembly_Firstpass/Steamworks/SteamInventoryResult_t.cs new file mode 100644 index 0000000..5860e2b --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamInventoryResult_t.cs @@ -0,0 +1,65 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct SteamInventoryResult_t : IEquatable<SteamInventoryResult_t>, IComparable<SteamInventoryResult_t> +{ + public static readonly SteamInventoryResult_t Invalid = new SteamInventoryResult_t(-1); + + public int m_SteamInventoryResult; + + public SteamInventoryResult_t(int value) + { + m_SteamInventoryResult = value; + } + + public override string ToString() + { + return m_SteamInventoryResult.ToString(); + } + + public override bool Equals(object other) + { + if (other is SteamInventoryResult_t) + { + return this == (SteamInventoryResult_t)other; + } + return false; + } + + public override int GetHashCode() + { + return m_SteamInventoryResult.GetHashCode(); + } + + public static bool operator ==(SteamInventoryResult_t x, SteamInventoryResult_t y) + { + return x.m_SteamInventoryResult == y.m_SteamInventoryResult; + } + + public static bool operator !=(SteamInventoryResult_t x, SteamInventoryResult_t y) + { + return !(x == y); + } + + public static explicit operator SteamInventoryResult_t(int value) + { + return new SteamInventoryResult_t(value); + } + + public static explicit operator int(SteamInventoryResult_t that) + { + return that.m_SteamInventoryResult; + } + + public bool Equals(SteamInventoryResult_t other) + { + return m_SteamInventoryResult == other.m_SteamInventoryResult; + } + + public int CompareTo(SteamInventoryResult_t other) + { + return m_SteamInventoryResult.CompareTo(other.m_SteamInventoryResult); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamInventoryStartPurchaseResult_t.cs b/Assembly_Firstpass/Steamworks/SteamInventoryStartPurchaseResult_t.cs new file mode 100644 index 0000000..01e5663 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamInventoryStartPurchaseResult_t.cs @@ -0,0 +1,16 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(4704)] +public struct SteamInventoryStartPurchaseResult_t +{ + public const int k_iCallback = 4704; + + public EResult m_result; + + public ulong m_ulOrderID; + + public ulong m_ulTransID; +} diff --git a/Assembly_Firstpass/Steamworks/SteamInventoryUpdateHandle_t.cs b/Assembly_Firstpass/Steamworks/SteamInventoryUpdateHandle_t.cs new file mode 100644 index 0000000..919a9da --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamInventoryUpdateHandle_t.cs @@ -0,0 +1,65 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct SteamInventoryUpdateHandle_t : IEquatable<SteamInventoryUpdateHandle_t>, IComparable<SteamInventoryUpdateHandle_t> +{ + public static readonly SteamInventoryUpdateHandle_t Invalid = new SteamInventoryUpdateHandle_t(ulong.MaxValue); + + public ulong m_SteamInventoryUpdateHandle; + + public SteamInventoryUpdateHandle_t(ulong value) + { + m_SteamInventoryUpdateHandle = value; + } + + public override string ToString() + { + return m_SteamInventoryUpdateHandle.ToString(); + } + + public override bool Equals(object other) + { + if (other is SteamInventoryUpdateHandle_t) + { + return this == (SteamInventoryUpdateHandle_t)other; + } + return false; + } + + public override int GetHashCode() + { + return m_SteamInventoryUpdateHandle.GetHashCode(); + } + + public static bool operator ==(SteamInventoryUpdateHandle_t x, SteamInventoryUpdateHandle_t y) + { + return x.m_SteamInventoryUpdateHandle == y.m_SteamInventoryUpdateHandle; + } + + public static bool operator !=(SteamInventoryUpdateHandle_t x, SteamInventoryUpdateHandle_t y) + { + return !(x == y); + } + + public static explicit operator SteamInventoryUpdateHandle_t(ulong value) + { + return new SteamInventoryUpdateHandle_t(value); + } + + public static explicit operator ulong(SteamInventoryUpdateHandle_t that) + { + return that.m_SteamInventoryUpdateHandle; + } + + public bool Equals(SteamInventoryUpdateHandle_t other) + { + return m_SteamInventoryUpdateHandle == other.m_SteamInventoryUpdateHandle; + } + + public int CompareTo(SteamInventoryUpdateHandle_t other) + { + return m_SteamInventoryUpdateHandle.CompareTo(other.m_SteamInventoryUpdateHandle); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamItemDef_t.cs b/Assembly_Firstpass/Steamworks/SteamItemDef_t.cs new file mode 100644 index 0000000..85e056e --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamItemDef_t.cs @@ -0,0 +1,63 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct SteamItemDef_t : IEquatable<SteamItemDef_t>, IComparable<SteamItemDef_t> +{ + public int m_SteamItemDef; + + public SteamItemDef_t(int value) + { + m_SteamItemDef = value; + } + + public override string ToString() + { + return m_SteamItemDef.ToString(); + } + + public override bool Equals(object other) + { + if (other is SteamItemDef_t) + { + return this == (SteamItemDef_t)other; + } + return false; + } + + public override int GetHashCode() + { + return m_SteamItemDef.GetHashCode(); + } + + public static bool operator ==(SteamItemDef_t x, SteamItemDef_t y) + { + return x.m_SteamItemDef == y.m_SteamItemDef; + } + + public static bool operator !=(SteamItemDef_t x, SteamItemDef_t y) + { + return !(x == y); + } + + public static explicit operator SteamItemDef_t(int value) + { + return new SteamItemDef_t(value); + } + + public static explicit operator int(SteamItemDef_t that) + { + return that.m_SteamItemDef; + } + + public bool Equals(SteamItemDef_t other) + { + return m_SteamItemDef == other.m_SteamItemDef; + } + + public int CompareTo(SteamItemDef_t other) + { + return m_SteamItemDef.CompareTo(other.m_SteamItemDef); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamItemDetails_t.cs b/Assembly_Firstpass/Steamworks/SteamItemDetails_t.cs new file mode 100644 index 0000000..5137228 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamItemDetails_t.cs @@ -0,0 +1,15 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +public struct SteamItemDetails_t +{ + public SteamItemInstanceID_t m_itemId; + + public SteamItemDef_t m_iDefinition; + + public ushort m_unQuantity; + + public ushort m_unFlags; +} diff --git a/Assembly_Firstpass/Steamworks/SteamItemInstanceID_t.cs b/Assembly_Firstpass/Steamworks/SteamItemInstanceID_t.cs new file mode 100644 index 0000000..014f585 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamItemInstanceID_t.cs @@ -0,0 +1,65 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct SteamItemInstanceID_t : IEquatable<SteamItemInstanceID_t>, IComparable<SteamItemInstanceID_t> +{ + public static readonly SteamItemInstanceID_t Invalid = new SteamItemInstanceID_t(ulong.MaxValue); + + public ulong m_SteamItemInstanceID; + + public SteamItemInstanceID_t(ulong value) + { + m_SteamItemInstanceID = value; + } + + public override string ToString() + { + return m_SteamItemInstanceID.ToString(); + } + + public override bool Equals(object other) + { + if (other is SteamItemInstanceID_t) + { + return this == (SteamItemInstanceID_t)other; + } + return false; + } + + public override int GetHashCode() + { + return m_SteamItemInstanceID.GetHashCode(); + } + + public static bool operator ==(SteamItemInstanceID_t x, SteamItemInstanceID_t y) + { + return x.m_SteamItemInstanceID == y.m_SteamItemInstanceID; + } + + public static bool operator !=(SteamItemInstanceID_t x, SteamItemInstanceID_t y) + { + return !(x == y); + } + + public static explicit operator SteamItemInstanceID_t(ulong value) + { + return new SteamItemInstanceID_t(value); + } + + public static explicit operator ulong(SteamItemInstanceID_t that) + { + return that.m_SteamItemInstanceID; + } + + public bool Equals(SteamItemInstanceID_t other) + { + return m_SteamItemInstanceID == other.m_SteamItemInstanceID; + } + + public int CompareTo(SteamItemInstanceID_t other) + { + return m_SteamItemInstanceID.CompareTo(other.m_SteamItemInstanceID); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamLeaderboardEntries_t.cs b/Assembly_Firstpass/Steamworks/SteamLeaderboardEntries_t.cs new file mode 100644 index 0000000..693e871 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamLeaderboardEntries_t.cs @@ -0,0 +1,63 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct SteamLeaderboardEntries_t : IEquatable<SteamLeaderboardEntries_t>, IComparable<SteamLeaderboardEntries_t> +{ + public ulong m_SteamLeaderboardEntries; + + public SteamLeaderboardEntries_t(ulong value) + { + m_SteamLeaderboardEntries = value; + } + + public override string ToString() + { + return m_SteamLeaderboardEntries.ToString(); + } + + public override bool Equals(object other) + { + if (other is SteamLeaderboardEntries_t) + { + return this == (SteamLeaderboardEntries_t)other; + } + return false; + } + + public override int GetHashCode() + { + return m_SteamLeaderboardEntries.GetHashCode(); + } + + public static bool operator ==(SteamLeaderboardEntries_t x, SteamLeaderboardEntries_t y) + { + return x.m_SteamLeaderboardEntries == y.m_SteamLeaderboardEntries; + } + + public static bool operator !=(SteamLeaderboardEntries_t x, SteamLeaderboardEntries_t y) + { + return !(x == y); + } + + public static explicit operator SteamLeaderboardEntries_t(ulong value) + { + return new SteamLeaderboardEntries_t(value); + } + + public static explicit operator ulong(SteamLeaderboardEntries_t that) + { + return that.m_SteamLeaderboardEntries; + } + + public bool Equals(SteamLeaderboardEntries_t other) + { + return m_SteamLeaderboardEntries == other.m_SteamLeaderboardEntries; + } + + public int CompareTo(SteamLeaderboardEntries_t other) + { + return m_SteamLeaderboardEntries.CompareTo(other.m_SteamLeaderboardEntries); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamLeaderboard_t.cs b/Assembly_Firstpass/Steamworks/SteamLeaderboard_t.cs new file mode 100644 index 0000000..0d89367 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamLeaderboard_t.cs @@ -0,0 +1,63 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct SteamLeaderboard_t : IEquatable<SteamLeaderboard_t>, IComparable<SteamLeaderboard_t> +{ + public ulong m_SteamLeaderboard; + + public SteamLeaderboard_t(ulong value) + { + m_SteamLeaderboard = value; + } + + public override string ToString() + { + return m_SteamLeaderboard.ToString(); + } + + public override bool Equals(object other) + { + if (other is SteamLeaderboard_t) + { + return this == (SteamLeaderboard_t)other; + } + return false; + } + + public override int GetHashCode() + { + return m_SteamLeaderboard.GetHashCode(); + } + + public static bool operator ==(SteamLeaderboard_t x, SteamLeaderboard_t y) + { + return x.m_SteamLeaderboard == y.m_SteamLeaderboard; + } + + public static bool operator !=(SteamLeaderboard_t x, SteamLeaderboard_t y) + { + return !(x == y); + } + + public static explicit operator SteamLeaderboard_t(ulong value) + { + return new SteamLeaderboard_t(value); + } + + public static explicit operator ulong(SteamLeaderboard_t that) + { + return that.m_SteamLeaderboard; + } + + public bool Equals(SteamLeaderboard_t other) + { + return m_SteamLeaderboard == other.m_SteamLeaderboard; + } + + public int CompareTo(SteamLeaderboard_t other) + { + return m_SteamLeaderboard.CompareTo(other.m_SteamLeaderboard); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamMatchmaking.cs b/Assembly_Firstpass/Steamworks/SteamMatchmaking.cs new file mode 100644 index 0000000..fc51bf7 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamMatchmaking.cs @@ -0,0 +1,253 @@ +using System; +using System.Runtime.InteropServices; + +namespace Steamworks; + +public static class SteamMatchmaking +{ + public static int GetFavoriteGameCount() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMatchmaking_GetFavoriteGameCount(CSteamAPIContext.GetSteamMatchmaking()); + } + + public static bool GetFavoriteGame(int iGame, out AppId_t pnAppID, out uint pnIP, out ushort pnConnPort, out ushort pnQueryPort, out uint punFlags, out uint pRTime32LastPlayedOnServer) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMatchmaking_GetFavoriteGame(CSteamAPIContext.GetSteamMatchmaking(), iGame, out pnAppID, out pnIP, out pnConnPort, out pnQueryPort, out punFlags, out pRTime32LastPlayedOnServer); + } + + public static int AddFavoriteGame(AppId_t nAppID, uint nIP, ushort nConnPort, ushort nQueryPort, uint unFlags, uint rTime32LastPlayedOnServer) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMatchmaking_AddFavoriteGame(CSteamAPIContext.GetSteamMatchmaking(), nAppID, nIP, nConnPort, nQueryPort, unFlags, rTime32LastPlayedOnServer); + } + + public static bool RemoveFavoriteGame(AppId_t nAppID, uint nIP, ushort nConnPort, ushort nQueryPort, uint unFlags) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMatchmaking_RemoveFavoriteGame(CSteamAPIContext.GetSteamMatchmaking(), nAppID, nIP, nConnPort, nQueryPort, unFlags); + } + + public static SteamAPICall_t RequestLobbyList() + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamMatchmaking_RequestLobbyList(CSteamAPIContext.GetSteamMatchmaking()); + } + + public static void AddRequestLobbyListStringFilter(string pchKeyToMatch, string pchValueToMatch, ELobbyComparison eComparisonType) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchKeyToMatch2 = new InteropHelp.UTF8StringHandle(pchKeyToMatch); + using InteropHelp.UTF8StringHandle pchValueToMatch2 = new InteropHelp.UTF8StringHandle(pchValueToMatch); + NativeMethods.ISteamMatchmaking_AddRequestLobbyListStringFilter(CSteamAPIContext.GetSteamMatchmaking(), pchKeyToMatch2, pchValueToMatch2, eComparisonType); + } + + public static void AddRequestLobbyListNumericalFilter(string pchKeyToMatch, int nValueToMatch, ELobbyComparison eComparisonType) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchKeyToMatch2 = new InteropHelp.UTF8StringHandle(pchKeyToMatch); + NativeMethods.ISteamMatchmaking_AddRequestLobbyListNumericalFilter(CSteamAPIContext.GetSteamMatchmaking(), pchKeyToMatch2, nValueToMatch, eComparisonType); + } + + public static void AddRequestLobbyListNearValueFilter(string pchKeyToMatch, int nValueToBeCloseTo) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchKeyToMatch2 = new InteropHelp.UTF8StringHandle(pchKeyToMatch); + NativeMethods.ISteamMatchmaking_AddRequestLobbyListNearValueFilter(CSteamAPIContext.GetSteamMatchmaking(), pchKeyToMatch2, nValueToBeCloseTo); + } + + public static void AddRequestLobbyListFilterSlotsAvailable(int nSlotsAvailable) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamMatchmaking_AddRequestLobbyListFilterSlotsAvailable(CSteamAPIContext.GetSteamMatchmaking(), nSlotsAvailable); + } + + public static void AddRequestLobbyListDistanceFilter(ELobbyDistanceFilter eLobbyDistanceFilter) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamMatchmaking_AddRequestLobbyListDistanceFilter(CSteamAPIContext.GetSteamMatchmaking(), eLobbyDistanceFilter); + } + + public static void AddRequestLobbyListResultCountFilter(int cMaxResults) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamMatchmaking_AddRequestLobbyListResultCountFilter(CSteamAPIContext.GetSteamMatchmaking(), cMaxResults); + } + + public static void AddRequestLobbyListCompatibleMembersFilter(CSteamID steamIDLobby) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamMatchmaking_AddRequestLobbyListCompatibleMembersFilter(CSteamAPIContext.GetSteamMatchmaking(), steamIDLobby); + } + + public static CSteamID GetLobbyByIndex(int iLobby) + { + InteropHelp.TestIfAvailableClient(); + return (CSteamID)NativeMethods.ISteamMatchmaking_GetLobbyByIndex(CSteamAPIContext.GetSteamMatchmaking(), iLobby); + } + + public static SteamAPICall_t CreateLobby(ELobbyType eLobbyType, int cMaxMembers) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamMatchmaking_CreateLobby(CSteamAPIContext.GetSteamMatchmaking(), eLobbyType, cMaxMembers); + } + + public static SteamAPICall_t JoinLobby(CSteamID steamIDLobby) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamMatchmaking_JoinLobby(CSteamAPIContext.GetSteamMatchmaking(), steamIDLobby); + } + + public static void LeaveLobby(CSteamID steamIDLobby) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamMatchmaking_LeaveLobby(CSteamAPIContext.GetSteamMatchmaking(), steamIDLobby); + } + + public static bool InviteUserToLobby(CSteamID steamIDLobby, CSteamID steamIDInvitee) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMatchmaking_InviteUserToLobby(CSteamAPIContext.GetSteamMatchmaking(), steamIDLobby, steamIDInvitee); + } + + public static int GetNumLobbyMembers(CSteamID steamIDLobby) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMatchmaking_GetNumLobbyMembers(CSteamAPIContext.GetSteamMatchmaking(), steamIDLobby); + } + + public static CSteamID GetLobbyMemberByIndex(CSteamID steamIDLobby, int iMember) + { + InteropHelp.TestIfAvailableClient(); + return (CSteamID)NativeMethods.ISteamMatchmaking_GetLobbyMemberByIndex(CSteamAPIContext.GetSteamMatchmaking(), steamIDLobby, iMember); + } + + public static string GetLobbyData(CSteamID steamIDLobby, string pchKey) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchKey2 = new InteropHelp.UTF8StringHandle(pchKey); + return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamMatchmaking_GetLobbyData(CSteamAPIContext.GetSteamMatchmaking(), steamIDLobby, pchKey2)); + } + + public static bool SetLobbyData(CSteamID steamIDLobby, string pchKey, string pchValue) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchKey2 = new InteropHelp.UTF8StringHandle(pchKey); + using InteropHelp.UTF8StringHandle pchValue2 = new InteropHelp.UTF8StringHandle(pchValue); + return NativeMethods.ISteamMatchmaking_SetLobbyData(CSteamAPIContext.GetSteamMatchmaking(), steamIDLobby, pchKey2, pchValue2); + } + + public static int GetLobbyDataCount(CSteamID steamIDLobby) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMatchmaking_GetLobbyDataCount(CSteamAPIContext.GetSteamMatchmaking(), steamIDLobby); + } + + public static bool GetLobbyDataByIndex(CSteamID steamIDLobby, int iLobbyData, out string pchKey, int cchKeyBufferSize, out string pchValue, int cchValueBufferSize) + { + InteropHelp.TestIfAvailableClient(); + IntPtr intPtr = Marshal.AllocHGlobal(cchKeyBufferSize); + IntPtr intPtr2 = Marshal.AllocHGlobal(cchValueBufferSize); + bool flag = NativeMethods.ISteamMatchmaking_GetLobbyDataByIndex(CSteamAPIContext.GetSteamMatchmaking(), steamIDLobby, iLobbyData, intPtr, cchKeyBufferSize, intPtr2, cchValueBufferSize); + pchKey = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + pchValue = (flag ? InteropHelp.PtrToStringUTF8(intPtr2) : null); + Marshal.FreeHGlobal(intPtr2); + return flag; + } + + public static bool DeleteLobbyData(CSteamID steamIDLobby, string pchKey) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchKey2 = new InteropHelp.UTF8StringHandle(pchKey); + return NativeMethods.ISteamMatchmaking_DeleteLobbyData(CSteamAPIContext.GetSteamMatchmaking(), steamIDLobby, pchKey2); + } + + public static string GetLobbyMemberData(CSteamID steamIDLobby, CSteamID steamIDUser, string pchKey) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchKey2 = new InteropHelp.UTF8StringHandle(pchKey); + return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamMatchmaking_GetLobbyMemberData(CSteamAPIContext.GetSteamMatchmaking(), steamIDLobby, steamIDUser, pchKey2)); + } + + public static void SetLobbyMemberData(CSteamID steamIDLobby, string pchKey, string pchValue) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchKey2 = new InteropHelp.UTF8StringHandle(pchKey); + using InteropHelp.UTF8StringHandle pchValue2 = new InteropHelp.UTF8StringHandle(pchValue); + NativeMethods.ISteamMatchmaking_SetLobbyMemberData(CSteamAPIContext.GetSteamMatchmaking(), steamIDLobby, pchKey2, pchValue2); + } + + public static bool SendLobbyChatMsg(CSteamID steamIDLobby, byte[] pvMsgBody, int cubMsgBody) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMatchmaking_SendLobbyChatMsg(CSteamAPIContext.GetSteamMatchmaking(), steamIDLobby, pvMsgBody, cubMsgBody); + } + + public static int GetLobbyChatEntry(CSteamID steamIDLobby, int iChatID, out CSteamID pSteamIDUser, byte[] pvData, int cubData, out EChatEntryType peChatEntryType) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMatchmaking_GetLobbyChatEntry(CSteamAPIContext.GetSteamMatchmaking(), steamIDLobby, iChatID, out pSteamIDUser, pvData, cubData, out peChatEntryType); + } + + public static bool RequestLobbyData(CSteamID steamIDLobby) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMatchmaking_RequestLobbyData(CSteamAPIContext.GetSteamMatchmaking(), steamIDLobby); + } + + public static void SetLobbyGameServer(CSteamID steamIDLobby, uint unGameServerIP, ushort unGameServerPort, CSteamID steamIDGameServer) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamMatchmaking_SetLobbyGameServer(CSteamAPIContext.GetSteamMatchmaking(), steamIDLobby, unGameServerIP, unGameServerPort, steamIDGameServer); + } + + public static bool GetLobbyGameServer(CSteamID steamIDLobby, out uint punGameServerIP, out ushort punGameServerPort, out CSteamID psteamIDGameServer) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMatchmaking_GetLobbyGameServer(CSteamAPIContext.GetSteamMatchmaking(), steamIDLobby, out punGameServerIP, out punGameServerPort, out psteamIDGameServer); + } + + public static bool SetLobbyMemberLimit(CSteamID steamIDLobby, int cMaxMembers) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMatchmaking_SetLobbyMemberLimit(CSteamAPIContext.GetSteamMatchmaking(), steamIDLobby, cMaxMembers); + } + + public static int GetLobbyMemberLimit(CSteamID steamIDLobby) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMatchmaking_GetLobbyMemberLimit(CSteamAPIContext.GetSteamMatchmaking(), steamIDLobby); + } + + public static bool SetLobbyType(CSteamID steamIDLobby, ELobbyType eLobbyType) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMatchmaking_SetLobbyType(CSteamAPIContext.GetSteamMatchmaking(), steamIDLobby, eLobbyType); + } + + public static bool SetLobbyJoinable(CSteamID steamIDLobby, bool bLobbyJoinable) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMatchmaking_SetLobbyJoinable(CSteamAPIContext.GetSteamMatchmaking(), steamIDLobby, bLobbyJoinable); + } + + public static CSteamID GetLobbyOwner(CSteamID steamIDLobby) + { + InteropHelp.TestIfAvailableClient(); + return (CSteamID)NativeMethods.ISteamMatchmaking_GetLobbyOwner(CSteamAPIContext.GetSteamMatchmaking(), steamIDLobby); + } + + public static bool SetLobbyOwner(CSteamID steamIDLobby, CSteamID steamIDNewOwner) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMatchmaking_SetLobbyOwner(CSteamAPIContext.GetSteamMatchmaking(), steamIDLobby, steamIDNewOwner); + } + + public static bool SetLinkedLobby(CSteamID steamIDLobby, CSteamID steamIDLobbyDependent) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMatchmaking_SetLinkedLobby(CSteamAPIContext.GetSteamMatchmaking(), steamIDLobby, steamIDLobbyDependent); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamMatchmakingServers.cs b/Assembly_Firstpass/Steamworks/SteamMatchmakingServers.cs new file mode 100644 index 0000000..3ac7d4e --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamMatchmakingServers.cs @@ -0,0 +1,109 @@ +using System; +using System.Runtime.InteropServices; + +namespace Steamworks; + +public static class SteamMatchmakingServers +{ + public static HServerListRequest RequestInternetServerList(AppId_t iApp, MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, ISteamMatchmakingServerListResponse pRequestServersResponse) + { + InteropHelp.TestIfAvailableClient(); + return (HServerListRequest)NativeMethods.ISteamMatchmakingServers_RequestInternetServerList(CSteamAPIContext.GetSteamMatchmakingServers(), iApp, new MMKVPMarshaller(ppchFilters), nFilters, (IntPtr)pRequestServersResponse); + } + + public static HServerListRequest RequestLANServerList(AppId_t iApp, ISteamMatchmakingServerListResponse pRequestServersResponse) + { + InteropHelp.TestIfAvailableClient(); + return (HServerListRequest)NativeMethods.ISteamMatchmakingServers_RequestLANServerList(CSteamAPIContext.GetSteamMatchmakingServers(), iApp, (IntPtr)pRequestServersResponse); + } + + public static HServerListRequest RequestFriendsServerList(AppId_t iApp, MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, ISteamMatchmakingServerListResponse pRequestServersResponse) + { + InteropHelp.TestIfAvailableClient(); + return (HServerListRequest)NativeMethods.ISteamMatchmakingServers_RequestFriendsServerList(CSteamAPIContext.GetSteamMatchmakingServers(), iApp, new MMKVPMarshaller(ppchFilters), nFilters, (IntPtr)pRequestServersResponse); + } + + public static HServerListRequest RequestFavoritesServerList(AppId_t iApp, MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, ISteamMatchmakingServerListResponse pRequestServersResponse) + { + InteropHelp.TestIfAvailableClient(); + return (HServerListRequest)NativeMethods.ISteamMatchmakingServers_RequestFavoritesServerList(CSteamAPIContext.GetSteamMatchmakingServers(), iApp, new MMKVPMarshaller(ppchFilters), nFilters, (IntPtr)pRequestServersResponse); + } + + public static HServerListRequest RequestHistoryServerList(AppId_t iApp, MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, ISteamMatchmakingServerListResponse pRequestServersResponse) + { + InteropHelp.TestIfAvailableClient(); + return (HServerListRequest)NativeMethods.ISteamMatchmakingServers_RequestHistoryServerList(CSteamAPIContext.GetSteamMatchmakingServers(), iApp, new MMKVPMarshaller(ppchFilters), nFilters, (IntPtr)pRequestServersResponse); + } + + public static HServerListRequest RequestSpectatorServerList(AppId_t iApp, MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, ISteamMatchmakingServerListResponse pRequestServersResponse) + { + InteropHelp.TestIfAvailableClient(); + return (HServerListRequest)NativeMethods.ISteamMatchmakingServers_RequestSpectatorServerList(CSteamAPIContext.GetSteamMatchmakingServers(), iApp, new MMKVPMarshaller(ppchFilters), nFilters, (IntPtr)pRequestServersResponse); + } + + public static void ReleaseRequest(HServerListRequest hServerListRequest) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamMatchmakingServers_ReleaseRequest(CSteamAPIContext.GetSteamMatchmakingServers(), hServerListRequest); + } + + public static gameserveritem_t GetServerDetails(HServerListRequest hRequest, int iServer) + { + InteropHelp.TestIfAvailableClient(); + return (gameserveritem_t)Marshal.PtrToStructure(NativeMethods.ISteamMatchmakingServers_GetServerDetails(CSteamAPIContext.GetSteamMatchmakingServers(), hRequest, iServer), typeof(gameserveritem_t)); + } + + public static void CancelQuery(HServerListRequest hRequest) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamMatchmakingServers_CancelQuery(CSteamAPIContext.GetSteamMatchmakingServers(), hRequest); + } + + public static void RefreshQuery(HServerListRequest hRequest) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamMatchmakingServers_RefreshQuery(CSteamAPIContext.GetSteamMatchmakingServers(), hRequest); + } + + public static bool IsRefreshing(HServerListRequest hRequest) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMatchmakingServers_IsRefreshing(CSteamAPIContext.GetSteamMatchmakingServers(), hRequest); + } + + public static int GetServerCount(HServerListRequest hRequest) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMatchmakingServers_GetServerCount(CSteamAPIContext.GetSteamMatchmakingServers(), hRequest); + } + + public static void RefreshServer(HServerListRequest hRequest, int iServer) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamMatchmakingServers_RefreshServer(CSteamAPIContext.GetSteamMatchmakingServers(), hRequest, iServer); + } + + public static HServerQuery PingServer(uint unIP, ushort usPort, ISteamMatchmakingPingResponse pRequestServersResponse) + { + InteropHelp.TestIfAvailableClient(); + return (HServerQuery)NativeMethods.ISteamMatchmakingServers_PingServer(CSteamAPIContext.GetSteamMatchmakingServers(), unIP, usPort, (IntPtr)pRequestServersResponse); + } + + public static HServerQuery PlayerDetails(uint unIP, ushort usPort, ISteamMatchmakingPlayersResponse pRequestServersResponse) + { + InteropHelp.TestIfAvailableClient(); + return (HServerQuery)NativeMethods.ISteamMatchmakingServers_PlayerDetails(CSteamAPIContext.GetSteamMatchmakingServers(), unIP, usPort, (IntPtr)pRequestServersResponse); + } + + public static HServerQuery ServerRules(uint unIP, ushort usPort, ISteamMatchmakingRulesResponse pRequestServersResponse) + { + InteropHelp.TestIfAvailableClient(); + return (HServerQuery)NativeMethods.ISteamMatchmakingServers_ServerRules(CSteamAPIContext.GetSteamMatchmakingServers(), unIP, usPort, (IntPtr)pRequestServersResponse); + } + + public static void CancelServerQuery(HServerQuery hServerQuery) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamMatchmakingServers_CancelServerQuery(CSteamAPIContext.GetSteamMatchmakingServers(), hServerQuery); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamMusic.cs b/Assembly_Firstpass/Steamworks/SteamMusic.cs new file mode 100644 index 0000000..93a205d --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamMusic.cs @@ -0,0 +1,58 @@ +namespace Steamworks; + +public static class SteamMusic +{ + public static bool BIsEnabled() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMusic_BIsEnabled(CSteamAPIContext.GetSteamMusic()); + } + + public static bool BIsPlaying() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMusic_BIsPlaying(CSteamAPIContext.GetSteamMusic()); + } + + public static AudioPlayback_Status GetPlaybackStatus() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMusic_GetPlaybackStatus(CSteamAPIContext.GetSteamMusic()); + } + + public static void Play() + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamMusic_Play(CSteamAPIContext.GetSteamMusic()); + } + + public static void Pause() + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamMusic_Pause(CSteamAPIContext.GetSteamMusic()); + } + + public static void PlayPrevious() + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamMusic_PlayPrevious(CSteamAPIContext.GetSteamMusic()); + } + + public static void PlayNext() + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamMusic_PlayNext(CSteamAPIContext.GetSteamMusic()); + } + + public static void SetVolume(float flVolume) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamMusic_SetVolume(CSteamAPIContext.GetSteamMusic(), flVolume); + } + + public static float GetVolume() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMusic_GetVolume(CSteamAPIContext.GetSteamMusic()); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamMusicRemote.cs b/Assembly_Firstpass/Steamworks/SteamMusicRemote.cs new file mode 100644 index 0000000..29d6d1a --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamMusicRemote.cs @@ -0,0 +1,201 @@ +namespace Steamworks; + +public static class SteamMusicRemote +{ + public static bool RegisterSteamMusicRemote(string pchName) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchName2 = new InteropHelp.UTF8StringHandle(pchName); + return NativeMethods.ISteamMusicRemote_RegisterSteamMusicRemote(CSteamAPIContext.GetSteamMusicRemote(), pchName2); + } + + public static bool DeregisterSteamMusicRemote() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMusicRemote_DeregisterSteamMusicRemote(CSteamAPIContext.GetSteamMusicRemote()); + } + + public static bool BIsCurrentMusicRemote() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMusicRemote_BIsCurrentMusicRemote(CSteamAPIContext.GetSteamMusicRemote()); + } + + public static bool BActivationSuccess(bool bValue) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMusicRemote_BActivationSuccess(CSteamAPIContext.GetSteamMusicRemote(), bValue); + } + + public static bool SetDisplayName(string pchDisplayName) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchDisplayName2 = new InteropHelp.UTF8StringHandle(pchDisplayName); + return NativeMethods.ISteamMusicRemote_SetDisplayName(CSteamAPIContext.GetSteamMusicRemote(), pchDisplayName2); + } + + public static bool SetPNGIcon_64x64(byte[] pvBuffer, uint cbBufferLength) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMusicRemote_SetPNGIcon_64x64(CSteamAPIContext.GetSteamMusicRemote(), pvBuffer, cbBufferLength); + } + + public static bool EnablePlayPrevious(bool bValue) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMusicRemote_EnablePlayPrevious(CSteamAPIContext.GetSteamMusicRemote(), bValue); + } + + public static bool EnablePlayNext(bool bValue) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMusicRemote_EnablePlayNext(CSteamAPIContext.GetSteamMusicRemote(), bValue); + } + + public static bool EnableShuffled(bool bValue) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMusicRemote_EnableShuffled(CSteamAPIContext.GetSteamMusicRemote(), bValue); + } + + public static bool EnableLooped(bool bValue) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMusicRemote_EnableLooped(CSteamAPIContext.GetSteamMusicRemote(), bValue); + } + + public static bool EnableQueue(bool bValue) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMusicRemote_EnableQueue(CSteamAPIContext.GetSteamMusicRemote(), bValue); + } + + public static bool EnablePlaylists(bool bValue) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMusicRemote_EnablePlaylists(CSteamAPIContext.GetSteamMusicRemote(), bValue); + } + + public static bool UpdatePlaybackStatus(AudioPlayback_Status nStatus) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMusicRemote_UpdatePlaybackStatus(CSteamAPIContext.GetSteamMusicRemote(), nStatus); + } + + public static bool UpdateShuffled(bool bValue) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMusicRemote_UpdateShuffled(CSteamAPIContext.GetSteamMusicRemote(), bValue); + } + + public static bool UpdateLooped(bool bValue) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMusicRemote_UpdateLooped(CSteamAPIContext.GetSteamMusicRemote(), bValue); + } + + public static bool UpdateVolume(float flValue) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMusicRemote_UpdateVolume(CSteamAPIContext.GetSteamMusicRemote(), flValue); + } + + public static bool CurrentEntryWillChange() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMusicRemote_CurrentEntryWillChange(CSteamAPIContext.GetSteamMusicRemote()); + } + + public static bool CurrentEntryIsAvailable(bool bAvailable) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMusicRemote_CurrentEntryIsAvailable(CSteamAPIContext.GetSteamMusicRemote(), bAvailable); + } + + public static bool UpdateCurrentEntryText(string pchText) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchText2 = new InteropHelp.UTF8StringHandle(pchText); + return NativeMethods.ISteamMusicRemote_UpdateCurrentEntryText(CSteamAPIContext.GetSteamMusicRemote(), pchText2); + } + + public static bool UpdateCurrentEntryElapsedSeconds(int nValue) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMusicRemote_UpdateCurrentEntryElapsedSeconds(CSteamAPIContext.GetSteamMusicRemote(), nValue); + } + + public static bool UpdateCurrentEntryCoverArt(byte[] pvBuffer, uint cbBufferLength) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMusicRemote_UpdateCurrentEntryCoverArt(CSteamAPIContext.GetSteamMusicRemote(), pvBuffer, cbBufferLength); + } + + public static bool CurrentEntryDidChange() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMusicRemote_CurrentEntryDidChange(CSteamAPIContext.GetSteamMusicRemote()); + } + + public static bool QueueWillChange() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMusicRemote_QueueWillChange(CSteamAPIContext.GetSteamMusicRemote()); + } + + public static bool ResetQueueEntries() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMusicRemote_ResetQueueEntries(CSteamAPIContext.GetSteamMusicRemote()); + } + + public static bool SetQueueEntry(int nID, int nPosition, string pchEntryText) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchEntryText2 = new InteropHelp.UTF8StringHandle(pchEntryText); + return NativeMethods.ISteamMusicRemote_SetQueueEntry(CSteamAPIContext.GetSteamMusicRemote(), nID, nPosition, pchEntryText2); + } + + public static bool SetCurrentQueueEntry(int nID) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMusicRemote_SetCurrentQueueEntry(CSteamAPIContext.GetSteamMusicRemote(), nID); + } + + public static bool QueueDidChange() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMusicRemote_QueueDidChange(CSteamAPIContext.GetSteamMusicRemote()); + } + + public static bool PlaylistWillChange() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMusicRemote_PlaylistWillChange(CSteamAPIContext.GetSteamMusicRemote()); + } + + public static bool ResetPlaylistEntries() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMusicRemote_ResetPlaylistEntries(CSteamAPIContext.GetSteamMusicRemote()); + } + + public static bool SetPlaylistEntry(int nID, int nPosition, string pchEntryText) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchEntryText2 = new InteropHelp.UTF8StringHandle(pchEntryText); + return NativeMethods.ISteamMusicRemote_SetPlaylistEntry(CSteamAPIContext.GetSteamMusicRemote(), nID, nPosition, pchEntryText2); + } + + public static bool SetCurrentPlaylistEntry(int nID) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMusicRemote_SetCurrentPlaylistEntry(CSteamAPIContext.GetSteamMusicRemote(), nID); + } + + public static bool PlaylistDidChange() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamMusicRemote_PlaylistDidChange(CSteamAPIContext.GetSteamMusicRemote()); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamNetAuthenticationStatus_t.cs b/Assembly_Firstpass/Steamworks/SteamNetAuthenticationStatus_t.cs new file mode 100644 index 0000000..8b8f4d7 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamNetAuthenticationStatus_t.cs @@ -0,0 +1,27 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1222)] +public struct SteamNetAuthenticationStatus_t +{ + public const int k_iCallback = 1222; + + public ESteamNetworkingAvailability m_eAvail; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] + private byte[] m_debugMsg_; + + public string m_debugMsg + { + get + { + return InteropHelp.ByteArrayToStringUTF8(m_debugMsg_); + } + set + { + InteropHelp.StringToByteArrayUTF8(value, m_debugMsg_, 256); + } + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamNetConnectionInfo_t.cs b/Assembly_Firstpass/Steamworks/SteamNetConnectionInfo_t.cs new file mode 100644 index 0000000..61c4fcb --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamNetConnectionInfo_t.cs @@ -0,0 +1,58 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +public struct SteamNetConnectionInfo_t +{ + public SteamNetworkingIdentity m_identityRemote; + + public long m_nUserData; + + public HSteamListenSocket m_hListenSocket; + + public SteamNetworkingIPAddr m_addrRemote; + + public ushort m__pad1; + + public SteamNetworkingPOPID m_idPOPRemote; + + public SteamNetworkingPOPID m_idPOPRelay; + + public ESteamNetworkingConnectionState m_eState; + + public int m_eEndReason; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] + private byte[] m_szEndDebug_; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] + private byte[] m_szConnectionDescription_; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] + public uint[] reserved; + + public string m_szEndDebug + { + get + { + return InteropHelp.ByteArrayToStringUTF8(m_szEndDebug_); + } + set + { + InteropHelp.StringToByteArrayUTF8(value, m_szEndDebug_, 128); + } + } + + public string m_szConnectionDescription + { + get + { + return InteropHelp.ByteArrayToStringUTF8(m_szConnectionDescription_); + } + set + { + InteropHelp.StringToByteArrayUTF8(value, m_szConnectionDescription_, 128); + } + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamNetConnectionStatusChangedCallback_t.cs b/Assembly_Firstpass/Steamworks/SteamNetConnectionStatusChangedCallback_t.cs new file mode 100644 index 0000000..1279f63 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamNetConnectionStatusChangedCallback_t.cs @@ -0,0 +1,16 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1221)] +public struct SteamNetConnectionStatusChangedCallback_t +{ + public const int k_iCallback = 1221; + + public HSteamNetConnection m_hConn; + + public SteamNetConnectionInfo_t m_info; + + public ESteamNetworkingConnectionState m_eOldState; +} diff --git a/Assembly_Firstpass/Steamworks/SteamNetworkPingLocation_t.cs b/Assembly_Firstpass/Steamworks/SteamNetworkPingLocation_t.cs new file mode 100644 index 0000000..6ba468f --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamNetworkPingLocation_t.cs @@ -0,0 +1,10 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +public struct SteamNetworkPingLocation_t +{ + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 512)] + public byte[] m_data; +} diff --git a/Assembly_Firstpass/Steamworks/SteamNetworking.cs b/Assembly_Firstpass/Steamworks/SteamNetworking.cs new file mode 100644 index 0000000..58a7c72 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamNetworking.cs @@ -0,0 +1,136 @@ +namespace Steamworks; + +public static class SteamNetworking +{ + public static bool SendP2PPacket(CSteamID steamIDRemote, byte[] pubData, uint cubData, EP2PSend eP2PSendType, int nChannel = 0) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworking_SendP2PPacket(CSteamAPIContext.GetSteamNetworking(), steamIDRemote, pubData, cubData, eP2PSendType, nChannel); + } + + public static bool IsP2PPacketAvailable(out uint pcubMsgSize, int nChannel = 0) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworking_IsP2PPacketAvailable(CSteamAPIContext.GetSteamNetworking(), out pcubMsgSize, nChannel); + } + + public static bool ReadP2PPacket(byte[] pubDest, uint cubDest, out uint pcubMsgSize, out CSteamID psteamIDRemote, int nChannel = 0) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworking_ReadP2PPacket(CSteamAPIContext.GetSteamNetworking(), pubDest, cubDest, out pcubMsgSize, out psteamIDRemote, nChannel); + } + + public static bool AcceptP2PSessionWithUser(CSteamID steamIDRemote) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworking_AcceptP2PSessionWithUser(CSteamAPIContext.GetSteamNetworking(), steamIDRemote); + } + + public static bool CloseP2PSessionWithUser(CSteamID steamIDRemote) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworking_CloseP2PSessionWithUser(CSteamAPIContext.GetSteamNetworking(), steamIDRemote); + } + + public static bool CloseP2PChannelWithUser(CSteamID steamIDRemote, int nChannel) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworking_CloseP2PChannelWithUser(CSteamAPIContext.GetSteamNetworking(), steamIDRemote, nChannel); + } + + public static bool GetP2PSessionState(CSteamID steamIDRemote, out P2PSessionState_t pConnectionState) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworking_GetP2PSessionState(CSteamAPIContext.GetSteamNetworking(), steamIDRemote, out pConnectionState); + } + + public static bool AllowP2PPacketRelay(bool bAllow) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworking_AllowP2PPacketRelay(CSteamAPIContext.GetSteamNetworking(), bAllow); + } + + public static SNetListenSocket_t CreateListenSocket(int nVirtualP2PPort, SteamIPAddress_t nIP, ushort nPort, bool bAllowUseOfPacketRelay) + { + InteropHelp.TestIfAvailableClient(); + return (SNetListenSocket_t)NativeMethods.ISteamNetworking_CreateListenSocket(CSteamAPIContext.GetSteamNetworking(), nVirtualP2PPort, nIP, nPort, bAllowUseOfPacketRelay); + } + + public static SNetSocket_t CreateP2PConnectionSocket(CSteamID steamIDTarget, int nVirtualPort, int nTimeoutSec, bool bAllowUseOfPacketRelay) + { + InteropHelp.TestIfAvailableClient(); + return (SNetSocket_t)NativeMethods.ISteamNetworking_CreateP2PConnectionSocket(CSteamAPIContext.GetSteamNetworking(), steamIDTarget, nVirtualPort, nTimeoutSec, bAllowUseOfPacketRelay); + } + + public static SNetSocket_t CreateConnectionSocket(SteamIPAddress_t nIP, ushort nPort, int nTimeoutSec) + { + InteropHelp.TestIfAvailableClient(); + return (SNetSocket_t)NativeMethods.ISteamNetworking_CreateConnectionSocket(CSteamAPIContext.GetSteamNetworking(), nIP, nPort, nTimeoutSec); + } + + public static bool DestroySocket(SNetSocket_t hSocket, bool bNotifyRemoteEnd) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworking_DestroySocket(CSteamAPIContext.GetSteamNetworking(), hSocket, bNotifyRemoteEnd); + } + + public static bool DestroyListenSocket(SNetListenSocket_t hSocket, bool bNotifyRemoteEnd) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworking_DestroyListenSocket(CSteamAPIContext.GetSteamNetworking(), hSocket, bNotifyRemoteEnd); + } + + public static bool SendDataOnSocket(SNetSocket_t hSocket, byte[] pubData, uint cubData, bool bReliable) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworking_SendDataOnSocket(CSteamAPIContext.GetSteamNetworking(), hSocket, pubData, cubData, bReliable); + } + + public static bool IsDataAvailableOnSocket(SNetSocket_t hSocket, out uint pcubMsgSize) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworking_IsDataAvailableOnSocket(CSteamAPIContext.GetSteamNetworking(), hSocket, out pcubMsgSize); + } + + public static bool RetrieveDataFromSocket(SNetSocket_t hSocket, byte[] pubDest, uint cubDest, out uint pcubMsgSize) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworking_RetrieveDataFromSocket(CSteamAPIContext.GetSteamNetworking(), hSocket, pubDest, cubDest, out pcubMsgSize); + } + + public static bool IsDataAvailable(SNetListenSocket_t hListenSocket, out uint pcubMsgSize, out SNetSocket_t phSocket) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworking_IsDataAvailable(CSteamAPIContext.GetSteamNetworking(), hListenSocket, out pcubMsgSize, out phSocket); + } + + public static bool RetrieveData(SNetListenSocket_t hListenSocket, byte[] pubDest, uint cubDest, out uint pcubMsgSize, out SNetSocket_t phSocket) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworking_RetrieveData(CSteamAPIContext.GetSteamNetworking(), hListenSocket, pubDest, cubDest, out pcubMsgSize, out phSocket); + } + + public static bool GetSocketInfo(SNetSocket_t hSocket, out CSteamID pSteamIDRemote, out int peSocketStatus, out SteamIPAddress_t punIPRemote, out ushort punPortRemote) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworking_GetSocketInfo(CSteamAPIContext.GetSteamNetworking(), hSocket, out pSteamIDRemote, out peSocketStatus, out punIPRemote, out punPortRemote); + } + + public static bool GetListenSocketInfo(SNetListenSocket_t hListenSocket, out SteamIPAddress_t pnIP, out ushort pnPort) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworking_GetListenSocketInfo(CSteamAPIContext.GetSteamNetworking(), hListenSocket, out pnIP, out pnPort); + } + + public static ESNetSocketConnectionType GetSocketConnectionType(SNetSocket_t hSocket) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworking_GetSocketConnectionType(CSteamAPIContext.GetSteamNetworking(), hSocket); + } + + public static int GetMaxPacketSize(SNetSocket_t hSocket) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworking_GetMaxPacketSize(CSteamAPIContext.GetSteamNetworking(), hSocket); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamNetworkingConfigValue_t.cs b/Assembly_Firstpass/Steamworks/SteamNetworkingConfigValue_t.cs new file mode 100644 index 0000000..c172f31 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamNetworkingConfigValue_t.cs @@ -0,0 +1,33 @@ +using System; +using System.Runtime.InteropServices; + +namespace Steamworks; + +[Serializable] +public struct SteamNetworkingConfigValue_t +{ + [StructLayout(LayoutKind.Explicit)] + public struct OptionValue + { + [FieldOffset(0)] + public int m_int32; + + [FieldOffset(0)] + public long m_int64; + + [FieldOffset(0)] + public float m_float; + + [FieldOffset(0)] + public IntPtr m_string; + + [FieldOffset(0)] + public IntPtr m_functionPtr; + } + + public ESteamNetworkingConfigValue m_eValue; + + public ESteamNetworkingConfigDataType m_eDataType; + + public OptionValue m_val; +} diff --git a/Assembly_Firstpass/Steamworks/SteamNetworkingErrMsg.cs b/Assembly_Firstpass/Steamworks/SteamNetworkingErrMsg.cs new file mode 100644 index 0000000..e078ebb --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamNetworkingErrMsg.cs @@ -0,0 +1,11 @@ +using System; +using System.Runtime.InteropServices; + +namespace Steamworks; + +[Serializable] +public struct SteamNetworkingErrMsg +{ + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1024)] + public byte[] m_SteamNetworkingErrMsg; +} diff --git a/Assembly_Firstpass/Steamworks/SteamNetworkingIPAddr.cs b/Assembly_Firstpass/Steamworks/SteamNetworkingIPAddr.cs new file mode 100644 index 0000000..a416723 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamNetworkingIPAddr.cs @@ -0,0 +1,75 @@ +using System; +using System.Runtime.InteropServices; + +namespace Steamworks; + +[Serializable] +[StructLayout(LayoutKind.Sequential, Pack = 1)] +public struct SteamNetworkingIPAddr : IEquatable<SteamNetworkingIPAddr> +{ + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] + public byte[] m_ipv6; + + public ushort m_port; + + public const int k_cchMaxString = 48; + + public void Clear() + { + NativeMethods.SteamAPI_SteamNetworkingIPAddr_Clear(ref this); + } + + public bool IsIPv6AllZeros() + { + return NativeMethods.SteamAPI_SteamNetworkingIPAddr_IsIPv6AllZeros(ref this); + } + + public void SetIPv6(byte[] ipv6, ushort nPort) + { + NativeMethods.SteamAPI_SteamNetworkingIPAddr_SetIPv6(ref this, ipv6, nPort); + } + + public void SetIPv4(uint nIP, ushort nPort) + { + NativeMethods.SteamAPI_SteamNetworkingIPAddr_SetIPv4(ref this, nIP, nPort); + } + + public bool IsIPv4() + { + return NativeMethods.SteamAPI_SteamNetworkingIPAddr_IsIPv4(ref this); + } + + public uint GetIPv4() + { + return NativeMethods.SteamAPI_SteamNetworkingIPAddr_GetIPv4(ref this); + } + + public void SetIPv6LocalHost(ushort nPort = 0) + { + NativeMethods.SteamAPI_SteamNetworkingIPAddr_SetIPv6LocalHost(ref this, nPort); + } + + public bool IsLocalHost() + { + return NativeMethods.SteamAPI_SteamNetworkingIPAddr_IsLocalHost(ref this); + } + + public void ToString(out string buf, bool bWithPort) + { + IntPtr intPtr = Marshal.AllocHGlobal(48); + NativeMethods.SteamNetworkingIPAddr_ToString(ref this, intPtr, 48u, bWithPort); + buf = InteropHelp.PtrToStringUTF8(intPtr); + Marshal.FreeHGlobal(intPtr); + } + + public bool ParseString(string pszStr) + { + using InteropHelp.UTF8StringHandle pszStr2 = new InteropHelp.UTF8StringHandle(pszStr); + return NativeMethods.SteamNetworkingIPAddr_ParseString(ref this, pszStr2); + } + + public bool Equals(SteamNetworkingIPAddr x) + { + return NativeMethods.SteamAPI_SteamNetworkingIPAddr_IsEqualTo(ref this, ref x); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamNetworkingIdentity.cs b/Assembly_Firstpass/Steamworks/SteamNetworkingIdentity.cs new file mode 100644 index 0000000..057391c --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamNetworkingIdentity.cs @@ -0,0 +1,112 @@ +using System; +using System.Runtime.InteropServices; + +namespace Steamworks; + +[Serializable] +[StructLayout(LayoutKind.Sequential, Pack = 1)] +public struct SteamNetworkingIdentity : IEquatable<SteamNetworkingIdentity> +{ + public ESteamNetworkingIdentityType m_eType; + + private int m_cbSize; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] + private uint[] m_reserved; + + public const int k_cchMaxString = 128; + + public const int k_cchMaxGenericString = 32; + + public const int k_cbMaxGenericBytes = 32; + + public void Clear() + { + NativeMethods.SteamAPI_SteamNetworkingIdentity_Clear(ref this); + } + + public bool IsInvalid() + { + return NativeMethods.SteamAPI_SteamNetworkingIdentity_IsInvalid(ref this); + } + + public void SetSteamID(CSteamID steamID) + { + NativeMethods.SteamAPI_SteamNetworkingIdentity_SetSteamID(ref this, (ulong)steamID); + } + + public CSteamID GetSteamID() + { + return (CSteamID)NativeMethods.SteamAPI_SteamNetworkingIdentity_GetSteamID(ref this); + } + + public void SetSteamID64(ulong steamID) + { + NativeMethods.SteamAPI_SteamNetworkingIdentity_SetSteamID64(ref this, steamID); + } + + public ulong GetSteamID64() + { + return NativeMethods.SteamAPI_SteamNetworkingIdentity_GetSteamID64(ref this); + } + + public void SetIPAddr(SteamNetworkingIPAddr addr) + { + NativeMethods.SteamAPI_SteamNetworkingIdentity_SetIPAddr(ref this, ref addr); + } + + public SteamNetworkingIPAddr GetIPAddr() + { + throw new NotImplementedException(); + } + + public void SetLocalHost() + { + NativeMethods.SteamAPI_SteamNetworkingIdentity_SetLocalHost(ref this); + } + + public bool IsLocalHost() + { + return NativeMethods.SteamAPI_SteamNetworkingIdentity_IsLocalHost(ref this); + } + + public bool SetGenericString(string pszString) + { + using InteropHelp.UTF8StringHandle pszString2 = new InteropHelp.UTF8StringHandle(pszString); + return NativeMethods.SteamAPI_SteamNetworkingIdentity_SetGenericString(ref this, pszString2); + } + + public string GetGenericString() + { + return InteropHelp.PtrToStringUTF8(NativeMethods.SteamAPI_SteamNetworkingIdentity_GetGenericString(ref this)); + } + + public bool SetGenericBytes(byte[] data, uint cbLen) + { + return NativeMethods.SteamAPI_SteamNetworkingIdentity_SetGenericBytes(ref this, data, cbLen); + } + + public byte[] GetGenericBytes(out int cbLen) + { + throw new NotImplementedException(); + } + + public bool Equals(SteamNetworkingIdentity x) + { + return NativeMethods.SteamAPI_SteamNetworkingIdentity_IsEqualTo(ref this, ref x); + } + + public void ToString(out string buf) + { + IntPtr intPtr = Marshal.AllocHGlobal(128); + NativeMethods.SteamNetworkingIdentity_ToString(ref this, intPtr, 128u); + buf = InteropHelp.PtrToStringUTF8(intPtr); + Marshal.FreeHGlobal(intPtr); + } + + public bool ParseString(string pszStr) + { + using InteropHelp.UTF8StringHandle pszStr2 = new InteropHelp.UTF8StringHandle(pszStr); + return NativeMethods.SteamNetworkingIdentity_ParseString(ref this, pszStr2); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamNetworkingMessage_t.cs b/Assembly_Firstpass/Steamworks/SteamNetworkingMessage_t.cs new file mode 100644 index 0000000..66dea2c --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamNetworkingMessage_t.cs @@ -0,0 +1,36 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct SteamNetworkingMessage_t +{ + public IntPtr m_pData; + + public int m_cbSize; + + public HSteamNetConnection m_conn; + + public SteamNetworkingIdentity m_identityPeer; + + public long m_nConnUserData; + + public SteamNetworkingMicroseconds m_usecTimeReceived; + + public long m_nMessageNumber; + + internal IntPtr m_pfnFreeData; + + internal IntPtr m_pfnRelease; + + public int m_nChannel; + + public int m_nFlags; + + public long m_nUserData; + + public void Release() + { + NativeMethods.SteamAPI_SteamNetworkingMessage_t_Release(m_pfnRelease); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamNetworkingMessages.cs b/Assembly_Firstpass/Steamworks/SteamNetworkingMessages.cs new file mode 100644 index 0000000..17e2786 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamNetworkingMessages.cs @@ -0,0 +1,42 @@ +using System; + +namespace Steamworks; + +public static class SteamNetworkingMessages +{ + public static EResult SendMessageToUser(ref SteamNetworkingIdentity identityRemote, IntPtr pubData, uint cubData, int nSendFlags, int nRemoteChannel) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingMessages_SendMessageToUser(CSteamAPIContext.GetSteamNetworkingMessages(), ref identityRemote, pubData, cubData, nSendFlags, nRemoteChannel); + } + + public static int ReceiveMessagesOnChannel(int nLocalChannel, IntPtr[] ppOutMessages, int nMaxMessages) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingMessages_ReceiveMessagesOnChannel(CSteamAPIContext.GetSteamNetworkingMessages(), nLocalChannel, ppOutMessages, nMaxMessages); + } + + public static bool AcceptSessionWithUser(ref SteamNetworkingIdentity identityRemote) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingMessages_AcceptSessionWithUser(CSteamAPIContext.GetSteamNetworkingMessages(), ref identityRemote); + } + + public static bool CloseSessionWithUser(ref SteamNetworkingIdentity identityRemote) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingMessages_CloseSessionWithUser(CSteamAPIContext.GetSteamNetworkingMessages(), ref identityRemote); + } + + public static bool CloseChannelWithUser(ref SteamNetworkingIdentity identityRemote, int nLocalChannel) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingMessages_CloseChannelWithUser(CSteamAPIContext.GetSteamNetworkingMessages(), ref identityRemote, nLocalChannel); + } + + public static ESteamNetworkingConnectionState GetSessionConnectionInfo(ref SteamNetworkingIdentity identityRemote, out SteamNetConnectionInfo_t pConnectionInfo, out SteamNetworkingQuickConnectionStatus pQuickStatus) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingMessages_GetSessionConnectionInfo(CSteamAPIContext.GetSteamNetworkingMessages(), ref identityRemote, out pConnectionInfo, out pQuickStatus); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamNetworkingMessagesSessionFailed_t.cs b/Assembly_Firstpass/Steamworks/SteamNetworkingMessagesSessionFailed_t.cs new file mode 100644 index 0000000..d4a73f8 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamNetworkingMessagesSessionFailed_t.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1252)] +public struct SteamNetworkingMessagesSessionFailed_t +{ + public const int k_iCallback = 1252; + + public SteamNetConnectionInfo_t m_info; +} diff --git a/Assembly_Firstpass/Steamworks/SteamNetworkingMessagesSessionRequest_t.cs b/Assembly_Firstpass/Steamworks/SteamNetworkingMessagesSessionRequest_t.cs new file mode 100644 index 0000000..0da8b8f --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamNetworkingMessagesSessionRequest_t.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1251)] +public struct SteamNetworkingMessagesSessionRequest_t +{ + public const int k_iCallback = 1251; + + public SteamNetworkingIdentity m_identityRemote; +} diff --git a/Assembly_Firstpass/Steamworks/SteamNetworkingMicroseconds.cs b/Assembly_Firstpass/Steamworks/SteamNetworkingMicroseconds.cs new file mode 100644 index 0000000..c354b35 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamNetworkingMicroseconds.cs @@ -0,0 +1,63 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct SteamNetworkingMicroseconds : IEquatable<SteamNetworkingMicroseconds>, IComparable<SteamNetworkingMicroseconds> +{ + public long m_SteamNetworkingMicroseconds; + + public SteamNetworkingMicroseconds(long value) + { + m_SteamNetworkingMicroseconds = value; + } + + public override string ToString() + { + return m_SteamNetworkingMicroseconds.ToString(); + } + + public override bool Equals(object other) + { + if (other is SteamNetworkingMicroseconds) + { + return this == (SteamNetworkingMicroseconds)other; + } + return false; + } + + public override int GetHashCode() + { + return m_SteamNetworkingMicroseconds.GetHashCode(); + } + + public static bool operator ==(SteamNetworkingMicroseconds x, SteamNetworkingMicroseconds y) + { + return x.m_SteamNetworkingMicroseconds == y.m_SteamNetworkingMicroseconds; + } + + public static bool operator !=(SteamNetworkingMicroseconds x, SteamNetworkingMicroseconds y) + { + return !(x == y); + } + + public static explicit operator SteamNetworkingMicroseconds(long value) + { + return new SteamNetworkingMicroseconds(value); + } + + public static explicit operator long(SteamNetworkingMicroseconds that) + { + return that.m_SteamNetworkingMicroseconds; + } + + public bool Equals(SteamNetworkingMicroseconds other) + { + return m_SteamNetworkingMicroseconds == other.m_SteamNetworkingMicroseconds; + } + + public int CompareTo(SteamNetworkingMicroseconds other) + { + return m_SteamNetworkingMicroseconds.CompareTo(other.m_SteamNetworkingMicroseconds); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamNetworkingPOPID.cs b/Assembly_Firstpass/Steamworks/SteamNetworkingPOPID.cs new file mode 100644 index 0000000..189eb15 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamNetworkingPOPID.cs @@ -0,0 +1,63 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct SteamNetworkingPOPID : IEquatable<SteamNetworkingPOPID>, IComparable<SteamNetworkingPOPID> +{ + public uint m_SteamNetworkingPOPID; + + public SteamNetworkingPOPID(uint value) + { + m_SteamNetworkingPOPID = value; + } + + public override string ToString() + { + return m_SteamNetworkingPOPID.ToString(); + } + + public override bool Equals(object other) + { + if (other is SteamNetworkingPOPID) + { + return this == (SteamNetworkingPOPID)other; + } + return false; + } + + public override int GetHashCode() + { + return m_SteamNetworkingPOPID.GetHashCode(); + } + + public static bool operator ==(SteamNetworkingPOPID x, SteamNetworkingPOPID y) + { + return x.m_SteamNetworkingPOPID == y.m_SteamNetworkingPOPID; + } + + public static bool operator !=(SteamNetworkingPOPID x, SteamNetworkingPOPID y) + { + return !(x == y); + } + + public static explicit operator SteamNetworkingPOPID(uint value) + { + return new SteamNetworkingPOPID(value); + } + + public static explicit operator uint(SteamNetworkingPOPID that) + { + return that.m_SteamNetworkingPOPID; + } + + public bool Equals(SteamNetworkingPOPID other) + { + return m_SteamNetworkingPOPID == other.m_SteamNetworkingPOPID; + } + + public int CompareTo(SteamNetworkingPOPID other) + { + return m_SteamNetworkingPOPID.CompareTo(other.m_SteamNetworkingPOPID); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamNetworkingQuickConnectionStatus.cs b/Assembly_Firstpass/Steamworks/SteamNetworkingQuickConnectionStatus.cs new file mode 100644 index 0000000..2be5fa3 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamNetworkingQuickConnectionStatus.cs @@ -0,0 +1,36 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +public struct SteamNetworkingQuickConnectionStatus +{ + public ESteamNetworkingConnectionState m_eState; + + public int m_nPing; + + public float m_flConnectionQualityLocal; + + public float m_flConnectionQualityRemote; + + public float m_flOutPacketsPerSec; + + public float m_flOutBytesPerSec; + + public float m_flInPacketsPerSec; + + public float m_flInBytesPerSec; + + public int m_nSendRateBytesPerSecond; + + public int m_cbPendingUnreliable; + + public int m_cbPendingReliable; + + public int m_cbSentUnackedReliable; + + public SteamNetworkingMicroseconds m_usecQueueTime; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] + public uint[] reserved; +} diff --git a/Assembly_Firstpass/Steamworks/SteamNetworkingSockets.cs b/Assembly_Firstpass/Steamworks/SteamNetworkingSockets.cs new file mode 100644 index 0000000..dd60be2 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamNetworkingSockets.cs @@ -0,0 +1,257 @@ +using System; +using System.Runtime.InteropServices; + +namespace Steamworks; + +public static class SteamNetworkingSockets +{ + public static HSteamListenSocket CreateListenSocketIP(ref SteamNetworkingIPAddr localAddress, int nOptions, SteamNetworkingConfigValue_t[] pOptions) + { + InteropHelp.TestIfAvailableClient(); + return (HSteamListenSocket)NativeMethods.ISteamNetworkingSockets_CreateListenSocketIP(CSteamAPIContext.GetSteamNetworkingSockets(), ref localAddress, nOptions, pOptions); + } + + public static HSteamNetConnection ConnectByIPAddress(ref SteamNetworkingIPAddr address, int nOptions, SteamNetworkingConfigValue_t[] pOptions) + { + InteropHelp.TestIfAvailableClient(); + return (HSteamNetConnection)NativeMethods.ISteamNetworkingSockets_ConnectByIPAddress(CSteamAPIContext.GetSteamNetworkingSockets(), ref address, nOptions, pOptions); + } + + public static HSteamListenSocket CreateListenSocketP2P(int nLocalVirtualPort, int nOptions, SteamNetworkingConfigValue_t[] pOptions) + { + InteropHelp.TestIfAvailableClient(); + return (HSteamListenSocket)NativeMethods.ISteamNetworkingSockets_CreateListenSocketP2P(CSteamAPIContext.GetSteamNetworkingSockets(), nLocalVirtualPort, nOptions, pOptions); + } + + public static HSteamNetConnection ConnectP2P(ref SteamNetworkingIdentity identityRemote, int nRemoteVirtualPort, int nOptions, SteamNetworkingConfigValue_t[] pOptions) + { + InteropHelp.TestIfAvailableClient(); + return (HSteamNetConnection)NativeMethods.ISteamNetworkingSockets_ConnectP2P(CSteamAPIContext.GetSteamNetworkingSockets(), ref identityRemote, nRemoteVirtualPort, nOptions, pOptions); + } + + public static EResult AcceptConnection(HSteamNetConnection hConn) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingSockets_AcceptConnection(CSteamAPIContext.GetSteamNetworkingSockets(), hConn); + } + + public static bool CloseConnection(HSteamNetConnection hPeer, int nReason, string pszDebug, bool bEnableLinger) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pszDebug2 = new InteropHelp.UTF8StringHandle(pszDebug); + return NativeMethods.ISteamNetworkingSockets_CloseConnection(CSteamAPIContext.GetSteamNetworkingSockets(), hPeer, nReason, pszDebug2, bEnableLinger); + } + + public static bool CloseListenSocket(HSteamListenSocket hSocket) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingSockets_CloseListenSocket(CSteamAPIContext.GetSteamNetworkingSockets(), hSocket); + } + + public static bool SetConnectionUserData(HSteamNetConnection hPeer, long nUserData) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingSockets_SetConnectionUserData(CSteamAPIContext.GetSteamNetworkingSockets(), hPeer, nUserData); + } + + public static long GetConnectionUserData(HSteamNetConnection hPeer) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingSockets_GetConnectionUserData(CSteamAPIContext.GetSteamNetworkingSockets(), hPeer); + } + + public static void SetConnectionName(HSteamNetConnection hPeer, string pszName) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pszName2 = new InteropHelp.UTF8StringHandle(pszName); + NativeMethods.ISteamNetworkingSockets_SetConnectionName(CSteamAPIContext.GetSteamNetworkingSockets(), hPeer, pszName2); + } + + public static bool GetConnectionName(HSteamNetConnection hPeer, out string pszName, int nMaxLen) + { + InteropHelp.TestIfAvailableClient(); + IntPtr intPtr = Marshal.AllocHGlobal(nMaxLen); + bool flag = NativeMethods.ISteamNetworkingSockets_GetConnectionName(CSteamAPIContext.GetSteamNetworkingSockets(), hPeer, intPtr, nMaxLen); + pszName = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return flag; + } + + public static EResult SendMessageToConnection(HSteamNetConnection hConn, IntPtr pData, uint cbData, int nSendFlags, out long pOutMessageNumber) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingSockets_SendMessageToConnection(CSteamAPIContext.GetSteamNetworkingSockets(), hConn, pData, cbData, nSendFlags, out pOutMessageNumber); + } + + public static void SendMessages(int nMessages, SteamNetworkingMessage_t[] pMessages, long[] pOutMessageNumberOrResult) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamNetworkingSockets_SendMessages(CSteamAPIContext.GetSteamNetworkingSockets(), nMessages, pMessages, pOutMessageNumberOrResult); + } + + public static EResult FlushMessagesOnConnection(HSteamNetConnection hConn) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingSockets_FlushMessagesOnConnection(CSteamAPIContext.GetSteamNetworkingSockets(), hConn); + } + + public static int ReceiveMessagesOnConnection(HSteamNetConnection hConn, IntPtr[] ppOutMessages, int nMaxMessages) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingSockets_ReceiveMessagesOnConnection(CSteamAPIContext.GetSteamNetworkingSockets(), hConn, ppOutMessages, nMaxMessages); + } + + public static bool GetConnectionInfo(HSteamNetConnection hConn, out SteamNetConnectionInfo_t pInfo) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingSockets_GetConnectionInfo(CSteamAPIContext.GetSteamNetworkingSockets(), hConn, out pInfo); + } + + public static bool GetQuickConnectionStatus(HSteamNetConnection hConn, out SteamNetworkingQuickConnectionStatus pStats) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingSockets_GetQuickConnectionStatus(CSteamAPIContext.GetSteamNetworkingSockets(), hConn, out pStats); + } + + public static int GetDetailedConnectionStatus(HSteamNetConnection hConn, out string pszBuf, int cbBuf) + { + InteropHelp.TestIfAvailableClient(); + IntPtr intPtr = Marshal.AllocHGlobal(cbBuf); + int num = NativeMethods.ISteamNetworkingSockets_GetDetailedConnectionStatus(CSteamAPIContext.GetSteamNetworkingSockets(), hConn, intPtr, cbBuf); + pszBuf = ((num != -1) ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return num; + } + + public static bool GetListenSocketAddress(HSteamListenSocket hSocket, out SteamNetworkingIPAddr address) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingSockets_GetListenSocketAddress(CSteamAPIContext.GetSteamNetworkingSockets(), hSocket, out address); + } + + public static bool CreateSocketPair(out HSteamNetConnection pOutConnection1, out HSteamNetConnection pOutConnection2, bool bUseNetworkLoopback, ref SteamNetworkingIdentity pIdentity1, ref SteamNetworkingIdentity pIdentity2) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingSockets_CreateSocketPair(CSteamAPIContext.GetSteamNetworkingSockets(), out pOutConnection1, out pOutConnection2, bUseNetworkLoopback, ref pIdentity1, ref pIdentity2); + } + + public static bool GetIdentity(out SteamNetworkingIdentity pIdentity) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingSockets_GetIdentity(CSteamAPIContext.GetSteamNetworkingSockets(), out pIdentity); + } + + public static ESteamNetworkingAvailability InitAuthentication() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingSockets_InitAuthentication(CSteamAPIContext.GetSteamNetworkingSockets()); + } + + public static ESteamNetworkingAvailability GetAuthenticationStatus(out SteamNetAuthenticationStatus_t pDetails) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingSockets_GetAuthenticationStatus(CSteamAPIContext.GetSteamNetworkingSockets(), out pDetails); + } + + public static HSteamNetPollGroup CreatePollGroup() + { + InteropHelp.TestIfAvailableClient(); + return (HSteamNetPollGroup)NativeMethods.ISteamNetworkingSockets_CreatePollGroup(CSteamAPIContext.GetSteamNetworkingSockets()); + } + + public static bool DestroyPollGroup(HSteamNetPollGroup hPollGroup) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingSockets_DestroyPollGroup(CSteamAPIContext.GetSteamNetworkingSockets(), hPollGroup); + } + + public static bool SetConnectionPollGroup(HSteamNetConnection hConn, HSteamNetPollGroup hPollGroup) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingSockets_SetConnectionPollGroup(CSteamAPIContext.GetSteamNetworkingSockets(), hConn, hPollGroup); + } + + public static int ReceiveMessagesOnPollGroup(HSteamNetPollGroup hPollGroup, IntPtr[] ppOutMessages, int nMaxMessages) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingSockets_ReceiveMessagesOnPollGroup(CSteamAPIContext.GetSteamNetworkingSockets(), hPollGroup, ppOutMessages, nMaxMessages); + } + + public static bool ReceivedRelayAuthTicket(IntPtr pvTicket, int cbTicket, out SteamDatagramRelayAuthTicket pOutParsedTicket) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingSockets_ReceivedRelayAuthTicket(CSteamAPIContext.GetSteamNetworkingSockets(), pvTicket, cbTicket, out pOutParsedTicket); + } + + public static int FindRelayAuthTicketForServer(ref SteamNetworkingIdentity identityGameServer, int nRemoteVirtualPort, out SteamDatagramRelayAuthTicket pOutParsedTicket) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingSockets_FindRelayAuthTicketForServer(CSteamAPIContext.GetSteamNetworkingSockets(), ref identityGameServer, nRemoteVirtualPort, out pOutParsedTicket); + } + + public static HSteamNetConnection ConnectToHostedDedicatedServer(ref SteamNetworkingIdentity identityTarget, int nRemoteVirtualPort, int nOptions, SteamNetworkingConfigValue_t[] pOptions) + { + InteropHelp.TestIfAvailableClient(); + return (HSteamNetConnection)NativeMethods.ISteamNetworkingSockets_ConnectToHostedDedicatedServer(CSteamAPIContext.GetSteamNetworkingSockets(), ref identityTarget, nRemoteVirtualPort, nOptions, pOptions); + } + + public static ushort GetHostedDedicatedServerPort() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingSockets_GetHostedDedicatedServerPort(CSteamAPIContext.GetSteamNetworkingSockets()); + } + + public static SteamNetworkingPOPID GetHostedDedicatedServerPOPID() + { + InteropHelp.TestIfAvailableClient(); + return (SteamNetworkingPOPID)NativeMethods.ISteamNetworkingSockets_GetHostedDedicatedServerPOPID(CSteamAPIContext.GetSteamNetworkingSockets()); + } + + public static EResult GetHostedDedicatedServerAddress(out SteamDatagramHostedAddress pRouting) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingSockets_GetHostedDedicatedServerAddress(CSteamAPIContext.GetSteamNetworkingSockets(), out pRouting); + } + + public static HSteamListenSocket CreateHostedDedicatedServerListenSocket(int nLocalVirtualPort, int nOptions, SteamNetworkingConfigValue_t[] pOptions) + { + InteropHelp.TestIfAvailableClient(); + return (HSteamListenSocket)NativeMethods.ISteamNetworkingSockets_CreateHostedDedicatedServerListenSocket(CSteamAPIContext.GetSteamNetworkingSockets(), nLocalVirtualPort, nOptions, pOptions); + } + + public static EResult GetGameCoordinatorServerLogin(out SteamDatagramGameCoordinatorServerLogin pLoginInfo, out int pcbSignedBlob, IntPtr pBlob) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingSockets_GetGameCoordinatorServerLogin(CSteamAPIContext.GetSteamNetworkingSockets(), out pLoginInfo, out pcbSignedBlob, pBlob); + } + + public static HSteamNetConnection ConnectP2PCustomSignaling(out ISteamNetworkingConnectionSignaling pSignaling, ref SteamNetworkingIdentity pPeerIdentity, int nRemoteVirtualPort, int nOptions, SteamNetworkingConfigValue_t[] pOptions) + { + InteropHelp.TestIfAvailableClient(); + return (HSteamNetConnection)NativeMethods.ISteamNetworkingSockets_ConnectP2PCustomSignaling(CSteamAPIContext.GetSteamNetworkingSockets(), out pSignaling, ref pPeerIdentity, nRemoteVirtualPort, nOptions, pOptions); + } + + public static bool ReceivedP2PCustomSignal(IntPtr pMsg, int cbMsg, out ISteamNetworkingSignalingRecvContext pContext) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingSockets_ReceivedP2PCustomSignal(CSteamAPIContext.GetSteamNetworkingSockets(), pMsg, cbMsg, out pContext); + } + + public static bool GetCertificateRequest(out int pcbBlob, IntPtr pBlob, out SteamNetworkingErrMsg errMsg) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingSockets_GetCertificateRequest(CSteamAPIContext.GetSteamNetworkingSockets(), out pcbBlob, pBlob, out errMsg); + } + + public static bool SetCertificate(IntPtr pCertificate, int cbCertificate, out SteamNetworkingErrMsg errMsg) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingSockets_SetCertificate(CSteamAPIContext.GetSteamNetworkingSockets(), pCertificate, cbCertificate, out errMsg); + } + + public static void RunCallbacks() + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamNetworkingSockets_RunCallbacks(CSteamAPIContext.GetSteamNetworkingSockets()); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamNetworkingUtils.cs b/Assembly_Firstpass/Steamworks/SteamNetworkingUtils.cs new file mode 100644 index 0000000..104b4d8 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamNetworkingUtils.cs @@ -0,0 +1,157 @@ +using System; +using System.Runtime.InteropServices; + +namespace Steamworks; + +public static class SteamNetworkingUtils +{ + public static IntPtr AllocateMessage(int cbAllocateBuffer) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingUtils_AllocateMessage(CSteamAPIContext.GetSteamNetworkingUtils(), cbAllocateBuffer); + } + + public static void InitRelayNetworkAccess() + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamNetworkingUtils_InitRelayNetworkAccess(CSteamAPIContext.GetSteamNetworkingUtils()); + } + + public static ESteamNetworkingAvailability GetRelayNetworkStatus(out SteamRelayNetworkStatus_t pDetails) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingUtils_GetRelayNetworkStatus(CSteamAPIContext.GetSteamNetworkingUtils(), out pDetails); + } + + public static float GetLocalPingLocation(out SteamNetworkPingLocation_t result) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingUtils_GetLocalPingLocation(CSteamAPIContext.GetSteamNetworkingUtils(), out result); + } + + public static int EstimatePingTimeBetweenTwoLocations(ref SteamNetworkPingLocation_t location1, ref SteamNetworkPingLocation_t location2) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingUtils_EstimatePingTimeBetweenTwoLocations(CSteamAPIContext.GetSteamNetworkingUtils(), ref location1, ref location2); + } + + public static int EstimatePingTimeFromLocalHost(ref SteamNetworkPingLocation_t remoteLocation) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingUtils_EstimatePingTimeFromLocalHost(CSteamAPIContext.GetSteamNetworkingUtils(), ref remoteLocation); + } + + public static void ConvertPingLocationToString(ref SteamNetworkPingLocation_t location, out string pszBuf, int cchBufSize) + { + InteropHelp.TestIfAvailableClient(); + IntPtr intPtr = Marshal.AllocHGlobal(cchBufSize); + NativeMethods.ISteamNetworkingUtils_ConvertPingLocationToString(CSteamAPIContext.GetSteamNetworkingUtils(), ref location, intPtr, cchBufSize); + pszBuf = InteropHelp.PtrToStringUTF8(intPtr); + Marshal.FreeHGlobal(intPtr); + } + + public static bool ParsePingLocationString(string pszString, out SteamNetworkPingLocation_t result) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pszString2 = new InteropHelp.UTF8StringHandle(pszString); + return NativeMethods.ISteamNetworkingUtils_ParsePingLocationString(CSteamAPIContext.GetSteamNetworkingUtils(), pszString2, out result); + } + + public static bool CheckPingDataUpToDate(float flMaxAgeSeconds) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingUtils_CheckPingDataUpToDate(CSteamAPIContext.GetSteamNetworkingUtils(), flMaxAgeSeconds); + } + + public static int GetPingToDataCenter(SteamNetworkingPOPID popID, out SteamNetworkingPOPID pViaRelayPoP) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingUtils_GetPingToDataCenter(CSteamAPIContext.GetSteamNetworkingUtils(), popID, out pViaRelayPoP); + } + + public static int GetDirectPingToPOP(SteamNetworkingPOPID popID) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingUtils_GetDirectPingToPOP(CSteamAPIContext.GetSteamNetworkingUtils(), popID); + } + + public static int GetPOPCount() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingUtils_GetPOPCount(CSteamAPIContext.GetSteamNetworkingUtils()); + } + + public static int GetPOPList(out SteamNetworkingPOPID list, int nListSz) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingUtils_GetPOPList(CSteamAPIContext.GetSteamNetworkingUtils(), out list, nListSz); + } + + public static SteamNetworkingMicroseconds GetLocalTimestamp() + { + InteropHelp.TestIfAvailableClient(); + return (SteamNetworkingMicroseconds)NativeMethods.ISteamNetworkingUtils_GetLocalTimestamp(CSteamAPIContext.GetSteamNetworkingUtils()); + } + + public static void SetDebugOutputFunction(ESteamNetworkingSocketsDebugOutputType eDetailLevel, FSteamNetworkingSocketsDebugOutput pfnFunc) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamNetworkingUtils_SetDebugOutputFunction(CSteamAPIContext.GetSteamNetworkingUtils(), eDetailLevel, pfnFunc); + } + + public static bool SetConfigValue(ESteamNetworkingConfigValue eValue, ESteamNetworkingConfigScope eScopeType, IntPtr scopeObj, ESteamNetworkingConfigDataType eDataType, IntPtr pArg) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingUtils_SetConfigValue(CSteamAPIContext.GetSteamNetworkingUtils(), eValue, eScopeType, scopeObj, eDataType, pArg); + } + + public static ESteamNetworkingGetConfigValueResult GetConfigValue(ESteamNetworkingConfigValue eValue, ESteamNetworkingConfigScope eScopeType, IntPtr scopeObj, out ESteamNetworkingConfigDataType pOutDataType, IntPtr pResult, out ulong cbResult) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingUtils_GetConfigValue(CSteamAPIContext.GetSteamNetworkingUtils(), eValue, eScopeType, scopeObj, out pOutDataType, pResult, out cbResult); + } + + public static bool GetConfigValueInfo(ESteamNetworkingConfigValue eValue, IntPtr pOutName, out ESteamNetworkingConfigDataType pOutDataType, out ESteamNetworkingConfigScope pOutScope, out ESteamNetworkingConfigValue pOutNextValue) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingUtils_GetConfigValueInfo(CSteamAPIContext.GetSteamNetworkingUtils(), eValue, pOutName, out pOutDataType, out pOutScope, out pOutNextValue); + } + + public static ESteamNetworkingConfigValue GetFirstConfigValue() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamNetworkingUtils_GetFirstConfigValue(CSteamAPIContext.GetSteamNetworkingUtils()); + } + + public static void SteamNetworkingIPAddr_ToString(ref SteamNetworkingIPAddr addr, out string buf, uint cbBuf, bool bWithPort) + { + InteropHelp.TestIfAvailableClient(); + IntPtr intPtr = Marshal.AllocHGlobal((int)cbBuf); + NativeMethods.ISteamNetworkingUtils_SteamNetworkingIPAddr_ToString(CSteamAPIContext.GetSteamNetworkingUtils(), ref addr, intPtr, cbBuf, bWithPort); + buf = InteropHelp.PtrToStringUTF8(intPtr); + Marshal.FreeHGlobal(intPtr); + } + + public static bool SteamNetworkingIPAddr_ParseString(out SteamNetworkingIPAddr pAddr, string pszStr) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pszStr2 = new InteropHelp.UTF8StringHandle(pszStr); + return NativeMethods.ISteamNetworkingUtils_SteamNetworkingIPAddr_ParseString(CSteamAPIContext.GetSteamNetworkingUtils(), out pAddr, pszStr2); + } + + public static void SteamNetworkingIdentity_ToString(ref SteamNetworkingIdentity identity, out string buf, uint cbBuf) + { + InteropHelp.TestIfAvailableClient(); + IntPtr intPtr = Marshal.AllocHGlobal((int)cbBuf); + NativeMethods.ISteamNetworkingUtils_SteamNetworkingIdentity_ToString(CSteamAPIContext.GetSteamNetworkingUtils(), ref identity, intPtr, cbBuf); + buf = InteropHelp.PtrToStringUTF8(intPtr); + Marshal.FreeHGlobal(intPtr); + } + + public static bool SteamNetworkingIdentity_ParseString(out SteamNetworkingIdentity pIdentity, string pszStr) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pszStr2 = new InteropHelp.UTF8StringHandle(pszStr); + return NativeMethods.ISteamNetworkingUtils_SteamNetworkingIdentity_ParseString(CSteamAPIContext.GetSteamNetworkingUtils(), out pIdentity, pszStr2); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamParamStringArray_t.cs b/Assembly_Firstpass/Steamworks/SteamParamStringArray_t.cs new file mode 100644 index 0000000..1c3b1e5 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamParamStringArray_t.cs @@ -0,0 +1,12 @@ +using System; +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +public struct SteamParamStringArray_t +{ + public IntPtr m_ppStrings; + + public int m_nNumStrings; +} diff --git a/Assembly_Firstpass/Steamworks/SteamParentalSettings.cs b/Assembly_Firstpass/Steamworks/SteamParentalSettings.cs new file mode 100644 index 0000000..e256211 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamParentalSettings.cs @@ -0,0 +1,40 @@ +namespace Steamworks; + +public static class SteamParentalSettings +{ + public static bool BIsParentalLockEnabled() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamParentalSettings_BIsParentalLockEnabled(CSteamAPIContext.GetSteamParentalSettings()); + } + + public static bool BIsParentalLockLocked() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamParentalSettings_BIsParentalLockLocked(CSteamAPIContext.GetSteamParentalSettings()); + } + + public static bool BIsAppBlocked(AppId_t nAppID) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamParentalSettings_BIsAppBlocked(CSteamAPIContext.GetSteamParentalSettings(), nAppID); + } + + public static bool BIsAppInBlockList(AppId_t nAppID) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamParentalSettings_BIsAppInBlockList(CSteamAPIContext.GetSteamParentalSettings(), nAppID); + } + + public static bool BIsFeatureBlocked(EParentalFeature eFeature) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamParentalSettings_BIsFeatureBlocked(CSteamAPIContext.GetSteamParentalSettings(), eFeature); + } + + public static bool BIsFeatureInBlockList(EParentalFeature eFeature) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamParentalSettings_BIsFeatureInBlockList(CSteamAPIContext.GetSteamParentalSettings(), eFeature); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamParentalSettingsChanged_t.cs b/Assembly_Firstpass/Steamworks/SteamParentalSettingsChanged_t.cs new file mode 100644 index 0000000..48e3c1c --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamParentalSettingsChanged_t.cs @@ -0,0 +1,10 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Size = 1)] +[CallbackIdentity(5001)] +public struct SteamParentalSettingsChanged_t +{ + public const int k_iCallback = 5001; +} diff --git a/Assembly_Firstpass/Steamworks/SteamParties.cs b/Assembly_Firstpass/Steamworks/SteamParties.cs new file mode 100644 index 0000000..13c16cf --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamParties.cs @@ -0,0 +1,89 @@ +using System; +using System.Runtime.InteropServices; + +namespace Steamworks; + +public static class SteamParties +{ + public static uint GetNumActiveBeacons() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamParties_GetNumActiveBeacons(CSteamAPIContext.GetSteamParties()); + } + + public static PartyBeaconID_t GetBeaconByIndex(uint unIndex) + { + InteropHelp.TestIfAvailableClient(); + return (PartyBeaconID_t)NativeMethods.ISteamParties_GetBeaconByIndex(CSteamAPIContext.GetSteamParties(), unIndex); + } + + public static bool GetBeaconDetails(PartyBeaconID_t ulBeaconID, out CSteamID pSteamIDBeaconOwner, out SteamPartyBeaconLocation_t pLocation, out string pchMetadata, int cchMetadata) + { + InteropHelp.TestIfAvailableClient(); + IntPtr intPtr = Marshal.AllocHGlobal(cchMetadata); + bool flag = NativeMethods.ISteamParties_GetBeaconDetails(CSteamAPIContext.GetSteamParties(), ulBeaconID, out pSteamIDBeaconOwner, out pLocation, intPtr, cchMetadata); + pchMetadata = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return flag; + } + + public static SteamAPICall_t JoinParty(PartyBeaconID_t ulBeaconID) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamParties_JoinParty(CSteamAPIContext.GetSteamParties(), ulBeaconID); + } + + public static bool GetNumAvailableBeaconLocations(out uint puNumLocations) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamParties_GetNumAvailableBeaconLocations(CSteamAPIContext.GetSteamParties(), out puNumLocations); + } + + public static bool GetAvailableBeaconLocations(SteamPartyBeaconLocation_t[] pLocationList, uint uMaxNumLocations) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamParties_GetAvailableBeaconLocations(CSteamAPIContext.GetSteamParties(), pLocationList, uMaxNumLocations); + } + + public static SteamAPICall_t CreateBeacon(uint unOpenSlots, ref SteamPartyBeaconLocation_t pBeaconLocation, string pchConnectString, string pchMetadata) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchConnectString2 = new InteropHelp.UTF8StringHandle(pchConnectString); + using InteropHelp.UTF8StringHandle pchMetadata2 = new InteropHelp.UTF8StringHandle(pchMetadata); + return (SteamAPICall_t)NativeMethods.ISteamParties_CreateBeacon(CSteamAPIContext.GetSteamParties(), unOpenSlots, ref pBeaconLocation, pchConnectString2, pchMetadata2); + } + + public static void OnReservationCompleted(PartyBeaconID_t ulBeacon, CSteamID steamIDUser) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamParties_OnReservationCompleted(CSteamAPIContext.GetSteamParties(), ulBeacon, steamIDUser); + } + + public static void CancelReservation(PartyBeaconID_t ulBeacon, CSteamID steamIDUser) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamParties_CancelReservation(CSteamAPIContext.GetSteamParties(), ulBeacon, steamIDUser); + } + + public static SteamAPICall_t ChangeNumOpenSlots(PartyBeaconID_t ulBeacon, uint unOpenSlots) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamParties_ChangeNumOpenSlots(CSteamAPIContext.GetSteamParties(), ulBeacon, unOpenSlots); + } + + public static bool DestroyBeacon(PartyBeaconID_t ulBeacon) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamParties_DestroyBeacon(CSteamAPIContext.GetSteamParties(), ulBeacon); + } + + public static bool GetBeaconLocationData(SteamPartyBeaconLocation_t BeaconLocation, ESteamPartyBeaconLocationData eData, out string pchDataStringOut, int cchDataStringOut) + { + InteropHelp.TestIfAvailableClient(); + IntPtr intPtr = Marshal.AllocHGlobal(cchDataStringOut); + bool flag = NativeMethods.ISteamParties_GetBeaconLocationData(CSteamAPIContext.GetSteamParties(), BeaconLocation, eData, intPtr, cchDataStringOut); + pchDataStringOut = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return flag; + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamPartyBeaconLocation_t.cs b/Assembly_Firstpass/Steamworks/SteamPartyBeaconLocation_t.cs new file mode 100644 index 0000000..7a8a157 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamPartyBeaconLocation_t.cs @@ -0,0 +1,11 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +public struct SteamPartyBeaconLocation_t +{ + public ESteamPartyBeaconLocationType m_eType; + + public ulong m_ulLocationID; +} diff --git a/Assembly_Firstpass/Steamworks/SteamRelayNetworkStatus_t.cs b/Assembly_Firstpass/Steamworks/SteamRelayNetworkStatus_t.cs new file mode 100644 index 0000000..316b0b6 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamRelayNetworkStatus_t.cs @@ -0,0 +1,32 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[CallbackIdentity(1281)] +public struct SteamRelayNetworkStatus_t +{ + public const int k_iCallback = 1281; + + public ESteamNetworkingAvailability m_eAvail; + + public int m_bPingMeasurementInProgress; + + public ESteamNetworkingAvailability m_eAvailNetworkConfig; + + public ESteamNetworkingAvailability m_eAvailAnyRelay; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] + private byte[] m_debugMsg_; + + public string m_debugMsg + { + get + { + return InteropHelp.ByteArrayToStringUTF8(m_debugMsg_); + } + set + { + InteropHelp.StringToByteArrayUTF8(value, m_debugMsg_, 256); + } + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamRemotePlay.cs b/Assembly_Firstpass/Steamworks/SteamRemotePlay.cs new file mode 100644 index 0000000..f39f24a --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamRemotePlay.cs @@ -0,0 +1,46 @@ +namespace Steamworks; + +public static class SteamRemotePlay +{ + public static uint GetSessionCount() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamRemotePlay_GetSessionCount(CSteamAPIContext.GetSteamRemotePlay()); + } + + public static RemotePlaySessionID_t GetSessionID(int iSessionIndex) + { + InteropHelp.TestIfAvailableClient(); + return (RemotePlaySessionID_t)NativeMethods.ISteamRemotePlay_GetSessionID(CSteamAPIContext.GetSteamRemotePlay(), iSessionIndex); + } + + public static CSteamID GetSessionSteamID(RemotePlaySessionID_t unSessionID) + { + InteropHelp.TestIfAvailableClient(); + return (CSteamID)NativeMethods.ISteamRemotePlay_GetSessionSteamID(CSteamAPIContext.GetSteamRemotePlay(), unSessionID); + } + + public static string GetSessionClientName(RemotePlaySessionID_t unSessionID) + { + InteropHelp.TestIfAvailableClient(); + return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamRemotePlay_GetSessionClientName(CSteamAPIContext.GetSteamRemotePlay(), unSessionID)); + } + + public static ESteamDeviceFormFactor GetSessionClientFormFactor(RemotePlaySessionID_t unSessionID) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamRemotePlay_GetSessionClientFormFactor(CSteamAPIContext.GetSteamRemotePlay(), unSessionID); + } + + public static bool BGetSessionClientResolution(RemotePlaySessionID_t unSessionID, out int pnResolutionX, out int pnResolutionY) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamRemotePlay_BGetSessionClientResolution(CSteamAPIContext.GetSteamRemotePlay(), unSessionID, out pnResolutionX, out pnResolutionY); + } + + public static bool BSendRemotePlayTogetherInvite(CSteamID steamIDFriend) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamRemotePlay_BSendRemotePlayTogetherInvite(CSteamAPIContext.GetSteamRemotePlay(), steamIDFriend); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamRemotePlaySessionConnected_t.cs b/Assembly_Firstpass/Steamworks/SteamRemotePlaySessionConnected_t.cs new file mode 100644 index 0000000..6514e8d --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamRemotePlaySessionConnected_t.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(5701)] +public struct SteamRemotePlaySessionConnected_t +{ + public const int k_iCallback = 5701; + + public RemotePlaySessionID_t m_unSessionID; +} diff --git a/Assembly_Firstpass/Steamworks/SteamRemotePlaySessionDisconnected_t.cs b/Assembly_Firstpass/Steamworks/SteamRemotePlaySessionDisconnected_t.cs new file mode 100644 index 0000000..c01cc29 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamRemotePlaySessionDisconnected_t.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(5702)] +public struct SteamRemotePlaySessionDisconnected_t +{ + public const int k_iCallback = 5702; + + public RemotePlaySessionID_t m_unSessionID; +} diff --git a/Assembly_Firstpass/Steamworks/SteamRemoteStorage.cs b/Assembly_Firstpass/Steamworks/SteamRemoteStorage.cs new file mode 100644 index 0000000..61b0750 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamRemoteStorage.cs @@ -0,0 +1,369 @@ +using System; +using System.Collections.Generic; + +namespace Steamworks; + +public static class SteamRemoteStorage +{ + public static bool FileWrite(string pchFile, byte[] pvData, int cubData) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchFile2 = new InteropHelp.UTF8StringHandle(pchFile); + return NativeMethods.ISteamRemoteStorage_FileWrite(CSteamAPIContext.GetSteamRemoteStorage(), pchFile2, pvData, cubData); + } + + public static int FileRead(string pchFile, byte[] pvData, int cubDataToRead) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchFile2 = new InteropHelp.UTF8StringHandle(pchFile); + return NativeMethods.ISteamRemoteStorage_FileRead(CSteamAPIContext.GetSteamRemoteStorage(), pchFile2, pvData, cubDataToRead); + } + + public static SteamAPICall_t FileWriteAsync(string pchFile, byte[] pvData, uint cubData) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchFile2 = new InteropHelp.UTF8StringHandle(pchFile); + return (SteamAPICall_t)NativeMethods.ISteamRemoteStorage_FileWriteAsync(CSteamAPIContext.GetSteamRemoteStorage(), pchFile2, pvData, cubData); + } + + public static SteamAPICall_t FileReadAsync(string pchFile, uint nOffset, uint cubToRead) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchFile2 = new InteropHelp.UTF8StringHandle(pchFile); + return (SteamAPICall_t)NativeMethods.ISteamRemoteStorage_FileReadAsync(CSteamAPIContext.GetSteamRemoteStorage(), pchFile2, nOffset, cubToRead); + } + + public static bool FileReadAsyncComplete(SteamAPICall_t hReadCall, byte[] pvBuffer, uint cubToRead) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamRemoteStorage_FileReadAsyncComplete(CSteamAPIContext.GetSteamRemoteStorage(), hReadCall, pvBuffer, cubToRead); + } + + public static bool FileForget(string pchFile) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchFile2 = new InteropHelp.UTF8StringHandle(pchFile); + return NativeMethods.ISteamRemoteStorage_FileForget(CSteamAPIContext.GetSteamRemoteStorage(), pchFile2); + } + + public static bool FileDelete(string pchFile) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchFile2 = new InteropHelp.UTF8StringHandle(pchFile); + return NativeMethods.ISteamRemoteStorage_FileDelete(CSteamAPIContext.GetSteamRemoteStorage(), pchFile2); + } + + public static SteamAPICall_t FileShare(string pchFile) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchFile2 = new InteropHelp.UTF8StringHandle(pchFile); + return (SteamAPICall_t)NativeMethods.ISteamRemoteStorage_FileShare(CSteamAPIContext.GetSteamRemoteStorage(), pchFile2); + } + + public static bool SetSyncPlatforms(string pchFile, ERemoteStoragePlatform eRemoteStoragePlatform) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchFile2 = new InteropHelp.UTF8StringHandle(pchFile); + return NativeMethods.ISteamRemoteStorage_SetSyncPlatforms(CSteamAPIContext.GetSteamRemoteStorage(), pchFile2, eRemoteStoragePlatform); + } + + public static UGCFileWriteStreamHandle_t FileWriteStreamOpen(string pchFile) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchFile2 = new InteropHelp.UTF8StringHandle(pchFile); + return (UGCFileWriteStreamHandle_t)NativeMethods.ISteamRemoteStorage_FileWriteStreamOpen(CSteamAPIContext.GetSteamRemoteStorage(), pchFile2); + } + + public static bool FileWriteStreamWriteChunk(UGCFileWriteStreamHandle_t writeHandle, byte[] pvData, int cubData) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamRemoteStorage_FileWriteStreamWriteChunk(CSteamAPIContext.GetSteamRemoteStorage(), writeHandle, pvData, cubData); + } + + public static bool FileWriteStreamClose(UGCFileWriteStreamHandle_t writeHandle) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamRemoteStorage_FileWriteStreamClose(CSteamAPIContext.GetSteamRemoteStorage(), writeHandle); + } + + public static bool FileWriteStreamCancel(UGCFileWriteStreamHandle_t writeHandle) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamRemoteStorage_FileWriteStreamCancel(CSteamAPIContext.GetSteamRemoteStorage(), writeHandle); + } + + public static bool FileExists(string pchFile) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchFile2 = new InteropHelp.UTF8StringHandle(pchFile); + return NativeMethods.ISteamRemoteStorage_FileExists(CSteamAPIContext.GetSteamRemoteStorage(), pchFile2); + } + + public static bool FilePersisted(string pchFile) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchFile2 = new InteropHelp.UTF8StringHandle(pchFile); + return NativeMethods.ISteamRemoteStorage_FilePersisted(CSteamAPIContext.GetSteamRemoteStorage(), pchFile2); + } + + public static int GetFileSize(string pchFile) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchFile2 = new InteropHelp.UTF8StringHandle(pchFile); + return NativeMethods.ISteamRemoteStorage_GetFileSize(CSteamAPIContext.GetSteamRemoteStorage(), pchFile2); + } + + public static long GetFileTimestamp(string pchFile) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchFile2 = new InteropHelp.UTF8StringHandle(pchFile); + return NativeMethods.ISteamRemoteStorage_GetFileTimestamp(CSteamAPIContext.GetSteamRemoteStorage(), pchFile2); + } + + public static ERemoteStoragePlatform GetSyncPlatforms(string pchFile) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchFile2 = new InteropHelp.UTF8StringHandle(pchFile); + return NativeMethods.ISteamRemoteStorage_GetSyncPlatforms(CSteamAPIContext.GetSteamRemoteStorage(), pchFile2); + } + + public static int GetFileCount() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamRemoteStorage_GetFileCount(CSteamAPIContext.GetSteamRemoteStorage()); + } + + public static string GetFileNameAndSize(int iFile, out int pnFileSizeInBytes) + { + InteropHelp.TestIfAvailableClient(); + return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamRemoteStorage_GetFileNameAndSize(CSteamAPIContext.GetSteamRemoteStorage(), iFile, out pnFileSizeInBytes)); + } + + public static bool GetQuota(out ulong pnTotalBytes, out ulong puAvailableBytes) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamRemoteStorage_GetQuota(CSteamAPIContext.GetSteamRemoteStorage(), out pnTotalBytes, out puAvailableBytes); + } + + public static bool IsCloudEnabledForAccount() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamRemoteStorage_IsCloudEnabledForAccount(CSteamAPIContext.GetSteamRemoteStorage()); + } + + public static bool IsCloudEnabledForApp() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamRemoteStorage_IsCloudEnabledForApp(CSteamAPIContext.GetSteamRemoteStorage()); + } + + public static void SetCloudEnabledForApp(bool bEnabled) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamRemoteStorage_SetCloudEnabledForApp(CSteamAPIContext.GetSteamRemoteStorage(), bEnabled); + } + + public static SteamAPICall_t UGCDownload(UGCHandle_t hContent, uint unPriority) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamRemoteStorage_UGCDownload(CSteamAPIContext.GetSteamRemoteStorage(), hContent, unPriority); + } + + public static bool GetUGCDownloadProgress(UGCHandle_t hContent, out int pnBytesDownloaded, out int pnBytesExpected) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamRemoteStorage_GetUGCDownloadProgress(CSteamAPIContext.GetSteamRemoteStorage(), hContent, out pnBytesDownloaded, out pnBytesExpected); + } + + public static bool GetUGCDetails(UGCHandle_t hContent, out AppId_t pnAppID, out string ppchName, out int pnFileSizeInBytes, out CSteamID pSteamIDOwner) + { + InteropHelp.TestIfAvailableClient(); + IntPtr ppchName2; + bool flag = NativeMethods.ISteamRemoteStorage_GetUGCDetails(CSteamAPIContext.GetSteamRemoteStorage(), hContent, out pnAppID, out ppchName2, out pnFileSizeInBytes, out pSteamIDOwner); + ppchName = (flag ? InteropHelp.PtrToStringUTF8(ppchName2) : null); + return flag; + } + + public static int UGCRead(UGCHandle_t hContent, byte[] pvData, int cubDataToRead, uint cOffset, EUGCReadAction eAction) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamRemoteStorage_UGCRead(CSteamAPIContext.GetSteamRemoteStorage(), hContent, pvData, cubDataToRead, cOffset, eAction); + } + + public static int GetCachedUGCCount() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamRemoteStorage_GetCachedUGCCount(CSteamAPIContext.GetSteamRemoteStorage()); + } + + public static UGCHandle_t GetCachedUGCHandle(int iCachedContent) + { + InteropHelp.TestIfAvailableClient(); + return (UGCHandle_t)NativeMethods.ISteamRemoteStorage_GetCachedUGCHandle(CSteamAPIContext.GetSteamRemoteStorage(), iCachedContent); + } + + public static SteamAPICall_t PublishWorkshopFile(string pchFile, string pchPreviewFile, AppId_t nConsumerAppId, string pchTitle, string pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, IList<string> pTags, EWorkshopFileType eWorkshopFileType) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchFile2 = new InteropHelp.UTF8StringHandle(pchFile); + using InteropHelp.UTF8StringHandle pchPreviewFile2 = new InteropHelp.UTF8StringHandle(pchPreviewFile); + using InteropHelp.UTF8StringHandle pchTitle2 = new InteropHelp.UTF8StringHandle(pchTitle); + using InteropHelp.UTF8StringHandle pchDescription2 = new InteropHelp.UTF8StringHandle(pchDescription); + return (SteamAPICall_t)NativeMethods.ISteamRemoteStorage_PublishWorkshopFile(CSteamAPIContext.GetSteamRemoteStorage(), pchFile2, pchPreviewFile2, nConsumerAppId, pchTitle2, pchDescription2, eVisibility, new InteropHelp.SteamParamStringArray(pTags), eWorkshopFileType); + } + + public static PublishedFileUpdateHandle_t CreatePublishedFileUpdateRequest(PublishedFileId_t unPublishedFileId) + { + InteropHelp.TestIfAvailableClient(); + return (PublishedFileUpdateHandle_t)NativeMethods.ISteamRemoteStorage_CreatePublishedFileUpdateRequest(CSteamAPIContext.GetSteamRemoteStorage(), unPublishedFileId); + } + + public static bool UpdatePublishedFileFile(PublishedFileUpdateHandle_t updateHandle, string pchFile) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchFile2 = new InteropHelp.UTF8StringHandle(pchFile); + return NativeMethods.ISteamRemoteStorage_UpdatePublishedFileFile(CSteamAPIContext.GetSteamRemoteStorage(), updateHandle, pchFile2); + } + + public static bool UpdatePublishedFilePreviewFile(PublishedFileUpdateHandle_t updateHandle, string pchPreviewFile) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchPreviewFile2 = new InteropHelp.UTF8StringHandle(pchPreviewFile); + return NativeMethods.ISteamRemoteStorage_UpdatePublishedFilePreviewFile(CSteamAPIContext.GetSteamRemoteStorage(), updateHandle, pchPreviewFile2); + } + + public static bool UpdatePublishedFileTitle(PublishedFileUpdateHandle_t updateHandle, string pchTitle) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchTitle2 = new InteropHelp.UTF8StringHandle(pchTitle); + return NativeMethods.ISteamRemoteStorage_UpdatePublishedFileTitle(CSteamAPIContext.GetSteamRemoteStorage(), updateHandle, pchTitle2); + } + + public static bool UpdatePublishedFileDescription(PublishedFileUpdateHandle_t updateHandle, string pchDescription) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchDescription2 = new InteropHelp.UTF8StringHandle(pchDescription); + return NativeMethods.ISteamRemoteStorage_UpdatePublishedFileDescription(CSteamAPIContext.GetSteamRemoteStorage(), updateHandle, pchDescription2); + } + + public static bool UpdatePublishedFileVisibility(PublishedFileUpdateHandle_t updateHandle, ERemoteStoragePublishedFileVisibility eVisibility) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamRemoteStorage_UpdatePublishedFileVisibility(CSteamAPIContext.GetSteamRemoteStorage(), updateHandle, eVisibility); + } + + public static bool UpdatePublishedFileTags(PublishedFileUpdateHandle_t updateHandle, IList<string> pTags) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamRemoteStorage_UpdatePublishedFileTags(CSteamAPIContext.GetSteamRemoteStorage(), updateHandle, new InteropHelp.SteamParamStringArray(pTags)); + } + + public static SteamAPICall_t CommitPublishedFileUpdate(PublishedFileUpdateHandle_t updateHandle) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamRemoteStorage_CommitPublishedFileUpdate(CSteamAPIContext.GetSteamRemoteStorage(), updateHandle); + } + + public static SteamAPICall_t GetPublishedFileDetails(PublishedFileId_t unPublishedFileId, uint unMaxSecondsOld) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamRemoteStorage_GetPublishedFileDetails(CSteamAPIContext.GetSteamRemoteStorage(), unPublishedFileId, unMaxSecondsOld); + } + + public static SteamAPICall_t DeletePublishedFile(PublishedFileId_t unPublishedFileId) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamRemoteStorage_DeletePublishedFile(CSteamAPIContext.GetSteamRemoteStorage(), unPublishedFileId); + } + + public static SteamAPICall_t EnumerateUserPublishedFiles(uint unStartIndex) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamRemoteStorage_EnumerateUserPublishedFiles(CSteamAPIContext.GetSteamRemoteStorage(), unStartIndex); + } + + public static SteamAPICall_t SubscribePublishedFile(PublishedFileId_t unPublishedFileId) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamRemoteStorage_SubscribePublishedFile(CSteamAPIContext.GetSteamRemoteStorage(), unPublishedFileId); + } + + public static SteamAPICall_t EnumerateUserSubscribedFiles(uint unStartIndex) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamRemoteStorage_EnumerateUserSubscribedFiles(CSteamAPIContext.GetSteamRemoteStorage(), unStartIndex); + } + + public static SteamAPICall_t UnsubscribePublishedFile(PublishedFileId_t unPublishedFileId) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamRemoteStorage_UnsubscribePublishedFile(CSteamAPIContext.GetSteamRemoteStorage(), unPublishedFileId); + } + + public static bool UpdatePublishedFileSetChangeDescription(PublishedFileUpdateHandle_t updateHandle, string pchChangeDescription) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchChangeDescription2 = new InteropHelp.UTF8StringHandle(pchChangeDescription); + return NativeMethods.ISteamRemoteStorage_UpdatePublishedFileSetChangeDescription(CSteamAPIContext.GetSteamRemoteStorage(), updateHandle, pchChangeDescription2); + } + + public static SteamAPICall_t GetPublishedItemVoteDetails(PublishedFileId_t unPublishedFileId) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamRemoteStorage_GetPublishedItemVoteDetails(CSteamAPIContext.GetSteamRemoteStorage(), unPublishedFileId); + } + + public static SteamAPICall_t UpdateUserPublishedItemVote(PublishedFileId_t unPublishedFileId, bool bVoteUp) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamRemoteStorage_UpdateUserPublishedItemVote(CSteamAPIContext.GetSteamRemoteStorage(), unPublishedFileId, bVoteUp); + } + + public static SteamAPICall_t GetUserPublishedItemVoteDetails(PublishedFileId_t unPublishedFileId) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamRemoteStorage_GetUserPublishedItemVoteDetails(CSteamAPIContext.GetSteamRemoteStorage(), unPublishedFileId); + } + + public static SteamAPICall_t EnumerateUserSharedWorkshopFiles(CSteamID steamId, uint unStartIndex, IList<string> pRequiredTags, IList<string> pExcludedTags) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamRemoteStorage_EnumerateUserSharedWorkshopFiles(CSteamAPIContext.GetSteamRemoteStorage(), steamId, unStartIndex, new InteropHelp.SteamParamStringArray(pRequiredTags), new InteropHelp.SteamParamStringArray(pExcludedTags)); + } + + public static SteamAPICall_t PublishVideo(EWorkshopVideoProvider eVideoProvider, string pchVideoAccount, string pchVideoIdentifier, string pchPreviewFile, AppId_t nConsumerAppId, string pchTitle, string pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, IList<string> pTags) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchVideoAccount2 = new InteropHelp.UTF8StringHandle(pchVideoAccount); + using InteropHelp.UTF8StringHandle pchVideoIdentifier2 = new InteropHelp.UTF8StringHandle(pchVideoIdentifier); + using InteropHelp.UTF8StringHandle pchPreviewFile2 = new InteropHelp.UTF8StringHandle(pchPreviewFile); + using InteropHelp.UTF8StringHandle pchTitle2 = new InteropHelp.UTF8StringHandle(pchTitle); + using InteropHelp.UTF8StringHandle pchDescription2 = new InteropHelp.UTF8StringHandle(pchDescription); + return (SteamAPICall_t)NativeMethods.ISteamRemoteStorage_PublishVideo(CSteamAPIContext.GetSteamRemoteStorage(), eVideoProvider, pchVideoAccount2, pchVideoIdentifier2, pchPreviewFile2, nConsumerAppId, pchTitle2, pchDescription2, eVisibility, new InteropHelp.SteamParamStringArray(pTags)); + } + + public static SteamAPICall_t SetUserPublishedFileAction(PublishedFileId_t unPublishedFileId, EWorkshopFileAction eAction) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamRemoteStorage_SetUserPublishedFileAction(CSteamAPIContext.GetSteamRemoteStorage(), unPublishedFileId, eAction); + } + + public static SteamAPICall_t EnumeratePublishedFilesByUserAction(EWorkshopFileAction eAction, uint unStartIndex) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamRemoteStorage_EnumeratePublishedFilesByUserAction(CSteamAPIContext.GetSteamRemoteStorage(), eAction, unStartIndex); + } + + public static SteamAPICall_t EnumeratePublishedWorkshopFiles(EWorkshopEnumerationType eEnumerationType, uint unStartIndex, uint unCount, uint unDays, IList<string> pTags, IList<string> pUserTags) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamRemoteStorage_EnumeratePublishedWorkshopFiles(CSteamAPIContext.GetSteamRemoteStorage(), eEnumerationType, unStartIndex, unCount, unDays, new InteropHelp.SteamParamStringArray(pTags), new InteropHelp.SteamParamStringArray(pUserTags)); + } + + public static SteamAPICall_t UGCDownloadToLocation(UGCHandle_t hContent, string pchLocation, uint unPriority) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchLocation2 = new InteropHelp.UTF8StringHandle(pchLocation); + return (SteamAPICall_t)NativeMethods.ISteamRemoteStorage_UGCDownloadToLocation(CSteamAPIContext.GetSteamRemoteStorage(), hContent, pchLocation2, unPriority); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamScreenshots.cs b/Assembly_Firstpass/Steamworks/SteamScreenshots.cs new file mode 100644 index 0000000..6b908d0 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamScreenshots.cs @@ -0,0 +1,63 @@ +namespace Steamworks; + +public static class SteamScreenshots +{ + public static ScreenshotHandle WriteScreenshot(byte[] pubRGB, uint cubRGB, int nWidth, int nHeight) + { + InteropHelp.TestIfAvailableClient(); + return (ScreenshotHandle)NativeMethods.ISteamScreenshots_WriteScreenshot(CSteamAPIContext.GetSteamScreenshots(), pubRGB, cubRGB, nWidth, nHeight); + } + + public static ScreenshotHandle AddScreenshotToLibrary(string pchFilename, string pchThumbnailFilename, int nWidth, int nHeight) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchFilename2 = new InteropHelp.UTF8StringHandle(pchFilename); + using InteropHelp.UTF8StringHandle pchThumbnailFilename2 = new InteropHelp.UTF8StringHandle(pchThumbnailFilename); + return (ScreenshotHandle)NativeMethods.ISteamScreenshots_AddScreenshotToLibrary(CSteamAPIContext.GetSteamScreenshots(), pchFilename2, pchThumbnailFilename2, nWidth, nHeight); + } + + public static void TriggerScreenshot() + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamScreenshots_TriggerScreenshot(CSteamAPIContext.GetSteamScreenshots()); + } + + public static void HookScreenshots(bool bHook) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamScreenshots_HookScreenshots(CSteamAPIContext.GetSteamScreenshots(), bHook); + } + + public static bool SetLocation(ScreenshotHandle hScreenshot, string pchLocation) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchLocation2 = new InteropHelp.UTF8StringHandle(pchLocation); + return NativeMethods.ISteamScreenshots_SetLocation(CSteamAPIContext.GetSteamScreenshots(), hScreenshot, pchLocation2); + } + + public static bool TagUser(ScreenshotHandle hScreenshot, CSteamID steamID) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamScreenshots_TagUser(CSteamAPIContext.GetSteamScreenshots(), hScreenshot, steamID); + } + + public static bool TagPublishedFile(ScreenshotHandle hScreenshot, PublishedFileId_t unPublishedFileID) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamScreenshots_TagPublishedFile(CSteamAPIContext.GetSteamScreenshots(), hScreenshot, unPublishedFileID); + } + + public static bool IsScreenshotsHooked() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamScreenshots_IsScreenshotsHooked(CSteamAPIContext.GetSteamScreenshots()); + } + + public static ScreenshotHandle AddVRScreenshotToLibrary(EVRScreenshotType eType, string pchFilename, string pchVRFilename) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchFilename2 = new InteropHelp.UTF8StringHandle(pchFilename); + using InteropHelp.UTF8StringHandle pchVRFilename2 = new InteropHelp.UTF8StringHandle(pchVRFilename); + return (ScreenshotHandle)NativeMethods.ISteamScreenshots_AddVRScreenshotToLibrary(CSteamAPIContext.GetSteamScreenshots(), eType, pchFilename2, pchVRFilename2); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamServerConnectFailure_t.cs b/Assembly_Firstpass/Steamworks/SteamServerConnectFailure_t.cs new file mode 100644 index 0000000..e5324d0 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamServerConnectFailure_t.cs @@ -0,0 +1,15 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(102)] +public struct SteamServerConnectFailure_t +{ + public const int k_iCallback = 102; + + public EResult m_eResult; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bStillRetrying; +} diff --git a/Assembly_Firstpass/Steamworks/SteamServersConnected_t.cs b/Assembly_Firstpass/Steamworks/SteamServersConnected_t.cs new file mode 100644 index 0000000..4cb9a78 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamServersConnected_t.cs @@ -0,0 +1,10 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8, Size = 1)] +[CallbackIdentity(101)] +public struct SteamServersConnected_t +{ + public const int k_iCallback = 101; +} diff --git a/Assembly_Firstpass/Steamworks/SteamServersDisconnected_t.cs b/Assembly_Firstpass/Steamworks/SteamServersDisconnected_t.cs new file mode 100644 index 0000000..932c3fb --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamServersDisconnected_t.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(103)] +public struct SteamServersDisconnected_t +{ + public const int k_iCallback = 103; + + public EResult m_eResult; +} diff --git a/Assembly_Firstpass/Steamworks/SteamShutdown_t.cs b/Assembly_Firstpass/Steamworks/SteamShutdown_t.cs new file mode 100644 index 0000000..ce834b0 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamShutdown_t.cs @@ -0,0 +1,10 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8, Size = 1)] +[CallbackIdentity(704)] +public struct SteamShutdown_t +{ + public const int k_iCallback = 704; +} diff --git a/Assembly_Firstpass/Steamworks/SteamUGC.cs b/Assembly_Firstpass/Steamworks/SteamUGC.cs new file mode 100644 index 0000000..ad858a6 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamUGC.cs @@ -0,0 +1,562 @@ +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; + +namespace Steamworks; + +public static class SteamUGC +{ + public static UGCQueryHandle_t CreateQueryUserUGCRequest(AccountID_t unAccountID, EUserUGCList eListType, EUGCMatchingUGCType eMatchingUGCType, EUserUGCListSortOrder eSortOrder, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint unPage) + { + InteropHelp.TestIfAvailableClient(); + return (UGCQueryHandle_t)NativeMethods.ISteamUGC_CreateQueryUserUGCRequest(CSteamAPIContext.GetSteamUGC(), unAccountID, eListType, eMatchingUGCType, eSortOrder, nCreatorAppID, nConsumerAppID, unPage); + } + + public static UGCQueryHandle_t CreateQueryAllUGCRequest(EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, uint unPage) + { + InteropHelp.TestIfAvailableClient(); + return (UGCQueryHandle_t)NativeMethods.ISteamUGC_CreateQueryAllUGCRequestPage(CSteamAPIContext.GetSteamUGC(), eQueryType, eMatchingeMatchingUGCTypeFileType, nCreatorAppID, nConsumerAppID, unPage); + } + + public static UGCQueryHandle_t CreateQueryAllUGCRequest(EUGCQuery eQueryType, EUGCMatchingUGCType eMatchingeMatchingUGCTypeFileType, AppId_t nCreatorAppID, AppId_t nConsumerAppID, string pchCursor = null) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchCursor2 = new InteropHelp.UTF8StringHandle(pchCursor); + return (UGCQueryHandle_t)NativeMethods.ISteamUGC_CreateQueryAllUGCRequestCursor(CSteamAPIContext.GetSteamUGC(), eQueryType, eMatchingeMatchingUGCTypeFileType, nCreatorAppID, nConsumerAppID, pchCursor2); + } + + public static UGCQueryHandle_t CreateQueryUGCDetailsRequest(PublishedFileId_t[] pvecPublishedFileID, uint unNumPublishedFileIDs) + { + InteropHelp.TestIfAvailableClient(); + return (UGCQueryHandle_t)NativeMethods.ISteamUGC_CreateQueryUGCDetailsRequest(CSteamAPIContext.GetSteamUGC(), pvecPublishedFileID, unNumPublishedFileIDs); + } + + public static SteamAPICall_t SendQueryUGCRequest(UGCQueryHandle_t handle) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamUGC_SendQueryUGCRequest(CSteamAPIContext.GetSteamUGC(), handle); + } + + public static bool GetQueryUGCResult(UGCQueryHandle_t handle, uint index, out SteamUGCDetails_t pDetails) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUGC_GetQueryUGCResult(CSteamAPIContext.GetSteamUGC(), handle, index, out pDetails); + } + + public static uint GetQueryUGCNumTags(UGCQueryHandle_t handle, uint index) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUGC_GetQueryUGCNumTags(CSteamAPIContext.GetSteamUGC(), handle, index); + } + + public static bool GetQueryUGCTag(UGCQueryHandle_t handle, uint index, uint indexTag, out string pchValue, uint cchValueSize) + { + InteropHelp.TestIfAvailableClient(); + IntPtr intPtr = Marshal.AllocHGlobal((int)cchValueSize); + bool flag = NativeMethods.ISteamUGC_GetQueryUGCTag(CSteamAPIContext.GetSteamUGC(), handle, index, indexTag, intPtr, cchValueSize); + pchValue = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return flag; + } + + public static bool GetQueryUGCTagDisplayName(UGCQueryHandle_t handle, uint index, uint indexTag, out string pchValue, uint cchValueSize) + { + InteropHelp.TestIfAvailableClient(); + IntPtr intPtr = Marshal.AllocHGlobal((int)cchValueSize); + bool flag = NativeMethods.ISteamUGC_GetQueryUGCTagDisplayName(CSteamAPIContext.GetSteamUGC(), handle, index, indexTag, intPtr, cchValueSize); + pchValue = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return flag; + } + + public static bool GetQueryUGCPreviewURL(UGCQueryHandle_t handle, uint index, out string pchURL, uint cchURLSize) + { + InteropHelp.TestIfAvailableClient(); + IntPtr intPtr = Marshal.AllocHGlobal((int)cchURLSize); + bool flag = NativeMethods.ISteamUGC_GetQueryUGCPreviewURL(CSteamAPIContext.GetSteamUGC(), handle, index, intPtr, cchURLSize); + pchURL = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return flag; + } + + public static bool GetQueryUGCMetadata(UGCQueryHandle_t handle, uint index, out string pchMetadata, uint cchMetadatasize) + { + InteropHelp.TestIfAvailableClient(); + IntPtr intPtr = Marshal.AllocHGlobal((int)cchMetadatasize); + bool flag = NativeMethods.ISteamUGC_GetQueryUGCMetadata(CSteamAPIContext.GetSteamUGC(), handle, index, intPtr, cchMetadatasize); + pchMetadata = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return flag; + } + + public static bool GetQueryUGCChildren(UGCQueryHandle_t handle, uint index, PublishedFileId_t[] pvecPublishedFileID, uint cMaxEntries) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUGC_GetQueryUGCChildren(CSteamAPIContext.GetSteamUGC(), handle, index, pvecPublishedFileID, cMaxEntries); + } + + public static bool GetQueryUGCStatistic(UGCQueryHandle_t handle, uint index, EItemStatistic eStatType, out ulong pStatValue) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUGC_GetQueryUGCStatistic(CSteamAPIContext.GetSteamUGC(), handle, index, eStatType, out pStatValue); + } + + public static uint GetQueryUGCNumAdditionalPreviews(UGCQueryHandle_t handle, uint index) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUGC_GetQueryUGCNumAdditionalPreviews(CSteamAPIContext.GetSteamUGC(), handle, index); + } + + public static bool GetQueryUGCAdditionalPreview(UGCQueryHandle_t handle, uint index, uint previewIndex, out string pchURLOrVideoID, uint cchURLSize, out string pchOriginalFileName, uint cchOriginalFileNameSize, out EItemPreviewType pPreviewType) + { + InteropHelp.TestIfAvailableClient(); + IntPtr intPtr = Marshal.AllocHGlobal((int)cchURLSize); + IntPtr intPtr2 = Marshal.AllocHGlobal((int)cchOriginalFileNameSize); + bool flag = NativeMethods.ISteamUGC_GetQueryUGCAdditionalPreview(CSteamAPIContext.GetSteamUGC(), handle, index, previewIndex, intPtr, cchURLSize, intPtr2, cchOriginalFileNameSize, out pPreviewType); + pchURLOrVideoID = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + pchOriginalFileName = (flag ? InteropHelp.PtrToStringUTF8(intPtr2) : null); + Marshal.FreeHGlobal(intPtr2); + return flag; + } + + public static uint GetQueryUGCNumKeyValueTags(UGCQueryHandle_t handle, uint index) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUGC_GetQueryUGCNumKeyValueTags(CSteamAPIContext.GetSteamUGC(), handle, index); + } + + public static bool GetQueryUGCKeyValueTag(UGCQueryHandle_t handle, uint index, uint keyValueTagIndex, out string pchKey, uint cchKeySize, out string pchValue, uint cchValueSize) + { + InteropHelp.TestIfAvailableClient(); + IntPtr intPtr = Marshal.AllocHGlobal((int)cchKeySize); + IntPtr intPtr2 = Marshal.AllocHGlobal((int)cchValueSize); + bool flag = NativeMethods.ISteamUGC_GetQueryUGCKeyValueTag(CSteamAPIContext.GetSteamUGC(), handle, index, keyValueTagIndex, intPtr, cchKeySize, intPtr2, cchValueSize); + pchKey = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + pchValue = (flag ? InteropHelp.PtrToStringUTF8(intPtr2) : null); + Marshal.FreeHGlobal(intPtr2); + return flag; + } + + public static bool GetQueryUGCKeyValueTag(UGCQueryHandle_t handle, uint index, string pchKey, out string pchValue, uint cchValueSize) + { + InteropHelp.TestIfAvailableClient(); + IntPtr intPtr = Marshal.AllocHGlobal((int)cchValueSize); + using InteropHelp.UTF8StringHandle pchKey2 = new InteropHelp.UTF8StringHandle(pchKey); + bool flag = NativeMethods.ISteamUGC_GetQueryFirstUGCKeyValueTag(CSteamAPIContext.GetSteamUGC(), handle, index, pchKey2, intPtr, cchValueSize); + pchValue = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return flag; + } + + public static bool ReleaseQueryUGCRequest(UGCQueryHandle_t handle) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUGC_ReleaseQueryUGCRequest(CSteamAPIContext.GetSteamUGC(), handle); + } + + public static bool AddRequiredTag(UGCQueryHandle_t handle, string pTagName) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pTagName2 = new InteropHelp.UTF8StringHandle(pTagName); + return NativeMethods.ISteamUGC_AddRequiredTag(CSteamAPIContext.GetSteamUGC(), handle, pTagName2); + } + + public static bool AddRequiredTagGroup(UGCQueryHandle_t handle, IList<string> pTagGroups) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUGC_AddRequiredTagGroup(CSteamAPIContext.GetSteamUGC(), handle, new InteropHelp.SteamParamStringArray(pTagGroups)); + } + + public static bool AddExcludedTag(UGCQueryHandle_t handle, string pTagName) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pTagName2 = new InteropHelp.UTF8StringHandle(pTagName); + return NativeMethods.ISteamUGC_AddExcludedTag(CSteamAPIContext.GetSteamUGC(), handle, pTagName2); + } + + public static bool SetReturnOnlyIDs(UGCQueryHandle_t handle, bool bReturnOnlyIDs) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUGC_SetReturnOnlyIDs(CSteamAPIContext.GetSteamUGC(), handle, bReturnOnlyIDs); + } + + public static bool SetReturnKeyValueTags(UGCQueryHandle_t handle, bool bReturnKeyValueTags) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUGC_SetReturnKeyValueTags(CSteamAPIContext.GetSteamUGC(), handle, bReturnKeyValueTags); + } + + public static bool SetReturnLongDescription(UGCQueryHandle_t handle, bool bReturnLongDescription) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUGC_SetReturnLongDescription(CSteamAPIContext.GetSteamUGC(), handle, bReturnLongDescription); + } + + public static bool SetReturnMetadata(UGCQueryHandle_t handle, bool bReturnMetadata) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUGC_SetReturnMetadata(CSteamAPIContext.GetSteamUGC(), handle, bReturnMetadata); + } + + public static bool SetReturnChildren(UGCQueryHandle_t handle, bool bReturnChildren) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUGC_SetReturnChildren(CSteamAPIContext.GetSteamUGC(), handle, bReturnChildren); + } + + public static bool SetReturnAdditionalPreviews(UGCQueryHandle_t handle, bool bReturnAdditionalPreviews) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUGC_SetReturnAdditionalPreviews(CSteamAPIContext.GetSteamUGC(), handle, bReturnAdditionalPreviews); + } + + public static bool SetReturnTotalOnly(UGCQueryHandle_t handle, bool bReturnTotalOnly) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUGC_SetReturnTotalOnly(CSteamAPIContext.GetSteamUGC(), handle, bReturnTotalOnly); + } + + public static bool SetReturnPlaytimeStats(UGCQueryHandle_t handle, uint unDays) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUGC_SetReturnPlaytimeStats(CSteamAPIContext.GetSteamUGC(), handle, unDays); + } + + public static bool SetLanguage(UGCQueryHandle_t handle, string pchLanguage) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchLanguage2 = new InteropHelp.UTF8StringHandle(pchLanguage); + return NativeMethods.ISteamUGC_SetLanguage(CSteamAPIContext.GetSteamUGC(), handle, pchLanguage2); + } + + public static bool SetAllowCachedResponse(UGCQueryHandle_t handle, uint unMaxAgeSeconds) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUGC_SetAllowCachedResponse(CSteamAPIContext.GetSteamUGC(), handle, unMaxAgeSeconds); + } + + public static bool SetCloudFileNameFilter(UGCQueryHandle_t handle, string pMatchCloudFileName) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pMatchCloudFileName2 = new InteropHelp.UTF8StringHandle(pMatchCloudFileName); + return NativeMethods.ISteamUGC_SetCloudFileNameFilter(CSteamAPIContext.GetSteamUGC(), handle, pMatchCloudFileName2); + } + + public static bool SetMatchAnyTag(UGCQueryHandle_t handle, bool bMatchAnyTag) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUGC_SetMatchAnyTag(CSteamAPIContext.GetSteamUGC(), handle, bMatchAnyTag); + } + + public static bool SetSearchText(UGCQueryHandle_t handle, string pSearchText) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pSearchText2 = new InteropHelp.UTF8StringHandle(pSearchText); + return NativeMethods.ISteamUGC_SetSearchText(CSteamAPIContext.GetSteamUGC(), handle, pSearchText2); + } + + public static bool SetRankedByTrendDays(UGCQueryHandle_t handle, uint unDays) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUGC_SetRankedByTrendDays(CSteamAPIContext.GetSteamUGC(), handle, unDays); + } + + public static bool AddRequiredKeyValueTag(UGCQueryHandle_t handle, string pKey, string pValue) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pKey2 = new InteropHelp.UTF8StringHandle(pKey); + using InteropHelp.UTF8StringHandle pValue2 = new InteropHelp.UTF8StringHandle(pValue); + return NativeMethods.ISteamUGC_AddRequiredKeyValueTag(CSteamAPIContext.GetSteamUGC(), handle, pKey2, pValue2); + } + + public static SteamAPICall_t RequestUGCDetails(PublishedFileId_t nPublishedFileID, uint unMaxAgeSeconds) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamUGC_RequestUGCDetails(CSteamAPIContext.GetSteamUGC(), nPublishedFileID, unMaxAgeSeconds); + } + + public static SteamAPICall_t CreateItem(AppId_t nConsumerAppId, EWorkshopFileType eFileType) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamUGC_CreateItem(CSteamAPIContext.GetSteamUGC(), nConsumerAppId, eFileType); + } + + public static UGCUpdateHandle_t StartItemUpdate(AppId_t nConsumerAppId, PublishedFileId_t nPublishedFileID) + { + InteropHelp.TestIfAvailableClient(); + return (UGCUpdateHandle_t)NativeMethods.ISteamUGC_StartItemUpdate(CSteamAPIContext.GetSteamUGC(), nConsumerAppId, nPublishedFileID); + } + + public static bool SetItemTitle(UGCUpdateHandle_t handle, string pchTitle) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchTitle2 = new InteropHelp.UTF8StringHandle(pchTitle); + return NativeMethods.ISteamUGC_SetItemTitle(CSteamAPIContext.GetSteamUGC(), handle, pchTitle2); + } + + public static bool SetItemDescription(UGCUpdateHandle_t handle, string pchDescription) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchDescription2 = new InteropHelp.UTF8StringHandle(pchDescription); + return NativeMethods.ISteamUGC_SetItemDescription(CSteamAPIContext.GetSteamUGC(), handle, pchDescription2); + } + + public static bool SetItemUpdateLanguage(UGCUpdateHandle_t handle, string pchLanguage) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchLanguage2 = new InteropHelp.UTF8StringHandle(pchLanguage); + return NativeMethods.ISteamUGC_SetItemUpdateLanguage(CSteamAPIContext.GetSteamUGC(), handle, pchLanguage2); + } + + public static bool SetItemMetadata(UGCUpdateHandle_t handle, string pchMetaData) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchMetaData2 = new InteropHelp.UTF8StringHandle(pchMetaData); + return NativeMethods.ISteamUGC_SetItemMetadata(CSteamAPIContext.GetSteamUGC(), handle, pchMetaData2); + } + + public static bool SetItemVisibility(UGCUpdateHandle_t handle, ERemoteStoragePublishedFileVisibility eVisibility) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUGC_SetItemVisibility(CSteamAPIContext.GetSteamUGC(), handle, eVisibility); + } + + public static bool SetItemTags(UGCUpdateHandle_t updateHandle, IList<string> pTags) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUGC_SetItemTags(CSteamAPIContext.GetSteamUGC(), updateHandle, new InteropHelp.SteamParamStringArray(pTags)); + } + + public static bool SetItemContent(UGCUpdateHandle_t handle, string pszContentFolder) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pszContentFolder2 = new InteropHelp.UTF8StringHandle(pszContentFolder); + return NativeMethods.ISteamUGC_SetItemContent(CSteamAPIContext.GetSteamUGC(), handle, pszContentFolder2); + } + + public static bool SetItemPreview(UGCUpdateHandle_t handle, string pszPreviewFile) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pszPreviewFile2 = new InteropHelp.UTF8StringHandle(pszPreviewFile); + return NativeMethods.ISteamUGC_SetItemPreview(CSteamAPIContext.GetSteamUGC(), handle, pszPreviewFile2); + } + + public static bool SetAllowLegacyUpload(UGCUpdateHandle_t handle, bool bAllowLegacyUpload) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUGC_SetAllowLegacyUpload(CSteamAPIContext.GetSteamUGC(), handle, bAllowLegacyUpload); + } + + public static bool RemoveAllItemKeyValueTags(UGCUpdateHandle_t handle) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUGC_RemoveAllItemKeyValueTags(CSteamAPIContext.GetSteamUGC(), handle); + } + + public static bool RemoveItemKeyValueTags(UGCUpdateHandle_t handle, string pchKey) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchKey2 = new InteropHelp.UTF8StringHandle(pchKey); + return NativeMethods.ISteamUGC_RemoveItemKeyValueTags(CSteamAPIContext.GetSteamUGC(), handle, pchKey2); + } + + public static bool AddItemKeyValueTag(UGCUpdateHandle_t handle, string pchKey, string pchValue) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchKey2 = new InteropHelp.UTF8StringHandle(pchKey); + using InteropHelp.UTF8StringHandle pchValue2 = new InteropHelp.UTF8StringHandle(pchValue); + return NativeMethods.ISteamUGC_AddItemKeyValueTag(CSteamAPIContext.GetSteamUGC(), handle, pchKey2, pchValue2); + } + + public static bool AddItemPreviewFile(UGCUpdateHandle_t handle, string pszPreviewFile, EItemPreviewType type) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pszPreviewFile2 = new InteropHelp.UTF8StringHandle(pszPreviewFile); + return NativeMethods.ISteamUGC_AddItemPreviewFile(CSteamAPIContext.GetSteamUGC(), handle, pszPreviewFile2, type); + } + + public static bool AddItemPreviewVideo(UGCUpdateHandle_t handle, string pszVideoID) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pszVideoID2 = new InteropHelp.UTF8StringHandle(pszVideoID); + return NativeMethods.ISteamUGC_AddItemPreviewVideo(CSteamAPIContext.GetSteamUGC(), handle, pszVideoID2); + } + + public static bool UpdateItemPreviewFile(UGCUpdateHandle_t handle, uint index, string pszPreviewFile) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pszPreviewFile2 = new InteropHelp.UTF8StringHandle(pszPreviewFile); + return NativeMethods.ISteamUGC_UpdateItemPreviewFile(CSteamAPIContext.GetSteamUGC(), handle, index, pszPreviewFile2); + } + + public static bool UpdateItemPreviewVideo(UGCUpdateHandle_t handle, uint index, string pszVideoID) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pszVideoID2 = new InteropHelp.UTF8StringHandle(pszVideoID); + return NativeMethods.ISteamUGC_UpdateItemPreviewVideo(CSteamAPIContext.GetSteamUGC(), handle, index, pszVideoID2); + } + + public static bool RemoveItemPreview(UGCUpdateHandle_t handle, uint index) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUGC_RemoveItemPreview(CSteamAPIContext.GetSteamUGC(), handle, index); + } + + public static SteamAPICall_t SubmitItemUpdate(UGCUpdateHandle_t handle, string pchChangeNote) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchChangeNote2 = new InteropHelp.UTF8StringHandle(pchChangeNote); + return (SteamAPICall_t)NativeMethods.ISteamUGC_SubmitItemUpdate(CSteamAPIContext.GetSteamUGC(), handle, pchChangeNote2); + } + + public static EItemUpdateStatus GetItemUpdateProgress(UGCUpdateHandle_t handle, out ulong punBytesProcessed, out ulong punBytesTotal) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUGC_GetItemUpdateProgress(CSteamAPIContext.GetSteamUGC(), handle, out punBytesProcessed, out punBytesTotal); + } + + public static SteamAPICall_t SetUserItemVote(PublishedFileId_t nPublishedFileID, bool bVoteUp) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamUGC_SetUserItemVote(CSteamAPIContext.GetSteamUGC(), nPublishedFileID, bVoteUp); + } + + public static SteamAPICall_t GetUserItemVote(PublishedFileId_t nPublishedFileID) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamUGC_GetUserItemVote(CSteamAPIContext.GetSteamUGC(), nPublishedFileID); + } + + public static SteamAPICall_t AddItemToFavorites(AppId_t nAppId, PublishedFileId_t nPublishedFileID) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamUGC_AddItemToFavorites(CSteamAPIContext.GetSteamUGC(), nAppId, nPublishedFileID); + } + + public static SteamAPICall_t RemoveItemFromFavorites(AppId_t nAppId, PublishedFileId_t nPublishedFileID) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamUGC_RemoveItemFromFavorites(CSteamAPIContext.GetSteamUGC(), nAppId, nPublishedFileID); + } + + public static SteamAPICall_t SubscribeItem(PublishedFileId_t nPublishedFileID) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamUGC_SubscribeItem(CSteamAPIContext.GetSteamUGC(), nPublishedFileID); + } + + public static SteamAPICall_t UnsubscribeItem(PublishedFileId_t nPublishedFileID) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamUGC_UnsubscribeItem(CSteamAPIContext.GetSteamUGC(), nPublishedFileID); + } + + public static uint GetNumSubscribedItems() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUGC_GetNumSubscribedItems(CSteamAPIContext.GetSteamUGC()); + } + + public static uint GetSubscribedItems(PublishedFileId_t[] pvecPublishedFileID, uint cMaxEntries) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUGC_GetSubscribedItems(CSteamAPIContext.GetSteamUGC(), pvecPublishedFileID, cMaxEntries); + } + + public static uint GetItemState(PublishedFileId_t nPublishedFileID) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUGC_GetItemState(CSteamAPIContext.GetSteamUGC(), nPublishedFileID); + } + + public static bool GetItemInstallInfo(PublishedFileId_t nPublishedFileID, out ulong punSizeOnDisk, out string pchFolder, uint cchFolderSize, out uint punTimeStamp) + { + InteropHelp.TestIfAvailableClient(); + IntPtr intPtr = Marshal.AllocHGlobal((int)cchFolderSize); + bool flag = NativeMethods.ISteamUGC_GetItemInstallInfo(CSteamAPIContext.GetSteamUGC(), nPublishedFileID, out punSizeOnDisk, intPtr, cchFolderSize, out punTimeStamp); + pchFolder = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return flag; + } + + public static bool GetItemDownloadInfo(PublishedFileId_t nPublishedFileID, out ulong punBytesDownloaded, out ulong punBytesTotal) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUGC_GetItemDownloadInfo(CSteamAPIContext.GetSteamUGC(), nPublishedFileID, out punBytesDownloaded, out punBytesTotal); + } + + public static bool DownloadItem(PublishedFileId_t nPublishedFileID, bool bHighPriority) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUGC_DownloadItem(CSteamAPIContext.GetSteamUGC(), nPublishedFileID, bHighPriority); + } + + public static bool BInitWorkshopForGameServer(DepotId_t unWorkshopDepotID, string pszFolder) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pszFolder2 = new InteropHelp.UTF8StringHandle(pszFolder); + return NativeMethods.ISteamUGC_BInitWorkshopForGameServer(CSteamAPIContext.GetSteamUGC(), unWorkshopDepotID, pszFolder2); + } + + public static void SuspendDownloads(bool bSuspend) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamUGC_SuspendDownloads(CSteamAPIContext.GetSteamUGC(), bSuspend); + } + + public static SteamAPICall_t StartPlaytimeTracking(PublishedFileId_t[] pvecPublishedFileID, uint unNumPublishedFileIDs) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamUGC_StartPlaytimeTracking(CSteamAPIContext.GetSteamUGC(), pvecPublishedFileID, unNumPublishedFileIDs); + } + + public static SteamAPICall_t StopPlaytimeTracking(PublishedFileId_t[] pvecPublishedFileID, uint unNumPublishedFileIDs) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamUGC_StopPlaytimeTracking(CSteamAPIContext.GetSteamUGC(), pvecPublishedFileID, unNumPublishedFileIDs); + } + + public static SteamAPICall_t StopPlaytimeTrackingForAllItems() + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamUGC_StopPlaytimeTrackingForAllItems(CSteamAPIContext.GetSteamUGC()); + } + + public static SteamAPICall_t AddDependency(PublishedFileId_t nParentPublishedFileID, PublishedFileId_t nChildPublishedFileID) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamUGC_AddDependency(CSteamAPIContext.GetSteamUGC(), nParentPublishedFileID, nChildPublishedFileID); + } + + public static SteamAPICall_t RemoveDependency(PublishedFileId_t nParentPublishedFileID, PublishedFileId_t nChildPublishedFileID) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamUGC_RemoveDependency(CSteamAPIContext.GetSteamUGC(), nParentPublishedFileID, nChildPublishedFileID); + } + + public static SteamAPICall_t AddAppDependency(PublishedFileId_t nPublishedFileID, AppId_t nAppID) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamUGC_AddAppDependency(CSteamAPIContext.GetSteamUGC(), nPublishedFileID, nAppID); + } + + public static SteamAPICall_t RemoveAppDependency(PublishedFileId_t nPublishedFileID, AppId_t nAppID) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamUGC_RemoveAppDependency(CSteamAPIContext.GetSteamUGC(), nPublishedFileID, nAppID); + } + + public static SteamAPICall_t GetAppDependencies(PublishedFileId_t nPublishedFileID) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamUGC_GetAppDependencies(CSteamAPIContext.GetSteamUGC(), nPublishedFileID); + } + + public static SteamAPICall_t DeleteItem(PublishedFileId_t nPublishedFileID) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamUGC_DeleteItem(CSteamAPIContext.GetSteamUGC(), nPublishedFileID); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamUGCDetails_t.cs b/Assembly_Firstpass/Steamworks/SteamUGCDetails_t.cs new file mode 100644 index 0000000..8ea35af --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamUGCDetails_t.cs @@ -0,0 +1,127 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +public struct SteamUGCDetails_t +{ + public PublishedFileId_t m_nPublishedFileId; + + public EResult m_eResult; + + public EWorkshopFileType m_eFileType; + + public AppId_t m_nCreatorAppID; + + public AppId_t m_nConsumerAppID; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 129)] + private byte[] m_rgchTitle_; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8000)] + private byte[] m_rgchDescription_; + + public ulong m_ulSteamIDOwner; + + public uint m_rtimeCreated; + + public uint m_rtimeUpdated; + + public uint m_rtimeAddedToUserList; + + public ERemoteStoragePublishedFileVisibility m_eVisibility; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bBanned; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bAcceptedForUse; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bTagsTruncated; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1025)] + private byte[] m_rgchTags_; + + public UGCHandle_t m_hFile; + + public UGCHandle_t m_hPreviewFile; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 260)] + private byte[] m_pchFileName_; + + public int m_nFileSize; + + public int m_nPreviewFileSize; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] + private byte[] m_rgchURL_; + + public uint m_unVotesUp; + + public uint m_unVotesDown; + + public float m_flScore; + + public uint m_unNumChildren; + + public string m_rgchTitle + { + get + { + return InteropHelp.ByteArrayToStringUTF8(m_rgchTitle_); + } + set + { + InteropHelp.StringToByteArrayUTF8(value, m_rgchTitle_, 129); + } + } + + public string m_rgchDescription + { + get + { + return InteropHelp.ByteArrayToStringUTF8(m_rgchDescription_); + } + set + { + InteropHelp.StringToByteArrayUTF8(value, m_rgchDescription_, 8000); + } + } + + public string m_rgchTags + { + get + { + return InteropHelp.ByteArrayToStringUTF8(m_rgchTags_); + } + set + { + InteropHelp.StringToByteArrayUTF8(value, m_rgchTags_, 1025); + } + } + + public string m_pchFileName + { + get + { + return InteropHelp.ByteArrayToStringUTF8(m_pchFileName_); + } + set + { + InteropHelp.StringToByteArrayUTF8(value, m_pchFileName_, 260); + } + } + + public string m_rgchURL + { + get + { + return InteropHelp.ByteArrayToStringUTF8(m_rgchURL_); + } + set + { + InteropHelp.StringToByteArrayUTF8(value, m_rgchURL_, 256); + } + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamUGCQueryCompleted_t.cs b/Assembly_Firstpass/Steamworks/SteamUGCQueryCompleted_t.cs new file mode 100644 index 0000000..f0d1e58 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamUGCQueryCompleted_t.cs @@ -0,0 +1,36 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(3401)] +public struct SteamUGCQueryCompleted_t +{ + public const int k_iCallback = 3401; + + public UGCQueryHandle_t m_handle; + + public EResult m_eResult; + + public uint m_unNumResultsReturned; + + public uint m_unTotalMatchingResults; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bCachedData; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] + private byte[] m_rgchNextCursor_; + + public string m_rgchNextCursor + { + get + { + return InteropHelp.ByteArrayToStringUTF8(m_rgchNextCursor_); + } + set + { + InteropHelp.StringToByteArrayUTF8(value, m_rgchNextCursor_, 256); + } + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamUGCRequestUGCDetailsResult_t.cs b/Assembly_Firstpass/Steamworks/SteamUGCRequestUGCDetailsResult_t.cs new file mode 100644 index 0000000..4043be5 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamUGCRequestUGCDetailsResult_t.cs @@ -0,0 +1,15 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(3402)] +public struct SteamUGCRequestUGCDetailsResult_t +{ + public const int k_iCallback = 3402; + + public SteamUGCDetails_t m_details; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bCachedData; +} diff --git a/Assembly_Firstpass/Steamworks/SteamUser.cs b/Assembly_Firstpass/Steamworks/SteamUser.cs new file mode 100644 index 0000000..b5cde14 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamUser.cs @@ -0,0 +1,205 @@ +using System; +using System.Runtime.InteropServices; + +namespace Steamworks; + +public static class SteamUser +{ + public static HSteamUser GetHSteamUser() + { + InteropHelp.TestIfAvailableClient(); + return (HSteamUser)NativeMethods.ISteamUser_GetHSteamUser(CSteamAPIContext.GetSteamUser()); + } + + public static bool BLoggedOn() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUser_BLoggedOn(CSteamAPIContext.GetSteamUser()); + } + + public static CSteamID GetSteamID() + { + InteropHelp.TestIfAvailableClient(); + return (CSteamID)NativeMethods.ISteamUser_GetSteamID(CSteamAPIContext.GetSteamUser()); + } + + public static int InitiateGameConnection(byte[] pAuthBlob, int cbMaxAuthBlob, CSteamID steamIDGameServer, uint unIPServer, ushort usPortServer, bool bSecure) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUser_InitiateGameConnection(CSteamAPIContext.GetSteamUser(), pAuthBlob, cbMaxAuthBlob, steamIDGameServer, unIPServer, usPortServer, bSecure); + } + + public static void TerminateGameConnection(uint unIPServer, ushort usPortServer) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamUser_TerminateGameConnection(CSteamAPIContext.GetSteamUser(), unIPServer, usPortServer); + } + + public static void TrackAppUsageEvent(CGameID gameID, int eAppUsageEvent, string pchExtraInfo = "") + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchExtraInfo2 = new InteropHelp.UTF8StringHandle(pchExtraInfo); + NativeMethods.ISteamUser_TrackAppUsageEvent(CSteamAPIContext.GetSteamUser(), gameID, eAppUsageEvent, pchExtraInfo2); + } + + public static bool GetUserDataFolder(out string pchBuffer, int cubBuffer) + { + InteropHelp.TestIfAvailableClient(); + IntPtr intPtr = Marshal.AllocHGlobal(cubBuffer); + bool flag = NativeMethods.ISteamUser_GetUserDataFolder(CSteamAPIContext.GetSteamUser(), intPtr, cubBuffer); + pchBuffer = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return flag; + } + + public static void StartVoiceRecording() + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamUser_StartVoiceRecording(CSteamAPIContext.GetSteamUser()); + } + + public static void StopVoiceRecording() + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamUser_StopVoiceRecording(CSteamAPIContext.GetSteamUser()); + } + + public static EVoiceResult GetAvailableVoice(out uint pcbCompressed) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUser_GetAvailableVoice(CSteamAPIContext.GetSteamUser(), out pcbCompressed, IntPtr.Zero, 0u); + } + + public static EVoiceResult GetVoice(bool bWantCompressed, byte[] pDestBuffer, uint cbDestBufferSize, out uint nBytesWritten) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUser_GetVoice(CSteamAPIContext.GetSteamUser(), bWantCompressed, pDestBuffer, cbDestBufferSize, out nBytesWritten, bWantUncompressed_Deprecated: false, IntPtr.Zero, 0u, IntPtr.Zero, 0u); + } + + public static EVoiceResult DecompressVoice(byte[] pCompressed, uint cbCompressed, byte[] pDestBuffer, uint cbDestBufferSize, out uint nBytesWritten, uint nDesiredSampleRate) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUser_DecompressVoice(CSteamAPIContext.GetSteamUser(), pCompressed, cbCompressed, pDestBuffer, cbDestBufferSize, out nBytesWritten, nDesiredSampleRate); + } + + public static uint GetVoiceOptimalSampleRate() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUser_GetVoiceOptimalSampleRate(CSteamAPIContext.GetSteamUser()); + } + + public static HAuthTicket GetAuthSessionTicket(byte[] pTicket, int cbMaxTicket, out uint pcbTicket) + { + InteropHelp.TestIfAvailableClient(); + return (HAuthTicket)NativeMethods.ISteamUser_GetAuthSessionTicket(CSteamAPIContext.GetSteamUser(), pTicket, cbMaxTicket, out pcbTicket); + } + + public static EBeginAuthSessionResult BeginAuthSession(byte[] pAuthTicket, int cbAuthTicket, CSteamID steamID) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUser_BeginAuthSession(CSteamAPIContext.GetSteamUser(), pAuthTicket, cbAuthTicket, steamID); + } + + public static void EndAuthSession(CSteamID steamID) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamUser_EndAuthSession(CSteamAPIContext.GetSteamUser(), steamID); + } + + public static void CancelAuthTicket(HAuthTicket hAuthTicket) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamUser_CancelAuthTicket(CSteamAPIContext.GetSteamUser(), hAuthTicket); + } + + public static EUserHasLicenseForAppResult UserHasLicenseForApp(CSteamID steamID, AppId_t appID) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUser_UserHasLicenseForApp(CSteamAPIContext.GetSteamUser(), steamID, appID); + } + + public static bool BIsBehindNAT() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUser_BIsBehindNAT(CSteamAPIContext.GetSteamUser()); + } + + public static void AdvertiseGame(CSteamID steamIDGameServer, uint unIPServer, ushort usPortServer) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamUser_AdvertiseGame(CSteamAPIContext.GetSteamUser(), steamIDGameServer, unIPServer, usPortServer); + } + + public static SteamAPICall_t RequestEncryptedAppTicket(byte[] pDataToInclude, int cbDataToInclude) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamUser_RequestEncryptedAppTicket(CSteamAPIContext.GetSteamUser(), pDataToInclude, cbDataToInclude); + } + + public static bool GetEncryptedAppTicket(byte[] pTicket, int cbMaxTicket, out uint pcbTicket) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUser_GetEncryptedAppTicket(CSteamAPIContext.GetSteamUser(), pTicket, cbMaxTicket, out pcbTicket); + } + + public static int GetGameBadgeLevel(int nSeries, bool bFoil) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUser_GetGameBadgeLevel(CSteamAPIContext.GetSteamUser(), nSeries, bFoil); + } + + public static int GetPlayerSteamLevel() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUser_GetPlayerSteamLevel(CSteamAPIContext.GetSteamUser()); + } + + public static SteamAPICall_t RequestStoreAuthURL(string pchRedirectURL) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchRedirectURL2 = new InteropHelp.UTF8StringHandle(pchRedirectURL); + return (SteamAPICall_t)NativeMethods.ISteamUser_RequestStoreAuthURL(CSteamAPIContext.GetSteamUser(), pchRedirectURL2); + } + + public static bool BIsPhoneVerified() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUser_BIsPhoneVerified(CSteamAPIContext.GetSteamUser()); + } + + public static bool BIsTwoFactorEnabled() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUser_BIsTwoFactorEnabled(CSteamAPIContext.GetSteamUser()); + } + + public static bool BIsPhoneIdentifying() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUser_BIsPhoneIdentifying(CSteamAPIContext.GetSteamUser()); + } + + public static bool BIsPhoneRequiringVerification() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUser_BIsPhoneRequiringVerification(CSteamAPIContext.GetSteamUser()); + } + + public static SteamAPICall_t GetMarketEligibility() + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamUser_GetMarketEligibility(CSteamAPIContext.GetSteamUser()); + } + + public static SteamAPICall_t GetDurationControl() + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamUser_GetDurationControl(CSteamAPIContext.GetSteamUser()); + } + + public static bool BSetDurationControlOnlineState(EDurationControlOnlineState eNewState) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUser_BSetDurationControlOnlineState(CSteamAPIContext.GetSteamUser(), eNewState); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamUserStats.cs b/Assembly_Firstpass/Steamworks/SteamUserStats.cs new file mode 100644 index 0000000..9d4e244 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamUserStats.cs @@ -0,0 +1,311 @@ +using System; +using System.Runtime.InteropServices; + +namespace Steamworks; + +public static class SteamUserStats +{ + public static bool RequestCurrentStats() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUserStats_RequestCurrentStats(CSteamAPIContext.GetSteamUserStats()); + } + + public static bool GetStat(string pchName, out int pData) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchName2 = new InteropHelp.UTF8StringHandle(pchName); + return NativeMethods.ISteamUserStats_GetStatInt32(CSteamAPIContext.GetSteamUserStats(), pchName2, out pData); + } + + public static bool GetStat(string pchName, out float pData) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchName2 = new InteropHelp.UTF8StringHandle(pchName); + return NativeMethods.ISteamUserStats_GetStatFloat(CSteamAPIContext.GetSteamUserStats(), pchName2, out pData); + } + + public static bool SetStat(string pchName, int nData) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchName2 = new InteropHelp.UTF8StringHandle(pchName); + return NativeMethods.ISteamUserStats_SetStatInt32(CSteamAPIContext.GetSteamUserStats(), pchName2, nData); + } + + public static bool SetStat(string pchName, float fData) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchName2 = new InteropHelp.UTF8StringHandle(pchName); + return NativeMethods.ISteamUserStats_SetStatFloat(CSteamAPIContext.GetSteamUserStats(), pchName2, fData); + } + + public static bool UpdateAvgRateStat(string pchName, float flCountThisSession, double dSessionLength) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchName2 = new InteropHelp.UTF8StringHandle(pchName); + return NativeMethods.ISteamUserStats_UpdateAvgRateStat(CSteamAPIContext.GetSteamUserStats(), pchName2, flCountThisSession, dSessionLength); + } + + public static bool GetAchievement(string pchName, out bool pbAchieved) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchName2 = new InteropHelp.UTF8StringHandle(pchName); + return NativeMethods.ISteamUserStats_GetAchievement(CSteamAPIContext.GetSteamUserStats(), pchName2, out pbAchieved); + } + + public static bool SetAchievement(string pchName) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchName2 = new InteropHelp.UTF8StringHandle(pchName); + return NativeMethods.ISteamUserStats_SetAchievement(CSteamAPIContext.GetSteamUserStats(), pchName2); + } + + public static bool ClearAchievement(string pchName) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchName2 = new InteropHelp.UTF8StringHandle(pchName); + return NativeMethods.ISteamUserStats_ClearAchievement(CSteamAPIContext.GetSteamUserStats(), pchName2); + } + + public static bool GetAchievementAndUnlockTime(string pchName, out bool pbAchieved, out uint punUnlockTime) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchName2 = new InteropHelp.UTF8StringHandle(pchName); + return NativeMethods.ISteamUserStats_GetAchievementAndUnlockTime(CSteamAPIContext.GetSteamUserStats(), pchName2, out pbAchieved, out punUnlockTime); + } + + public static bool StoreStats() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUserStats_StoreStats(CSteamAPIContext.GetSteamUserStats()); + } + + public static int GetAchievementIcon(string pchName) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchName2 = new InteropHelp.UTF8StringHandle(pchName); + return NativeMethods.ISteamUserStats_GetAchievementIcon(CSteamAPIContext.GetSteamUserStats(), pchName2); + } + + public static string GetAchievementDisplayAttribute(string pchName, string pchKey) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchName2 = new InteropHelp.UTF8StringHandle(pchName); + using InteropHelp.UTF8StringHandle pchKey2 = new InteropHelp.UTF8StringHandle(pchKey); + return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamUserStats_GetAchievementDisplayAttribute(CSteamAPIContext.GetSteamUserStats(), pchName2, pchKey2)); + } + + public static bool IndicateAchievementProgress(string pchName, uint nCurProgress, uint nMaxProgress) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchName2 = new InteropHelp.UTF8StringHandle(pchName); + return NativeMethods.ISteamUserStats_IndicateAchievementProgress(CSteamAPIContext.GetSteamUserStats(), pchName2, nCurProgress, nMaxProgress); + } + + public static uint GetNumAchievements() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUserStats_GetNumAchievements(CSteamAPIContext.GetSteamUserStats()); + } + + public static string GetAchievementName(uint iAchievement) + { + InteropHelp.TestIfAvailableClient(); + return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamUserStats_GetAchievementName(CSteamAPIContext.GetSteamUserStats(), iAchievement)); + } + + public static SteamAPICall_t RequestUserStats(CSteamID steamIDUser) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamUserStats_RequestUserStats(CSteamAPIContext.GetSteamUserStats(), steamIDUser); + } + + public static bool GetUserStat(CSteamID steamIDUser, string pchName, out int pData) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchName2 = new InteropHelp.UTF8StringHandle(pchName); + return NativeMethods.ISteamUserStats_GetUserStatInt32(CSteamAPIContext.GetSteamUserStats(), steamIDUser, pchName2, out pData); + } + + public static bool GetUserStat(CSteamID steamIDUser, string pchName, out float pData) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchName2 = new InteropHelp.UTF8StringHandle(pchName); + return NativeMethods.ISteamUserStats_GetUserStatFloat(CSteamAPIContext.GetSteamUserStats(), steamIDUser, pchName2, out pData); + } + + public static bool GetUserAchievement(CSteamID steamIDUser, string pchName, out bool pbAchieved) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchName2 = new InteropHelp.UTF8StringHandle(pchName); + return NativeMethods.ISteamUserStats_GetUserAchievement(CSteamAPIContext.GetSteamUserStats(), steamIDUser, pchName2, out pbAchieved); + } + + public static bool GetUserAchievementAndUnlockTime(CSteamID steamIDUser, string pchName, out bool pbAchieved, out uint punUnlockTime) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchName2 = new InteropHelp.UTF8StringHandle(pchName); + return NativeMethods.ISteamUserStats_GetUserAchievementAndUnlockTime(CSteamAPIContext.GetSteamUserStats(), steamIDUser, pchName2, out pbAchieved, out punUnlockTime); + } + + public static bool ResetAllStats(bool bAchievementsToo) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUserStats_ResetAllStats(CSteamAPIContext.GetSteamUserStats(), bAchievementsToo); + } + + public static SteamAPICall_t FindOrCreateLeaderboard(string pchLeaderboardName, ELeaderboardSortMethod eLeaderboardSortMethod, ELeaderboardDisplayType eLeaderboardDisplayType) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchLeaderboardName2 = new InteropHelp.UTF8StringHandle(pchLeaderboardName); + return (SteamAPICall_t)NativeMethods.ISteamUserStats_FindOrCreateLeaderboard(CSteamAPIContext.GetSteamUserStats(), pchLeaderboardName2, eLeaderboardSortMethod, eLeaderboardDisplayType); + } + + public static SteamAPICall_t FindLeaderboard(string pchLeaderboardName) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchLeaderboardName2 = new InteropHelp.UTF8StringHandle(pchLeaderboardName); + return (SteamAPICall_t)NativeMethods.ISteamUserStats_FindLeaderboard(CSteamAPIContext.GetSteamUserStats(), pchLeaderboardName2); + } + + public static string GetLeaderboardName(SteamLeaderboard_t hSteamLeaderboard) + { + InteropHelp.TestIfAvailableClient(); + return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamUserStats_GetLeaderboardName(CSteamAPIContext.GetSteamUserStats(), hSteamLeaderboard)); + } + + public static int GetLeaderboardEntryCount(SteamLeaderboard_t hSteamLeaderboard) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUserStats_GetLeaderboardEntryCount(CSteamAPIContext.GetSteamUserStats(), hSteamLeaderboard); + } + + public static ELeaderboardSortMethod GetLeaderboardSortMethod(SteamLeaderboard_t hSteamLeaderboard) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUserStats_GetLeaderboardSortMethod(CSteamAPIContext.GetSteamUserStats(), hSteamLeaderboard); + } + + public static ELeaderboardDisplayType GetLeaderboardDisplayType(SteamLeaderboard_t hSteamLeaderboard) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUserStats_GetLeaderboardDisplayType(CSteamAPIContext.GetSteamUserStats(), hSteamLeaderboard); + } + + public static SteamAPICall_t DownloadLeaderboardEntries(SteamLeaderboard_t hSteamLeaderboard, ELeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamUserStats_DownloadLeaderboardEntries(CSteamAPIContext.GetSteamUserStats(), hSteamLeaderboard, eLeaderboardDataRequest, nRangeStart, nRangeEnd); + } + + public static SteamAPICall_t DownloadLeaderboardEntriesForUsers(SteamLeaderboard_t hSteamLeaderboard, CSteamID[] prgUsers, int cUsers) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamUserStats_DownloadLeaderboardEntriesForUsers(CSteamAPIContext.GetSteamUserStats(), hSteamLeaderboard, prgUsers, cUsers); + } + + public static bool GetDownloadedLeaderboardEntry(SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, out LeaderboardEntry_t pLeaderboardEntry, int[] pDetails, int cDetailsMax) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUserStats_GetDownloadedLeaderboardEntry(CSteamAPIContext.GetSteamUserStats(), hSteamLeaderboardEntries, index, out pLeaderboardEntry, pDetails, cDetailsMax); + } + + public static SteamAPICall_t UploadLeaderboardScore(SteamLeaderboard_t hSteamLeaderboard, ELeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int nScore, int[] pScoreDetails, int cScoreDetailsCount) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamUserStats_UploadLeaderboardScore(CSteamAPIContext.GetSteamUserStats(), hSteamLeaderboard, eLeaderboardUploadScoreMethod, nScore, pScoreDetails, cScoreDetailsCount); + } + + public static SteamAPICall_t AttachLeaderboardUGC(SteamLeaderboard_t hSteamLeaderboard, UGCHandle_t hUGC) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamUserStats_AttachLeaderboardUGC(CSteamAPIContext.GetSteamUserStats(), hSteamLeaderboard, hUGC); + } + + public static SteamAPICall_t GetNumberOfCurrentPlayers() + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamUserStats_GetNumberOfCurrentPlayers(CSteamAPIContext.GetSteamUserStats()); + } + + public static SteamAPICall_t RequestGlobalAchievementPercentages() + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamUserStats_RequestGlobalAchievementPercentages(CSteamAPIContext.GetSteamUserStats()); + } + + public static int GetMostAchievedAchievementInfo(out string pchName, uint unNameBufLen, out float pflPercent, out bool pbAchieved) + { + InteropHelp.TestIfAvailableClient(); + IntPtr intPtr = Marshal.AllocHGlobal((int)unNameBufLen); + int num = NativeMethods.ISteamUserStats_GetMostAchievedAchievementInfo(CSteamAPIContext.GetSteamUserStats(), intPtr, unNameBufLen, out pflPercent, out pbAchieved); + pchName = ((num != -1) ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return num; + } + + public static int GetNextMostAchievedAchievementInfo(int iIteratorPrevious, out string pchName, uint unNameBufLen, out float pflPercent, out bool pbAchieved) + { + InteropHelp.TestIfAvailableClient(); + IntPtr intPtr = Marshal.AllocHGlobal((int)unNameBufLen); + int num = NativeMethods.ISteamUserStats_GetNextMostAchievedAchievementInfo(CSteamAPIContext.GetSteamUserStats(), iIteratorPrevious, intPtr, unNameBufLen, out pflPercent, out pbAchieved); + pchName = ((num != -1) ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return num; + } + + public static bool GetAchievementAchievedPercent(string pchName, out float pflPercent) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchName2 = new InteropHelp.UTF8StringHandle(pchName); + return NativeMethods.ISteamUserStats_GetAchievementAchievedPercent(CSteamAPIContext.GetSteamUserStats(), pchName2, out pflPercent); + } + + public static SteamAPICall_t RequestGlobalStats(int nHistoryDays) + { + InteropHelp.TestIfAvailableClient(); + return (SteamAPICall_t)NativeMethods.ISteamUserStats_RequestGlobalStats(CSteamAPIContext.GetSteamUserStats(), nHistoryDays); + } + + public static bool GetGlobalStat(string pchStatName, out long pData) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchStatName2 = new InteropHelp.UTF8StringHandle(pchStatName); + return NativeMethods.ISteamUserStats_GetGlobalStatInt64(CSteamAPIContext.GetSteamUserStats(), pchStatName2, out pData); + } + + public static bool GetGlobalStat(string pchStatName, out double pData) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchStatName2 = new InteropHelp.UTF8StringHandle(pchStatName); + return NativeMethods.ISteamUserStats_GetGlobalStatDouble(CSteamAPIContext.GetSteamUserStats(), pchStatName2, out pData); + } + + public static int GetGlobalStatHistory(string pchStatName, long[] pData, uint cubData) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchStatName2 = new InteropHelp.UTF8StringHandle(pchStatName); + return NativeMethods.ISteamUserStats_GetGlobalStatHistoryInt64(CSteamAPIContext.GetSteamUserStats(), pchStatName2, pData, cubData); + } + + public static int GetGlobalStatHistory(string pchStatName, double[] pData, uint cubData) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchStatName2 = new InteropHelp.UTF8StringHandle(pchStatName); + return NativeMethods.ISteamUserStats_GetGlobalStatHistoryDouble(CSteamAPIContext.GetSteamUserStats(), pchStatName2, pData, cubData); + } + + public static bool GetAchievementProgressLimits(string pchName, out int pnMinProgress, out int pnMaxProgress) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchName2 = new InteropHelp.UTF8StringHandle(pchName); + return NativeMethods.ISteamUserStats_GetAchievementProgressLimitsInt32(CSteamAPIContext.GetSteamUserStats(), pchName2, out pnMinProgress, out pnMaxProgress); + } + + public static bool GetAchievementProgressLimits(string pchName, out float pfMinProgress, out float pfMaxProgress) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchName2 = new InteropHelp.UTF8StringHandle(pchName); + return NativeMethods.ISteamUserStats_GetAchievementProgressLimitsFloat(CSteamAPIContext.GetSteamUserStats(), pchName2, out pfMinProgress, out pfMaxProgress); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamUtils.cs b/Assembly_Firstpass/Steamworks/SteamUtils.cs new file mode 100644 index 0000000..f9d2861 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamUtils.cs @@ -0,0 +1,211 @@ +using System; +using System.Runtime.InteropServices; + +namespace Steamworks; + +public static class SteamUtils +{ + public static uint GetSecondsSinceAppActive() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUtils_GetSecondsSinceAppActive(CSteamAPIContext.GetSteamUtils()); + } + + public static uint GetSecondsSinceComputerActive() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUtils_GetSecondsSinceComputerActive(CSteamAPIContext.GetSteamUtils()); + } + + public static EUniverse GetConnectedUniverse() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUtils_GetConnectedUniverse(CSteamAPIContext.GetSteamUtils()); + } + + public static uint GetServerRealTime() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUtils_GetServerRealTime(CSteamAPIContext.GetSteamUtils()); + } + + public static string GetIPCountry() + { + InteropHelp.TestIfAvailableClient(); + return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamUtils_GetIPCountry(CSteamAPIContext.GetSteamUtils())); + } + + public static bool GetImageSize(int iImage, out uint pnWidth, out uint pnHeight) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUtils_GetImageSize(CSteamAPIContext.GetSteamUtils(), iImage, out pnWidth, out pnHeight); + } + + public static bool GetImageRGBA(int iImage, byte[] pubDest, int nDestBufferSize) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUtils_GetImageRGBA(CSteamAPIContext.GetSteamUtils(), iImage, pubDest, nDestBufferSize); + } + + public static byte GetCurrentBatteryPower() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUtils_GetCurrentBatteryPower(CSteamAPIContext.GetSteamUtils()); + } + + public static AppId_t GetAppID() + { + InteropHelp.TestIfAvailableClient(); + return (AppId_t)NativeMethods.ISteamUtils_GetAppID(CSteamAPIContext.GetSteamUtils()); + } + + public static void SetOverlayNotificationPosition(ENotificationPosition eNotificationPosition) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamUtils_SetOverlayNotificationPosition(CSteamAPIContext.GetSteamUtils(), eNotificationPosition); + } + + public static bool IsAPICallCompleted(SteamAPICall_t hSteamAPICall, out bool pbFailed) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUtils_IsAPICallCompleted(CSteamAPIContext.GetSteamUtils(), hSteamAPICall, out pbFailed); + } + + public static ESteamAPICallFailure GetAPICallFailureReason(SteamAPICall_t hSteamAPICall) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUtils_GetAPICallFailureReason(CSteamAPIContext.GetSteamUtils(), hSteamAPICall); + } + + public static bool GetAPICallResult(SteamAPICall_t hSteamAPICall, IntPtr pCallback, int cubCallback, int iCallbackExpected, out bool pbFailed) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUtils_GetAPICallResult(CSteamAPIContext.GetSteamUtils(), hSteamAPICall, pCallback, cubCallback, iCallbackExpected, out pbFailed); + } + + public static uint GetIPCCallCount() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUtils_GetIPCCallCount(CSteamAPIContext.GetSteamUtils()); + } + + public static void SetWarningMessageHook(SteamAPIWarningMessageHook_t pFunction) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamUtils_SetWarningMessageHook(CSteamAPIContext.GetSteamUtils(), pFunction); + } + + public static bool IsOverlayEnabled() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUtils_IsOverlayEnabled(CSteamAPIContext.GetSteamUtils()); + } + + public static bool BOverlayNeedsPresent() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUtils_BOverlayNeedsPresent(CSteamAPIContext.GetSteamUtils()); + } + + public static SteamAPICall_t CheckFileSignature(string szFileName) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle szFileName2 = new InteropHelp.UTF8StringHandle(szFileName); + return (SteamAPICall_t)NativeMethods.ISteamUtils_CheckFileSignature(CSteamAPIContext.GetSteamUtils(), szFileName2); + } + + public static bool ShowGamepadTextInput(EGamepadTextInputMode eInputMode, EGamepadTextInputLineMode eLineInputMode, string pchDescription, uint unCharMax, string pchExistingText) + { + InteropHelp.TestIfAvailableClient(); + using InteropHelp.UTF8StringHandle pchDescription2 = new InteropHelp.UTF8StringHandle(pchDescription); + using InteropHelp.UTF8StringHandle pchExistingText2 = new InteropHelp.UTF8StringHandle(pchExistingText); + return NativeMethods.ISteamUtils_ShowGamepadTextInput(CSteamAPIContext.GetSteamUtils(), eInputMode, eLineInputMode, pchDescription2, unCharMax, pchExistingText2); + } + + public static uint GetEnteredGamepadTextLength() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUtils_GetEnteredGamepadTextLength(CSteamAPIContext.GetSteamUtils()); + } + + public static bool GetEnteredGamepadTextInput(out string pchText, uint cchText) + { + InteropHelp.TestIfAvailableClient(); + IntPtr intPtr = Marshal.AllocHGlobal((int)cchText); + bool flag = NativeMethods.ISteamUtils_GetEnteredGamepadTextInput(CSteamAPIContext.GetSteamUtils(), intPtr, cchText); + pchText = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return flag; + } + + public static string GetSteamUILanguage() + { + InteropHelp.TestIfAvailableClient(); + return InteropHelp.PtrToStringUTF8(NativeMethods.ISteamUtils_GetSteamUILanguage(CSteamAPIContext.GetSteamUtils())); + } + + public static bool IsSteamRunningInVR() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUtils_IsSteamRunningInVR(CSteamAPIContext.GetSteamUtils()); + } + + public static void SetOverlayNotificationInset(int nHorizontalInset, int nVerticalInset) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamUtils_SetOverlayNotificationInset(CSteamAPIContext.GetSteamUtils(), nHorizontalInset, nVerticalInset); + } + + public static bool IsSteamInBigPictureMode() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUtils_IsSteamInBigPictureMode(CSteamAPIContext.GetSteamUtils()); + } + + public static void StartVRDashboard() + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamUtils_StartVRDashboard(CSteamAPIContext.GetSteamUtils()); + } + + public static bool IsVRHeadsetStreamingEnabled() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUtils_IsVRHeadsetStreamingEnabled(CSteamAPIContext.GetSteamUtils()); + } + + public static void SetVRHeadsetStreamingEnabled(bool bEnabled) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamUtils_SetVRHeadsetStreamingEnabled(CSteamAPIContext.GetSteamUtils(), bEnabled); + } + + public static bool IsSteamChinaLauncher() + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUtils_IsSteamChinaLauncher(CSteamAPIContext.GetSteamUtils()); + } + + public static bool InitFilterText(uint unFilterOptions = 0u) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUtils_InitFilterText(CSteamAPIContext.GetSteamUtils(), unFilterOptions); + } + + public static int FilterText(ETextFilteringContext eContext, CSteamID sourceSteamID, string pchInputMessage, out string pchOutFilteredText, uint nByteSizeOutFilteredText) + { + InteropHelp.TestIfAvailableClient(); + IntPtr intPtr = Marshal.AllocHGlobal((int)nByteSizeOutFilteredText); + using InteropHelp.UTF8StringHandle pchInputMessage2 = new InteropHelp.UTF8StringHandle(pchInputMessage); + int num = NativeMethods.ISteamUtils_FilterText(CSteamAPIContext.GetSteamUtils(), eContext, sourceSteamID, pchInputMessage2, intPtr, nByteSizeOutFilteredText); + pchOutFilteredText = ((num != -1) ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return num; + } + + public static ESteamIPv6ConnectivityState GetIPv6ConnectivityState(ESteamIPv6ConnectivityProtocol eProtocol) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamUtils_GetIPv6ConnectivityState(CSteamAPIContext.GetSteamUtils(), eProtocol); + } +} diff --git a/Assembly_Firstpass/Steamworks/SteamVideo.cs b/Assembly_Firstpass/Steamworks/SteamVideo.cs new file mode 100644 index 0000000..9c8d287 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SteamVideo.cs @@ -0,0 +1,35 @@ +using System; +using System.Runtime.InteropServices; + +namespace Steamworks; + +public static class SteamVideo +{ + public static void GetVideoURL(AppId_t unVideoAppID) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamVideo_GetVideoURL(CSteamAPIContext.GetSteamVideo(), unVideoAppID); + } + + public static bool IsBroadcasting(out int pnNumViewers) + { + InteropHelp.TestIfAvailableClient(); + return NativeMethods.ISteamVideo_IsBroadcasting(CSteamAPIContext.GetSteamVideo(), out pnNumViewers); + } + + public static void GetOPFSettings(AppId_t unVideoAppID) + { + InteropHelp.TestIfAvailableClient(); + NativeMethods.ISteamVideo_GetOPFSettings(CSteamAPIContext.GetSteamVideo(), unVideoAppID); + } + + public static bool GetOPFStringForApp(AppId_t unVideoAppID, out string pchBuffer, ref int pnBufferSize) + { + InteropHelp.TestIfAvailableClient(); + IntPtr intPtr = Marshal.AllocHGlobal(pnBufferSize); + bool flag = NativeMethods.ISteamVideo_GetOPFStringForApp(CSteamAPIContext.GetSteamVideo(), unVideoAppID, intPtr, ref pnBufferSize); + pchBuffer = (flag ? InteropHelp.PtrToStringUTF8(intPtr) : null); + Marshal.FreeHGlobal(intPtr); + return flag; + } +} diff --git a/Assembly_Firstpass/Steamworks/StopPlaytimeTrackingResult_t.cs b/Assembly_Firstpass/Steamworks/StopPlaytimeTrackingResult_t.cs new file mode 100644 index 0000000..a6d6365 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/StopPlaytimeTrackingResult_t.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(3411)] +public struct StopPlaytimeTrackingResult_t +{ + public const int k_iCallback = 3411; + + public EResult m_eResult; +} diff --git a/Assembly_Firstpass/Steamworks/StoreAuthURLResponse_t.cs b/Assembly_Firstpass/Steamworks/StoreAuthURLResponse_t.cs new file mode 100644 index 0000000..aded473 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/StoreAuthURLResponse_t.cs @@ -0,0 +1,25 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(165)] +public struct StoreAuthURLResponse_t +{ + public const int k_iCallback = 165; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 512)] + private byte[] m_szURL_; + + public string m_szURL + { + get + { + return InteropHelp.ByteArrayToStringUTF8(m_szURL_); + } + set + { + InteropHelp.StringToByteArrayUTF8(value, m_szURL_, 512); + } + } +} diff --git a/Assembly_Firstpass/Steamworks/SubmitItemUpdateResult_t.cs b/Assembly_Firstpass/Steamworks/SubmitItemUpdateResult_t.cs new file mode 100644 index 0000000..4958265 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SubmitItemUpdateResult_t.cs @@ -0,0 +1,17 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(3404)] +public struct SubmitItemUpdateResult_t +{ + public const int k_iCallback = 3404; + + public EResult m_eResult; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bUserNeedsToAcceptWorkshopLegalAgreement; + + public PublishedFileId_t m_nPublishedFileId; +} diff --git a/Assembly_Firstpass/Steamworks/SubmitPlayerResultResultCallback_t.cs b/Assembly_Firstpass/Steamworks/SubmitPlayerResultResultCallback_t.cs new file mode 100644 index 0000000..f089427 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SubmitPlayerResultResultCallback_t.cs @@ -0,0 +1,16 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(5214)] +public struct SubmitPlayerResultResultCallback_t +{ + public const int k_iCallback = 5214; + + public EResult m_eResult; + + public ulong ullUniqueGameID; + + public CSteamID steamIDPlayer; +} diff --git a/Assembly_Firstpass/Steamworks/TimedTrialStatus_t.cs b/Assembly_Firstpass/Steamworks/TimedTrialStatus_t.cs new file mode 100644 index 0000000..8cccb8c --- /dev/null +++ b/Assembly_Firstpass/Steamworks/TimedTrialStatus_t.cs @@ -0,0 +1,19 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1030)] +public struct TimedTrialStatus_t +{ + public const int k_iCallback = 1030; + + public AppId_t m_unAppID; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bIsOffline; + + public uint m_unSecondsAllowed; + + public uint m_unSecondsPlayed; +} diff --git a/Assembly_Firstpass/Steamworks/UGCFileWriteStreamHandle_t.cs b/Assembly_Firstpass/Steamworks/UGCFileWriteStreamHandle_t.cs new file mode 100644 index 0000000..10622bd --- /dev/null +++ b/Assembly_Firstpass/Steamworks/UGCFileWriteStreamHandle_t.cs @@ -0,0 +1,65 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct UGCFileWriteStreamHandle_t : IEquatable<UGCFileWriteStreamHandle_t>, IComparable<UGCFileWriteStreamHandle_t> +{ + public static readonly UGCFileWriteStreamHandle_t Invalid = new UGCFileWriteStreamHandle_t(ulong.MaxValue); + + public ulong m_UGCFileWriteStreamHandle; + + public UGCFileWriteStreamHandle_t(ulong value) + { + m_UGCFileWriteStreamHandle = value; + } + + public override string ToString() + { + return m_UGCFileWriteStreamHandle.ToString(); + } + + public override bool Equals(object other) + { + if (other is UGCFileWriteStreamHandle_t) + { + return this == (UGCFileWriteStreamHandle_t)other; + } + return false; + } + + public override int GetHashCode() + { + return m_UGCFileWriteStreamHandle.GetHashCode(); + } + + public static bool operator ==(UGCFileWriteStreamHandle_t x, UGCFileWriteStreamHandle_t y) + { + return x.m_UGCFileWriteStreamHandle == y.m_UGCFileWriteStreamHandle; + } + + public static bool operator !=(UGCFileWriteStreamHandle_t x, UGCFileWriteStreamHandle_t y) + { + return !(x == y); + } + + public static explicit operator UGCFileWriteStreamHandle_t(ulong value) + { + return new UGCFileWriteStreamHandle_t(value); + } + + public static explicit operator ulong(UGCFileWriteStreamHandle_t that) + { + return that.m_UGCFileWriteStreamHandle; + } + + public bool Equals(UGCFileWriteStreamHandle_t other) + { + return m_UGCFileWriteStreamHandle == other.m_UGCFileWriteStreamHandle; + } + + public int CompareTo(UGCFileWriteStreamHandle_t other) + { + return m_UGCFileWriteStreamHandle.CompareTo(other.m_UGCFileWriteStreamHandle); + } +} diff --git a/Assembly_Firstpass/Steamworks/UGCHandle_t.cs b/Assembly_Firstpass/Steamworks/UGCHandle_t.cs new file mode 100644 index 0000000..4edc20d --- /dev/null +++ b/Assembly_Firstpass/Steamworks/UGCHandle_t.cs @@ -0,0 +1,65 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct UGCHandle_t : IEquatable<UGCHandle_t>, IComparable<UGCHandle_t> +{ + public static readonly UGCHandle_t Invalid = new UGCHandle_t(ulong.MaxValue); + + public ulong m_UGCHandle; + + public UGCHandle_t(ulong value) + { + m_UGCHandle = value; + } + + public override string ToString() + { + return m_UGCHandle.ToString(); + } + + public override bool Equals(object other) + { + if (other is UGCHandle_t) + { + return this == (UGCHandle_t)other; + } + return false; + } + + public override int GetHashCode() + { + return m_UGCHandle.GetHashCode(); + } + + public static bool operator ==(UGCHandle_t x, UGCHandle_t y) + { + return x.m_UGCHandle == y.m_UGCHandle; + } + + public static bool operator !=(UGCHandle_t x, UGCHandle_t y) + { + return !(x == y); + } + + public static explicit operator UGCHandle_t(ulong value) + { + return new UGCHandle_t(value); + } + + public static explicit operator ulong(UGCHandle_t that) + { + return that.m_UGCHandle; + } + + public bool Equals(UGCHandle_t other) + { + return m_UGCHandle == other.m_UGCHandle; + } + + public int CompareTo(UGCHandle_t other) + { + return m_UGCHandle.CompareTo(other.m_UGCHandle); + } +} diff --git a/Assembly_Firstpass/Steamworks/UGCQueryHandle_t.cs b/Assembly_Firstpass/Steamworks/UGCQueryHandle_t.cs new file mode 100644 index 0000000..cc50441 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/UGCQueryHandle_t.cs @@ -0,0 +1,65 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct UGCQueryHandle_t : IEquatable<UGCQueryHandle_t>, IComparable<UGCQueryHandle_t> +{ + public static readonly UGCQueryHandle_t Invalid = new UGCQueryHandle_t(ulong.MaxValue); + + public ulong m_UGCQueryHandle; + + public UGCQueryHandle_t(ulong value) + { + m_UGCQueryHandle = value; + } + + public override string ToString() + { + return m_UGCQueryHandle.ToString(); + } + + public override bool Equals(object other) + { + if (other is UGCQueryHandle_t) + { + return this == (UGCQueryHandle_t)other; + } + return false; + } + + public override int GetHashCode() + { + return m_UGCQueryHandle.GetHashCode(); + } + + public static bool operator ==(UGCQueryHandle_t x, UGCQueryHandle_t y) + { + return x.m_UGCQueryHandle == y.m_UGCQueryHandle; + } + + public static bool operator !=(UGCQueryHandle_t x, UGCQueryHandle_t y) + { + return !(x == y); + } + + public static explicit operator UGCQueryHandle_t(ulong value) + { + return new UGCQueryHandle_t(value); + } + + public static explicit operator ulong(UGCQueryHandle_t that) + { + return that.m_UGCQueryHandle; + } + + public bool Equals(UGCQueryHandle_t other) + { + return m_UGCQueryHandle == other.m_UGCQueryHandle; + } + + public int CompareTo(UGCQueryHandle_t other) + { + return m_UGCQueryHandle.CompareTo(other.m_UGCQueryHandle); + } +} diff --git a/Assembly_Firstpass/Steamworks/UGCUpdateHandle_t.cs b/Assembly_Firstpass/Steamworks/UGCUpdateHandle_t.cs new file mode 100644 index 0000000..6c9a7da --- /dev/null +++ b/Assembly_Firstpass/Steamworks/UGCUpdateHandle_t.cs @@ -0,0 +1,65 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct UGCUpdateHandle_t : IEquatable<UGCUpdateHandle_t>, IComparable<UGCUpdateHandle_t> +{ + public static readonly UGCUpdateHandle_t Invalid = new UGCUpdateHandle_t(ulong.MaxValue); + + public ulong m_UGCUpdateHandle; + + public UGCUpdateHandle_t(ulong value) + { + m_UGCUpdateHandle = value; + } + + public override string ToString() + { + return m_UGCUpdateHandle.ToString(); + } + + public override bool Equals(object other) + { + if (other is UGCUpdateHandle_t) + { + return this == (UGCUpdateHandle_t)other; + } + return false; + } + + public override int GetHashCode() + { + return m_UGCUpdateHandle.GetHashCode(); + } + + public static bool operator ==(UGCUpdateHandle_t x, UGCUpdateHandle_t y) + { + return x.m_UGCUpdateHandle == y.m_UGCUpdateHandle; + } + + public static bool operator !=(UGCUpdateHandle_t x, UGCUpdateHandle_t y) + { + return !(x == y); + } + + public static explicit operator UGCUpdateHandle_t(ulong value) + { + return new UGCUpdateHandle_t(value); + } + + public static explicit operator ulong(UGCUpdateHandle_t that) + { + return that.m_UGCUpdateHandle; + } + + public bool Equals(UGCUpdateHandle_t other) + { + return m_UGCUpdateHandle == other.m_UGCUpdateHandle; + } + + public int CompareTo(UGCUpdateHandle_t other) + { + return m_UGCUpdateHandle.CompareTo(other.m_UGCUpdateHandle); + } +} diff --git a/Assembly_Firstpass/Steamworks/UnreadChatMessagesChanged_t.cs b/Assembly_Firstpass/Steamworks/UnreadChatMessagesChanged_t.cs new file mode 100644 index 0000000..85acc68 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/UnreadChatMessagesChanged_t.cs @@ -0,0 +1,10 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8, Size = 1)] +[CallbackIdentity(348)] +public struct UnreadChatMessagesChanged_t +{ + public const int k_iCallback = 348; +} diff --git a/Assembly_Firstpass/Steamworks/UserAchievementIconFetched_t.cs b/Assembly_Firstpass/Steamworks/UserAchievementIconFetched_t.cs new file mode 100644 index 0000000..f83126d --- /dev/null +++ b/Assembly_Firstpass/Steamworks/UserAchievementIconFetched_t.cs @@ -0,0 +1,32 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1109)] +public struct UserAchievementIconFetched_t +{ + public const int k_iCallback = 1109; + + public CGameID m_nGameID; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] + private byte[] m_rgchAchievementName_; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bAchieved; + + public int m_nIconHandle; + + public string m_rgchAchievementName + { + get + { + return InteropHelp.ByteArrayToStringUTF8(m_rgchAchievementName_); + } + set + { + InteropHelp.StringToByteArrayUTF8(value, m_rgchAchievementName_, 128); + } + } +} diff --git a/Assembly_Firstpass/Steamworks/UserAchievementStored_t.cs b/Assembly_Firstpass/Steamworks/UserAchievementStored_t.cs new file mode 100644 index 0000000..223fa93 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/UserAchievementStored_t.cs @@ -0,0 +1,34 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1103)] +public struct UserAchievementStored_t +{ + public const int k_iCallback = 1103; + + public ulong m_nGameID; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bGroupAchievement; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] + private byte[] m_rgchAchievementName_; + + public uint m_nCurProgress; + + public uint m_nMaxProgress; + + public string m_rgchAchievementName + { + get + { + return InteropHelp.ByteArrayToStringUTF8(m_rgchAchievementName_); + } + set + { + InteropHelp.StringToByteArrayUTF8(value, m_rgchAchievementName_, 128); + } + } +} diff --git a/Assembly_Firstpass/Steamworks/UserFavoriteItemsListChanged_t.cs b/Assembly_Firstpass/Steamworks/UserFavoriteItemsListChanged_t.cs new file mode 100644 index 0000000..a77a81f --- /dev/null +++ b/Assembly_Firstpass/Steamworks/UserFavoriteItemsListChanged_t.cs @@ -0,0 +1,17 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(3407)] +public struct UserFavoriteItemsListChanged_t +{ + public const int k_iCallback = 3407; + + public PublishedFileId_t m_nPublishedFileId; + + public EResult m_eResult; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bWasAddRequest; +} diff --git a/Assembly_Firstpass/Steamworks/UserStatsReceived_t.cs b/Assembly_Firstpass/Steamworks/UserStatsReceived_t.cs new file mode 100644 index 0000000..71404c8 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/UserStatsReceived_t.cs @@ -0,0 +1,19 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Explicit, Pack = 8)] +[CallbackIdentity(1101)] +public struct UserStatsReceived_t +{ + public const int k_iCallback = 1101; + + [FieldOffset(0)] + public ulong m_nGameID; + + [FieldOffset(8)] + public EResult m_eResult; + + [FieldOffset(12)] + public CSteamID m_steamIDUser; +} diff --git a/Assembly_Firstpass/Steamworks/UserStatsStored_t.cs b/Assembly_Firstpass/Steamworks/UserStatsStored_t.cs new file mode 100644 index 0000000..e8ecc07 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/UserStatsStored_t.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1102)] +public struct UserStatsStored_t +{ + public const int k_iCallback = 1102; + + public ulong m_nGameID; + + public EResult m_eResult; +} diff --git a/Assembly_Firstpass/Steamworks/UserStatsUnloaded_t.cs b/Assembly_Firstpass/Steamworks/UserStatsUnloaded_t.cs new file mode 100644 index 0000000..fdb91c1 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/UserStatsUnloaded_t.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(1108)] +public struct UserStatsUnloaded_t +{ + public const int k_iCallback = 1108; + + public CSteamID m_steamIDUser; +} diff --git a/Assembly_Firstpass/Steamworks/ValidateAuthTicketResponse_t.cs b/Assembly_Firstpass/Steamworks/ValidateAuthTicketResponse_t.cs new file mode 100644 index 0000000..e1b541b --- /dev/null +++ b/Assembly_Firstpass/Steamworks/ValidateAuthTicketResponse_t.cs @@ -0,0 +1,16 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 4)] +[CallbackIdentity(143)] +public struct ValidateAuthTicketResponse_t +{ + public const int k_iCallback = 143; + + public CSteamID m_SteamID; + + public EAuthSessionResponse m_eAuthSessionResponse; + + public CSteamID m_OwnerSteamID; +} diff --git a/Assembly_Firstpass/Steamworks/Version.cs b/Assembly_Firstpass/Steamworks/Version.cs new file mode 100644 index 0000000..286b9e3 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/Version.cs @@ -0,0 +1,14 @@ +namespace Steamworks; + +public static class Version +{ + public const string SteamworksNETVersion = "15.0.1"; + + public const string SteamworksSDKVersion = "1.51"; + + public const string SteamAPIDLLVersion = "06.28.18.86"; + + public const int SteamAPIDLLSize = 239904; + + public const int SteamAPI64DLLSize = 265504; +} diff --git a/Assembly_Firstpass/Steamworks/VolumeHasChanged_t.cs b/Assembly_Firstpass/Steamworks/VolumeHasChanged_t.cs new file mode 100644 index 0000000..7cf39ea --- /dev/null +++ b/Assembly_Firstpass/Steamworks/VolumeHasChanged_t.cs @@ -0,0 +1,12 @@ +using System.Runtime.InteropServices; + +namespace Steamworks; + +[StructLayout(LayoutKind.Sequential, Pack = 8)] +[CallbackIdentity(4002)] +public struct VolumeHasChanged_t +{ + public const int k_iCallback = 4002; + + public float m_flNewVolume; +} diff --git a/Assembly_Firstpass/Steamworks/gameserveritem_t.cs b/Assembly_Firstpass/Steamworks/gameserveritem_t.cs new file mode 100644 index 0000000..0ae3046 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/gameserveritem_t.cs @@ -0,0 +1,109 @@ +using System; +using System.Runtime.InteropServices; +using System.Text; + +namespace Steamworks; + +[Serializable] +[StructLayout(LayoutKind.Sequential, Pack = 4, Size = 372)] +public class gameserveritem_t +{ + public servernetadr_t m_NetAdr; + + public int m_nPing; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bHadSuccessfulResponse; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bDoNotRefresh; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] + private byte[] m_szGameDir; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] + private byte[] m_szMap; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] + private byte[] m_szGameDescription; + + public uint m_nAppID; + + public int m_nPlayers; + + public int m_nMaxPlayers; + + public int m_nBotPlayers; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bPassword; + + [MarshalAs(UnmanagedType.I1)] + public bool m_bSecure; + + public uint m_ulTimeLastPlayed; + + public int m_nServerVersion; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] + private byte[] m_szServerName; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] + private byte[] m_szGameTags; + + public CSteamID m_steamID; + + public string GetGameDir() + { + return Encoding.UTF8.GetString(m_szGameDir, 0, Array.IndexOf(m_szGameDir, (byte)0)); + } + + public void SetGameDir(string dir) + { + m_szGameDir = Encoding.UTF8.GetBytes(dir + "\0"); + } + + public string GetMap() + { + return Encoding.UTF8.GetString(m_szMap, 0, Array.IndexOf(m_szMap, (byte)0)); + } + + public void SetMap(string map) + { + m_szMap = Encoding.UTF8.GetBytes(map + "\0"); + } + + public string GetGameDescription() + { + return Encoding.UTF8.GetString(m_szGameDescription, 0, Array.IndexOf(m_szGameDescription, (byte)0)); + } + + public void SetGameDescription(string desc) + { + m_szGameDescription = Encoding.UTF8.GetBytes(desc + "\0"); + } + + public string GetServerName() + { + if (m_szServerName[0] == 0) + { + return m_NetAdr.GetConnectionAddressString(); + } + return Encoding.UTF8.GetString(m_szServerName, 0, Array.IndexOf(m_szServerName, (byte)0)); + } + + public void SetServerName(string name) + { + m_szServerName = Encoding.UTF8.GetBytes(name + "\0"); + } + + public string GetGameTags() + { + return Encoding.UTF8.GetString(m_szGameTags, 0, Array.IndexOf(m_szGameTags, (byte)0)); + } + + public void SetGameTags(string tags) + { + m_szGameTags = Encoding.UTF8.GetBytes(tags + "\0"); + } +} diff --git a/Assembly_Firstpass/Steamworks/servernetadr_t.cs b/Assembly_Firstpass/Steamworks/servernetadr_t.cs new file mode 100644 index 0000000..8dfde4c --- /dev/null +++ b/Assembly_Firstpass/Steamworks/servernetadr_t.cs @@ -0,0 +1,133 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct servernetadr_t +{ + private ushort m_usConnectionPort; + + private ushort m_usQueryPort; + + private uint m_unIP; + + public void Init(uint ip, ushort usQueryPort, ushort usConnectionPort) + { + m_unIP = ip; + m_usQueryPort = usQueryPort; + m_usConnectionPort = usConnectionPort; + } + + public ushort GetQueryPort() + { + return m_usQueryPort; + } + + public void SetQueryPort(ushort usPort) + { + m_usQueryPort = usPort; + } + + public ushort GetConnectionPort() + { + return m_usConnectionPort; + } + + public void SetConnectionPort(ushort usPort) + { + m_usConnectionPort = usPort; + } + + public uint GetIP() + { + return m_unIP; + } + + public void SetIP(uint unIP) + { + m_unIP = unIP; + } + + public string GetConnectionAddressString() + { + return ToString(m_unIP, m_usConnectionPort); + } + + public string GetQueryAddressString() + { + return ToString(m_unIP, m_usQueryPort); + } + + public static string ToString(uint unIP, ushort usPort) + { + return $"{(ulong)(unIP >> 24) & 0xFFuL}.{(ulong)(unIP >> 16) & 0xFFuL}.{(ulong)(unIP >> 8) & 0xFFuL}.{(ulong)unIP & 0xFFuL}:{usPort}"; + } + + public static bool operator <(servernetadr_t x, servernetadr_t y) + { + if (x.m_unIP >= y.m_unIP) + { + if (x.m_unIP == y.m_unIP) + { + return x.m_usQueryPort < y.m_usQueryPort; + } + return false; + } + return true; + } + + public static bool operator >(servernetadr_t x, servernetadr_t y) + { + if (x.m_unIP <= y.m_unIP) + { + if (x.m_unIP == y.m_unIP) + { + return x.m_usQueryPort > y.m_usQueryPort; + } + return false; + } + return true; + } + + public override bool Equals(object other) + { + if (other is servernetadr_t) + { + return this == (servernetadr_t)other; + } + return false; + } + + public override int GetHashCode() + { + return m_unIP.GetHashCode() + m_usQueryPort.GetHashCode() + m_usConnectionPort.GetHashCode(); + } + + public static bool operator ==(servernetadr_t x, servernetadr_t y) + { + if (x.m_unIP == y.m_unIP && x.m_usQueryPort == y.m_usQueryPort) + { + return x.m_usConnectionPort == y.m_usConnectionPort; + } + return false; + } + + public static bool operator !=(servernetadr_t x, servernetadr_t y) + { + return !(x == y); + } + + public bool Equals(servernetadr_t other) + { + if (m_unIP == other.m_unIP && m_usQueryPort == other.m_usQueryPort) + { + return m_usConnectionPort == other.m_usConnectionPort; + } + return false; + } + + public int CompareTo(servernetadr_t other) + { + return m_unIP.CompareTo(other.m_unIP) + m_usQueryPort.CompareTo(other.m_usQueryPort) + m_usConnectionPort.CompareTo(other.m_usConnectionPort); + } +} |