From b3fbffb0623633c45a5ba046e263680ccf8fe9d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fa=E9=B8=BD?= <43724908+Akarinnnnn@users.noreply.github.com> Date: Fri, 3 Oct 2025 05:39:54 +0800 Subject: [PATCH] Fix most callback system related marshal issues. Added a conditional marshalling table to decide which alignment to use at runtime, this should fix most callback-retrieve related issues. Struct parameters in interface methods are still need to fix. --- CodeGen/src/structs.py | 95 +- .../anycpu/ConditionalMarshallerTable.head.cs | 19 + .../anycpu/ConditionalMarshallerTable.tail.cs | 4 + Standalone3.0/ConditionalMarshallerTable.cs | 19 + Standalone3.0/ConditionalMarshallerTable.g.cs | 3725 +++++++++ .../Runtime/CallbackDispatcher.cs | 8 +- .../Runtime/Packsize.cs | 35 +- .../Runtime/autogen/SteamCallbacks.cs | 6630 ++++++++++++++++- .../Runtime/autogen/SteamStructs.cs | 937 ++- 9 files changed, 11115 insertions(+), 357 deletions(-) create mode 100644 CodeGen/templates/anycpu/ConditionalMarshallerTable.head.cs create mode 100644 CodeGen/templates/anycpu/ConditionalMarshallerTable.tail.cs create mode 100644 Standalone3.0/ConditionalMarshallerTable.cs create mode 100644 Standalone3.0/ConditionalMarshallerTable.g.cs diff --git a/CodeGen/src/structs.py b/CodeGen/src/structs.py index 6fb5cb46..0ab200d0 100644 --- a/CodeGen/src/structs.py +++ b/CodeGen/src/structs.py @@ -1,5 +1,6 @@ import os import sys +from copy import deepcopy from SteamworksParser import steamworksparser g_TypeConversionDict = { @@ -102,11 +103,14 @@ def main(parser): lines = [] callbacklines = [] + + anyCpuConditionalMarshallerLines = [] # Contains conditional marshaller code only + for f in parser.files: for struct in f.structs: - lines.extend(parse(struct)) + lines.extend(parse(struct, True, anyCpuConditionalMarshallerLines)) for callback in f.callbacks: - callbacklines.extend(parse(callback)) + callbacklines.extend(parse(callback, True, anyCpuConditionalMarshallerLines)) with open("../com.rlabrecque.steamworks.net/Runtime/autogen/SteamStructs.cs", "wb") as out: with open("templates/header.txt", "r") as f: @@ -125,8 +129,23 @@ def main(parser): out.write(bytes(line + "\n", "utf-8")) out.write(bytes("}\n\n", "utf-8")) out.write(bytes("#endif // !DISABLESTEAMWORKS\n", "utf-8")) + + with open("../Standalone3.0/ConditionalMarshallerTable.g.cs", "wb") as out: + with open("templates/header.txt", "r") as f: + out.write(bytes(f.read(), "utf-8")) + + with open("templates/anycpu/ConditionalMarshallerTable.head.cs", "r") as f: + out.write(bytes(f.read(), "utf-8")) + + for line in anyCpuConditionalMarshallerLines: + out.write(bytes("\t\t\t" + line + "\n", "utf-8")) + + with open("templates/anycpu/ConditionalMarshallerTable.tail.cs", "r") as f: + out.write(bytes(f.read(), "utf-8")) + + out.write(bytes("#endif // !DISABLESTEAMWORKS\n", "utf-8")) -def parse(struct): +def parse(struct, isMainStruct, marshalTableLines: list[str]): if struct.name in g_SkippedStructs: return [] @@ -136,11 +155,13 @@ def parse(struct): continue lines.append("\t" + comment) - structname = struct.name + structname: str = struct.name packsize = g_CustomPackSize.get(structname, "Packsize.value") + isExplicitStruct = False if g_ExplicitStructs.get(structname, False): lines.append("\t[StructLayout(LayoutKind.Explicit, Pack = " + packsize + ")]") + isExplicitStruct = True elif struct.packsize: customsize = "" if len(struct.fields) == 0: @@ -155,7 +176,11 @@ def parse(struct): lines.append("\t[StructLayout(LayoutKind.Sequential)]") break - lines.append("\tpublic struct " + structname + " {") + if isMainStruct: + lines.append("\tpublic struct " + structname + " {") + else: + lines.append("\tinternal struct " + structname + " {") + lines.extend(insert_constructors(structname)) @@ -163,7 +188,12 @@ def parse(struct): lines.append("\t\tpublic const int k_iCallback = Constants." + struct.callbackid + ";") for field in struct.fields: - lines.extend(parse_field(field, structname)) + fieldHandlingStructName = structname + + if "_LargePack" in structname or "_SmallPack" in structname: + fieldHandlingStructName = fieldHandlingStructName[:structname.rindex("_")] + + lines.extend(parse_field(field, fieldHandlingStructName)) if struct.endcomments: for comment in struct.endcomments.rawprecomments: @@ -172,11 +202,62 @@ def parse(struct): else: lines.append("\t" + comment) + # Generate Any CPU marshal helper + if isMainStruct and packsize == "Packsize.value" and not isExplicitStruct: + marshalTableLines.append(f"marshallers.Add(typeof({structname}), (unmanaged) => {{") + marshalTableLines.append(f"\t{structname} result = default;") + marshalTableLines.append("") + marshalTableLines.append("\tif (Packsize.IsLargePack) {") + marshalTableLines.append(f"\t\tvar value = System.Runtime.InteropServices.Marshal.PtrToStructure<{structname}_LargePack>(unmanaged);") + + for field in struct.fields: + gen_fieldcopycode(field, structname, marshalTableLines) + + marshalTableLines.append("\t} else {") + marshalTableLines.append(f"\t\tvar value = System.Runtime.InteropServices.Marshal.PtrToStructure<{structname}_SmallPack>(unmanaged);") + + for field in struct.fields: + gen_fieldcopycode(field, structname, marshalTableLines) + + marshalTableLines.append("\t}") + marshalTableLines.append("") + marshalTableLines.append("\treturn result;") + marshalTableLines.append("});") + + pass + lines.append("\t}") lines.append("") + # Generate Any CPU struct variant for default pack-sized structs + if isMainStruct and packsize == "Packsize.value" and not isExplicitStruct: + lines.append("\t#if STEAMWORKS_ANYCPU") + + largePackStruct = struct + largePackStruct.name = structname + "_LargePack" + largePackStruct.packsize = 8 + lines.extend(parse(largePackStruct, False, marshalTableLines)) + + lines.append("") + + smallPackStruct = struct + smallPackStruct.name = structname + "_SmallPack" + smallPackStruct.packsize = 4 + lines.extend(parse(smallPackStruct, False, marshalTableLines)) + + lines.append("\t#endif") + return lines +def gen_fieldcopycode(field, structname, marshalTableLines): + fieldtype = g_TypeConversionDict.get(field.type, field.type) + fieldtype = g_SpecialFieldTypes.get(structname, dict()).get(field.name, fieldtype) + + if field.arraysize and fieldtype == "string": + marshalTableLines.append(f"\t\tresult.{field.name}_ = value.{field.name}_;") + else: + marshalTableLines.append(f"\t\tresult.{field.name} = value.{field.name};") + def parse_field(field, structname): lines = [] for comment in field.c.rawprecomments: @@ -213,7 +294,7 @@ def parse_field(field, structname): lines.append("\t\t[MarshalAs(UnmanagedType.I1)]") if field.arraysize and fieldtype == "string[]": - lines.append("\t\tprivate byte[] " + field.name + "_;") + lines.append("\t\tinternal byte[] " + field.name + "_;") lines.append("\t\tpublic string " + field.name + comment) lines.append("\t\t{") lines.append("\t\t\tget { return InteropHelp.ByteArrayToStringUTF8(" + field.name + "_); }") diff --git a/CodeGen/templates/anycpu/ConditionalMarshallerTable.head.cs b/CodeGen/templates/anycpu/ConditionalMarshallerTable.head.cs new file mode 100644 index 00000000..9688f02e --- /dev/null +++ b/CodeGen/templates/anycpu/ConditionalMarshallerTable.head.cs @@ -0,0 +1,19 @@ +/// +// This file is generated by CodeGen/src/struct.py + +#if !STEAMWORKS_ANYCPU +#error This file for Any CPU variant, not meaningful to any other platform. +#endif + +using System; +using System.Collections.Frozen; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Steamworks { + internal static partial class ConditionalMarshallerTable { + static ConditionalMarshallerTable() { + Dictionary> marshallers = new(); + diff --git a/CodeGen/templates/anycpu/ConditionalMarshallerTable.tail.cs b/CodeGen/templates/anycpu/ConditionalMarshallerTable.tail.cs new file mode 100644 index 00000000..702da47f --- /dev/null +++ b/CodeGen/templates/anycpu/ConditionalMarshallerTable.tail.cs @@ -0,0 +1,4 @@ + s_marshallerLookupTable = FrozenDictionary.ToFrozenDictionary(marshallers); + } + } +} diff --git a/Standalone3.0/ConditionalMarshallerTable.cs b/Standalone3.0/ConditionalMarshallerTable.cs new file mode 100644 index 00000000..f0e31161 --- /dev/null +++ b/Standalone3.0/ConditionalMarshallerTable.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Frozen; +using System.Collections.Generic; + +namespace Steamworks +{ + internal static partial class ConditionalMarshallerTable + { + private static readonly FrozenDictionary> s_marshallerLookupTable; + + // partial, in generated file + // static ConditionalMarshallerTable(); + + public static T Marshal(IntPtr unmanagetype) + { + return (T)s_marshallerLookupTable[typeof(T)](unmanagetype); + } + } +} diff --git a/Standalone3.0/ConditionalMarshallerTable.g.cs b/Standalone3.0/ConditionalMarshallerTable.g.cs new file mode 100644 index 00000000..7871a183 --- /dev/null +++ b/Standalone3.0/ConditionalMarshallerTable.g.cs @@ -0,0 +1,3725 @@ +// This file is provided under The MIT License as part of Steamworks.NET. +// Copyright (c) 2013-2022 Riley Labrecque +// Please see the included LICENSE.txt for additional information. + +// This file is automatically generated. +// Changes to this file will be reverted when you update Steamworks.NET + +#if !(UNITY_STANDALONE_WIN || UNITY_STANDALONE_LINUX || UNITY_STANDALONE_OSX || STEAMWORKS_WIN || STEAMWORKS_LIN_OSX) + #define DISABLESTEAMWORKS +#endif + +#if !DISABLESTEAMWORKS + +using System.Runtime.InteropServices; +using IntPtr = System.IntPtr; + +/// +// This file is generated by CodeGen/src/struct.py + +#if !STEAMWORKS_ANYCPU +#error This file for Any CPU variant, not meaningful to any other platform. +#endif + +using System; +using System.Collections.Frozen; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Steamworks { + internal static partial class ConditionalMarshallerTable { + static ConditionalMarshallerTable() { + Dictionary> marshallers = new(); + + marshallers.Add(typeof(DlcInstalled_t), (unmanaged) => { + DlcInstalled_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nAppID = value.m_nAppID; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nAppID = value.m_nAppID; + } + + return result; + }); + marshallers.Add(typeof(NewUrlLaunchParameters_t), (unmanaged) => { + NewUrlLaunchParameters_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } + + return result; + }); + marshallers.Add(typeof(AppProofOfPurchaseKeyResponse_t), (unmanaged) => { + AppProofOfPurchaseKeyResponse_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nAppID = value.m_nAppID; + result.m_cchKeyLength = value.m_cchKeyLength; + result.m_rgchKey_ = value.m_rgchKey_; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nAppID = value.m_nAppID; + result.m_cchKeyLength = value.m_cchKeyLength; + result.m_rgchKey_ = value.m_rgchKey_; + } + + return result; + }); + marshallers.Add(typeof(FileDetailsResult_t), (unmanaged) => { + FileDetailsResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_ulFileSize = value.m_ulFileSize; + result.m_FileSHA = value.m_FileSHA; + result.m_unFlags = value.m_unFlags; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_ulFileSize = value.m_ulFileSize; + result.m_FileSHA = value.m_FileSHA; + result.m_unFlags = value.m_unFlags; + } + + return result; + }); + marshallers.Add(typeof(TimedTrialStatus_t), (unmanaged) => { + TimedTrialStatus_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_unAppID = value.m_unAppID; + result.m_bIsOffline = value.m_bIsOffline; + result.m_unSecondsAllowed = value.m_unSecondsAllowed; + result.m_unSecondsPlayed = value.m_unSecondsPlayed; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_unAppID = value.m_unAppID; + result.m_bIsOffline = value.m_bIsOffline; + result.m_unSecondsAllowed = value.m_unSecondsAllowed; + result.m_unSecondsPlayed = value.m_unSecondsPlayed; + } + + return result; + }); + marshallers.Add(typeof(FriendGameInfo_t), (unmanaged) => { + FriendGameInfo_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_gameID = value.m_gameID; + result.m_unGameIP = value.m_unGameIP; + result.m_usGamePort = value.m_usGamePort; + result.m_usQueryPort = value.m_usQueryPort; + result.m_steamIDLobby = value.m_steamIDLobby; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_gameID = value.m_gameID; + result.m_unGameIP = value.m_unGameIP; + result.m_usGamePort = value.m_usGamePort; + result.m_usQueryPort = value.m_usQueryPort; + result.m_steamIDLobby = value.m_steamIDLobby; + } + + return result; + }); + marshallers.Add(typeof(PersonaStateChange_t), (unmanaged) => { + PersonaStateChange_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_ulSteamID = value.m_ulSteamID; + result.m_nChangeFlags = value.m_nChangeFlags; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_ulSteamID = value.m_ulSteamID; + result.m_nChangeFlags = value.m_nChangeFlags; + } + + return result; + }); + marshallers.Add(typeof(GameOverlayActivated_t), (unmanaged) => { + GameOverlayActivated_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_bActive = value.m_bActive; + result.m_bUserInitiated = value.m_bUserInitiated; + result.m_nAppID = value.m_nAppID; + result.m_dwOverlayPID = value.m_dwOverlayPID; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_bActive = value.m_bActive; + result.m_bUserInitiated = value.m_bUserInitiated; + result.m_nAppID = value.m_nAppID; + result.m_dwOverlayPID = value.m_dwOverlayPID; + } + + return result; + }); + marshallers.Add(typeof(GameServerChangeRequested_t), (unmanaged) => { + GameServerChangeRequested_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_rgchServer_ = value.m_rgchServer_; + result.m_rgchPassword_ = value.m_rgchPassword_; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_rgchServer_ = value.m_rgchServer_; + result.m_rgchPassword_ = value.m_rgchPassword_; + } + + return result; + }); + marshallers.Add(typeof(GameLobbyJoinRequested_t), (unmanaged) => { + GameLobbyJoinRequested_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_steamIDLobby = value.m_steamIDLobby; + result.m_steamIDFriend = value.m_steamIDFriend; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_steamIDLobby = value.m_steamIDLobby; + result.m_steamIDFriend = value.m_steamIDFriend; + } + + return result; + }); + marshallers.Add(typeof(ClanOfficerListResponse_t), (unmanaged) => { + ClanOfficerListResponse_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_steamIDClan = value.m_steamIDClan; + result.m_cOfficers = value.m_cOfficers; + result.m_bSuccess = value.m_bSuccess; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_steamIDClan = value.m_steamIDClan; + result.m_cOfficers = value.m_cOfficers; + result.m_bSuccess = value.m_bSuccess; + } + + return result; + }); + marshallers.Add(typeof(GameRichPresenceJoinRequested_t), (unmanaged) => { + GameRichPresenceJoinRequested_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_steamIDFriend = value.m_steamIDFriend; + result.m_rgchConnect_ = value.m_rgchConnect_; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_steamIDFriend = value.m_steamIDFriend; + result.m_rgchConnect_ = value.m_rgchConnect_; + } + + return result; + }); + marshallers.Add(typeof(GameConnectedChatJoin_t), (unmanaged) => { + GameConnectedChatJoin_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_steamIDClanChat = value.m_steamIDClanChat; + result.m_steamIDUser = value.m_steamIDUser; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_steamIDClanChat = value.m_steamIDClanChat; + result.m_steamIDUser = value.m_steamIDUser; + } + + return result; + }); + marshallers.Add(typeof(DownloadClanActivityCountsResult_t), (unmanaged) => { + DownloadClanActivityCountsResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_bSuccess = value.m_bSuccess; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_bSuccess = value.m_bSuccess; + } + + return result; + }); + marshallers.Add(typeof(UnreadChatMessagesChanged_t), (unmanaged) => { + UnreadChatMessagesChanged_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } + + return result; + }); + marshallers.Add(typeof(OverlayBrowserProtocolNavigation_t), (unmanaged) => { + OverlayBrowserProtocolNavigation_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.rgchURI_ = value.rgchURI_; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.rgchURI_ = value.rgchURI_; + } + + return result; + }); + marshallers.Add(typeof(EquippedProfileItemsChanged_t), (unmanaged) => { + EquippedProfileItemsChanged_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_steamID = value.m_steamID; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_steamID = value.m_steamID; + } + + return result; + }); + marshallers.Add(typeof(EquippedProfileItems_t), (unmanaged) => { + EquippedProfileItems_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_steamID = value.m_steamID; + result.m_bHasAnimatedAvatar = value.m_bHasAnimatedAvatar; + result.m_bHasAvatarFrame = value.m_bHasAvatarFrame; + result.m_bHasProfileModifier = value.m_bHasProfileModifier; + result.m_bHasProfileBackground = value.m_bHasProfileBackground; + result.m_bHasMiniProfileBackground = value.m_bHasMiniProfileBackground; + result.m_bFromCache = value.m_bFromCache; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_steamID = value.m_steamID; + result.m_bHasAnimatedAvatar = value.m_bHasAnimatedAvatar; + result.m_bHasAvatarFrame = value.m_bHasAvatarFrame; + result.m_bHasProfileModifier = value.m_bHasProfileModifier; + result.m_bHasProfileBackground = value.m_bHasProfileBackground; + result.m_bHasMiniProfileBackground = value.m_bHasMiniProfileBackground; + result.m_bFromCache = value.m_bFromCache; + } + + return result; + }); + marshallers.Add(typeof(GCMessageAvailable_t), (unmanaged) => { + GCMessageAvailable_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nMessageSize = value.m_nMessageSize; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nMessageSize = value.m_nMessageSize; + } + + return result; + }); + marshallers.Add(typeof(GCMessageFailed_t), (unmanaged) => { + GCMessageFailed_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } + + return result; + }); + marshallers.Add(typeof(GSClientApprove_t), (unmanaged) => { + GSClientApprove_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_SteamID = value.m_SteamID; + result.m_OwnerSteamID = value.m_OwnerSteamID; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_SteamID = value.m_SteamID; + result.m_OwnerSteamID = value.m_OwnerSteamID; + } + + return result; + }); + marshallers.Add(typeof(GSClientAchievementStatus_t), (unmanaged) => { + GSClientAchievementStatus_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_SteamID = value.m_SteamID; + result.m_pchAchievement_ = value.m_pchAchievement_; + result.m_bUnlocked = value.m_bUnlocked; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_SteamID = value.m_SteamID; + result.m_pchAchievement_ = value.m_pchAchievement_; + result.m_bUnlocked = value.m_bUnlocked; + } + + return result; + }); + marshallers.Add(typeof(GSPolicyResponse_t), (unmanaged) => { + GSPolicyResponse_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_bSecure = value.m_bSecure; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_bSecure = value.m_bSecure; + } + + return result; + }); + marshallers.Add(typeof(GSGameplayStats_t), (unmanaged) => { + GSGameplayStats_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nRank = value.m_nRank; + result.m_unTotalConnects = value.m_unTotalConnects; + result.m_unTotalMinutesPlayed = value.m_unTotalMinutesPlayed; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nRank = value.m_nRank; + result.m_unTotalConnects = value.m_unTotalConnects; + result.m_unTotalMinutesPlayed = value.m_unTotalMinutesPlayed; + } + + return result; + }); + marshallers.Add(typeof(GSReputation_t), (unmanaged) => { + GSReputation_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_unReputationScore = value.m_unReputationScore; + result.m_bBanned = value.m_bBanned; + result.m_unBannedIP = value.m_unBannedIP; + result.m_usBannedPort = value.m_usBannedPort; + result.m_ulBannedGameID = value.m_ulBannedGameID; + result.m_unBanExpires = value.m_unBanExpires; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_unReputationScore = value.m_unReputationScore; + result.m_bBanned = value.m_bBanned; + result.m_unBannedIP = value.m_unBannedIP; + result.m_usBannedPort = value.m_usBannedPort; + result.m_ulBannedGameID = value.m_ulBannedGameID; + result.m_unBanExpires = value.m_unBanExpires; + } + + return result; + }); + marshallers.Add(typeof(AssociateWithClanResult_t), (unmanaged) => { + AssociateWithClanResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + } + + return result; + }); + marshallers.Add(typeof(ComputeNewPlayerCompatibilityResult_t), (unmanaged) => { + ComputeNewPlayerCompatibilityResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_cPlayersThatDontLikeCandidate = value.m_cPlayersThatDontLikeCandidate; + result.m_cPlayersThatCandidateDoesntLike = value.m_cPlayersThatCandidateDoesntLike; + result.m_cClanPlayersThatDontLikeCandidate = value.m_cClanPlayersThatDontLikeCandidate; + result.m_SteamIDCandidate = value.m_SteamIDCandidate; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_cPlayersThatDontLikeCandidate = value.m_cPlayersThatDontLikeCandidate; + result.m_cPlayersThatCandidateDoesntLike = value.m_cPlayersThatCandidateDoesntLike; + result.m_cClanPlayersThatDontLikeCandidate = value.m_cClanPlayersThatDontLikeCandidate; + result.m_SteamIDCandidate = value.m_SteamIDCandidate; + } + + return result; + }); + marshallers.Add(typeof(GSStatsUnloaded_t), (unmanaged) => { + GSStatsUnloaded_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_steamIDUser = value.m_steamIDUser; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_steamIDUser = value.m_steamIDUser; + } + + return result; + }); + marshallers.Add(typeof(HTML_BrowserReady_t), (unmanaged) => { + HTML_BrowserReady_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + } + + return result; + }); + marshallers.Add(typeof(HTML_NeedsPaint_t), (unmanaged) => { + HTML_NeedsPaint_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.pBGRA = value.pBGRA; + result.unWide = value.unWide; + result.unTall = value.unTall; + result.unUpdateX = value.unUpdateX; + result.unUpdateY = value.unUpdateY; + result.unUpdateWide = value.unUpdateWide; + result.unUpdateTall = value.unUpdateTall; + result.unScrollX = value.unScrollX; + result.unScrollY = value.unScrollY; + result.flPageScale = value.flPageScale; + result.unPageSerial = value.unPageSerial; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.pBGRA = value.pBGRA; + result.unWide = value.unWide; + result.unTall = value.unTall; + result.unUpdateX = value.unUpdateX; + result.unUpdateY = value.unUpdateY; + result.unUpdateWide = value.unUpdateWide; + result.unUpdateTall = value.unUpdateTall; + result.unScrollX = value.unScrollX; + result.unScrollY = value.unScrollY; + result.flPageScale = value.flPageScale; + result.unPageSerial = value.unPageSerial; + } + + return result; + }); + marshallers.Add(typeof(HTML_StartRequest_t), (unmanaged) => { + HTML_StartRequest_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.pchURL = value.pchURL; + result.pchTarget = value.pchTarget; + result.pchPostData = value.pchPostData; + result.bIsRedirect = value.bIsRedirect; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.pchURL = value.pchURL; + result.pchTarget = value.pchTarget; + result.pchPostData = value.pchPostData; + result.bIsRedirect = value.bIsRedirect; + } + + return result; + }); + marshallers.Add(typeof(HTML_CloseBrowser_t), (unmanaged) => { + HTML_CloseBrowser_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + } + + return result; + }); + marshallers.Add(typeof(HTML_URLChanged_t), (unmanaged) => { + HTML_URLChanged_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.pchURL = value.pchURL; + result.pchPostData = value.pchPostData; + result.bIsRedirect = value.bIsRedirect; + result.pchPageTitle = value.pchPageTitle; + result.bNewNavigation = value.bNewNavigation; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.pchURL = value.pchURL; + result.pchPostData = value.pchPostData; + result.bIsRedirect = value.bIsRedirect; + result.pchPageTitle = value.pchPageTitle; + result.bNewNavigation = value.bNewNavigation; + } + + return result; + }); + marshallers.Add(typeof(HTML_FinishedRequest_t), (unmanaged) => { + HTML_FinishedRequest_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.pchURL = value.pchURL; + result.pchPageTitle = value.pchPageTitle; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.pchURL = value.pchURL; + result.pchPageTitle = value.pchPageTitle; + } + + return result; + }); + marshallers.Add(typeof(HTML_OpenLinkInNewTab_t), (unmanaged) => { + HTML_OpenLinkInNewTab_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.pchURL = value.pchURL; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.pchURL = value.pchURL; + } + + return result; + }); + marshallers.Add(typeof(HTML_ChangedTitle_t), (unmanaged) => { + HTML_ChangedTitle_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.pchTitle = value.pchTitle; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.pchTitle = value.pchTitle; + } + + return result; + }); + marshallers.Add(typeof(HTML_SearchResults_t), (unmanaged) => { + HTML_SearchResults_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.unResults = value.unResults; + result.unCurrentMatch = value.unCurrentMatch; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.unResults = value.unResults; + result.unCurrentMatch = value.unCurrentMatch; + } + + return result; + }); + marshallers.Add(typeof(HTML_CanGoBackAndForward_t), (unmanaged) => { + HTML_CanGoBackAndForward_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.bCanGoBack = value.bCanGoBack; + result.bCanGoForward = value.bCanGoForward; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.bCanGoBack = value.bCanGoBack; + result.bCanGoForward = value.bCanGoForward; + } + + return result; + }); + marshallers.Add(typeof(HTML_HorizontalScroll_t), (unmanaged) => { + HTML_HorizontalScroll_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.unScrollMax = value.unScrollMax; + result.unScrollCurrent = value.unScrollCurrent; + result.flPageScale = value.flPageScale; + result.bVisible = value.bVisible; + result.unPageSize = value.unPageSize; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.unScrollMax = value.unScrollMax; + result.unScrollCurrent = value.unScrollCurrent; + result.flPageScale = value.flPageScale; + result.bVisible = value.bVisible; + result.unPageSize = value.unPageSize; + } + + return result; + }); + marshallers.Add(typeof(HTML_VerticalScroll_t), (unmanaged) => { + HTML_VerticalScroll_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.unScrollMax = value.unScrollMax; + result.unScrollCurrent = value.unScrollCurrent; + result.flPageScale = value.flPageScale; + result.bVisible = value.bVisible; + result.unPageSize = value.unPageSize; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.unScrollMax = value.unScrollMax; + result.unScrollCurrent = value.unScrollCurrent; + result.flPageScale = value.flPageScale; + result.bVisible = value.bVisible; + result.unPageSize = value.unPageSize; + } + + return result; + }); + marshallers.Add(typeof(HTML_LinkAtPosition_t), (unmanaged) => { + HTML_LinkAtPosition_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.x = value.x; + result.y = value.y; + result.pchURL = value.pchURL; + result.bInput = value.bInput; + result.bLiveLink = value.bLiveLink; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.x = value.x; + result.y = value.y; + result.pchURL = value.pchURL; + result.bInput = value.bInput; + result.bLiveLink = value.bLiveLink; + } + + return result; + }); + marshallers.Add(typeof(HTML_JSAlert_t), (unmanaged) => { + HTML_JSAlert_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.pchMessage = value.pchMessage; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.pchMessage = value.pchMessage; + } + + return result; + }); + marshallers.Add(typeof(HTML_JSConfirm_t), (unmanaged) => { + HTML_JSConfirm_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.pchMessage = value.pchMessage; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.pchMessage = value.pchMessage; + } + + return result; + }); + marshallers.Add(typeof(HTML_FileOpenDialog_t), (unmanaged) => { + HTML_FileOpenDialog_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.pchTitle = value.pchTitle; + result.pchInitialFile = value.pchInitialFile; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.pchTitle = value.pchTitle; + result.pchInitialFile = value.pchInitialFile; + } + + return result; + }); + marshallers.Add(typeof(HTML_NewWindow_t), (unmanaged) => { + HTML_NewWindow_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.pchURL = value.pchURL; + result.unX = value.unX; + result.unY = value.unY; + result.unWide = value.unWide; + result.unTall = value.unTall; + result.unNewWindow_BrowserHandle_IGNORE = value.unNewWindow_BrowserHandle_IGNORE; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.pchURL = value.pchURL; + result.unX = value.unX; + result.unY = value.unY; + result.unWide = value.unWide; + result.unTall = value.unTall; + result.unNewWindow_BrowserHandle_IGNORE = value.unNewWindow_BrowserHandle_IGNORE; + } + + return result; + }); + marshallers.Add(typeof(HTML_SetCursor_t), (unmanaged) => { + HTML_SetCursor_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.eMouseCursor = value.eMouseCursor; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.eMouseCursor = value.eMouseCursor; + } + + return result; + }); + marshallers.Add(typeof(HTML_StatusText_t), (unmanaged) => { + HTML_StatusText_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.pchMsg = value.pchMsg; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.pchMsg = value.pchMsg; + } + + return result; + }); + marshallers.Add(typeof(HTML_ShowToolTip_t), (unmanaged) => { + HTML_ShowToolTip_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.pchMsg = value.pchMsg; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.pchMsg = value.pchMsg; + } + + return result; + }); + marshallers.Add(typeof(HTML_UpdateToolTip_t), (unmanaged) => { + HTML_UpdateToolTip_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.pchMsg = value.pchMsg; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.pchMsg = value.pchMsg; + } + + return result; + }); + marshallers.Add(typeof(HTML_HideToolTip_t), (unmanaged) => { + HTML_HideToolTip_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + } + + return result; + }); + marshallers.Add(typeof(HTML_BrowserRestarted_t), (unmanaged) => { + HTML_BrowserRestarted_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.unOldBrowserHandle = value.unOldBrowserHandle; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.unBrowserHandle = value.unBrowserHandle; + result.unOldBrowserHandle = value.unOldBrowserHandle; + } + + return result; + }); + marshallers.Add(typeof(HTTPRequestCompleted_t), (unmanaged) => { + HTTPRequestCompleted_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_hRequest = value.m_hRequest; + result.m_ulContextValue = value.m_ulContextValue; + result.m_bRequestSuccessful = value.m_bRequestSuccessful; + result.m_eStatusCode = value.m_eStatusCode; + result.m_unBodySize = value.m_unBodySize; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_hRequest = value.m_hRequest; + result.m_ulContextValue = value.m_ulContextValue; + result.m_bRequestSuccessful = value.m_bRequestSuccessful; + result.m_eStatusCode = value.m_eStatusCode; + result.m_unBodySize = value.m_unBodySize; + } + + return result; + }); + marshallers.Add(typeof(HTTPRequestHeadersReceived_t), (unmanaged) => { + HTTPRequestHeadersReceived_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_hRequest = value.m_hRequest; + result.m_ulContextValue = value.m_ulContextValue; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_hRequest = value.m_hRequest; + result.m_ulContextValue = value.m_ulContextValue; + } + + return result; + }); + marshallers.Add(typeof(HTTPRequestDataReceived_t), (unmanaged) => { + HTTPRequestDataReceived_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_hRequest = value.m_hRequest; + result.m_ulContextValue = value.m_ulContextValue; + result.m_cOffset = value.m_cOffset; + result.m_cBytesReceived = value.m_cBytesReceived; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_hRequest = value.m_hRequest; + result.m_ulContextValue = value.m_ulContextValue; + result.m_cOffset = value.m_cOffset; + result.m_cBytesReceived = value.m_cBytesReceived; + } + + return result; + }); + marshallers.Add(typeof(InputMotionData_t), (unmanaged) => { + InputMotionData_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.rotQuatX = value.rotQuatX; + result.rotQuatY = value.rotQuatY; + result.rotQuatZ = value.rotQuatZ; + result.rotQuatW = value.rotQuatW; + result.posAccelX = value.posAccelX; + result.posAccelY = value.posAccelY; + result.posAccelZ = value.posAccelZ; + result.rotVelX = value.rotVelX; + result.rotVelY = value.rotVelY; + result.rotVelZ = value.rotVelZ; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.rotQuatX = value.rotQuatX; + result.rotQuatY = value.rotQuatY; + result.rotQuatZ = value.rotQuatZ; + result.rotQuatW = value.rotQuatW; + result.posAccelX = value.posAccelX; + result.posAccelY = value.posAccelY; + result.posAccelZ = value.posAccelZ; + result.rotVelX = value.rotVelX; + result.rotVelY = value.rotVelY; + result.rotVelZ = value.rotVelZ; + } + + return result; + }); + marshallers.Add(typeof(SteamInputDeviceConnected_t), (unmanaged) => { + SteamInputDeviceConnected_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_ulConnectedDeviceHandle = value.m_ulConnectedDeviceHandle; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_ulConnectedDeviceHandle = value.m_ulConnectedDeviceHandle; + } + + return result; + }); + marshallers.Add(typeof(SteamInputDeviceDisconnected_t), (unmanaged) => { + SteamInputDeviceDisconnected_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_ulDisconnectedDeviceHandle = value.m_ulDisconnectedDeviceHandle; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_ulDisconnectedDeviceHandle = value.m_ulDisconnectedDeviceHandle; + } + + return result; + }); + marshallers.Add(typeof(SteamInputConfigurationLoaded_t), (unmanaged) => { + SteamInputConfigurationLoaded_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_unAppID = value.m_unAppID; + result.m_ulDeviceHandle = value.m_ulDeviceHandle; + result.m_ulMappingCreator = value.m_ulMappingCreator; + result.m_unMajorRevision = value.m_unMajorRevision; + result.m_unMinorRevision = value.m_unMinorRevision; + result.m_bUsesSteamInputAPI = value.m_bUsesSteamInputAPI; + result.m_bUsesGamepadAPI = value.m_bUsesGamepadAPI; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_unAppID = value.m_unAppID; + result.m_ulDeviceHandle = value.m_ulDeviceHandle; + result.m_ulMappingCreator = value.m_ulMappingCreator; + result.m_unMajorRevision = value.m_unMajorRevision; + result.m_unMinorRevision = value.m_unMinorRevision; + result.m_bUsesSteamInputAPI = value.m_bUsesSteamInputAPI; + result.m_bUsesGamepadAPI = value.m_bUsesGamepadAPI; + } + + return result; + }); + marshallers.Add(typeof(SteamInputGamepadSlotChange_t), (unmanaged) => { + SteamInputGamepadSlotChange_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_unAppID = value.m_unAppID; + result.m_ulDeviceHandle = value.m_ulDeviceHandle; + result.m_eDeviceType = value.m_eDeviceType; + result.m_nOldGamepadSlot = value.m_nOldGamepadSlot; + result.m_nNewGamepadSlot = value.m_nNewGamepadSlot; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_unAppID = value.m_unAppID; + result.m_ulDeviceHandle = value.m_ulDeviceHandle; + result.m_eDeviceType = value.m_eDeviceType; + result.m_nOldGamepadSlot = value.m_nOldGamepadSlot; + result.m_nNewGamepadSlot = value.m_nNewGamepadSlot; + } + + return result; + }); + marshallers.Add(typeof(SteamItemDetails_t), (unmanaged) => { + SteamItemDetails_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_itemId = value.m_itemId; + result.m_iDefinition = value.m_iDefinition; + result.m_unQuantity = value.m_unQuantity; + result.m_unFlags = value.m_unFlags; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_itemId = value.m_itemId; + result.m_iDefinition = value.m_iDefinition; + result.m_unQuantity = value.m_unQuantity; + result.m_unFlags = value.m_unFlags; + } + + return result; + }); + marshallers.Add(typeof(SteamInventoryResultReady_t), (unmanaged) => { + SteamInventoryResultReady_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_handle = value.m_handle; + result.m_result = value.m_result; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_handle = value.m_handle; + result.m_result = value.m_result; + } + + return result; + }); + marshallers.Add(typeof(SteamInventoryFullUpdate_t), (unmanaged) => { + SteamInventoryFullUpdate_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_handle = value.m_handle; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_handle = value.m_handle; + } + + return result; + }); + marshallers.Add(typeof(SteamInventoryDefinitionUpdate_t), (unmanaged) => { + SteamInventoryDefinitionUpdate_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } + + return result; + }); + marshallers.Add(typeof(SteamInventoryEligiblePromoItemDefIDs_t), (unmanaged) => { + SteamInventoryEligiblePromoItemDefIDs_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_result = value.m_result; + result.m_steamID = value.m_steamID; + result.m_numEligiblePromoItemDefs = value.m_numEligiblePromoItemDefs; + result.m_bCachedData = value.m_bCachedData; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_result = value.m_result; + result.m_steamID = value.m_steamID; + result.m_numEligiblePromoItemDefs = value.m_numEligiblePromoItemDefs; + result.m_bCachedData = value.m_bCachedData; + } + + return result; + }); + marshallers.Add(typeof(SteamInventoryStartPurchaseResult_t), (unmanaged) => { + SteamInventoryStartPurchaseResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_result = value.m_result; + result.m_ulOrderID = value.m_ulOrderID; + result.m_ulTransID = value.m_ulTransID; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_result = value.m_result; + result.m_ulOrderID = value.m_ulOrderID; + result.m_ulTransID = value.m_ulTransID; + } + + return result; + }); + marshallers.Add(typeof(SteamInventoryRequestPricesResult_t), (unmanaged) => { + SteamInventoryRequestPricesResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_result = value.m_result; + result.m_rgchCurrency_ = value.m_rgchCurrency_; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_result = value.m_result; + result.m_rgchCurrency_ = value.m_rgchCurrency_; + } + + return result; + }); + marshallers.Add(typeof(SteamPartyBeaconLocation_t), (unmanaged) => { + SteamPartyBeaconLocation_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eType = value.m_eType; + result.m_ulLocationID = value.m_ulLocationID; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eType = value.m_eType; + result.m_ulLocationID = value.m_ulLocationID; + } + + return result; + }); + marshallers.Add(typeof(FavoritesListChanged_t), (unmanaged) => { + FavoritesListChanged_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nIP = value.m_nIP; + result.m_nQueryPort = value.m_nQueryPort; + result.m_nConnPort = value.m_nConnPort; + result.m_nAppID = value.m_nAppID; + result.m_nFlags = value.m_nFlags; + result.m_bAdd = value.m_bAdd; + result.m_unAccountId = value.m_unAccountId; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nIP = value.m_nIP; + result.m_nQueryPort = value.m_nQueryPort; + result.m_nConnPort = value.m_nConnPort; + result.m_nAppID = value.m_nAppID; + result.m_nFlags = value.m_nFlags; + result.m_bAdd = value.m_bAdd; + result.m_unAccountId = value.m_unAccountId; + } + + return result; + }); + marshallers.Add(typeof(LobbyInvite_t), (unmanaged) => { + LobbyInvite_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_ulSteamIDUser = value.m_ulSteamIDUser; + result.m_ulSteamIDLobby = value.m_ulSteamIDLobby; + result.m_ulGameID = value.m_ulGameID; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_ulSteamIDUser = value.m_ulSteamIDUser; + result.m_ulSteamIDLobby = value.m_ulSteamIDLobby; + result.m_ulGameID = value.m_ulGameID; + } + + return result; + }); + marshallers.Add(typeof(LobbyEnter_t), (unmanaged) => { + LobbyEnter_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_ulSteamIDLobby = value.m_ulSteamIDLobby; + result.m_rgfChatPermissions = value.m_rgfChatPermissions; + result.m_bLocked = value.m_bLocked; + result.m_EChatRoomEnterResponse = value.m_EChatRoomEnterResponse; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_ulSteamIDLobby = value.m_ulSteamIDLobby; + result.m_rgfChatPermissions = value.m_rgfChatPermissions; + result.m_bLocked = value.m_bLocked; + result.m_EChatRoomEnterResponse = value.m_EChatRoomEnterResponse; + } + + return result; + }); + marshallers.Add(typeof(LobbyDataUpdate_t), (unmanaged) => { + LobbyDataUpdate_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_ulSteamIDLobby = value.m_ulSteamIDLobby; + result.m_ulSteamIDMember = value.m_ulSteamIDMember; + result.m_bSuccess = value.m_bSuccess; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_ulSteamIDLobby = value.m_ulSteamIDLobby; + result.m_ulSteamIDMember = value.m_ulSteamIDMember; + result.m_bSuccess = value.m_bSuccess; + } + + return result; + }); + marshallers.Add(typeof(LobbyChatUpdate_t), (unmanaged) => { + LobbyChatUpdate_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_ulSteamIDLobby = value.m_ulSteamIDLobby; + result.m_ulSteamIDUserChanged = value.m_ulSteamIDUserChanged; + result.m_ulSteamIDMakingChange = value.m_ulSteamIDMakingChange; + result.m_rgfChatMemberStateChange = value.m_rgfChatMemberStateChange; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_ulSteamIDLobby = value.m_ulSteamIDLobby; + result.m_ulSteamIDUserChanged = value.m_ulSteamIDUserChanged; + result.m_ulSteamIDMakingChange = value.m_ulSteamIDMakingChange; + result.m_rgfChatMemberStateChange = value.m_rgfChatMemberStateChange; + } + + return result; + }); + marshallers.Add(typeof(LobbyChatMsg_t), (unmanaged) => { + LobbyChatMsg_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_ulSteamIDLobby = value.m_ulSteamIDLobby; + result.m_ulSteamIDUser = value.m_ulSteamIDUser; + result.m_eChatEntryType = value.m_eChatEntryType; + result.m_iChatID = value.m_iChatID; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_ulSteamIDLobby = value.m_ulSteamIDLobby; + result.m_ulSteamIDUser = value.m_ulSteamIDUser; + result.m_eChatEntryType = value.m_eChatEntryType; + result.m_iChatID = value.m_iChatID; + } + + return result; + }); + marshallers.Add(typeof(LobbyGameCreated_t), (unmanaged) => { + LobbyGameCreated_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_ulSteamIDLobby = value.m_ulSteamIDLobby; + result.m_ulSteamIDGameServer = value.m_ulSteamIDGameServer; + result.m_unIP = value.m_unIP; + result.m_usPort = value.m_usPort; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_ulSteamIDLobby = value.m_ulSteamIDLobby; + result.m_ulSteamIDGameServer = value.m_ulSteamIDGameServer; + result.m_unIP = value.m_unIP; + result.m_usPort = value.m_usPort; + } + + return result; + }); + marshallers.Add(typeof(LobbyMatchList_t), (unmanaged) => { + LobbyMatchList_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nLobbiesMatching = value.m_nLobbiesMatching; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nLobbiesMatching = value.m_nLobbiesMatching; + } + + return result; + }); + marshallers.Add(typeof(LobbyKicked_t), (unmanaged) => { + LobbyKicked_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_ulSteamIDLobby = value.m_ulSteamIDLobby; + result.m_ulSteamIDAdmin = value.m_ulSteamIDAdmin; + result.m_bKickedDueToDisconnect = value.m_bKickedDueToDisconnect; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_ulSteamIDLobby = value.m_ulSteamIDLobby; + result.m_ulSteamIDAdmin = value.m_ulSteamIDAdmin; + result.m_bKickedDueToDisconnect = value.m_bKickedDueToDisconnect; + } + + return result; + }); + marshallers.Add(typeof(LobbyCreated_t), (unmanaged) => { + LobbyCreated_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_ulSteamIDLobby = value.m_ulSteamIDLobby; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_ulSteamIDLobby = value.m_ulSteamIDLobby; + } + + return result; + }); + marshallers.Add(typeof(FavoritesListAccountsUpdated_t), (unmanaged) => { + FavoritesListAccountsUpdated_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + } + + return result; + }); + marshallers.Add(typeof(SearchForGameProgressCallback_t), (unmanaged) => { + SearchForGameProgressCallback_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_ullSearchID = value.m_ullSearchID; + result.m_eResult = value.m_eResult; + result.m_lobbyID = value.m_lobbyID; + result.m_steamIDEndedSearch = value.m_steamIDEndedSearch; + result.m_nSecondsRemainingEstimate = value.m_nSecondsRemainingEstimate; + result.m_cPlayersSearching = value.m_cPlayersSearching; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_ullSearchID = value.m_ullSearchID; + result.m_eResult = value.m_eResult; + result.m_lobbyID = value.m_lobbyID; + result.m_steamIDEndedSearch = value.m_steamIDEndedSearch; + result.m_nSecondsRemainingEstimate = value.m_nSecondsRemainingEstimate; + result.m_cPlayersSearching = value.m_cPlayersSearching; + } + + return result; + }); + marshallers.Add(typeof(SearchForGameResultCallback_t), (unmanaged) => { + SearchForGameResultCallback_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_ullSearchID = value.m_ullSearchID; + result.m_eResult = value.m_eResult; + result.m_nCountPlayersInGame = value.m_nCountPlayersInGame; + result.m_nCountAcceptedGame = value.m_nCountAcceptedGame; + result.m_steamIDHost = value.m_steamIDHost; + result.m_bFinalCallback = value.m_bFinalCallback; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_ullSearchID = value.m_ullSearchID; + result.m_eResult = value.m_eResult; + result.m_nCountPlayersInGame = value.m_nCountPlayersInGame; + result.m_nCountAcceptedGame = value.m_nCountAcceptedGame; + result.m_steamIDHost = value.m_steamIDHost; + result.m_bFinalCallback = value.m_bFinalCallback; + } + + return result; + }); + marshallers.Add(typeof(RequestPlayersForGameProgressCallback_t), (unmanaged) => { + RequestPlayersForGameProgressCallback_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_ullSearchID = value.m_ullSearchID; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_ullSearchID = value.m_ullSearchID; + } + + return result; + }); + marshallers.Add(typeof(RequestPlayersForGameResultCallback_t), (unmanaged) => { + RequestPlayersForGameResultCallback_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_ullSearchID = value.m_ullSearchID; + result.m_SteamIDPlayerFound = value.m_SteamIDPlayerFound; + result.m_SteamIDLobby = value.m_SteamIDLobby; + result.m_ePlayerAcceptState = value.m_ePlayerAcceptState; + result.m_nPlayerIndex = value.m_nPlayerIndex; + result.m_nTotalPlayersFound = value.m_nTotalPlayersFound; + result.m_nTotalPlayersAcceptedGame = value.m_nTotalPlayersAcceptedGame; + result.m_nSuggestedTeamIndex = value.m_nSuggestedTeamIndex; + result.m_ullUniqueGameID = value.m_ullUniqueGameID; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_ullSearchID = value.m_ullSearchID; + result.m_SteamIDPlayerFound = value.m_SteamIDPlayerFound; + result.m_SteamIDLobby = value.m_SteamIDLobby; + result.m_ePlayerAcceptState = value.m_ePlayerAcceptState; + result.m_nPlayerIndex = value.m_nPlayerIndex; + result.m_nTotalPlayersFound = value.m_nTotalPlayersFound; + result.m_nTotalPlayersAcceptedGame = value.m_nTotalPlayersAcceptedGame; + result.m_nSuggestedTeamIndex = value.m_nSuggestedTeamIndex; + result.m_ullUniqueGameID = value.m_ullUniqueGameID; + } + + return result; + }); + marshallers.Add(typeof(RequestPlayersForGameFinalResultCallback_t), (unmanaged) => { + RequestPlayersForGameFinalResultCallback_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_ullSearchID = value.m_ullSearchID; + result.m_ullUniqueGameID = value.m_ullUniqueGameID; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_ullSearchID = value.m_ullSearchID; + result.m_ullUniqueGameID = value.m_ullUniqueGameID; + } + + return result; + }); + marshallers.Add(typeof(SubmitPlayerResultResultCallback_t), (unmanaged) => { + SubmitPlayerResultResultCallback_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.ullUniqueGameID = value.ullUniqueGameID; + result.steamIDPlayer = value.steamIDPlayer; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.ullUniqueGameID = value.ullUniqueGameID; + result.steamIDPlayer = value.steamIDPlayer; + } + + return result; + }); + marshallers.Add(typeof(EndGameResultCallback_t), (unmanaged) => { + EndGameResultCallback_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.ullUniqueGameID = value.ullUniqueGameID; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.ullUniqueGameID = value.ullUniqueGameID; + } + + return result; + }); + marshallers.Add(typeof(JoinPartyCallback_t), (unmanaged) => { + JoinPartyCallback_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_ulBeaconID = value.m_ulBeaconID; + result.m_SteamIDBeaconOwner = value.m_SteamIDBeaconOwner; + result.m_rgchConnectString_ = value.m_rgchConnectString_; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_ulBeaconID = value.m_ulBeaconID; + result.m_SteamIDBeaconOwner = value.m_SteamIDBeaconOwner; + result.m_rgchConnectString_ = value.m_rgchConnectString_; + } + + return result; + }); + marshallers.Add(typeof(CreateBeaconCallback_t), (unmanaged) => { + CreateBeaconCallback_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_ulBeaconID = value.m_ulBeaconID; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_ulBeaconID = value.m_ulBeaconID; + } + + return result; + }); + marshallers.Add(typeof(ReservationNotificationCallback_t), (unmanaged) => { + ReservationNotificationCallback_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_ulBeaconID = value.m_ulBeaconID; + result.m_steamIDJoiner = value.m_steamIDJoiner; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_ulBeaconID = value.m_ulBeaconID; + result.m_steamIDJoiner = value.m_steamIDJoiner; + } + + return result; + }); + marshallers.Add(typeof(ChangeNumOpenSlotsCallback_t), (unmanaged) => { + ChangeNumOpenSlotsCallback_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + } + + return result; + }); + marshallers.Add(typeof(AvailableBeaconLocationsUpdated_t), (unmanaged) => { + AvailableBeaconLocationsUpdated_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } + + return result; + }); + marshallers.Add(typeof(ActiveBeaconsUpdated_t), (unmanaged) => { + ActiveBeaconsUpdated_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } + + return result; + }); + marshallers.Add(typeof(PlaybackStatusHasChanged_t), (unmanaged) => { + PlaybackStatusHasChanged_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } + + return result; + }); + marshallers.Add(typeof(VolumeHasChanged_t), (unmanaged) => { + VolumeHasChanged_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_flNewVolume = value.m_flNewVolume; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_flNewVolume = value.m_flNewVolume; + } + + return result; + }); + marshallers.Add(typeof(MusicPlayerRemoteWillActivate_t), (unmanaged) => { + MusicPlayerRemoteWillActivate_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } + + return result; + }); + marshallers.Add(typeof(MusicPlayerRemoteWillDeactivate_t), (unmanaged) => { + MusicPlayerRemoteWillDeactivate_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } + + return result; + }); + marshallers.Add(typeof(MusicPlayerRemoteToFront_t), (unmanaged) => { + MusicPlayerRemoteToFront_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } + + return result; + }); + marshallers.Add(typeof(MusicPlayerWillQuit_t), (unmanaged) => { + MusicPlayerWillQuit_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } + + return result; + }); + marshallers.Add(typeof(MusicPlayerWantsPlay_t), (unmanaged) => { + MusicPlayerWantsPlay_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } + + return result; + }); + marshallers.Add(typeof(MusicPlayerWantsPause_t), (unmanaged) => { + MusicPlayerWantsPause_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } + + return result; + }); + marshallers.Add(typeof(MusicPlayerWantsPlayPrevious_t), (unmanaged) => { + MusicPlayerWantsPlayPrevious_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } + + return result; + }); + marshallers.Add(typeof(MusicPlayerWantsPlayNext_t), (unmanaged) => { + MusicPlayerWantsPlayNext_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } + + return result; + }); + marshallers.Add(typeof(MusicPlayerWantsShuffled_t), (unmanaged) => { + MusicPlayerWantsShuffled_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_bShuffled = value.m_bShuffled; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_bShuffled = value.m_bShuffled; + } + + return result; + }); + marshallers.Add(typeof(MusicPlayerWantsLooped_t), (unmanaged) => { + MusicPlayerWantsLooped_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_bLooped = value.m_bLooped; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_bLooped = value.m_bLooped; + } + + return result; + }); + marshallers.Add(typeof(MusicPlayerWantsVolume_t), (unmanaged) => { + MusicPlayerWantsVolume_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_flNewVolume = value.m_flNewVolume; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_flNewVolume = value.m_flNewVolume; + } + + return result; + }); + marshallers.Add(typeof(MusicPlayerSelectsQueueEntry_t), (unmanaged) => { + MusicPlayerSelectsQueueEntry_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.nID = value.nID; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.nID = value.nID; + } + + return result; + }); + marshallers.Add(typeof(MusicPlayerSelectsPlaylistEntry_t), (unmanaged) => { + MusicPlayerSelectsPlaylistEntry_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.nID = value.nID; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.nID = value.nID; + } + + return result; + }); + marshallers.Add(typeof(MusicPlayerWantsPlayingRepeatStatus_t), (unmanaged) => { + MusicPlayerWantsPlayingRepeatStatus_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nPlayingRepeatStatus = value.m_nPlayingRepeatStatus; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nPlayingRepeatStatus = value.m_nPlayingRepeatStatus; + } + + return result; + }); + marshallers.Add(typeof(P2PSessionState_t), (unmanaged) => { + P2PSessionState_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_bConnectionActive = value.m_bConnectionActive; + result.m_bConnecting = value.m_bConnecting; + result.m_eP2PSessionError = value.m_eP2PSessionError; + result.m_bUsingRelay = value.m_bUsingRelay; + result.m_nBytesQueuedForSend = value.m_nBytesQueuedForSend; + result.m_nPacketsQueuedForSend = value.m_nPacketsQueuedForSend; + result.m_nRemoteIP = value.m_nRemoteIP; + result.m_nRemotePort = value.m_nRemotePort; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_bConnectionActive = value.m_bConnectionActive; + result.m_bConnecting = value.m_bConnecting; + result.m_eP2PSessionError = value.m_eP2PSessionError; + result.m_bUsingRelay = value.m_bUsingRelay; + result.m_nBytesQueuedForSend = value.m_nBytesQueuedForSend; + result.m_nPacketsQueuedForSend = value.m_nPacketsQueuedForSend; + result.m_nRemoteIP = value.m_nRemoteIP; + result.m_nRemotePort = value.m_nRemotePort; + } + + return result; + }); + marshallers.Add(typeof(P2PSessionRequest_t), (unmanaged) => { + P2PSessionRequest_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_steamIDRemote = value.m_steamIDRemote; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_steamIDRemote = value.m_steamIDRemote; + } + + return result; + }); + marshallers.Add(typeof(SteamNetworkingMessagesSessionRequest_t), (unmanaged) => { + SteamNetworkingMessagesSessionRequest_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_identityRemote = value.m_identityRemote; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_identityRemote = value.m_identityRemote; + } + + return result; + }); + marshallers.Add(typeof(SteamNetworkingMessagesSessionFailed_t), (unmanaged) => { + SteamNetworkingMessagesSessionFailed_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_info = value.m_info; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_info = value.m_info; + } + + return result; + }); + marshallers.Add(typeof(SteamNetConnectionStatusChangedCallback_t), (unmanaged) => { + SteamNetConnectionStatusChangedCallback_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_hConn = value.m_hConn; + result.m_info = value.m_info; + result.m_eOldState = value.m_eOldState; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_hConn = value.m_hConn; + result.m_info = value.m_info; + result.m_eOldState = value.m_eOldState; + } + + return result; + }); + marshallers.Add(typeof(SteamNetAuthenticationStatus_t), (unmanaged) => { + SteamNetAuthenticationStatus_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eAvail = value.m_eAvail; + result.m_debugMsg_ = value.m_debugMsg_; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eAvail = value.m_eAvail; + result.m_debugMsg_ = value.m_debugMsg_; + } + + return result; + }); + marshallers.Add(typeof(SteamRelayNetworkStatus_t), (unmanaged) => { + SteamRelayNetworkStatus_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eAvail = value.m_eAvail; + result.m_bPingMeasurementInProgress = value.m_bPingMeasurementInProgress; + result.m_eAvailNetworkConfig = value.m_eAvailNetworkConfig; + result.m_eAvailAnyRelay = value.m_eAvailAnyRelay; + result.m_debugMsg_ = value.m_debugMsg_; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eAvail = value.m_eAvail; + result.m_bPingMeasurementInProgress = value.m_bPingMeasurementInProgress; + result.m_eAvailNetworkConfig = value.m_eAvailNetworkConfig; + result.m_eAvailAnyRelay = value.m_eAvailAnyRelay; + result.m_debugMsg_ = value.m_debugMsg_; + } + + return result; + }); + marshallers.Add(typeof(SteamParentalSettingsChanged_t), (unmanaged) => { + SteamParentalSettingsChanged_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } + + return result; + }); + marshallers.Add(typeof(RemotePlayInputMouseMotion_t), (unmanaged) => { + RemotePlayInputMouseMotion_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_bAbsolute = value.m_bAbsolute; + result.m_flNormalizedX = value.m_flNormalizedX; + result.m_flNormalizedY = value.m_flNormalizedY; + result.m_nDeltaX = value.m_nDeltaX; + result.m_nDeltaY = value.m_nDeltaY; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_bAbsolute = value.m_bAbsolute; + result.m_flNormalizedX = value.m_flNormalizedX; + result.m_flNormalizedY = value.m_flNormalizedY; + result.m_nDeltaX = value.m_nDeltaX; + result.m_nDeltaY = value.m_nDeltaY; + } + + return result; + }); + marshallers.Add(typeof(RemotePlayInputMouseWheel_t), (unmanaged) => { + RemotePlayInputMouseWheel_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eDirection = value.m_eDirection; + result.m_flAmount = value.m_flAmount; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eDirection = value.m_eDirection; + result.m_flAmount = value.m_flAmount; + } + + return result; + }); + marshallers.Add(typeof(RemotePlayInputKey_t), (unmanaged) => { + RemotePlayInputKey_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eScancode = value.m_eScancode; + result.m_unModifiers = value.m_unModifiers; + result.m_unKeycode = value.m_unKeycode; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eScancode = value.m_eScancode; + result.m_unModifiers = value.m_unModifiers; + result.m_unKeycode = value.m_unKeycode; + } + + return result; + }); + marshallers.Add(typeof(SteamRemotePlaySessionConnected_t), (unmanaged) => { + SteamRemotePlaySessionConnected_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_unSessionID = value.m_unSessionID; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_unSessionID = value.m_unSessionID; + } + + return result; + }); + marshallers.Add(typeof(SteamRemotePlaySessionDisconnected_t), (unmanaged) => { + SteamRemotePlaySessionDisconnected_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_unSessionID = value.m_unSessionID; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_unSessionID = value.m_unSessionID; + } + + return result; + }); + marshallers.Add(typeof(SteamRemotePlayTogetherGuestInvite_t), (unmanaged) => { + SteamRemotePlayTogetherGuestInvite_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_szConnectURL_ = value.m_szConnectURL_; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_szConnectURL_ = value.m_szConnectURL_; + } + + return result; + }); + marshallers.Add(typeof(SteamParamStringArray_t), (unmanaged) => { + SteamParamStringArray_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_ppStrings = value.m_ppStrings; + result.m_nNumStrings = value.m_nNumStrings; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_ppStrings = value.m_ppStrings; + result.m_nNumStrings = value.m_nNumStrings; + } + + return result; + }); + marshallers.Add(typeof(RemoteStorageFileShareResult_t), (unmanaged) => { + RemoteStorageFileShareResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_hFile = value.m_hFile; + result.m_rgchFilename_ = value.m_rgchFilename_; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_hFile = value.m_hFile; + result.m_rgchFilename_ = value.m_rgchFilename_; + } + + return result; + }); + marshallers.Add(typeof(RemoteStoragePublishFileResult_t), (unmanaged) => { + RemoteStoragePublishFileResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_bUserNeedsToAcceptWorkshopLegalAgreement = value.m_bUserNeedsToAcceptWorkshopLegalAgreement; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_bUserNeedsToAcceptWorkshopLegalAgreement = value.m_bUserNeedsToAcceptWorkshopLegalAgreement; + } + + return result; + }); + marshallers.Add(typeof(RemoteStorageDeletePublishedFileResult_t), (unmanaged) => { + RemoteStorageDeletePublishedFileResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nPublishedFileId = value.m_nPublishedFileId; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nPublishedFileId = value.m_nPublishedFileId; + } + + return result; + }); + marshallers.Add(typeof(RemoteStorageEnumerateUserPublishedFilesResult_t), (unmanaged) => { + RemoteStorageEnumerateUserPublishedFilesResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nResultsReturned = value.m_nResultsReturned; + result.m_nTotalResultCount = value.m_nTotalResultCount; + result.m_rgPublishedFileId = value.m_rgPublishedFileId; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nResultsReturned = value.m_nResultsReturned; + result.m_nTotalResultCount = value.m_nTotalResultCount; + result.m_rgPublishedFileId = value.m_rgPublishedFileId; + } + + return result; + }); + marshallers.Add(typeof(RemoteStorageSubscribePublishedFileResult_t), (unmanaged) => { + RemoteStorageSubscribePublishedFileResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nPublishedFileId = value.m_nPublishedFileId; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nPublishedFileId = value.m_nPublishedFileId; + } + + return result; + }); + marshallers.Add(typeof(RemoteStorageEnumerateUserSubscribedFilesResult_t), (unmanaged) => { + RemoteStorageEnumerateUserSubscribedFilesResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nResultsReturned = value.m_nResultsReturned; + result.m_nTotalResultCount = value.m_nTotalResultCount; + result.m_rgPublishedFileId = value.m_rgPublishedFileId; + result.m_rgRTimeSubscribed = value.m_rgRTimeSubscribed; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nResultsReturned = value.m_nResultsReturned; + result.m_nTotalResultCount = value.m_nTotalResultCount; + result.m_rgPublishedFileId = value.m_rgPublishedFileId; + result.m_rgRTimeSubscribed = value.m_rgRTimeSubscribed; + } + + return result; + }); + marshallers.Add(typeof(RemoteStorageUnsubscribePublishedFileResult_t), (unmanaged) => { + RemoteStorageUnsubscribePublishedFileResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nPublishedFileId = value.m_nPublishedFileId; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nPublishedFileId = value.m_nPublishedFileId; + } + + return result; + }); + marshallers.Add(typeof(RemoteStorageUpdatePublishedFileResult_t), (unmanaged) => { + RemoteStorageUpdatePublishedFileResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_bUserNeedsToAcceptWorkshopLegalAgreement = value.m_bUserNeedsToAcceptWorkshopLegalAgreement; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_bUserNeedsToAcceptWorkshopLegalAgreement = value.m_bUserNeedsToAcceptWorkshopLegalAgreement; + } + + return result; + }); + marshallers.Add(typeof(RemoteStorageDownloadUGCResult_t), (unmanaged) => { + RemoteStorageDownloadUGCResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_hFile = value.m_hFile; + result.m_nAppID = value.m_nAppID; + result.m_nSizeInBytes = value.m_nSizeInBytes; + result.m_pchFileName_ = value.m_pchFileName_; + result.m_ulSteamIDOwner = value.m_ulSteamIDOwner; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_hFile = value.m_hFile; + result.m_nAppID = value.m_nAppID; + result.m_nSizeInBytes = value.m_nSizeInBytes; + result.m_pchFileName_ = value.m_pchFileName_; + result.m_ulSteamIDOwner = value.m_ulSteamIDOwner; + } + + return result; + }); + marshallers.Add(typeof(RemoteStorageGetPublishedFileDetailsResult_t), (unmanaged) => { + RemoteStorageGetPublishedFileDetailsResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_nCreatorAppID = value.m_nCreatorAppID; + result.m_nConsumerAppID = value.m_nConsumerAppID; + result.m_rgchTitle_ = value.m_rgchTitle_; + result.m_rgchDescription_ = value.m_rgchDescription_; + result.m_hFile = value.m_hFile; + result.m_hPreviewFile = value.m_hPreviewFile; + result.m_ulSteamIDOwner = value.m_ulSteamIDOwner; + result.m_rtimeCreated = value.m_rtimeCreated; + result.m_rtimeUpdated = value.m_rtimeUpdated; + result.m_eVisibility = value.m_eVisibility; + result.m_bBanned = value.m_bBanned; + result.m_rgchTags_ = value.m_rgchTags_; + result.m_bTagsTruncated = value.m_bTagsTruncated; + result.m_pchFileName_ = value.m_pchFileName_; + result.m_nFileSize = value.m_nFileSize; + result.m_nPreviewFileSize = value.m_nPreviewFileSize; + result.m_rgchURL_ = value.m_rgchURL_; + result.m_eFileType = value.m_eFileType; + result.m_bAcceptedForUse = value.m_bAcceptedForUse; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_nCreatorAppID = value.m_nCreatorAppID; + result.m_nConsumerAppID = value.m_nConsumerAppID; + result.m_rgchTitle_ = value.m_rgchTitle_; + result.m_rgchDescription_ = value.m_rgchDescription_; + result.m_hFile = value.m_hFile; + result.m_hPreviewFile = value.m_hPreviewFile; + result.m_ulSteamIDOwner = value.m_ulSteamIDOwner; + result.m_rtimeCreated = value.m_rtimeCreated; + result.m_rtimeUpdated = value.m_rtimeUpdated; + result.m_eVisibility = value.m_eVisibility; + result.m_bBanned = value.m_bBanned; + result.m_rgchTags_ = value.m_rgchTags_; + result.m_bTagsTruncated = value.m_bTagsTruncated; + result.m_pchFileName_ = value.m_pchFileName_; + result.m_nFileSize = value.m_nFileSize; + result.m_nPreviewFileSize = value.m_nPreviewFileSize; + result.m_rgchURL_ = value.m_rgchURL_; + result.m_eFileType = value.m_eFileType; + result.m_bAcceptedForUse = value.m_bAcceptedForUse; + } + + return result; + }); + marshallers.Add(typeof(RemoteStorageEnumerateWorkshopFilesResult_t), (unmanaged) => { + RemoteStorageEnumerateWorkshopFilesResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nResultsReturned = value.m_nResultsReturned; + result.m_nTotalResultCount = value.m_nTotalResultCount; + result.m_rgPublishedFileId = value.m_rgPublishedFileId; + result.m_rgScore = value.m_rgScore; + result.m_nAppId = value.m_nAppId; + result.m_unStartIndex = value.m_unStartIndex; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nResultsReturned = value.m_nResultsReturned; + result.m_nTotalResultCount = value.m_nTotalResultCount; + result.m_rgPublishedFileId = value.m_rgPublishedFileId; + result.m_rgScore = value.m_rgScore; + result.m_nAppId = value.m_nAppId; + result.m_unStartIndex = value.m_unStartIndex; + } + + return result; + }); + marshallers.Add(typeof(RemoteStorageGetPublishedItemVoteDetailsResult_t), (unmanaged) => { + RemoteStorageGetPublishedItemVoteDetailsResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_unPublishedFileId = value.m_unPublishedFileId; + result.m_nVotesFor = value.m_nVotesFor; + result.m_nVotesAgainst = value.m_nVotesAgainst; + result.m_nReports = value.m_nReports; + result.m_fScore = value.m_fScore; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_unPublishedFileId = value.m_unPublishedFileId; + result.m_nVotesFor = value.m_nVotesFor; + result.m_nVotesAgainst = value.m_nVotesAgainst; + result.m_nReports = value.m_nReports; + result.m_fScore = value.m_fScore; + } + + return result; + }); + marshallers.Add(typeof(RemoteStoragePublishedFileSubscribed_t), (unmanaged) => { + RemoteStoragePublishedFileSubscribed_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_nAppID = value.m_nAppID; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_nAppID = value.m_nAppID; + } + + return result; + }); + marshallers.Add(typeof(RemoteStoragePublishedFileUnsubscribed_t), (unmanaged) => { + RemoteStoragePublishedFileUnsubscribed_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_nAppID = value.m_nAppID; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_nAppID = value.m_nAppID; + } + + return result; + }); + marshallers.Add(typeof(RemoteStoragePublishedFileDeleted_t), (unmanaged) => { + RemoteStoragePublishedFileDeleted_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_nAppID = value.m_nAppID; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_nAppID = value.m_nAppID; + } + + return result; + }); + marshallers.Add(typeof(RemoteStorageUpdateUserPublishedItemVoteResult_t), (unmanaged) => { + RemoteStorageUpdateUserPublishedItemVoteResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nPublishedFileId = value.m_nPublishedFileId; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nPublishedFileId = value.m_nPublishedFileId; + } + + return result; + }); + marshallers.Add(typeof(RemoteStorageUserVoteDetails_t), (unmanaged) => { + RemoteStorageUserVoteDetails_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_eVote = value.m_eVote; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_eVote = value.m_eVote; + } + + return result; + }); + marshallers.Add(typeof(RemoteStorageEnumerateUserSharedWorkshopFilesResult_t), (unmanaged) => { + RemoteStorageEnumerateUserSharedWorkshopFilesResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nResultsReturned = value.m_nResultsReturned; + result.m_nTotalResultCount = value.m_nTotalResultCount; + result.m_rgPublishedFileId = value.m_rgPublishedFileId; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nResultsReturned = value.m_nResultsReturned; + result.m_nTotalResultCount = value.m_nTotalResultCount; + result.m_rgPublishedFileId = value.m_rgPublishedFileId; + } + + return result; + }); + marshallers.Add(typeof(RemoteStorageSetUserPublishedFileActionResult_t), (unmanaged) => { + RemoteStorageSetUserPublishedFileActionResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_eAction = value.m_eAction; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_eAction = value.m_eAction; + } + + return result; + }); + marshallers.Add(typeof(RemoteStorageEnumeratePublishedFilesByUserActionResult_t), (unmanaged) => { + RemoteStorageEnumeratePublishedFilesByUserActionResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_eAction = value.m_eAction; + result.m_nResultsReturned = value.m_nResultsReturned; + result.m_nTotalResultCount = value.m_nTotalResultCount; + result.m_rgPublishedFileId = value.m_rgPublishedFileId; + result.m_rgRTimeUpdated = value.m_rgRTimeUpdated; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_eAction = value.m_eAction; + result.m_nResultsReturned = value.m_nResultsReturned; + result.m_nTotalResultCount = value.m_nTotalResultCount; + result.m_rgPublishedFileId = value.m_rgPublishedFileId; + result.m_rgRTimeUpdated = value.m_rgRTimeUpdated; + } + + return result; + }); + marshallers.Add(typeof(RemoteStoragePublishFileProgress_t), (unmanaged) => { + RemoteStoragePublishFileProgress_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_dPercentFile = value.m_dPercentFile; + result.m_bPreview = value.m_bPreview; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_dPercentFile = value.m_dPercentFile; + result.m_bPreview = value.m_bPreview; + } + + return result; + }); + marshallers.Add(typeof(RemoteStoragePublishedFileUpdated_t), (unmanaged) => { + RemoteStoragePublishedFileUpdated_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_nAppID = value.m_nAppID; + result.m_ulUnused = value.m_ulUnused; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_nAppID = value.m_nAppID; + result.m_ulUnused = value.m_ulUnused; + } + + return result; + }); + marshallers.Add(typeof(RemoteStorageFileWriteAsyncComplete_t), (unmanaged) => { + RemoteStorageFileWriteAsyncComplete_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + } + + return result; + }); + marshallers.Add(typeof(RemoteStorageFileReadAsyncComplete_t), (unmanaged) => { + RemoteStorageFileReadAsyncComplete_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_hFileReadAsync = value.m_hFileReadAsync; + result.m_eResult = value.m_eResult; + result.m_nOffset = value.m_nOffset; + result.m_cubRead = value.m_cubRead; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_hFileReadAsync = value.m_hFileReadAsync; + result.m_eResult = value.m_eResult; + result.m_nOffset = value.m_nOffset; + result.m_cubRead = value.m_cubRead; + } + + return result; + }); + marshallers.Add(typeof(RemoteStorageLocalFileChange_t), (unmanaged) => { + RemoteStorageLocalFileChange_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } + + return result; + }); + marshallers.Add(typeof(ScreenshotReady_t), (unmanaged) => { + ScreenshotReady_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_hLocal = value.m_hLocal; + result.m_eResult = value.m_eResult; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_hLocal = value.m_hLocal; + result.m_eResult = value.m_eResult; + } + + return result; + }); + marshallers.Add(typeof(ScreenshotRequested_t), (unmanaged) => { + ScreenshotRequested_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } + + return result; + }); + marshallers.Add(typeof(SteamTimelineGamePhaseRecordingExists_t), (unmanaged) => { + SteamTimelineGamePhaseRecordingExists_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_rgchPhaseID_ = value.m_rgchPhaseID_; + result.m_ulRecordingMS = value.m_ulRecordingMS; + result.m_ulLongestClipMS = value.m_ulLongestClipMS; + result.m_unClipCount = value.m_unClipCount; + result.m_unScreenshotCount = value.m_unScreenshotCount; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_rgchPhaseID_ = value.m_rgchPhaseID_; + result.m_ulRecordingMS = value.m_ulRecordingMS; + result.m_ulLongestClipMS = value.m_ulLongestClipMS; + result.m_unClipCount = value.m_unClipCount; + result.m_unScreenshotCount = value.m_unScreenshotCount; + } + + return result; + }); + marshallers.Add(typeof(SteamTimelineEventRecordingExists_t), (unmanaged) => { + SteamTimelineEventRecordingExists_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_ulEventID = value.m_ulEventID; + result.m_bRecordingExists = value.m_bRecordingExists; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_ulEventID = value.m_ulEventID; + result.m_bRecordingExists = value.m_bRecordingExists; + } + + return result; + }); + marshallers.Add(typeof(SteamUGCDetails_t), (unmanaged) => { + SteamUGCDetails_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_eResult = value.m_eResult; + result.m_eFileType = value.m_eFileType; + result.m_nCreatorAppID = value.m_nCreatorAppID; + result.m_nConsumerAppID = value.m_nConsumerAppID; + result.m_rgchTitle_ = value.m_rgchTitle_; + result.m_rgchDescription_ = value.m_rgchDescription_; + result.m_ulSteamIDOwner = value.m_ulSteamIDOwner; + result.m_rtimeCreated = value.m_rtimeCreated; + result.m_rtimeUpdated = value.m_rtimeUpdated; + result.m_rtimeAddedToUserList = value.m_rtimeAddedToUserList; + result.m_eVisibility = value.m_eVisibility; + result.m_bBanned = value.m_bBanned; + result.m_bAcceptedForUse = value.m_bAcceptedForUse; + result.m_bTagsTruncated = value.m_bTagsTruncated; + result.m_rgchTags_ = value.m_rgchTags_; + result.m_hFile = value.m_hFile; + result.m_hPreviewFile = value.m_hPreviewFile; + result.m_pchFileName_ = value.m_pchFileName_; + result.m_nFileSize = value.m_nFileSize; + result.m_nPreviewFileSize = value.m_nPreviewFileSize; + result.m_rgchURL_ = value.m_rgchURL_; + result.m_unVotesUp = value.m_unVotesUp; + result.m_unVotesDown = value.m_unVotesDown; + result.m_flScore = value.m_flScore; + result.m_unNumChildren = value.m_unNumChildren; + result.m_ulTotalFilesSize = value.m_ulTotalFilesSize; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_eResult = value.m_eResult; + result.m_eFileType = value.m_eFileType; + result.m_nCreatorAppID = value.m_nCreatorAppID; + result.m_nConsumerAppID = value.m_nConsumerAppID; + result.m_rgchTitle_ = value.m_rgchTitle_; + result.m_rgchDescription_ = value.m_rgchDescription_; + result.m_ulSteamIDOwner = value.m_ulSteamIDOwner; + result.m_rtimeCreated = value.m_rtimeCreated; + result.m_rtimeUpdated = value.m_rtimeUpdated; + result.m_rtimeAddedToUserList = value.m_rtimeAddedToUserList; + result.m_eVisibility = value.m_eVisibility; + result.m_bBanned = value.m_bBanned; + result.m_bAcceptedForUse = value.m_bAcceptedForUse; + result.m_bTagsTruncated = value.m_bTagsTruncated; + result.m_rgchTags_ = value.m_rgchTags_; + result.m_hFile = value.m_hFile; + result.m_hPreviewFile = value.m_hPreviewFile; + result.m_pchFileName_ = value.m_pchFileName_; + result.m_nFileSize = value.m_nFileSize; + result.m_nPreviewFileSize = value.m_nPreviewFileSize; + result.m_rgchURL_ = value.m_rgchURL_; + result.m_unVotesUp = value.m_unVotesUp; + result.m_unVotesDown = value.m_unVotesDown; + result.m_flScore = value.m_flScore; + result.m_unNumChildren = value.m_unNumChildren; + result.m_ulTotalFilesSize = value.m_ulTotalFilesSize; + } + + return result; + }); + marshallers.Add(typeof(SteamUGCQueryCompleted_t), (unmanaged) => { + SteamUGCQueryCompleted_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_handle = value.m_handle; + result.m_eResult = value.m_eResult; + result.m_unNumResultsReturned = value.m_unNumResultsReturned; + result.m_unTotalMatchingResults = value.m_unTotalMatchingResults; + result.m_bCachedData = value.m_bCachedData; + result.m_rgchNextCursor_ = value.m_rgchNextCursor_; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_handle = value.m_handle; + result.m_eResult = value.m_eResult; + result.m_unNumResultsReturned = value.m_unNumResultsReturned; + result.m_unTotalMatchingResults = value.m_unTotalMatchingResults; + result.m_bCachedData = value.m_bCachedData; + result.m_rgchNextCursor_ = value.m_rgchNextCursor_; + } + + return result; + }); + marshallers.Add(typeof(SteamUGCRequestUGCDetailsResult_t), (unmanaged) => { + SteamUGCRequestUGCDetailsResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_details = value.m_details; + result.m_bCachedData = value.m_bCachedData; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_details = value.m_details; + result.m_bCachedData = value.m_bCachedData; + } + + return result; + }); + marshallers.Add(typeof(CreateItemResult_t), (unmanaged) => { + CreateItemResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_bUserNeedsToAcceptWorkshopLegalAgreement = value.m_bUserNeedsToAcceptWorkshopLegalAgreement; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_bUserNeedsToAcceptWorkshopLegalAgreement = value.m_bUserNeedsToAcceptWorkshopLegalAgreement; + } + + return result; + }); + marshallers.Add(typeof(SubmitItemUpdateResult_t), (unmanaged) => { + SubmitItemUpdateResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_bUserNeedsToAcceptWorkshopLegalAgreement = value.m_bUserNeedsToAcceptWorkshopLegalAgreement; + result.m_nPublishedFileId = value.m_nPublishedFileId; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_bUserNeedsToAcceptWorkshopLegalAgreement = value.m_bUserNeedsToAcceptWorkshopLegalAgreement; + result.m_nPublishedFileId = value.m_nPublishedFileId; + } + + return result; + }); + marshallers.Add(typeof(ItemInstalled_t), (unmanaged) => { + ItemInstalled_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_unAppID = value.m_unAppID; + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_hLegacyContent = value.m_hLegacyContent; + result.m_unManifestID = value.m_unManifestID; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_unAppID = value.m_unAppID; + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_hLegacyContent = value.m_hLegacyContent; + result.m_unManifestID = value.m_unManifestID; + } + + return result; + }); + marshallers.Add(typeof(DownloadItemResult_t), (unmanaged) => { + DownloadItemResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_unAppID = value.m_unAppID; + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_eResult = value.m_eResult; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_unAppID = value.m_unAppID; + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_eResult = value.m_eResult; + } + + return result; + }); + marshallers.Add(typeof(UserFavoriteItemsListChanged_t), (unmanaged) => { + UserFavoriteItemsListChanged_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_eResult = value.m_eResult; + result.m_bWasAddRequest = value.m_bWasAddRequest; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_eResult = value.m_eResult; + result.m_bWasAddRequest = value.m_bWasAddRequest; + } + + return result; + }); + marshallers.Add(typeof(SetUserItemVoteResult_t), (unmanaged) => { + SetUserItemVoteResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_eResult = value.m_eResult; + result.m_bVoteUp = value.m_bVoteUp; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_eResult = value.m_eResult; + result.m_bVoteUp = value.m_bVoteUp; + } + + return result; + }); + marshallers.Add(typeof(GetUserItemVoteResult_t), (unmanaged) => { + GetUserItemVoteResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_eResult = value.m_eResult; + result.m_bVotedUp = value.m_bVotedUp; + result.m_bVotedDown = value.m_bVotedDown; + result.m_bVoteSkipped = value.m_bVoteSkipped; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_eResult = value.m_eResult; + result.m_bVotedUp = value.m_bVotedUp; + result.m_bVotedDown = value.m_bVotedDown; + result.m_bVoteSkipped = value.m_bVoteSkipped; + } + + return result; + }); + marshallers.Add(typeof(StartPlaytimeTrackingResult_t), (unmanaged) => { + StartPlaytimeTrackingResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + } + + return result; + }); + marshallers.Add(typeof(StopPlaytimeTrackingResult_t), (unmanaged) => { + StopPlaytimeTrackingResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + } + + return result; + }); + marshallers.Add(typeof(AddUGCDependencyResult_t), (unmanaged) => { + AddUGCDependencyResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_nChildPublishedFileId = value.m_nChildPublishedFileId; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_nChildPublishedFileId = value.m_nChildPublishedFileId; + } + + return result; + }); + marshallers.Add(typeof(RemoveUGCDependencyResult_t), (unmanaged) => { + RemoveUGCDependencyResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_nChildPublishedFileId = value.m_nChildPublishedFileId; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_nChildPublishedFileId = value.m_nChildPublishedFileId; + } + + return result; + }); + marshallers.Add(typeof(AddAppDependencyResult_t), (unmanaged) => { + AddAppDependencyResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_nAppID = value.m_nAppID; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_nAppID = value.m_nAppID; + } + + return result; + }); + marshallers.Add(typeof(RemoveAppDependencyResult_t), (unmanaged) => { + RemoveAppDependencyResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_nAppID = value.m_nAppID; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_nAppID = value.m_nAppID; + } + + return result; + }); + marshallers.Add(typeof(GetAppDependenciesResult_t), (unmanaged) => { + GetAppDependenciesResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_rgAppIDs = value.m_rgAppIDs; + result.m_nNumAppDependencies = value.m_nNumAppDependencies; + result.m_nTotalNumAppDependencies = value.m_nTotalNumAppDependencies; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nPublishedFileId = value.m_nPublishedFileId; + result.m_rgAppIDs = value.m_rgAppIDs; + result.m_nNumAppDependencies = value.m_nNumAppDependencies; + result.m_nTotalNumAppDependencies = value.m_nTotalNumAppDependencies; + } + + return result; + }); + marshallers.Add(typeof(DeleteItemResult_t), (unmanaged) => { + DeleteItemResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nPublishedFileId = value.m_nPublishedFileId; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nPublishedFileId = value.m_nPublishedFileId; + } + + return result; + }); + marshallers.Add(typeof(UserSubscribedItemsListChanged_t), (unmanaged) => { + UserSubscribedItemsListChanged_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nAppID = value.m_nAppID; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nAppID = value.m_nAppID; + } + + return result; + }); + marshallers.Add(typeof(WorkshopEULAStatus_t), (unmanaged) => { + WorkshopEULAStatus_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nAppID = value.m_nAppID; + result.m_unVersion = value.m_unVersion; + result.m_rtAction = value.m_rtAction; + result.m_bAccepted = value.m_bAccepted; + result.m_bNeedsAction = value.m_bNeedsAction; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_nAppID = value.m_nAppID; + result.m_unVersion = value.m_unVersion; + result.m_rtAction = value.m_rtAction; + result.m_bAccepted = value.m_bAccepted; + result.m_bNeedsAction = value.m_bNeedsAction; + } + + return result; + }); + marshallers.Add(typeof(SteamServersConnected_t), (unmanaged) => { + SteamServersConnected_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } + + return result; + }); + marshallers.Add(typeof(SteamServerConnectFailure_t), (unmanaged) => { + SteamServerConnectFailure_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_bStillRetrying = value.m_bStillRetrying; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_bStillRetrying = value.m_bStillRetrying; + } + + return result; + }); + marshallers.Add(typeof(SteamServersDisconnected_t), (unmanaged) => { + SteamServersDisconnected_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + } + + return result; + }); + marshallers.Add(typeof(ClientGameServerDeny_t), (unmanaged) => { + ClientGameServerDeny_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_uAppID = value.m_uAppID; + result.m_unGameServerIP = value.m_unGameServerIP; + result.m_usGameServerPort = value.m_usGameServerPort; + result.m_bSecure = value.m_bSecure; + result.m_uReason = value.m_uReason; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_uAppID = value.m_uAppID; + result.m_unGameServerIP = value.m_unGameServerIP; + result.m_usGameServerPort = value.m_usGameServerPort; + result.m_bSecure = value.m_bSecure; + result.m_uReason = value.m_uReason; + } + + return result; + }); + marshallers.Add(typeof(IPCFailure_t), (unmanaged) => { + IPCFailure_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eFailureType = value.m_eFailureType; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eFailureType = value.m_eFailureType; + } + + return result; + }); + marshallers.Add(typeof(LicensesUpdated_t), (unmanaged) => { + LicensesUpdated_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } + + return result; + }); + marshallers.Add(typeof(MicroTxnAuthorizationResponse_t), (unmanaged) => { + MicroTxnAuthorizationResponse_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_unAppID = value.m_unAppID; + result.m_ulOrderID = value.m_ulOrderID; + result.m_bAuthorized = value.m_bAuthorized; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_unAppID = value.m_unAppID; + result.m_ulOrderID = value.m_ulOrderID; + result.m_bAuthorized = value.m_bAuthorized; + } + + return result; + }); + marshallers.Add(typeof(EncryptedAppTicketResponse_t), (unmanaged) => { + EncryptedAppTicketResponse_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + } + + return result; + }); + marshallers.Add(typeof(GetAuthSessionTicketResponse_t), (unmanaged) => { + GetAuthSessionTicketResponse_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_hAuthTicket = value.m_hAuthTicket; + result.m_eResult = value.m_eResult; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_hAuthTicket = value.m_hAuthTicket; + result.m_eResult = value.m_eResult; + } + + return result; + }); + marshallers.Add(typeof(GameWebCallback_t), (unmanaged) => { + GameWebCallback_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_szURL_ = value.m_szURL_; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_szURL_ = value.m_szURL_; + } + + return result; + }); + marshallers.Add(typeof(StoreAuthURLResponse_t), (unmanaged) => { + StoreAuthURLResponse_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_szURL_ = value.m_szURL_; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_szURL_ = value.m_szURL_; + } + + return result; + }); + marshallers.Add(typeof(MarketEligibilityResponse_t), (unmanaged) => { + MarketEligibilityResponse_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_bAllowed = value.m_bAllowed; + result.m_eNotAllowedReason = value.m_eNotAllowedReason; + result.m_rtAllowedAtTime = value.m_rtAllowedAtTime; + result.m_cdaySteamGuardRequiredDays = value.m_cdaySteamGuardRequiredDays; + result.m_cdayNewDeviceCooldown = value.m_cdayNewDeviceCooldown; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_bAllowed = value.m_bAllowed; + result.m_eNotAllowedReason = value.m_eNotAllowedReason; + result.m_rtAllowedAtTime = value.m_rtAllowedAtTime; + result.m_cdaySteamGuardRequiredDays = value.m_cdaySteamGuardRequiredDays; + result.m_cdayNewDeviceCooldown = value.m_cdayNewDeviceCooldown; + } + + return result; + }); + marshallers.Add(typeof(DurationControl_t), (unmanaged) => { + DurationControl_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_appid = value.m_appid; + result.m_bApplicable = value.m_bApplicable; + result.m_csecsLast5h = value.m_csecsLast5h; + result.m_progress = value.m_progress; + result.m_notification = value.m_notification; + result.m_csecsToday = value.m_csecsToday; + result.m_csecsRemaining = value.m_csecsRemaining; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_appid = value.m_appid; + result.m_bApplicable = value.m_bApplicable; + result.m_csecsLast5h = value.m_csecsLast5h; + result.m_progress = value.m_progress; + result.m_notification = value.m_notification; + result.m_csecsToday = value.m_csecsToday; + result.m_csecsRemaining = value.m_csecsRemaining; + } + + return result; + }); + marshallers.Add(typeof(GetTicketForWebApiResponse_t), (unmanaged) => { + GetTicketForWebApiResponse_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_hAuthTicket = value.m_hAuthTicket; + result.m_eResult = value.m_eResult; + result.m_cubTicket = value.m_cubTicket; + result.m_rgubTicket = value.m_rgubTicket; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_hAuthTicket = value.m_hAuthTicket; + result.m_eResult = value.m_eResult; + result.m_cubTicket = value.m_cubTicket; + result.m_rgubTicket = value.m_rgubTicket; + } + + return result; + }); + marshallers.Add(typeof(LeaderboardEntry_t), (unmanaged) => { + LeaderboardEntry_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_steamIDUser = value.m_steamIDUser; + result.m_nGlobalRank = value.m_nGlobalRank; + result.m_nScore = value.m_nScore; + result.m_cDetails = value.m_cDetails; + result.m_hUGC = value.m_hUGC; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_steamIDUser = value.m_steamIDUser; + result.m_nGlobalRank = value.m_nGlobalRank; + result.m_nScore = value.m_nScore; + result.m_cDetails = value.m_cDetails; + result.m_hUGC = value.m_hUGC; + } + + return result; + }); + marshallers.Add(typeof(UserStatsStored_t), (unmanaged) => { + UserStatsStored_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nGameID = value.m_nGameID; + result.m_eResult = value.m_eResult; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nGameID = value.m_nGameID; + result.m_eResult = value.m_eResult; + } + + return result; + }); + marshallers.Add(typeof(UserAchievementStored_t), (unmanaged) => { + UserAchievementStored_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nGameID = value.m_nGameID; + result.m_bGroupAchievement = value.m_bGroupAchievement; + result.m_rgchAchievementName_ = value.m_rgchAchievementName_; + result.m_nCurProgress = value.m_nCurProgress; + result.m_nMaxProgress = value.m_nMaxProgress; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nGameID = value.m_nGameID; + result.m_bGroupAchievement = value.m_bGroupAchievement; + result.m_rgchAchievementName_ = value.m_rgchAchievementName_; + result.m_nCurProgress = value.m_nCurProgress; + result.m_nMaxProgress = value.m_nMaxProgress; + } + + return result; + }); + marshallers.Add(typeof(LeaderboardFindResult_t), (unmanaged) => { + LeaderboardFindResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_hSteamLeaderboard = value.m_hSteamLeaderboard; + result.m_bLeaderboardFound = value.m_bLeaderboardFound; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_hSteamLeaderboard = value.m_hSteamLeaderboard; + result.m_bLeaderboardFound = value.m_bLeaderboardFound; + } + + return result; + }); + marshallers.Add(typeof(LeaderboardScoresDownloaded_t), (unmanaged) => { + LeaderboardScoresDownloaded_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_hSteamLeaderboard = value.m_hSteamLeaderboard; + result.m_hSteamLeaderboardEntries = value.m_hSteamLeaderboardEntries; + result.m_cEntryCount = value.m_cEntryCount; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_hSteamLeaderboard = value.m_hSteamLeaderboard; + result.m_hSteamLeaderboardEntries = value.m_hSteamLeaderboardEntries; + result.m_cEntryCount = value.m_cEntryCount; + } + + return result; + }); + marshallers.Add(typeof(LeaderboardScoreUploaded_t), (unmanaged) => { + LeaderboardScoreUploaded_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_bSuccess = value.m_bSuccess; + result.m_hSteamLeaderboard = value.m_hSteamLeaderboard; + result.m_nScore = value.m_nScore; + result.m_bScoreChanged = value.m_bScoreChanged; + result.m_nGlobalRankNew = value.m_nGlobalRankNew; + result.m_nGlobalRankPrevious = value.m_nGlobalRankPrevious; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_bSuccess = value.m_bSuccess; + result.m_hSteamLeaderboard = value.m_hSteamLeaderboard; + result.m_nScore = value.m_nScore; + result.m_bScoreChanged = value.m_bScoreChanged; + result.m_nGlobalRankNew = value.m_nGlobalRankNew; + result.m_nGlobalRankPrevious = value.m_nGlobalRankPrevious; + } + + return result; + }); + marshallers.Add(typeof(NumberOfCurrentPlayers_t), (unmanaged) => { + NumberOfCurrentPlayers_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_bSuccess = value.m_bSuccess; + result.m_cPlayers = value.m_cPlayers; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_bSuccess = value.m_bSuccess; + result.m_cPlayers = value.m_cPlayers; + } + + return result; + }); + marshallers.Add(typeof(UserStatsUnloaded_t), (unmanaged) => { + UserStatsUnloaded_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_steamIDUser = value.m_steamIDUser; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_steamIDUser = value.m_steamIDUser; + } + + return result; + }); + marshallers.Add(typeof(UserAchievementIconFetched_t), (unmanaged) => { + UserAchievementIconFetched_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nGameID = value.m_nGameID; + result.m_rgchAchievementName_ = value.m_rgchAchievementName_; + result.m_bAchieved = value.m_bAchieved; + result.m_nIconHandle = value.m_nIconHandle; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nGameID = value.m_nGameID; + result.m_rgchAchievementName_ = value.m_rgchAchievementName_; + result.m_bAchieved = value.m_bAchieved; + result.m_nIconHandle = value.m_nIconHandle; + } + + return result; + }); + marshallers.Add(typeof(GlobalAchievementPercentagesReady_t), (unmanaged) => { + GlobalAchievementPercentagesReady_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nGameID = value.m_nGameID; + result.m_eResult = value.m_eResult; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nGameID = value.m_nGameID; + result.m_eResult = value.m_eResult; + } + + return result; + }); + marshallers.Add(typeof(LeaderboardUGCSet_t), (unmanaged) => { + LeaderboardUGCSet_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_hSteamLeaderboard = value.m_hSteamLeaderboard; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_hSteamLeaderboard = value.m_hSteamLeaderboard; + } + + return result; + }); + marshallers.Add(typeof(GlobalStatsReceived_t), (unmanaged) => { + GlobalStatsReceived_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nGameID = value.m_nGameID; + result.m_eResult = value.m_eResult; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nGameID = value.m_nGameID; + result.m_eResult = value.m_eResult; + } + + return result; + }); + marshallers.Add(typeof(IPCountry_t), (unmanaged) => { + IPCountry_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } + + return result; + }); + marshallers.Add(typeof(LowBatteryPower_t), (unmanaged) => { + LowBatteryPower_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nMinutesBatteryLeft = value.m_nMinutesBatteryLeft; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_nMinutesBatteryLeft = value.m_nMinutesBatteryLeft; + } + + return result; + }); + marshallers.Add(typeof(SteamAPICallCompleted_t), (unmanaged) => { + SteamAPICallCompleted_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_hAsyncCall = value.m_hAsyncCall; + result.m_iCallback = value.m_iCallback; + result.m_cubParam = value.m_cubParam; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_hAsyncCall = value.m_hAsyncCall; + result.m_iCallback = value.m_iCallback; + result.m_cubParam = value.m_cubParam; + } + + return result; + }); + marshallers.Add(typeof(SteamShutdown_t), (unmanaged) => { + SteamShutdown_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } + + return result; + }); + marshallers.Add(typeof(CheckFileSignature_t), (unmanaged) => { + CheckFileSignature_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eCheckFileSignature = value.m_eCheckFileSignature; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eCheckFileSignature = value.m_eCheckFileSignature; + } + + return result; + }); + marshallers.Add(typeof(GamepadTextInputDismissed_t), (unmanaged) => { + GamepadTextInputDismissed_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_bSubmitted = value.m_bSubmitted; + result.m_unSubmittedText = value.m_unSubmittedText; + result.m_unAppID = value.m_unAppID; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_bSubmitted = value.m_bSubmitted; + result.m_unSubmittedText = value.m_unSubmittedText; + result.m_unAppID = value.m_unAppID; + } + + return result; + }); + marshallers.Add(typeof(AppResumingFromSuspend_t), (unmanaged) => { + AppResumingFromSuspend_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } + + return result; + }); + marshallers.Add(typeof(FloatingGamepadTextInputDismissed_t), (unmanaged) => { + FloatingGamepadTextInputDismissed_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + } + + return result; + }); + marshallers.Add(typeof(FilterTextDictionaryChanged_t), (unmanaged) => { + FilterTextDictionaryChanged_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eLanguage = value.m_eLanguage; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eLanguage = value.m_eLanguage; + } + + return result; + }); + marshallers.Add(typeof(GetVideoURLResult_t), (unmanaged) => { + GetVideoURLResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_unVideoAppID = value.m_unVideoAppID; + result.m_rgchURL_ = value.m_rgchURL_; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_unVideoAppID = value.m_unVideoAppID; + result.m_rgchURL_ = value.m_rgchURL_; + } + + return result; + }); + marshallers.Add(typeof(GetOPFSettingsResult_t), (unmanaged) => { + GetOPFSettingsResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_unVideoAppID = value.m_unVideoAppID; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_unVideoAppID = value.m_unVideoAppID; + } + + return result; + }); + marshallers.Add(typeof(BroadcastUploadStart_t), (unmanaged) => { + BroadcastUploadStart_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_bIsRTMP = value.m_bIsRTMP; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_bIsRTMP = value.m_bIsRTMP; + } + + return result; + }); + marshallers.Add(typeof(BroadcastUploadStop_t), (unmanaged) => { + BroadcastUploadStop_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + } + + return result; + }); + marshallers.Add(typeof(MatchMakingKeyValuePair_t), (unmanaged) => { + MatchMakingKeyValuePair_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_szKey_ = value.m_szKey_; + result.m_szValue_ = value.m_szValue_; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_szKey_ = value.m_szKey_; + result.m_szValue_ = value.m_szValue_; + } + + return result; + }); + marshallers.Add(typeof(CallbackMsg_t), (unmanaged) => { + CallbackMsg_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_hSteamUser = value.m_hSteamUser; + result.m_iCallback = value.m_iCallback; + result.m_pubParam = value.m_pubParam; + result.m_cubParam = value.m_cubParam; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_hSteamUser = value.m_hSteamUser; + result.m_iCallback = value.m_iCallback; + result.m_pubParam = value.m_pubParam; + result.m_cubParam = value.m_cubParam; + } + + return result; + }); + marshallers.Add(typeof(SteamNetworkingFakeIPResult_t), (unmanaged) => { + SteamNetworkingFakeIPResult_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_identity = value.m_identity; + result.m_unIP = value.m_unIP; + result.m_unPorts = value.m_unPorts; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eResult = value.m_eResult; + result.m_identity = value.m_identity; + result.m_unIP = value.m_unIP; + result.m_unPorts = value.m_unPorts; + } + + return result; + }); + marshallers.Add(typeof(SteamNetConnectionInfo_t), (unmanaged) => { + SteamNetConnectionInfo_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_identityRemote = value.m_identityRemote; + result.m_nUserData = value.m_nUserData; + result.m_hListenSocket = value.m_hListenSocket; + result.m_addrRemote = value.m_addrRemote; + result.m__pad1 = value.m__pad1; + result.m_idPOPRemote = value.m_idPOPRemote; + result.m_idPOPRelay = value.m_idPOPRelay; + result.m_eState = value.m_eState; + result.m_eEndReason = value.m_eEndReason; + result.m_szEndDebug_ = value.m_szEndDebug_; + result.m_szConnectionDescription_ = value.m_szConnectionDescription_; + result.m_nFlags = value.m_nFlags; + result.reserved = value.reserved; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_identityRemote = value.m_identityRemote; + result.m_nUserData = value.m_nUserData; + result.m_hListenSocket = value.m_hListenSocket; + result.m_addrRemote = value.m_addrRemote; + result.m__pad1 = value.m__pad1; + result.m_idPOPRemote = value.m_idPOPRemote; + result.m_idPOPRelay = value.m_idPOPRelay; + result.m_eState = value.m_eState; + result.m_eEndReason = value.m_eEndReason; + result.m_szEndDebug_ = value.m_szEndDebug_; + result.m_szConnectionDescription_ = value.m_szConnectionDescription_; + result.m_nFlags = value.m_nFlags; + result.reserved = value.reserved; + } + + return result; + }); + marshallers.Add(typeof(SteamNetConnectionRealTimeStatus_t), (unmanaged) => { + SteamNetConnectionRealTimeStatus_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eState = value.m_eState; + result.m_nPing = value.m_nPing; + result.m_flConnectionQualityLocal = value.m_flConnectionQualityLocal; + result.m_flConnectionQualityRemote = value.m_flConnectionQualityRemote; + result.m_flOutPacketsPerSec = value.m_flOutPacketsPerSec; + result.m_flOutBytesPerSec = value.m_flOutBytesPerSec; + result.m_flInPacketsPerSec = value.m_flInPacketsPerSec; + result.m_flInBytesPerSec = value.m_flInBytesPerSec; + result.m_nSendRateBytesPerSecond = value.m_nSendRateBytesPerSecond; + result.m_cbPendingUnreliable = value.m_cbPendingUnreliable; + result.m_cbPendingReliable = value.m_cbPendingReliable; + result.m_cbSentUnackedReliable = value.m_cbSentUnackedReliable; + result.m_usecQueueTime = value.m_usecQueueTime; + result.reserved = value.reserved; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_eState = value.m_eState; + result.m_nPing = value.m_nPing; + result.m_flConnectionQualityLocal = value.m_flConnectionQualityLocal; + result.m_flConnectionQualityRemote = value.m_flConnectionQualityRemote; + result.m_flOutPacketsPerSec = value.m_flOutPacketsPerSec; + result.m_flOutBytesPerSec = value.m_flOutBytesPerSec; + result.m_flInPacketsPerSec = value.m_flInPacketsPerSec; + result.m_flInBytesPerSec = value.m_flInBytesPerSec; + result.m_nSendRateBytesPerSecond = value.m_nSendRateBytesPerSecond; + result.m_cbPendingUnreliable = value.m_cbPendingUnreliable; + result.m_cbPendingReliable = value.m_cbPendingReliable; + result.m_cbSentUnackedReliable = value.m_cbSentUnackedReliable; + result.m_usecQueueTime = value.m_usecQueueTime; + result.reserved = value.reserved; + } + + return result; + }); + marshallers.Add(typeof(SteamNetConnectionRealTimeLaneStatus_t), (unmanaged) => { + SteamNetConnectionRealTimeLaneStatus_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_cbPendingUnreliable = value.m_cbPendingUnreliable; + result.m_cbPendingReliable = value.m_cbPendingReliable; + result.m_cbSentUnackedReliable = value.m_cbSentUnackedReliable; + result._reservePad1 = value._reservePad1; + result.m_usecQueueTime = value.m_usecQueueTime; + result.reserved = value.reserved; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_cbPendingUnreliable = value.m_cbPendingUnreliable; + result.m_cbPendingReliable = value.m_cbPendingReliable; + result.m_cbSentUnackedReliable = value.m_cbSentUnackedReliable; + result._reservePad1 = value._reservePad1; + result.m_usecQueueTime = value.m_usecQueueTime; + result.reserved = value.reserved; + } + + return result; + }); + marshallers.Add(typeof(SteamNetworkPingLocation_t), (unmanaged) => { + SteamNetworkPingLocation_t result = default; + + if (Packsize.IsLargePack) { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_data = value.m_data; + } else { + var value = System.Runtime.InteropServices.Marshal.PtrToStructure(unmanaged); + result.m_data = value.m_data; + } + + return result; + }); + s_marshallerLookupTable = FrozenDictionary.ToFrozenDictionary(marshallers); + } + } +} +#endif // !DISABLESTEAMWORKS diff --git a/com.rlabrecque.steamworks.net/Runtime/CallbackDispatcher.cs b/com.rlabrecque.steamworks.net/Runtime/CallbackDispatcher.cs index 71a14fd9..910b4706 100644 --- a/com.rlabrecque.steamworks.net/Runtime/CallbackDispatcher.cs +++ b/com.rlabrecque.steamworks.net/Runtime/CallbackDispatcher.cs @@ -394,7 +394,13 @@ internal override void OnRunCallResult(IntPtr pvParam, bool bFailed, ulong hStea SteamAPICall_t hSteamAPICall = (SteamAPICall_t)hSteamAPICall_; if (hSteamAPICall == m_hAPICall) { try { - m_Func((T)Marshal.PtrToStructure(pvParam, typeof(T)), bFailed); + T result; +#if STEAMWORKS_ANYCPU + result = ConditionalMarshallerTable.Marshal(pvParam); +#else + result = (T)Marshal.PtrToStructure(pvParam, typeof(T)); +#endif + m_Func(result, bFailed); } catch (Exception e) { CallbackDispatcher.ExceptionHandler(e); diff --git a/com.rlabrecque.steamworks.net/Runtime/Packsize.cs b/com.rlabrecque.steamworks.net/Runtime/Packsize.cs index 3b2efb09..dbe6233a 100644 --- a/com.rlabrecque.steamworks.net/Runtime/Packsize.cs +++ b/com.rlabrecque.steamworks.net/Runtime/Packsize.cs @@ -9,31 +9,33 @@ #define DISABLESTEAMWORKS #endif +// We don't expose or use Packsize in the AnyCPU build. #if !DISABLESTEAMWORKS // If we're running in the Unity Editor we need the editors platform. #if UNITY_EDITOR_WIN - #define VALVE_CALLBACK_PACK_LARGE +#define VALVE_CALLBACK_PACK_LARGE #elif UNITY_EDITOR_OSX || UNITY_EDITOR_LINUX - #define VALVE_CALLBACK_PACK_SMALL +#define VALVE_CALLBACK_PACK_SMALL // Otherwise we want the target platform. #elif UNITY_STANDALONE_WIN || STEAMWORKS_WIN - #define VALVE_CALLBACK_PACK_LARGE +#define VALVE_CALLBACK_PACK_LARGE #elif UNITY_STANDALONE_LINUX || UNITY_STANDALONE_OSX || STEAMWORKS_LIN_OSX - #define VALVE_CALLBACK_PACK_SMALL +#define VALVE_CALLBACK_PACK_SMALL // We do not want to throw a warning when we're building in Unity but for an unsupported platform. So we'll silently let this slip by. // It would be nice if Unity itself would define 'UNITY' or something like that... #elif UNITY_3_5 || UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_5 || UNITY_4_6 || UNITY_4_7 || UNITY_5 || UNITY_2017_1_OR_NEWER - #define VALVE_CALLBACK_PACK_SMALL +#define VALVE_CALLBACK_PACK_SMALL // But we do want to be explicit on the Standalone build for XNA/Monogame. #else - #define VALVE_CALLBACK_PACK_LARGE - #warning You need to define STEAMWORKS_WIN, or STEAMWORKS_LIN_OSX. Refer to the readme for more details. +#define VALVE_CALLBACK_PACK_LARGE +#warning You need to define STEAMWORKS_WIN, or STEAMWORKS_LIN_OSX. Refer to the readme for more details. #endif +using System; using System.Runtime.InteropServices; using IntPtr = System.IntPtr; @@ -45,6 +47,7 @@ public static class Packsize { public const int value = 4; #endif +#if !STEAMWORKS_ANYCPU public static bool Test() { int sentinelSize = Marshal.SizeOf(typeof(ValvePackingSentinel_t)); int subscribedFilesSize = Marshal.SizeOf(typeof(RemoteStorageEnumerateUserSubscribedFilesResult_t)); @@ -57,6 +60,24 @@ public static bool Test() { #endif return true; } +#else + /// + /// Get runtime determined value of structure pack size. + /// + public readonly static int AnyCpuRuntimeValue = InitializeRuntimeValue(); + + public readonly static bool IsLargePack = AnyCpuRuntimeValue == 8; + + private static int InitializeRuntimeValue() + { + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + return 8; + else + return 4; + } + + public static bool Test() { return true; } +#endif [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] struct ValvePackingSentinel_t { diff --git a/com.rlabrecque.steamworks.net/Runtime/autogen/SteamCallbacks.cs b/com.rlabrecque.steamworks.net/Runtime/autogen/SteamCallbacks.cs index 8cc1c32b..2dd47fd6 100644 --- a/com.rlabrecque.steamworks.net/Runtime/autogen/SteamCallbacks.cs +++ b/com.rlabrecque.steamworks.net/Runtime/autogen/SteamCallbacks.cs @@ -26,6 +26,31 @@ public struct DlcInstalled_t { public AppId_t m_nAppID; // AppID of the DLC } + #if STEAMWORKS_ANYCPU + // callbacks + //----------------------------------------------------------------------------- + // Purpose: posted after the user gains ownership of DLC & that DLC is installed + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamAppsCallbacks + 5)] + internal struct DlcInstalled_t_LargePack { + public const int k_iCallback = Constants.k_iSteamAppsCallbacks + 5; + public AppId_t m_nAppID; // AppID of the DLC + } + + + // callbacks + //----------------------------------------------------------------------------- + // Purpose: posted after the user gains ownership of DLC & that DLC is installed + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamAppsCallbacks + 5)] + internal struct DlcInstalled_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamAppsCallbacks + 5; + public AppId_t m_nAppID; // AppID of the DLC + } + + #endif //--------------------------------------------------------------------------------- // Purpose: posted after the user gains executes a Steam URL with command line or query parameters // such as steam://run///-commandline/?param1=value1¶m2=value2¶m3=value3 etc @@ -38,6 +63,33 @@ public struct NewUrlLaunchParameters_t { public const int k_iCallback = Constants.k_iSteamAppsCallbacks + 14; } + #if STEAMWORKS_ANYCPU + //--------------------------------------------------------------------------------- + // Purpose: posted after the user gains executes a Steam URL with command line or query parameters + // such as steam://run///-commandline/?param1=value1¶m2=value2¶m3=value3 etc + // while the game is already running. The new params can be queried + // with GetLaunchQueryParam and GetLaunchCommandLine + //--------------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamAppsCallbacks + 14)] + internal struct NewUrlLaunchParameters_t_LargePack { + public const int k_iCallback = Constants.k_iSteamAppsCallbacks + 14; + } + + + //--------------------------------------------------------------------------------- + // Purpose: posted after the user gains executes a Steam URL with command line or query parameters + // such as steam://run///-commandline/?param1=value1¶m2=value2¶m3=value3 etc + // while the game is already running. The new params can be queried + // with GetLaunchQueryParam and GetLaunchCommandLine + //--------------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamAppsCallbacks + 14)] + internal struct NewUrlLaunchParameters_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamAppsCallbacks + 14; + } + + #endif //----------------------------------------------------------------------------- // Purpose: response to RequestAppProofOfPurchaseKey/RequestAllProofOfPurchaseKeys // for supporting third-party CD keys, or other proof-of-purchase systems. @@ -50,7 +102,49 @@ public struct AppProofOfPurchaseKeyResponse_t { public uint m_nAppID; public uint m_cchKeyLength; [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cubAppProofOfPurchaseKeyMax)] - private byte[] m_rgchKey_; + internal byte[] m_rgchKey_; + public string m_rgchKey + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchKey_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchKey_, Constants.k_cubAppProofOfPurchaseKeyMax); } + } + } + + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: response to RequestAppProofOfPurchaseKey/RequestAllProofOfPurchaseKeys + // for supporting third-party CD keys, or other proof-of-purchase systems. + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamAppsCallbacks + 21)] + internal struct AppProofOfPurchaseKeyResponse_t_LargePack { + public const int k_iCallback = Constants.k_iSteamAppsCallbacks + 21; + public EResult m_eResult; + public uint m_nAppID; + public uint m_cchKeyLength; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cubAppProofOfPurchaseKeyMax)] + internal byte[] m_rgchKey_; + public string m_rgchKey + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchKey_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchKey_, Constants.k_cubAppProofOfPurchaseKeyMax); } + } + } + + + //----------------------------------------------------------------------------- + // Purpose: response to RequestAppProofOfPurchaseKey/RequestAllProofOfPurchaseKeys + // for supporting third-party CD keys, or other proof-of-purchase systems. + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamAppsCallbacks + 21)] + internal struct AppProofOfPurchaseKeyResponse_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamAppsCallbacks + 21; + public EResult m_eResult; + public uint m_nAppID; + public uint m_cchKeyLength; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cubAppProofOfPurchaseKeyMax)] + internal byte[] m_rgchKey_; public string m_rgchKey { get { return InteropHelp.ByteArrayToStringUTF8(m_rgchKey_); } @@ -58,6 +152,7 @@ public string m_rgchKey } } + #endif //----------------------------------------------------------------------------- // Purpose: response to GetFileDetails //----------------------------------------------------------------------------- @@ -72,6 +167,37 @@ public struct FileDetailsResult_t { public uint m_unFlags; // } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: response to GetFileDetails + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamAppsCallbacks + 23)] + internal struct FileDetailsResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamAppsCallbacks + 23; + public EResult m_eResult; + public ulong m_ulFileSize; // original file size in bytes + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)] + public byte[] m_FileSHA; // original file SHA1 hash + public uint m_unFlags; // + } + + + //----------------------------------------------------------------------------- + // Purpose: response to GetFileDetails + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamAppsCallbacks + 23)] + internal struct FileDetailsResult_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamAppsCallbacks + 23; + public EResult m_eResult; + public ulong m_ulFileSize; // original file size in bytes + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)] + public byte[] m_FileSHA; // original file SHA1 hash + public uint m_unFlags; // + } + + #endif //----------------------------------------------------------------------------- // Purpose: called for games in Timed Trial mode //----------------------------------------------------------------------------- @@ -86,6 +212,37 @@ public struct TimedTrialStatus_t { public uint m_unSecondsPlayed; // how many seconds the app was already played } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: called for games in Timed Trial mode + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamAppsCallbacks + 30)] + internal struct TimedTrialStatus_t_LargePack { + public const int k_iCallback = Constants.k_iSteamAppsCallbacks + 30; + public AppId_t m_unAppID; // appID + [MarshalAs(UnmanagedType.I1)] + public bool m_bIsOffline; // if true, time allowed / played refers to offline time, not total time + public uint m_unSecondsAllowed; // how many seconds the app can be played in total + public uint m_unSecondsPlayed; // how many seconds the app was already played + } + + + //----------------------------------------------------------------------------- + // Purpose: called for games in Timed Trial mode + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamAppsCallbacks + 30)] + internal struct TimedTrialStatus_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamAppsCallbacks + 30; + public AppId_t m_unAppID; // appID + [MarshalAs(UnmanagedType.I1)] + public bool m_bIsOffline; // if true, time allowed / played refers to offline time, not total time + public uint m_unSecondsAllowed; // how many seconds the app can be played in total + public uint m_unSecondsPlayed; // how many seconds the app was already played + } + + #endif // callbacks //----------------------------------------------------------------------------- // Purpose: called when a friends' status changes @@ -99,6 +256,35 @@ public struct PersonaStateChange_t { public EPersonaChange m_nChangeFlags; // what's changed } + #if STEAMWORKS_ANYCPU + // callbacks + //----------------------------------------------------------------------------- + // Purpose: called when a friends' status changes + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamFriendsCallbacks + 4)] + internal struct PersonaStateChange_t_LargePack { + public const int k_iCallback = Constants.k_iSteamFriendsCallbacks + 4; + + public ulong m_ulSteamID; // steamID of the friend who changed + public EPersonaChange m_nChangeFlags; // what's changed + } + + + // callbacks + //----------------------------------------------------------------------------- + // Purpose: called when a friends' status changes + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamFriendsCallbacks + 4)] + internal struct PersonaStateChange_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamFriendsCallbacks + 4; + + public ulong m_ulSteamID; // steamID of the friend who changed + public EPersonaChange m_nChangeFlags; // what's changed + } + + #endif //----------------------------------------------------------------------------- // Purpose: posted when game overlay activates or deactivates // the game can use this to be pause or resume single player games @@ -114,6 +300,39 @@ public struct GameOverlayActivated_t { public uint m_dwOverlayPID; // used internally } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: posted when game overlay activates or deactivates + // the game can use this to be pause or resume single player games + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamFriendsCallbacks + 31)] + internal struct GameOverlayActivated_t_LargePack { + public const int k_iCallback = Constants.k_iSteamFriendsCallbacks + 31; + public byte m_bActive; // true if it's just been activated, false otherwise + [MarshalAs(UnmanagedType.I1)] + public bool m_bUserInitiated; // true if the user asked for the overlay to be activated/deactivated + public AppId_t m_nAppID; // the appID of the game (should always be the current game) + public uint m_dwOverlayPID; // used internally + } + + + //----------------------------------------------------------------------------- + // Purpose: posted when game overlay activates or deactivates + // the game can use this to be pause or resume single player games + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamFriendsCallbacks + 31)] + internal struct GameOverlayActivated_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamFriendsCallbacks + 31; + public byte m_bActive; // true if it's just been activated, false otherwise + [MarshalAs(UnmanagedType.I1)] + public bool m_bUserInitiated; // true if the user asked for the overlay to be activated/deactivated + public AppId_t m_nAppID; // the appID of the game (should always be the current game) + public uint m_dwOverlayPID; // used internally + } + + #endif //----------------------------------------------------------------------------- // Purpose: called when the user tries to join a different game server from their friends list // game client should attempt to connect to specified server when this is received @@ -123,14 +342,64 @@ public struct GameOverlayActivated_t { public struct GameServerChangeRequested_t { public const int k_iCallback = Constants.k_iSteamFriendsCallbacks + 32; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] - private byte[] m_rgchServer_; + internal byte[] m_rgchServer_; + public string m_rgchServer // server address ("127.0.0.1:27015", "tf2.valvesoftware.com") + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchServer_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchServer_, 64); } + } + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] + internal byte[] m_rgchPassword_; + public string m_rgchPassword // server password, if any + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchPassword_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchPassword_, 64); } + } + } + + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: called when the user tries to join a different game server from their friends list + // game client should attempt to connect to specified server when this is received + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamFriendsCallbacks + 32)] + internal struct GameServerChangeRequested_t_LargePack { + public const int k_iCallback = Constants.k_iSteamFriendsCallbacks + 32; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] + internal byte[] m_rgchServer_; + public string m_rgchServer // server address ("127.0.0.1:27015", "tf2.valvesoftware.com") + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchServer_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchServer_, 64); } + } + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] + internal byte[] m_rgchPassword_; + public string m_rgchPassword // server password, if any + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchPassword_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchPassword_, 64); } + } + } + + + //----------------------------------------------------------------------------- + // Purpose: called when the user tries to join a different game server from their friends list + // game client should attempt to connect to specified server when this is received + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamFriendsCallbacks + 32)] + internal struct GameServerChangeRequested_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamFriendsCallbacks + 32; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] + internal byte[] m_rgchServer_; public string m_rgchServer // server address ("127.0.0.1:27015", "tf2.valvesoftware.com") { get { return InteropHelp.ByteArrayToStringUTF8(m_rgchServer_); } set { InteropHelp.StringToByteArrayUTF8(value, m_rgchServer_, 64); } } [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] - private byte[] m_rgchPassword_; + internal byte[] m_rgchPassword_; public string m_rgchPassword // server password, if any { get { return InteropHelp.ByteArrayToStringUTF8(m_rgchPassword_); } @@ -138,6 +407,7 @@ public struct GameServerChangeRequested_t { } } + #endif //----------------------------------------------------------------------------- // Purpose: called when the user tries to join a lobby from their friends list // game client should attempt to connect to specified lobby when this is received @@ -152,25 +422,56 @@ public struct GameLobbyJoinRequested_t { public CSteamID m_steamIDFriend; } + #if STEAMWORKS_ANYCPU //----------------------------------------------------------------------------- - // Purpose: called when an avatar is loaded in from a previous GetLargeFriendAvatar() call - // if the image wasn't already available + // Purpose: called when the user tries to join a lobby from their friends list + // game client should attempt to connect to specified lobby when this is received //----------------------------------------------------------------------------- - [StructLayout(LayoutKind.Sequential, Pack = 4)] - [CallbackIdentity(Constants.k_iSteamFriendsCallbacks + 34)] - public struct AvatarImageLoaded_t { - public const int k_iCallback = Constants.k_iSteamFriendsCallbacks + 34; - public CSteamID m_steamID; // steamid the avatar has been loaded for - public int m_iImage; // the image index of the now loaded image - public int m_iWide; // width of the loaded image - public int m_iTall; // height of the loaded image + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamFriendsCallbacks + 33)] + internal struct GameLobbyJoinRequested_t_LargePack { + public const int k_iCallback = Constants.k_iSteamFriendsCallbacks + 33; + public CSteamID m_steamIDLobby; + + // The friend they did the join via (will be invalid if not directly via a friend) + public CSteamID m_steamIDFriend; } + //----------------------------------------------------------------------------- - // Purpose: marks the return of a request officer list call + // Purpose: called when the user tries to join a lobby from their friends list + // game client should attempt to connect to specified lobby when this is received //----------------------------------------------------------------------------- [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] - [CallbackIdentity(Constants.k_iSteamFriendsCallbacks + 35)] + [CallbackIdentity(Constants.k_iSteamFriendsCallbacks + 33)] + internal struct GameLobbyJoinRequested_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamFriendsCallbacks + 33; + public CSteamID m_steamIDLobby; + + // The friend they did the join via (will be invalid if not directly via a friend) + public CSteamID m_steamIDFriend; + } + + #endif + //----------------------------------------------------------------------------- + // Purpose: called when an avatar is loaded in from a previous GetLargeFriendAvatar() call + // if the image wasn't already available + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = 4)] + [CallbackIdentity(Constants.k_iSteamFriendsCallbacks + 34)] + public struct AvatarImageLoaded_t { + public const int k_iCallback = Constants.k_iSteamFriendsCallbacks + 34; + public CSteamID m_steamID; // steamid the avatar has been loaded for + public int m_iImage; // the image index of the now loaded image + public int m_iWide; // width of the loaded image + public int m_iTall; // height of the loaded image + } + + //----------------------------------------------------------------------------- + // Purpose: marks the return of a request officer list call + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamFriendsCallbacks + 35)] public struct ClanOfficerListResponse_t { public const int k_iCallback = Constants.k_iSteamFriendsCallbacks + 35; public CSteamID m_steamIDClan; @@ -178,6 +479,33 @@ public struct ClanOfficerListResponse_t { public byte m_bSuccess; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: marks the return of a request officer list call + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamFriendsCallbacks + 35)] + internal struct ClanOfficerListResponse_t_LargePack { + public const int k_iCallback = Constants.k_iSteamFriendsCallbacks + 35; + public CSteamID m_steamIDClan; + public int m_cOfficers; + public byte m_bSuccess; + } + + + //----------------------------------------------------------------------------- + // Purpose: marks the return of a request officer list call + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamFriendsCallbacks + 35)] + internal struct ClanOfficerListResponse_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamFriendsCallbacks + 35; + public CSteamID m_steamIDClan; + public int m_cOfficers; + public byte m_bSuccess; + } + + #endif //----------------------------------------------------------------------------- // Purpose: callback indicating updated data about friends rich presence information //----------------------------------------------------------------------------- @@ -199,7 +527,45 @@ public struct GameRichPresenceJoinRequested_t { public const int k_iCallback = Constants.k_iSteamFriendsCallbacks + 37; public CSteamID m_steamIDFriend; // the friend they did the join via (will be invalid if not directly via a friend) [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchMaxRichPresenceValueLength)] - private byte[] m_rgchConnect_; + internal byte[] m_rgchConnect_; + public string m_rgchConnect + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchConnect_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchConnect_, Constants.k_cchMaxRichPresenceValueLength); } + } + } + + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: called when the user tries to join a game from their friends list + // rich presence will have been set with the "connect" key which is set here + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamFriendsCallbacks + 37)] + internal struct GameRichPresenceJoinRequested_t_LargePack { + public const int k_iCallback = Constants.k_iSteamFriendsCallbacks + 37; + public CSteamID m_steamIDFriend; // the friend they did the join via (will be invalid if not directly via a friend) + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchMaxRichPresenceValueLength)] + internal byte[] m_rgchConnect_; + public string m_rgchConnect + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchConnect_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchConnect_, Constants.k_cchMaxRichPresenceValueLength); } + } + } + + + //----------------------------------------------------------------------------- + // Purpose: called when the user tries to join a game from their friends list + // rich presence will have been set with the "connect" key which is set here + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamFriendsCallbacks + 37)] + internal struct GameRichPresenceJoinRequested_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamFriendsCallbacks + 37; + public CSteamID m_steamIDFriend; // the friend they did the join via (will be invalid if not directly via a friend) + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchMaxRichPresenceValueLength)] + internal byte[] m_rgchConnect_; public string m_rgchConnect { get { return InteropHelp.ByteArrayToStringUTF8(m_rgchConnect_); } @@ -207,6 +573,7 @@ public string m_rgchConnect } } + #endif //----------------------------------------------------------------------------- // Purpose: a chat message has been received for a clan chat the game has joined //----------------------------------------------------------------------------- @@ -230,6 +597,31 @@ public struct GameConnectedChatJoin_t { public CSteamID m_steamIDUser; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: a user has joined a clan chat + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamFriendsCallbacks + 39)] + internal struct GameConnectedChatJoin_t_LargePack { + public const int k_iCallback = Constants.k_iSteamFriendsCallbacks + 39; + public CSteamID m_steamIDClanChat; + public CSteamID m_steamIDUser; + } + + + //----------------------------------------------------------------------------- + // Purpose: a user has joined a clan chat + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamFriendsCallbacks + 39)] + internal struct GameConnectedChatJoin_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamFriendsCallbacks + 39; + public CSteamID m_steamIDClanChat; + public CSteamID m_steamIDUser; + } + + #endif //----------------------------------------------------------------------------- // Purpose: a user has left the chat we're in //----------------------------------------------------------------------------- @@ -256,6 +648,31 @@ public struct DownloadClanActivityCountsResult_t { public bool m_bSuccess; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: a DownloadClanActivityCounts() call has finished + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamFriendsCallbacks + 41)] + internal struct DownloadClanActivityCountsResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamFriendsCallbacks + 41; + [MarshalAs(UnmanagedType.I1)] + public bool m_bSuccess; + } + + + //----------------------------------------------------------------------------- + // Purpose: a DownloadClanActivityCounts() call has finished + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamFriendsCallbacks + 41)] + internal struct DownloadClanActivityCountsResult_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamFriendsCallbacks + 41; + [MarshalAs(UnmanagedType.I1)] + public bool m_bSuccess; + } + + #endif //----------------------------------------------------------------------------- // Purpose: a JoinClanChatRoom() call has finished //----------------------------------------------------------------------------- @@ -317,6 +734,27 @@ public struct UnreadChatMessagesChanged_t { public const int k_iCallback = Constants.k_iSteamFriendsCallbacks + 48; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: Invoked when the status of unread messages changes + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamFriendsCallbacks + 48)] + internal struct UnreadChatMessagesChanged_t_LargePack { + public const int k_iCallback = Constants.k_iSteamFriendsCallbacks + 48; + } + + + //----------------------------------------------------------------------------- + // Purpose: Invoked when the status of unread messages changes + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamFriendsCallbacks + 48)] + internal struct UnreadChatMessagesChanged_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamFriendsCallbacks + 48; + } + + #endif //----------------------------------------------------------------------------- // Purpose: Dispatched when an overlay browser instance is navigated to a protocol/scheme registered by RegisterProtocolInOverlayBrowser() //----------------------------------------------------------------------------- @@ -325,7 +763,41 @@ public struct UnreadChatMessagesChanged_t { public struct OverlayBrowserProtocolNavigation_t { public const int k_iCallback = Constants.k_iSteamFriendsCallbacks + 49; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1024)] - private byte[] rgchURI_; + internal byte[] rgchURI_; + public string rgchURI + { + get { return InteropHelp.ByteArrayToStringUTF8(rgchURI_); } + set { InteropHelp.StringToByteArrayUTF8(value, rgchURI_, 1024); } + } + } + + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: Dispatched when an overlay browser instance is navigated to a protocol/scheme registered by RegisterProtocolInOverlayBrowser() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamFriendsCallbacks + 49)] + internal struct OverlayBrowserProtocolNavigation_t_LargePack { + public const int k_iCallback = Constants.k_iSteamFriendsCallbacks + 49; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1024)] + internal byte[] rgchURI_; + public string rgchURI + { + get { return InteropHelp.ByteArrayToStringUTF8(rgchURI_); } + set { InteropHelp.StringToByteArrayUTF8(value, rgchURI_, 1024); } + } + } + + + //----------------------------------------------------------------------------- + // Purpose: Dispatched when an overlay browser instance is navigated to a protocol/scheme registered by RegisterProtocolInOverlayBrowser() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamFriendsCallbacks + 49)] + internal struct OverlayBrowserProtocolNavigation_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamFriendsCallbacks + 49; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1024)] + internal byte[] rgchURI_; public string rgchURI { get { return InteropHelp.ByteArrayToStringUTF8(rgchURI_); } @@ -333,6 +805,7 @@ public string rgchURI } } + #endif //----------------------------------------------------------------------------- // Purpose: A user's equipped profile items have changed //----------------------------------------------------------------------------- @@ -343,6 +816,29 @@ public struct EquippedProfileItemsChanged_t { public CSteamID m_steamID; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: A user's equipped profile items have changed + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamFriendsCallbacks + 50)] + internal struct EquippedProfileItemsChanged_t_LargePack { + public const int k_iCallback = Constants.k_iSteamFriendsCallbacks + 50; + public CSteamID m_steamID; + } + + + //----------------------------------------------------------------------------- + // Purpose: A user's equipped profile items have changed + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamFriendsCallbacks + 50)] + internal struct EquippedProfileItemsChanged_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamFriendsCallbacks + 50; + public CSteamID m_steamID; + } + + #endif //----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- @@ -366,6 +862,55 @@ public struct EquippedProfileItems_t { public bool m_bFromCache; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamFriendsCallbacks + 51)] + internal struct EquippedProfileItems_t_LargePack { + public const int k_iCallback = Constants.k_iSteamFriendsCallbacks + 51; + public EResult m_eResult; + public CSteamID m_steamID; + [MarshalAs(UnmanagedType.I1)] + public bool m_bHasAnimatedAvatar; + [MarshalAs(UnmanagedType.I1)] + public bool m_bHasAvatarFrame; + [MarshalAs(UnmanagedType.I1)] + public bool m_bHasProfileModifier; + [MarshalAs(UnmanagedType.I1)] + public bool m_bHasProfileBackground; + [MarshalAs(UnmanagedType.I1)] + public bool m_bHasMiniProfileBackground; + [MarshalAs(UnmanagedType.I1)] + public bool m_bFromCache; + } + + + //----------------------------------------------------------------------------- + // Purpose: + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamFriendsCallbacks + 51)] + internal struct EquippedProfileItems_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamFriendsCallbacks + 51; + public EResult m_eResult; + public CSteamID m_steamID; + [MarshalAs(UnmanagedType.I1)] + public bool m_bHasAnimatedAvatar; + [MarshalAs(UnmanagedType.I1)] + public bool m_bHasAvatarFrame; + [MarshalAs(UnmanagedType.I1)] + public bool m_bHasProfileModifier; + [MarshalAs(UnmanagedType.I1)] + public bool m_bHasProfileBackground; + [MarshalAs(UnmanagedType.I1)] + public bool m_bHasMiniProfileBackground; + [MarshalAs(UnmanagedType.I1)] + public bool m_bFromCache; + } + + #endif // callbacks // callback notification - A new message is available for reading from the message queue [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] @@ -375,6 +920,27 @@ public struct GCMessageAvailable_t { public uint m_nMessageSize; } + #if STEAMWORKS_ANYCPU + // callbacks + // callback notification - A new message is available for reading from the message queue + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamGameCoordinatorCallbacks + 1)] + internal struct GCMessageAvailable_t_LargePack { + public const int k_iCallback = Constants.k_iSteamGameCoordinatorCallbacks + 1; + public uint m_nMessageSize; + } + + + // callbacks + // callback notification - A new message is available for reading from the message queue + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamGameCoordinatorCallbacks + 1)] + internal struct GCMessageAvailable_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamGameCoordinatorCallbacks + 1; + public uint m_nMessageSize; + } + + #endif // callback notification - A message failed to make it to the GC. It may be down temporarily [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] [CallbackIdentity(Constants.k_iSteamGameCoordinatorCallbacks + 2)] @@ -382,16 +948,56 @@ public struct GCMessageFailed_t { public const int k_iCallback = Constants.k_iSteamGameCoordinatorCallbacks + 2; } - // callbacks - // client has been approved to connect to this game server - [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] - [CallbackIdentity(Constants.k_iSteamGameServerCallbacks + 1)] + #if STEAMWORKS_ANYCPU + // callback notification - A message failed to make it to the GC. It may be down temporarily + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamGameCoordinatorCallbacks + 2)] + internal struct GCMessageFailed_t_LargePack { + public const int k_iCallback = Constants.k_iSteamGameCoordinatorCallbacks + 2; + } + + + // callback notification - A message failed to make it to the GC. It may be down temporarily + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamGameCoordinatorCallbacks + 2)] + internal struct GCMessageFailed_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamGameCoordinatorCallbacks + 2; + } + + #endif + // callbacks + // client has been approved to connect to this game server + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamGameServerCallbacks + 1)] public struct GSClientApprove_t { public const int k_iCallback = Constants.k_iSteamGameServerCallbacks + 1; public CSteamID m_SteamID; // SteamID of approved player public CSteamID m_OwnerSteamID; // SteamID of original owner for game license } + #if STEAMWORKS_ANYCPU + // callbacks + // client has been approved to connect to this game server + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamGameServerCallbacks + 1)] + internal struct GSClientApprove_t_LargePack { + public const int k_iCallback = Constants.k_iSteamGameServerCallbacks + 1; + public CSteamID m_SteamID; // SteamID of approved player + public CSteamID m_OwnerSteamID; // SteamID of original owner for game license + } + + + // callbacks + // client has been approved to connect to this game server + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamGameServerCallbacks + 1)] + internal struct GSClientApprove_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamGameServerCallbacks + 1; + public CSteamID m_SteamID; // SteamID of approved player + public CSteamID m_OwnerSteamID; // SteamID of original owner for game license + } + + #endif // client has been denied to connection to this game server [StructLayout(LayoutKind.Sequential, Pack = 4)] [CallbackIdentity(Constants.k_iSteamGameServerCallbacks + 2)] @@ -400,7 +1006,7 @@ public struct GSClientDeny_t { public CSteamID m_SteamID; public EDenyReason m_eDenyReason; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] - private byte[] m_rgchOptionalText_; + internal byte[] m_rgchOptionalText_; public string m_rgchOptionalText { get { return InteropHelp.ByteArrayToStringUTF8(m_rgchOptionalText_); } @@ -426,7 +1032,47 @@ public struct GSClientAchievementStatus_t { public const int k_iCallback = Constants.k_iSteamGameServerCallbacks + 6; public ulong m_SteamID; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] - private byte[] m_pchAchievement_; + internal byte[] m_pchAchievement_; + public string m_pchAchievement + { + get { return InteropHelp.ByteArrayToStringUTF8(m_pchAchievement_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_pchAchievement_, 128); } + } + [MarshalAs(UnmanagedType.I1)] + public bool m_bUnlocked; + } + + #if STEAMWORKS_ANYCPU + // NOTE: callback values 4 and 5 are skipped because they are used for old deprecated callbacks, + // do not reuse them here. + // client achievement info + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamGameServerCallbacks + 6)] + internal struct GSClientAchievementStatus_t_LargePack { + public const int k_iCallback = Constants.k_iSteamGameServerCallbacks + 6; + public ulong m_SteamID; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] + internal byte[] m_pchAchievement_; + public string m_pchAchievement + { + get { return InteropHelp.ByteArrayToStringUTF8(m_pchAchievement_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_pchAchievement_, 128); } + } + [MarshalAs(UnmanagedType.I1)] + public bool m_bUnlocked; + } + + + // NOTE: callback values 4 and 5 are skipped because they are used for old deprecated callbacks, + // do not reuse them here. + // client achievement info + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamGameServerCallbacks + 6)] + internal struct GSClientAchievementStatus_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamGameServerCallbacks + 6; + public ulong m_SteamID; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] + internal byte[] m_pchAchievement_; public string m_pchAchievement { get { return InteropHelp.ByteArrayToStringUTF8(m_pchAchievement_); } @@ -436,6 +1082,7 @@ public string m_pchAchievement public bool m_bUnlocked; } + #endif // received when the game server requests to be displayed as secure (VAC protected) // m_bSecure is true if the game server should display itself as secure to users, false otherwise [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] @@ -445,6 +1092,27 @@ public struct GSPolicyResponse_t { public byte m_bSecure; } + #if STEAMWORKS_ANYCPU + // received when the game server requests to be displayed as secure (VAC protected) + // m_bSecure is true if the game server should display itself as secure to users, false otherwise + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserCallbacks + 15)] + internal struct GSPolicyResponse_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUserCallbacks + 15; + public byte m_bSecure; + } + + + // received when the game server requests to be displayed as secure (VAC protected) + // m_bSecure is true if the game server should display itself as secure to users, false otherwise + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserCallbacks + 15)] + internal struct GSPolicyResponse_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUserCallbacks + 15; + public byte m_bSecure; + } + + #endif // GS gameplay stats info [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamGameServerCallbacks + 7)] @@ -456,6 +1124,31 @@ public struct GSGameplayStats_t { public uint m_unTotalMinutesPlayed; // Total number of minutes ever played on the server } + #if STEAMWORKS_ANYCPU + // GS gameplay stats info + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamGameServerCallbacks + 7)] + internal struct GSGameplayStats_t_LargePack { + public const int k_iCallback = Constants.k_iSteamGameServerCallbacks + 7; + public EResult m_eResult; // Result of the call + public int m_nRank; // Overall rank of the server (0-based) + public uint m_unTotalConnects; // Total number of clients who have ever connected to the server + public uint m_unTotalMinutesPlayed; // Total number of minutes ever played on the server + } + + + // GS gameplay stats info + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamGameServerCallbacks + 7)] + internal struct GSGameplayStats_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamGameServerCallbacks + 7; + public EResult m_eResult; // Result of the call + public int m_nRank; // Overall rank of the server (0-based) + public uint m_unTotalConnects; // Total number of clients who have ever connected to the server + public uint m_unTotalMinutesPlayed; // Total number of minutes ever played on the server + } + + #endif // send as a reply to RequestUserGroupStatus() [StructLayout(LayoutKind.Sequential, Pack = 1)] [CallbackIdentity(Constants.k_iSteamGameServerCallbacks + 8)] @@ -491,6 +1184,53 @@ public struct GSReputation_t { public uint m_unBanExpires; // Time the ban expires, expressed in the Unix epoch (seconds since 1/1/1970) } + #if STEAMWORKS_ANYCPU + // Sent as a reply to GetServerReputation() + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamGameServerCallbacks + 9)] + internal struct GSReputation_t_LargePack { + public const int k_iCallback = Constants.k_iSteamGameServerCallbacks + 9; + public EResult m_eResult; // Result of the call; + public uint m_unReputationScore; // The reputation score for the game server + [MarshalAs(UnmanagedType.I1)] + public bool m_bBanned; // True if the server is banned from the Steam + // master servers + + // The following members are only filled out if m_bBanned is true. They will all + // be set to zero otherwise. Master server bans are by IP so it is possible to be + // banned even when the score is good high if there is a bad server on another port. + // This information can be used to determine which server is bad. + + public uint m_unBannedIP; // The IP of the banned server + public ushort m_usBannedPort; // The port of the banned server + public ulong m_ulBannedGameID; // The game ID the banned server is serving + public uint m_unBanExpires; // Time the ban expires, expressed in the Unix epoch (seconds since 1/1/1970) + } + + + // Sent as a reply to GetServerReputation() + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamGameServerCallbacks + 9)] + internal struct GSReputation_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamGameServerCallbacks + 9; + public EResult m_eResult; // Result of the call; + public uint m_unReputationScore; // The reputation score for the game server + [MarshalAs(UnmanagedType.I1)] + public bool m_bBanned; // True if the server is banned from the Steam + // master servers + + // The following members are only filled out if m_bBanned is true. They will all + // be set to zero otherwise. Master server bans are by IP so it is possible to be + // banned even when the score is good high if there is a bad server on another port. + // This information can be used to determine which server is bad. + + public uint m_unBannedIP; // The IP of the banned server + public ushort m_usBannedPort; // The port of the banned server + public ulong m_ulBannedGameID; // The game ID the banned server is serving + public uint m_unBanExpires; // Time the ban expires, expressed in the Unix epoch (seconds since 1/1/1970) + } + + #endif // Sent as a reply to AssociateWithClan() [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamGameServerCallbacks + 10)] @@ -499,6 +1239,25 @@ public struct AssociateWithClanResult_t { public EResult m_eResult; // Result of the call; } + #if STEAMWORKS_ANYCPU + // Sent as a reply to AssociateWithClan() + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamGameServerCallbacks + 10)] + internal struct AssociateWithClanResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamGameServerCallbacks + 10; + public EResult m_eResult; // Result of the call; + } + + + // Sent as a reply to AssociateWithClan() + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamGameServerCallbacks + 10)] + internal struct AssociateWithClanResult_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamGameServerCallbacks + 10; + public EResult m_eResult; // Result of the call; + } + + #endif // Sent as a reply to ComputeNewPlayerCompatibility() [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamGameServerCallbacks + 11)] @@ -511,6 +1270,33 @@ public struct ComputeNewPlayerCompatibilityResult_t { public CSteamID m_SteamIDCandidate; } + #if STEAMWORKS_ANYCPU + // Sent as a reply to ComputeNewPlayerCompatibility() + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamGameServerCallbacks + 11)] + internal struct ComputeNewPlayerCompatibilityResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamGameServerCallbacks + 11; + public EResult m_eResult; // Result of the call; + public int m_cPlayersThatDontLikeCandidate; + public int m_cPlayersThatCandidateDoesntLike; + public int m_cClanPlayersThatDontLikeCandidate; + public CSteamID m_SteamIDCandidate; + } + + + // Sent as a reply to ComputeNewPlayerCompatibility() + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamGameServerCallbacks + 11)] + internal struct ComputeNewPlayerCompatibilityResult_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamGameServerCallbacks + 11; + public EResult m_eResult; // Result of the call; + public int m_cPlayersThatDontLikeCandidate; + public int m_cPlayersThatCandidateDoesntLike; + public int m_cClanPlayersThatDontLikeCandidate; + public CSteamID m_SteamIDCandidate; + } + + #endif // callbacks //----------------------------------------------------------------------------- // Purpose: called when the latests stats and achievements have been received @@ -546,6 +1332,31 @@ public struct GSStatsUnloaded_t { public CSteamID m_steamIDUser; // User whose stats have been unloaded } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: Callback indicating that a user's stats have been unloaded. + // Call RequestUserStats again to access stats for this user + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserStatsCallbacks + 8)] + internal struct GSStatsUnloaded_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUserStatsCallbacks + 8; + public CSteamID m_steamIDUser; // User whose stats have been unloaded + } + + + //----------------------------------------------------------------------------- + // Purpose: Callback indicating that a user's stats have been unloaded. + // Call RequestUserStats again to access stats for this user + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserStatsCallbacks + 8)] + internal struct GSStatsUnloaded_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUserStatsCallbacks + 8; + public CSteamID m_steamIDUser; // User whose stats have been unloaded + } + + #endif // callbacks //----------------------------------------------------------------------------- // Purpose: The browser is ready for use @@ -557,6 +1368,31 @@ public struct HTML_BrowserReady_t { public HHTMLBrowser unBrowserHandle; // this browser is now fully created and ready to navigate to pages } + #if STEAMWORKS_ANYCPU + // callbacks + //----------------------------------------------------------------------------- + // Purpose: The browser is ready for use + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 1)] + internal struct HTML_BrowserReady_t_LargePack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 1; + public HHTMLBrowser unBrowserHandle; // this browser is now fully created and ready to navigate to pages + } + + + // callbacks + //----------------------------------------------------------------------------- + // Purpose: The browser is ready for use + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 1)] + internal struct HTML_BrowserReady_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 1; + public HHTMLBrowser unBrowserHandle; // this browser is now fully created and ready to navigate to pages + } + + #endif //----------------------------------------------------------------------------- // Purpose: the browser has a pending paint //----------------------------------------------------------------------------- @@ -578,250 +1414,837 @@ public struct HTML_NeedsPaint_t { public uint unPageSerial; // incremented on each new page load, you can use this to reject draws while navigating to new pages } + #if STEAMWORKS_ANYCPU //----------------------------------------------------------------------------- - // Purpose: The browser wanted to navigate to a new page - // NOTE - you MUST call AllowStartRequest in response to this callback - //----------------------------------------------------------------------------- - [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] - [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 3)] - public struct HTML_StartRequest_t { - public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 3; - public HHTMLBrowser unBrowserHandle; // the handle of the surface navigating - public string pchURL; // the url they wish to navigate to - public string pchTarget; // the html link target type (i.e _blank, _self, _parent, _top ) - public string pchPostData; // any posted data for the request - [MarshalAs(UnmanagedType.I1)] - public bool bIsRedirect; // true if this was a http/html redirect from the last load request - } - - //----------------------------------------------------------------------------- - // Purpose: The browser has been requested to close due to user interaction (usually from a javascript window.close() call) + // Purpose: the browser has a pending paint //----------------------------------------------------------------------------- [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] - [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 4)] - public struct HTML_CloseBrowser_t { - public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 4; - public HHTMLBrowser unBrowserHandle; // the handle of the surface - } - + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 2)] + internal struct HTML_NeedsPaint_t_LargePack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 2; + public HHTMLBrowser unBrowserHandle; // the browser that needs the paint + public IntPtr pBGRA; // a pointer to the B8G8R8A8 data for this surface, valid until SteamAPI_RunCallbacks is next called + public uint unWide; // the total width of the pBGRA texture + public uint unTall; // the total height of the pBGRA texture + public uint unUpdateX; // the offset in X for the damage rect for this update + public uint unUpdateY; // the offset in Y for the damage rect for this update + public uint unUpdateWide; // the width of the damage rect for this update + public uint unUpdateTall; // the height of the damage rect for this update + public uint unScrollX; // the page scroll the browser was at when this texture was rendered + public uint unScrollY; // the page scroll the browser was at when this texture was rendered + public float flPageScale; // the page scale factor on this page when rendered + public uint unPageSerial; // incremented on each new page load, you can use this to reject draws while navigating to new pages + } + + //----------------------------------------------------------------------------- - // Purpose: the browser is navigating to a new url + // Purpose: the browser has a pending paint //----------------------------------------------------------------------------- [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] - [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 5)] - public struct HTML_URLChanged_t { - public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 5; + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 2)] + internal struct HTML_NeedsPaint_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 2; + public HHTMLBrowser unBrowserHandle; // the browser that needs the paint + public IntPtr pBGRA; // a pointer to the B8G8R8A8 data for this surface, valid until SteamAPI_RunCallbacks is next called + public uint unWide; // the total width of the pBGRA texture + public uint unTall; // the total height of the pBGRA texture + public uint unUpdateX; // the offset in X for the damage rect for this update + public uint unUpdateY; // the offset in Y for the damage rect for this update + public uint unUpdateWide; // the width of the damage rect for this update + public uint unUpdateTall; // the height of the damage rect for this update + public uint unScrollX; // the page scroll the browser was at when this texture was rendered + public uint unScrollY; // the page scroll the browser was at when this texture was rendered + public float flPageScale; // the page scale factor on this page when rendered + public uint unPageSerial; // incremented on each new page load, you can use this to reject draws while navigating to new pages + } + + #endif + //----------------------------------------------------------------------------- + // Purpose: The browser wanted to navigate to a new page + // NOTE - you MUST call AllowStartRequest in response to this callback + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 3)] + public struct HTML_StartRequest_t { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 3; public HHTMLBrowser unBrowserHandle; // the handle of the surface navigating public string pchURL; // the url they wish to navigate to + public string pchTarget; // the html link target type (i.e _blank, _self, _parent, _top ) public string pchPostData; // any posted data for the request [MarshalAs(UnmanagedType.I1)] public bool bIsRedirect; // true if this was a http/html redirect from the last load request - public string pchPageTitle; // the title of the page - [MarshalAs(UnmanagedType.I1)] - public bool bNewNavigation; // true if this was from a fresh tab and not a click on an existing page } + #if STEAMWORKS_ANYCPU //----------------------------------------------------------------------------- - // Purpose: A page is finished loading + // Purpose: The browser wanted to navigate to a new page + // NOTE - you MUST call AllowStartRequest in response to this callback //----------------------------------------------------------------------------- [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] - [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 6)] - public struct HTML_FinishedRequest_t { - public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 6; - public HHTMLBrowser unBrowserHandle; // the handle of the surface - public string pchURL; // - public string pchPageTitle; // + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 3)] + internal struct HTML_StartRequest_t_LargePack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 3; + public HHTMLBrowser unBrowserHandle; // the handle of the surface navigating + public string pchURL; // the url they wish to navigate to + public string pchTarget; // the html link target type (i.e _blank, _self, _parent, _top ) + public string pchPostData; // any posted data for the request + [MarshalAs(UnmanagedType.I1)] + public bool bIsRedirect; // true if this was a http/html redirect from the last load request } + //----------------------------------------------------------------------------- - // Purpose: a request to load this url in a new tab + // Purpose: The browser wanted to navigate to a new page + // NOTE - you MUST call AllowStartRequest in response to this callback //----------------------------------------------------------------------------- [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] - [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 7)] - public struct HTML_OpenLinkInNewTab_t { - public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 7; - public HHTMLBrowser unBrowserHandle; // the handle of the surface - public string pchURL; // + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 3)] + internal struct HTML_StartRequest_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 3; + public HHTMLBrowser unBrowserHandle; // the handle of the surface navigating + public string pchURL; // the url they wish to navigate to + public string pchTarget; // the html link target type (i.e _blank, _self, _parent, _top ) + public string pchPostData; // any posted data for the request + [MarshalAs(UnmanagedType.I1)] + public bool bIsRedirect; // true if this was a http/html redirect from the last load request } + #endif //----------------------------------------------------------------------------- - // Purpose: the page has a new title now + // Purpose: The browser has been requested to close due to user interaction (usually from a javascript window.close() call) //----------------------------------------------------------------------------- [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] - [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 8)] - public struct HTML_ChangedTitle_t { - public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 8; + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 4)] + public struct HTML_CloseBrowser_t { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 4; public HHTMLBrowser unBrowserHandle; // the handle of the surface - public string pchTitle; // } + #if STEAMWORKS_ANYCPU //----------------------------------------------------------------------------- - // Purpose: results from a search + // Purpose: The browser has been requested to close due to user interaction (usually from a javascript window.close() call) //----------------------------------------------------------------------------- [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] - [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 9)] - public struct HTML_SearchResults_t { - public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 9; + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 4)] + internal struct HTML_CloseBrowser_t_LargePack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 4; public HHTMLBrowser unBrowserHandle; // the handle of the surface - public uint unResults; // - public uint unCurrentMatch; // } + //----------------------------------------------------------------------------- - // Purpose: page history status changed on the ability to go backwards and forward + // Purpose: The browser has been requested to close due to user interaction (usually from a javascript window.close() call) //----------------------------------------------------------------------------- [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] - [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 10)] - public struct HTML_CanGoBackAndForward_t { - public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 10; + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 4)] + internal struct HTML_CloseBrowser_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 4; public HHTMLBrowser unBrowserHandle; // the handle of the surface - [MarshalAs(UnmanagedType.I1)] - public bool bCanGoBack; // - [MarshalAs(UnmanagedType.I1)] - public bool bCanGoForward; // } + #endif //----------------------------------------------------------------------------- - // Purpose: details on the visibility and size of the horizontal scrollbar + // Purpose: the browser is navigating to a new url //----------------------------------------------------------------------------- [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] - [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 11)] - public struct HTML_HorizontalScroll_t { - public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 11; - public HHTMLBrowser unBrowserHandle; // the handle of the surface - public uint unScrollMax; // - public uint unScrollCurrent; // - public float flPageScale; // + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 5)] + public struct HTML_URLChanged_t { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 5; + public HHTMLBrowser unBrowserHandle; // the handle of the surface navigating + public string pchURL; // the url they wish to navigate to + public string pchPostData; // any posted data for the request [MarshalAs(UnmanagedType.I1)] - public bool bVisible; // - public uint unPageSize; // + public bool bIsRedirect; // true if this was a http/html redirect from the last load request + public string pchPageTitle; // the title of the page + [MarshalAs(UnmanagedType.I1)] + public bool bNewNavigation; // true if this was from a fresh tab and not a click on an existing page } + #if STEAMWORKS_ANYCPU //----------------------------------------------------------------------------- - // Purpose: details on the visibility and size of the vertical scrollbar + // Purpose: the browser is navigating to a new url //----------------------------------------------------------------------------- [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] - [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 12)] - public struct HTML_VerticalScroll_t { - public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 12; - public HHTMLBrowser unBrowserHandle; // the handle of the surface - public uint unScrollMax; // - public uint unScrollCurrent; // - public float flPageScale; // + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 5)] + internal struct HTML_URLChanged_t_LargePack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 5; + public HHTMLBrowser unBrowserHandle; // the handle of the surface navigating + public string pchURL; // the url they wish to navigate to + public string pchPostData; // any posted data for the request [MarshalAs(UnmanagedType.I1)] - public bool bVisible; // - public uint unPageSize; // + public bool bIsRedirect; // true if this was a http/html redirect from the last load request + public string pchPageTitle; // the title of the page + [MarshalAs(UnmanagedType.I1)] + public bool bNewNavigation; // true if this was from a fresh tab and not a click on an existing page } + //----------------------------------------------------------------------------- - // Purpose: response to GetLinkAtPosition call + // Purpose: the browser is navigating to a new url //----------------------------------------------------------------------------- [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] - [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 13)] - public struct HTML_LinkAtPosition_t { - public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 13; - public HHTMLBrowser unBrowserHandle; // the handle of the surface - public uint x; // NOTE - Not currently set - public uint y; // NOTE - Not currently set - public string pchURL; // + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 5)] + internal struct HTML_URLChanged_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 5; + public HHTMLBrowser unBrowserHandle; // the handle of the surface navigating + public string pchURL; // the url they wish to navigate to + public string pchPostData; // any posted data for the request [MarshalAs(UnmanagedType.I1)] - public bool bInput; // + public bool bIsRedirect; // true if this was a http/html redirect from the last load request + public string pchPageTitle; // the title of the page [MarshalAs(UnmanagedType.I1)] - public bool bLiveLink; // + public bool bNewNavigation; // true if this was from a fresh tab and not a click on an existing page } + #endif //----------------------------------------------------------------------------- - // Purpose: show a Javascript alert dialog, call JSDialogResponse - // when the user dismisses this dialog (or right away to ignore it) + // Purpose: A page is finished loading //----------------------------------------------------------------------------- [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] - [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 14)] - public struct HTML_JSAlert_t { - public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 14; + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 6)] + public struct HTML_FinishedRequest_t { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 6; public HHTMLBrowser unBrowserHandle; // the handle of the surface - public string pchMessage; // + public string pchURL; // + public string pchPageTitle; // } + #if STEAMWORKS_ANYCPU //----------------------------------------------------------------------------- - // Purpose: show a Javascript confirmation dialog, call JSDialogResponse - // when the user dismisses this dialog (or right away to ignore it) + // Purpose: A page is finished loading //----------------------------------------------------------------------------- [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] - [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 15)] - public struct HTML_JSConfirm_t { - public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 15; + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 6)] + internal struct HTML_FinishedRequest_t_LargePack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 6; public HHTMLBrowser unBrowserHandle; // the handle of the surface - public string pchMessage; // + public string pchURL; // + public string pchPageTitle; // } + //----------------------------------------------------------------------------- - // Purpose: when received show a file open dialog - // then call FileLoadDialogResponse with the file(s) the user selected. + // Purpose: A page is finished loading //----------------------------------------------------------------------------- [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] - [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 16)] - public struct HTML_FileOpenDialog_t { - public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 16; + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 6)] + internal struct HTML_FinishedRequest_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 6; public HHTMLBrowser unBrowserHandle; // the handle of the surface - public string pchTitle; // - public string pchInitialFile; // + public string pchURL; // + public string pchPageTitle; // } + #endif //----------------------------------------------------------------------------- - // Purpose: a new html window is being created. - // - // IMPORTANT NOTE: at this time, the API does not allow you to acknowledge or - // render the contents of this new window, so the new window is always destroyed - // immediately. The URL and other parameters of the new window are passed here - // to give your application the opportunity to call CreateBrowser and set up - // a new browser in response to the attempted popup, if you wish to do so. + // Purpose: a request to load this url in a new tab //----------------------------------------------------------------------------- [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] - [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 21)] - public struct HTML_NewWindow_t { - public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 21; - public HHTMLBrowser unBrowserHandle; // the handle of the current surface - public string pchURL; // the page to load - public uint unX; // the x pos into the page to display the popup - public uint unY; // the y pos into the page to display the popup - public uint unWide; // the total width of the pBGRA texture - public uint unTall; // the total height of the pBGRA texture - public HHTMLBrowser unNewWindow_BrowserHandle_IGNORE; + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 7)] + public struct HTML_OpenLinkInNewTab_t { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 7; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + public string pchURL; // } + #if STEAMWORKS_ANYCPU //----------------------------------------------------------------------------- - // Purpose: change the cursor to display + // Purpose: a request to load this url in a new tab //----------------------------------------------------------------------------- [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] - [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 22)] - public struct HTML_SetCursor_t { - public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 22; + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 7)] + internal struct HTML_OpenLinkInNewTab_t_LargePack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 7; public HHTMLBrowser unBrowserHandle; // the handle of the surface - public uint eMouseCursor; // the EHTMLMouseCursor to display + public string pchURL; // } + //----------------------------------------------------------------------------- - // Purpose: informational message from the browser + // Purpose: a request to load this url in a new tab //----------------------------------------------------------------------------- [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] - [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 23)] - public struct HTML_StatusText_t { - public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 23; + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 7)] + internal struct HTML_OpenLinkInNewTab_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 7; public HHTMLBrowser unBrowserHandle; // the handle of the surface - public string pchMsg; // the message text + public string pchURL; // } + #endif //----------------------------------------------------------------------------- - // Purpose: show a tooltip + // Purpose: the page has a new title now //----------------------------------------------------------------------------- [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] - [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 24)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 8)] + public struct HTML_ChangedTitle_t { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 8; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + public string pchTitle; // + } + + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: the page has a new title now + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 8)] + internal struct HTML_ChangedTitle_t_LargePack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 8; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + public string pchTitle; // + } + + + //----------------------------------------------------------------------------- + // Purpose: the page has a new title now + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 8)] + internal struct HTML_ChangedTitle_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 8; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + public string pchTitle; // + } + + #endif + //----------------------------------------------------------------------------- + // Purpose: results from a search + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 9)] + public struct HTML_SearchResults_t { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 9; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + public uint unResults; // + public uint unCurrentMatch; // + } + + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: results from a search + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 9)] + internal struct HTML_SearchResults_t_LargePack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 9; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + public uint unResults; // + public uint unCurrentMatch; // + } + + + //----------------------------------------------------------------------------- + // Purpose: results from a search + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 9)] + internal struct HTML_SearchResults_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 9; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + public uint unResults; // + public uint unCurrentMatch; // + } + + #endif + //----------------------------------------------------------------------------- + // Purpose: page history status changed on the ability to go backwards and forward + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 10)] + public struct HTML_CanGoBackAndForward_t { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 10; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + [MarshalAs(UnmanagedType.I1)] + public bool bCanGoBack; // + [MarshalAs(UnmanagedType.I1)] + public bool bCanGoForward; // + } + + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: page history status changed on the ability to go backwards and forward + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 10)] + internal struct HTML_CanGoBackAndForward_t_LargePack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 10; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + [MarshalAs(UnmanagedType.I1)] + public bool bCanGoBack; // + [MarshalAs(UnmanagedType.I1)] + public bool bCanGoForward; // + } + + + //----------------------------------------------------------------------------- + // Purpose: page history status changed on the ability to go backwards and forward + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 10)] + internal struct HTML_CanGoBackAndForward_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 10; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + [MarshalAs(UnmanagedType.I1)] + public bool bCanGoBack; // + [MarshalAs(UnmanagedType.I1)] + public bool bCanGoForward; // + } + + #endif + //----------------------------------------------------------------------------- + // Purpose: details on the visibility and size of the horizontal scrollbar + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 11)] + public struct HTML_HorizontalScroll_t { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 11; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + public uint unScrollMax; // + public uint unScrollCurrent; // + public float flPageScale; // + [MarshalAs(UnmanagedType.I1)] + public bool bVisible; // + public uint unPageSize; // + } + + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: details on the visibility and size of the horizontal scrollbar + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 11)] + internal struct HTML_HorizontalScroll_t_LargePack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 11; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + public uint unScrollMax; // + public uint unScrollCurrent; // + public float flPageScale; // + [MarshalAs(UnmanagedType.I1)] + public bool bVisible; // + public uint unPageSize; // + } + + + //----------------------------------------------------------------------------- + // Purpose: details on the visibility and size of the horizontal scrollbar + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 11)] + internal struct HTML_HorizontalScroll_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 11; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + public uint unScrollMax; // + public uint unScrollCurrent; // + public float flPageScale; // + [MarshalAs(UnmanagedType.I1)] + public bool bVisible; // + public uint unPageSize; // + } + + #endif + //----------------------------------------------------------------------------- + // Purpose: details on the visibility and size of the vertical scrollbar + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 12)] + public struct HTML_VerticalScroll_t { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 12; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + public uint unScrollMax; // + public uint unScrollCurrent; // + public float flPageScale; // + [MarshalAs(UnmanagedType.I1)] + public bool bVisible; // + public uint unPageSize; // + } + + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: details on the visibility and size of the vertical scrollbar + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 12)] + internal struct HTML_VerticalScroll_t_LargePack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 12; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + public uint unScrollMax; // + public uint unScrollCurrent; // + public float flPageScale; // + [MarshalAs(UnmanagedType.I1)] + public bool bVisible; // + public uint unPageSize; // + } + + + //----------------------------------------------------------------------------- + // Purpose: details on the visibility and size of the vertical scrollbar + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 12)] + internal struct HTML_VerticalScroll_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 12; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + public uint unScrollMax; // + public uint unScrollCurrent; // + public float flPageScale; // + [MarshalAs(UnmanagedType.I1)] + public bool bVisible; // + public uint unPageSize; // + } + + #endif + //----------------------------------------------------------------------------- + // Purpose: response to GetLinkAtPosition call + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 13)] + public struct HTML_LinkAtPosition_t { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 13; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + public uint x; // NOTE - Not currently set + public uint y; // NOTE - Not currently set + public string pchURL; // + [MarshalAs(UnmanagedType.I1)] + public bool bInput; // + [MarshalAs(UnmanagedType.I1)] + public bool bLiveLink; // + } + + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: response to GetLinkAtPosition call + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 13)] + internal struct HTML_LinkAtPosition_t_LargePack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 13; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + public uint x; // NOTE - Not currently set + public uint y; // NOTE - Not currently set + public string pchURL; // + [MarshalAs(UnmanagedType.I1)] + public bool bInput; // + [MarshalAs(UnmanagedType.I1)] + public bool bLiveLink; // + } + + + //----------------------------------------------------------------------------- + // Purpose: response to GetLinkAtPosition call + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 13)] + internal struct HTML_LinkAtPosition_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 13; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + public uint x; // NOTE - Not currently set + public uint y; // NOTE - Not currently set + public string pchURL; // + [MarshalAs(UnmanagedType.I1)] + public bool bInput; // + [MarshalAs(UnmanagedType.I1)] + public bool bLiveLink; // + } + + #endif + //----------------------------------------------------------------------------- + // Purpose: show a Javascript alert dialog, call JSDialogResponse + // when the user dismisses this dialog (or right away to ignore it) + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 14)] + public struct HTML_JSAlert_t { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 14; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + public string pchMessage; // + } + + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: show a Javascript alert dialog, call JSDialogResponse + // when the user dismisses this dialog (or right away to ignore it) + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 14)] + internal struct HTML_JSAlert_t_LargePack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 14; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + public string pchMessage; // + } + + + //----------------------------------------------------------------------------- + // Purpose: show a Javascript alert dialog, call JSDialogResponse + // when the user dismisses this dialog (or right away to ignore it) + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 14)] + internal struct HTML_JSAlert_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 14; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + public string pchMessage; // + } + + #endif + //----------------------------------------------------------------------------- + // Purpose: show a Javascript confirmation dialog, call JSDialogResponse + // when the user dismisses this dialog (or right away to ignore it) + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 15)] + public struct HTML_JSConfirm_t { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 15; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + public string pchMessage; // + } + + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: show a Javascript confirmation dialog, call JSDialogResponse + // when the user dismisses this dialog (or right away to ignore it) + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 15)] + internal struct HTML_JSConfirm_t_LargePack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 15; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + public string pchMessage; // + } + + + //----------------------------------------------------------------------------- + // Purpose: show a Javascript confirmation dialog, call JSDialogResponse + // when the user dismisses this dialog (or right away to ignore it) + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 15)] + internal struct HTML_JSConfirm_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 15; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + public string pchMessage; // + } + + #endif + //----------------------------------------------------------------------------- + // Purpose: when received show a file open dialog + // then call FileLoadDialogResponse with the file(s) the user selected. + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 16)] + public struct HTML_FileOpenDialog_t { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 16; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + public string pchTitle; // + public string pchInitialFile; // + } + + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: when received show a file open dialog + // then call FileLoadDialogResponse with the file(s) the user selected. + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 16)] + internal struct HTML_FileOpenDialog_t_LargePack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 16; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + public string pchTitle; // + public string pchInitialFile; // + } + + + //----------------------------------------------------------------------------- + // Purpose: when received show a file open dialog + // then call FileLoadDialogResponse with the file(s) the user selected. + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 16)] + internal struct HTML_FileOpenDialog_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 16; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + public string pchTitle; // + public string pchInitialFile; // + } + + #endif + //----------------------------------------------------------------------------- + // Purpose: a new html window is being created. + // + // IMPORTANT NOTE: at this time, the API does not allow you to acknowledge or + // render the contents of this new window, so the new window is always destroyed + // immediately. The URL and other parameters of the new window are passed here + // to give your application the opportunity to call CreateBrowser and set up + // a new browser in response to the attempted popup, if you wish to do so. + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 21)] + public struct HTML_NewWindow_t { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 21; + public HHTMLBrowser unBrowserHandle; // the handle of the current surface + public string pchURL; // the page to load + public uint unX; // the x pos into the page to display the popup + public uint unY; // the y pos into the page to display the popup + public uint unWide; // the total width of the pBGRA texture + public uint unTall; // the total height of the pBGRA texture + public HHTMLBrowser unNewWindow_BrowserHandle_IGNORE; + } + + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: a new html window is being created. + // + // IMPORTANT NOTE: at this time, the API does not allow you to acknowledge or + // render the contents of this new window, so the new window is always destroyed + // immediately. The URL and other parameters of the new window are passed here + // to give your application the opportunity to call CreateBrowser and set up + // a new browser in response to the attempted popup, if you wish to do so. + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 21)] + internal struct HTML_NewWindow_t_LargePack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 21; + public HHTMLBrowser unBrowserHandle; // the handle of the current surface + public string pchURL; // the page to load + public uint unX; // the x pos into the page to display the popup + public uint unY; // the y pos into the page to display the popup + public uint unWide; // the total width of the pBGRA texture + public uint unTall; // the total height of the pBGRA texture + public HHTMLBrowser unNewWindow_BrowserHandle_IGNORE; + } + + + //----------------------------------------------------------------------------- + // Purpose: a new html window is being created. + // + // IMPORTANT NOTE: at this time, the API does not allow you to acknowledge or + // render the contents of this new window, so the new window is always destroyed + // immediately. The URL and other parameters of the new window are passed here + // to give your application the opportunity to call CreateBrowser and set up + // a new browser in response to the attempted popup, if you wish to do so. + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 21)] + internal struct HTML_NewWindow_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 21; + public HHTMLBrowser unBrowserHandle; // the handle of the current surface + public string pchURL; // the page to load + public uint unX; // the x pos into the page to display the popup + public uint unY; // the y pos into the page to display the popup + public uint unWide; // the total width of the pBGRA texture + public uint unTall; // the total height of the pBGRA texture + public HHTMLBrowser unNewWindow_BrowserHandle_IGNORE; + } + + #endif + //----------------------------------------------------------------------------- + // Purpose: change the cursor to display + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 22)] + public struct HTML_SetCursor_t { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 22; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + public uint eMouseCursor; // the EHTMLMouseCursor to display + } + + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: change the cursor to display + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 22)] + internal struct HTML_SetCursor_t_LargePack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 22; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + public uint eMouseCursor; // the EHTMLMouseCursor to display + } + + + //----------------------------------------------------------------------------- + // Purpose: change the cursor to display + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 22)] + internal struct HTML_SetCursor_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 22; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + public uint eMouseCursor; // the EHTMLMouseCursor to display + } + + #endif + //----------------------------------------------------------------------------- + // Purpose: informational message from the browser + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 23)] + public struct HTML_StatusText_t { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 23; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + public string pchMsg; // the message text + } + + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: informational message from the browser + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 23)] + internal struct HTML_StatusText_t_LargePack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 23; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + public string pchMsg; // the message text + } + + + //----------------------------------------------------------------------------- + // Purpose: informational message from the browser + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 23)] + internal struct HTML_StatusText_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 23; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + public string pchMsg; // the message text + } + + #endif + //----------------------------------------------------------------------------- + // Purpose: show a tooltip + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 24)] public struct HTML_ShowToolTip_t { public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 24; public HHTMLBrowser unBrowserHandle; // the handle of the surface public string pchMsg; // the tooltip text } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: show a tooltip + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 24)] + internal struct HTML_ShowToolTip_t_LargePack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 24; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + public string pchMsg; // the tooltip text + } + + + //----------------------------------------------------------------------------- + // Purpose: show a tooltip + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 24)] + internal struct HTML_ShowToolTip_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 24; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + public string pchMsg; // the tooltip text + } + + #endif //----------------------------------------------------------------------------- // Purpose: update the text of an existing tooltip //----------------------------------------------------------------------------- @@ -833,6 +2256,31 @@ public struct HTML_UpdateToolTip_t { public string pchMsg; // the new tooltip text } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: update the text of an existing tooltip + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 25)] + internal struct HTML_UpdateToolTip_t_LargePack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 25; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + public string pchMsg; // the new tooltip text + } + + + //----------------------------------------------------------------------------- + // Purpose: update the text of an existing tooltip + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 25)] + internal struct HTML_UpdateToolTip_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 25; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + public string pchMsg; // the new tooltip text + } + + #endif //----------------------------------------------------------------------------- // Purpose: hide the tooltip you are showing //----------------------------------------------------------------------------- @@ -843,21 +2291,121 @@ public struct HTML_HideToolTip_t { public HHTMLBrowser unBrowserHandle; // the handle of the surface } - //----------------------------------------------------------------------------- - // Purpose: The browser has restarted due to an internal failure, use this new handle value - //----------------------------------------------------------------------------- + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: hide the tooltip you are showing + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 26)] + internal struct HTML_HideToolTip_t_LargePack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 26; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + } + + + //----------------------------------------------------------------------------- + // Purpose: hide the tooltip you are showing + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 26)] + internal struct HTML_HideToolTip_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 26; + public HHTMLBrowser unBrowserHandle; // the handle of the surface + } + + #endif + //----------------------------------------------------------------------------- + // Purpose: The browser has restarted due to an internal failure, use this new handle value + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 27)] + public struct HTML_BrowserRestarted_t { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 27; + public HHTMLBrowser unBrowserHandle; // this is the new browser handle after the restart + public HHTMLBrowser unOldBrowserHandle; // the handle for the browser before the restart, if your handle was this then switch to using unBrowserHandle for API calls + } + + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: The browser has restarted due to an internal failure, use this new handle value + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 27)] + internal struct HTML_BrowserRestarted_t_LargePack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 27; + public HHTMLBrowser unBrowserHandle; // this is the new browser handle after the restart + public HHTMLBrowser unOldBrowserHandle; // the handle for the browser before the restart, if your handle was this then switch to using unBrowserHandle for API calls + } + + + //----------------------------------------------------------------------------- + // Purpose: The browser has restarted due to an internal failure, use this new handle value + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 27)] + internal struct HTML_BrowserRestarted_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 27; + public HHTMLBrowser unBrowserHandle; // this is the new browser handle after the restart + public HHTMLBrowser unOldBrowserHandle; // the handle for the browser before the restart, if your handle was this then switch to using unBrowserHandle for API calls + } + + #endif + // callbacks + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTTPCallbacks + 1)] + public struct HTTPRequestCompleted_t { + public const int k_iCallback = Constants.k_iSteamHTTPCallbacks + 1; + + // Handle value for the request that has completed. + public HTTPRequestHandle m_hRequest; + + // Context value that the user defined on the request that this callback is associated with, 0 if + // no context value was set. + public ulong m_ulContextValue; + + // This will be true if we actually got any sort of response from the server (even an error). + // It will be false if we failed due to an internal error or client side network failure. + [MarshalAs(UnmanagedType.I1)] + public bool m_bRequestSuccessful; + + // Will be the HTTP status code value returned by the server, k_EHTTPStatusCode200OK is the normal + // OK response, if you get something else you probably need to treat it as a failure. + public EHTTPStatusCode m_eStatusCode; + + public uint m_unBodySize; // Same as GetHTTPResponseBodySize() + } + + #if STEAMWORKS_ANYCPU + // callbacks [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] - [CallbackIdentity(Constants.k_iSteamHTMLSurfaceCallbacks + 27)] - public struct HTML_BrowserRestarted_t { - public const int k_iCallback = Constants.k_iSteamHTMLSurfaceCallbacks + 27; - public HHTMLBrowser unBrowserHandle; // this is the new browser handle after the restart - public HHTMLBrowser unOldBrowserHandle; // the handle for the browser before the restart, if your handle was this then switch to using unBrowserHandle for API calls + [CallbackIdentity(Constants.k_iSteamHTTPCallbacks + 1)] + internal struct HTTPRequestCompleted_t_LargePack { + public const int k_iCallback = Constants.k_iSteamHTTPCallbacks + 1; + + // Handle value for the request that has completed. + public HTTPRequestHandle m_hRequest; + + // Context value that the user defined on the request that this callback is associated with, 0 if + // no context value was set. + public ulong m_ulContextValue; + + // This will be true if we actually got any sort of response from the server (even an error). + // It will be false if we failed due to an internal error or client side network failure. + [MarshalAs(UnmanagedType.I1)] + public bool m_bRequestSuccessful; + + // Will be the HTTP status code value returned by the server, k_EHTTPStatusCode200OK is the normal + // OK response, if you get something else you probably need to treat it as a failure. + public EHTTPStatusCode m_eStatusCode; + + public uint m_unBodySize; // Same as GetHTTPResponseBodySize() } + // callbacks [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamHTTPCallbacks + 1)] - public struct HTTPRequestCompleted_t { + internal struct HTTPRequestCompleted_t_SmallPack { public const int k_iCallback = Constants.k_iSteamHTTPCallbacks + 1; // Handle value for the request that has completed. @@ -879,6 +2427,7 @@ public struct HTTPRequestCompleted_t { public uint m_unBodySize; // Same as GetHTTPResponseBodySize() } + #endif [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamHTTPCallbacks + 2)] public struct HTTPRequestHeadersReceived_t { @@ -892,6 +2441,35 @@ public struct HTTPRequestHeadersReceived_t { public ulong m_ulContextValue; } + #if STEAMWORKS_ANYCPU + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTTPCallbacks + 2)] + internal struct HTTPRequestHeadersReceived_t_LargePack { + public const int k_iCallback = Constants.k_iSteamHTTPCallbacks + 2; + + // Handle value for the request that has received headers. + public HTTPRequestHandle m_hRequest; + + // Context value that the user defined on the request that this callback is associated with, 0 if + // no context value was set. + public ulong m_ulContextValue; + } + + + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTTPCallbacks + 2)] + internal struct HTTPRequestHeadersReceived_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamHTTPCallbacks + 2; + + // Handle value for the request that has received headers. + public HTTPRequestHandle m_hRequest; + + // Context value that the user defined on the request that this callback is associated with, 0 if + // no context value was set. + public ulong m_ulContextValue; + } + + #endif [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamHTTPCallbacks + 3)] public struct HTTPRequestDataReceived_t { @@ -912,6 +2490,49 @@ public struct HTTPRequestDataReceived_t { public uint m_cBytesReceived; } + #if STEAMWORKS_ANYCPU + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTTPCallbacks + 3)] + internal struct HTTPRequestDataReceived_t_LargePack { + public const int k_iCallback = Constants.k_iSteamHTTPCallbacks + 3; + + // Handle value for the request that has received data. + public HTTPRequestHandle m_hRequest; + + // Context value that the user defined on the request that this callback is associated with, 0 if + // no context value was set. + public ulong m_ulContextValue; + + + // Offset to provide to GetHTTPStreamingResponseBodyData to get this chunk of data + public uint m_cOffset; + + // Size to provide to GetHTTPStreamingResponseBodyData to get this chunk of data + public uint m_cBytesReceived; + } + + + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamHTTPCallbacks + 3)] + internal struct HTTPRequestDataReceived_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamHTTPCallbacks + 3; + + // Handle value for the request that has received data. + public HTTPRequestHandle m_hRequest; + + // Context value that the user defined on the request that this callback is associated with, 0 if + // no context value was set. + public ulong m_ulContextValue; + + + // Offset to provide to GetHTTPStreamingResponseBodyData to get this chunk of data + public uint m_cOffset; + + // Size to provide to GetHTTPStreamingResponseBodyData to get this chunk of data + public uint m_cBytesReceived; + } + + #endif //----------------------------------------------------------------------------- // Purpose: called when a new controller has been connected, will fire once // per controller if multiple new controllers connect in the same frame @@ -923,6 +2544,31 @@ public struct SteamInputDeviceConnected_t { public InputHandle_t m_ulConnectedDeviceHandle; // Handle for device } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: called when a new controller has been connected, will fire once + // per controller if multiple new controllers connect in the same frame + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamControllerCallbacks + 1)] + internal struct SteamInputDeviceConnected_t_LargePack { + public const int k_iCallback = Constants.k_iSteamControllerCallbacks + 1; + public InputHandle_t m_ulConnectedDeviceHandle; // Handle for device + } + + + //----------------------------------------------------------------------------- + // Purpose: called when a new controller has been connected, will fire once + // per controller if multiple new controllers connect in the same frame + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamControllerCallbacks + 1)] + internal struct SteamInputDeviceConnected_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamControllerCallbacks + 1; + public InputHandle_t m_ulConnectedDeviceHandle; // Handle for device + } + + #endif //----------------------------------------------------------------------------- // Purpose: called when a new controller has been connected, will fire once // per controller if multiple new controllers connect in the same frame @@ -934,6 +2580,31 @@ public struct SteamInputDeviceDisconnected_t { public InputHandle_t m_ulDisconnectedDeviceHandle; // Handle for device } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: called when a new controller has been connected, will fire once + // per controller if multiple new controllers connect in the same frame + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamControllerCallbacks + 2)] + internal struct SteamInputDeviceDisconnected_t_LargePack { + public const int k_iCallback = Constants.k_iSteamControllerCallbacks + 2; + public InputHandle_t m_ulDisconnectedDeviceHandle; // Handle for device + } + + + //----------------------------------------------------------------------------- + // Purpose: called when a new controller has been connected, will fire once + // per controller if multiple new controllers connect in the same frame + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamControllerCallbacks + 2)] + internal struct SteamInputDeviceDisconnected_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamControllerCallbacks + 2; + public InputHandle_t m_ulDisconnectedDeviceHandle; // Handle for device + } + + #endif //----------------------------------------------------------------------------- // Purpose: called when a controller configuration has been loaded, will fire once // per controller per focus change for Steam Input enabled controllers @@ -955,6 +2626,51 @@ public struct SteamInputConfigurationLoaded_t { public bool m_bUsesGamepadAPI; // Does the configuration contain any Xinput bindings? } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: called when a controller configuration has been loaded, will fire once + // per controller per focus change for Steam Input enabled controllers + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamControllerCallbacks + 3)] + internal struct SteamInputConfigurationLoaded_t_LargePack { + public const int k_iCallback = Constants.k_iSteamControllerCallbacks + 3; + public AppId_t m_unAppID; + public InputHandle_t m_ulDeviceHandle; // Handle for device + public CSteamID m_ulMappingCreator; // May differ from local user when using + // an unmodified community or official config + public uint m_unMajorRevision; // Binding revision from In-game Action File. + // Same value as queried by GetDeviceBindingRevision + public uint m_unMinorRevision; + [MarshalAs(UnmanagedType.I1)] + public bool m_bUsesSteamInputAPI; // Does the configuration contain any Analog/Digital actions? + [MarshalAs(UnmanagedType.I1)] + public bool m_bUsesGamepadAPI; // Does the configuration contain any Xinput bindings? + } + + + //----------------------------------------------------------------------------- + // Purpose: called when a controller configuration has been loaded, will fire once + // per controller per focus change for Steam Input enabled controllers + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamControllerCallbacks + 3)] + internal struct SteamInputConfigurationLoaded_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamControllerCallbacks + 3; + public AppId_t m_unAppID; + public InputHandle_t m_ulDeviceHandle; // Handle for device + public CSteamID m_ulMappingCreator; // May differ from local user when using + // an unmodified community or official config + public uint m_unMajorRevision; // Binding revision from In-game Action File. + // Same value as queried by GetDeviceBindingRevision + public uint m_unMinorRevision; + [MarshalAs(UnmanagedType.I1)] + public bool m_bUsesSteamInputAPI; // Does the configuration contain any Analog/Digital actions? + [MarshalAs(UnmanagedType.I1)] + public bool m_bUsesGamepadAPI; // Does the configuration contain any Xinput bindings? + } + + #endif //----------------------------------------------------------------------------- // Purpose: called when controller gamepad slots change - on Linux/macOS these // slots are shared for all running apps. @@ -970,6 +2686,39 @@ public struct SteamInputGamepadSlotChange_t { public int m_nNewGamepadSlot; // New Gamepad Slot - can be -1 controller doesn't uses gamepad bindings } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: called when controller gamepad slots change - on Linux/macOS these + // slots are shared for all running apps. + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamControllerCallbacks + 4)] + internal struct SteamInputGamepadSlotChange_t_LargePack { + public const int k_iCallback = Constants.k_iSteamControllerCallbacks + 4; + public AppId_t m_unAppID; + public InputHandle_t m_ulDeviceHandle; // Handle for device + public ESteamInputType m_eDeviceType; // Type of device + public int m_nOldGamepadSlot; // Previous GamepadSlot - can be -1 controller doesn't uses gamepad bindings + public int m_nNewGamepadSlot; // New Gamepad Slot - can be -1 controller doesn't uses gamepad bindings + } + + + //----------------------------------------------------------------------------- + // Purpose: called when controller gamepad slots change - on Linux/macOS these + // slots are shared for all running apps. + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamControllerCallbacks + 4)] + internal struct SteamInputGamepadSlotChange_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamControllerCallbacks + 4; + public AppId_t m_unAppID; + public InputHandle_t m_ulDeviceHandle; // Handle for device + public ESteamInputType m_eDeviceType; // Type of device + public int m_nOldGamepadSlot; // Previous GamepadSlot - can be -1 controller doesn't uses gamepad bindings + public int m_nNewGamepadSlot; // New Gamepad Slot - can be -1 controller doesn't uses gamepad bindings + } + + #endif // SteamInventoryResultReady_t callbacks are fired whenever asynchronous // results transition from "Pending" to "OK" or an error state. There will // always be exactly one callback per handle. @@ -978,9 +2727,64 @@ public struct SteamInputGamepadSlotChange_t { public struct SteamInventoryResultReady_t { public const int k_iCallback = Constants.k_iSteamInventoryCallbacks + 0; public SteamInventoryResult_t m_handle; - public EResult m_result; + public EResult m_result; + } + + #if STEAMWORKS_ANYCPU + // SteamInventoryResultReady_t callbacks are fired whenever asynchronous + // results transition from "Pending" to "OK" or an error state. There will + // always be exactly one callback per handle. + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamInventoryCallbacks + 0)] + internal struct SteamInventoryResultReady_t_LargePack { + public const int k_iCallback = Constants.k_iSteamInventoryCallbacks + 0; + public SteamInventoryResult_t m_handle; + public EResult m_result; + } + + + // SteamInventoryResultReady_t callbacks are fired whenever asynchronous + // results transition from "Pending" to "OK" or an error state. There will + // always be exactly one callback per handle. + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamInventoryCallbacks + 0)] + internal struct SteamInventoryResultReady_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamInventoryCallbacks + 0; + public SteamInventoryResult_t m_handle; + public EResult m_result; + } + + #endif + // SteamInventoryFullUpdate_t callbacks are triggered when GetAllItems + // successfully returns a result which is newer / fresher than the last + // known result. (It will not trigger if the inventory hasn't changed, + // or if results from two overlapping calls are reversed in flight and + // the earlier result is already known to be stale/out-of-date.) + // The normal ResultReady callback will still be triggered immediately + // afterwards; this is an additional notification for your convenience. + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamInventoryCallbacks + 1)] + public struct SteamInventoryFullUpdate_t { + public const int k_iCallback = Constants.k_iSteamInventoryCallbacks + 1; + public SteamInventoryResult_t m_handle; + } + + #if STEAMWORKS_ANYCPU + // SteamInventoryFullUpdate_t callbacks are triggered when GetAllItems + // successfully returns a result which is newer / fresher than the last + // known result. (It will not trigger if the inventory hasn't changed, + // or if results from two overlapping calls are reversed in flight and + // the earlier result is already known to be stale/out-of-date.) + // The normal ResultReady callback will still be triggered immediately + // afterwards; this is an additional notification for your convenience. + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamInventoryCallbacks + 1)] + internal struct SteamInventoryFullUpdate_t_LargePack { + public const int k_iCallback = Constants.k_iSteamInventoryCallbacks + 1; + public SteamInventoryResult_t m_handle; } + // SteamInventoryFullUpdate_t callbacks are triggered when GetAllItems // successfully returns a result which is newer / fresher than the last // known result. (It will not trigger if the inventory hasn't changed, @@ -990,11 +2794,12 @@ public struct SteamInventoryResultReady_t { // afterwards; this is an additional notification for your convenience. [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamInventoryCallbacks + 1)] - public struct SteamInventoryFullUpdate_t { + internal struct SteamInventoryFullUpdate_t_SmallPack { public const int k_iCallback = Constants.k_iSteamInventoryCallbacks + 1; public SteamInventoryResult_t m_handle; } + #endif // A SteamInventoryDefinitionUpdate_t callback is triggered whenever // item definitions have been updated, which could be in response to // LoadItemDefinitions() or any other async request which required @@ -1005,6 +2810,29 @@ public struct SteamInventoryDefinitionUpdate_t { public const int k_iCallback = Constants.k_iSteamInventoryCallbacks + 2; } + #if STEAMWORKS_ANYCPU + // A SteamInventoryDefinitionUpdate_t callback is triggered whenever + // item definitions have been updated, which could be in response to + // LoadItemDefinitions() or any other async request which required + // a definition update in order to process results from the server. + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamInventoryCallbacks + 2)] + internal struct SteamInventoryDefinitionUpdate_t_LargePack { + public const int k_iCallback = Constants.k_iSteamInventoryCallbacks + 2; + } + + + // A SteamInventoryDefinitionUpdate_t callback is triggered whenever + // item definitions have been updated, which could be in response to + // LoadItemDefinitions() or any other async request which required + // a definition update in order to process results from the server. + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamInventoryCallbacks + 2)] + internal struct SteamInventoryDefinitionUpdate_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamInventoryCallbacks + 2; + } + + #endif // Returned [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamInventoryCallbacks + 3)] @@ -1017,6 +2845,33 @@ public struct SteamInventoryEligiblePromoItemDefIDs_t { public bool m_bCachedData; // indicates that the data was retrieved from the cache and not the server } + #if STEAMWORKS_ANYCPU + // Returned + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamInventoryCallbacks + 3)] + internal struct SteamInventoryEligiblePromoItemDefIDs_t_LargePack { + public const int k_iCallback = Constants.k_iSteamInventoryCallbacks + 3; + public EResult m_result; + public CSteamID m_steamID; + public int m_numEligiblePromoItemDefs; + [MarshalAs(UnmanagedType.I1)] + public bool m_bCachedData; // indicates that the data was retrieved from the cache and not the server + } + + + // Returned + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamInventoryCallbacks + 3)] + internal struct SteamInventoryEligiblePromoItemDefIDs_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamInventoryCallbacks + 3; + public EResult m_result; + public CSteamID m_steamID; + public int m_numEligiblePromoItemDefs; + [MarshalAs(UnmanagedType.I1)] + public bool m_bCachedData; // indicates that the data was retrieved from the cache and not the server + } + + #endif // Triggered from StartPurchase call [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamInventoryCallbacks + 4)] @@ -1027,6 +2882,29 @@ public struct SteamInventoryStartPurchaseResult_t { public ulong m_ulTransID; } + #if STEAMWORKS_ANYCPU + // Triggered from StartPurchase call + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamInventoryCallbacks + 4)] + internal struct SteamInventoryStartPurchaseResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamInventoryCallbacks + 4; + public EResult m_result; + public ulong m_ulOrderID; + public ulong m_ulTransID; + } + + + // Triggered from StartPurchase call + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamInventoryCallbacks + 4)] + internal struct SteamInventoryStartPurchaseResult_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamInventoryCallbacks + 4; + public EResult m_result; + public ulong m_ulOrderID; + public ulong m_ulTransID; + } + + #endif // Triggered from RequestPrices [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamInventoryCallbacks + 5)] @@ -1034,7 +2912,7 @@ public struct SteamInventoryRequestPricesResult_t { public const int k_iCallback = Constants.k_iSteamInventoryCallbacks + 5; public EResult m_result; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] - private byte[] m_rgchCurrency_; + internal byte[] m_rgchCurrency_; public string m_rgchCurrency { get { return InteropHelp.ByteArrayToStringUTF8(m_rgchCurrency_); } @@ -1042,6 +2920,39 @@ public string m_rgchCurrency } } + #if STEAMWORKS_ANYCPU + // Triggered from RequestPrices + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamInventoryCallbacks + 5)] + internal struct SteamInventoryRequestPricesResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamInventoryCallbacks + 5; + public EResult m_result; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] + internal byte[] m_rgchCurrency_; + public string m_rgchCurrency + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchCurrency_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchCurrency_, 4); } + } + } + + + // Triggered from RequestPrices + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamInventoryCallbacks + 5)] + internal struct SteamInventoryRequestPricesResult_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamInventoryCallbacks + 5; + public EResult m_result; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] + internal byte[] m_rgchCurrency_; + public string m_rgchCurrency + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchCurrency_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchCurrency_, 4); } + } + } + + #endif //----------------------------------------------------------------------------- // Callbacks for ISteamMatchmaking (which go through the regular Steam callback registration system) //----------------------------------------------------------------------------- @@ -1061,6 +2972,47 @@ public struct FavoritesListChanged_t { public AccountID_t m_unAccountId; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Callbacks for ISteamMatchmaking (which go through the regular Steam callback registration system) + //----------------------------------------------------------------------------- + // Purpose: a server was added/removed from the favorites list, you should refresh now + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamMatchmakingCallbacks + 2)] + internal struct FavoritesListChanged_t_LargePack { + public const int k_iCallback = Constants.k_iSteamMatchmakingCallbacks + 2; + public uint m_nIP; // an IP of 0 means reload the whole list, any other value means just one server + public uint m_nQueryPort; + public uint m_nConnPort; + public uint m_nAppID; + public uint m_nFlags; + [MarshalAs(UnmanagedType.I1)] + public bool m_bAdd; // true if this is adding the entry, otherwise it is a remove + public AccountID_t m_unAccountId; + } + + + //----------------------------------------------------------------------------- + // Callbacks for ISteamMatchmaking (which go through the regular Steam callback registration system) + //----------------------------------------------------------------------------- + // Purpose: a server was added/removed from the favorites list, you should refresh now + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamMatchmakingCallbacks + 2)] + internal struct FavoritesListChanged_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamMatchmakingCallbacks + 2; + public uint m_nIP; // an IP of 0 means reload the whole list, any other value means just one server + public uint m_nQueryPort; + public uint m_nConnPort; + public uint m_nAppID; + public uint m_nFlags; + [MarshalAs(UnmanagedType.I1)] + public bool m_bAdd; // true if this is adding the entry, otherwise it is a remove + public AccountID_t m_unAccountId; + } + + #endif //----------------------------------------------------------------------------- // Purpose: Someone has invited you to join a Lobby // normally you don't need to do anything with this, since @@ -1079,6 +3031,45 @@ public struct LobbyInvite_t { public ulong m_ulGameID; // GameID of the Lobby } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: Someone has invited you to join a Lobby + // normally you don't need to do anything with this, since + // the Steam UI will also display a ' has invited you to the lobby, join?' dialog + // + // if the user outside a game chooses to join, your game will be launched with the parameter "+connect_lobby <64-bit lobby id>", + // or with the callback GameLobbyJoinRequested_t if they're already in-game + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamMatchmakingCallbacks + 3)] + internal struct LobbyInvite_t_LargePack { + public const int k_iCallback = Constants.k_iSteamMatchmakingCallbacks + 3; + + public ulong m_ulSteamIDUser; // Steam ID of the person making the invite + public ulong m_ulSteamIDLobby; // Steam ID of the Lobby + public ulong m_ulGameID; // GameID of the Lobby + } + + + //----------------------------------------------------------------------------- + // Purpose: Someone has invited you to join a Lobby + // normally you don't need to do anything with this, since + // the Steam UI will also display a ' has invited you to the lobby, join?' dialog + // + // if the user outside a game chooses to join, your game will be launched with the parameter "+connect_lobby <64-bit lobby id>", + // or with the callback GameLobbyJoinRequested_t if they're already in-game + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamMatchmakingCallbacks + 3)] + internal struct LobbyInvite_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamMatchmakingCallbacks + 3; + + public ulong m_ulSteamIDUser; // Steam ID of the person making the invite + public ulong m_ulSteamIDLobby; // Steam ID of the Lobby + public ulong m_ulGameID; // GameID of the Lobby + } + + #endif //----------------------------------------------------------------------------- // Purpose: Sent on entering a lobby, or on failing to enter // m_EChatRoomEnterResponse will be set to k_EChatRoomEnterResponseSuccess on success, @@ -1096,6 +3087,43 @@ public struct LobbyEnter_t { public uint m_EChatRoomEnterResponse; // EChatRoomEnterResponse } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: Sent on entering a lobby, or on failing to enter + // m_EChatRoomEnterResponse will be set to k_EChatRoomEnterResponseSuccess on success, + // or a higher value on failure (see enum EChatRoomEnterResponse) + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamMatchmakingCallbacks + 4)] + internal struct LobbyEnter_t_LargePack { + public const int k_iCallback = Constants.k_iSteamMatchmakingCallbacks + 4; + + public ulong m_ulSteamIDLobby; // SteamID of the Lobby you have entered + public uint m_rgfChatPermissions; // Permissions of the current user + [MarshalAs(UnmanagedType.I1)] + public bool m_bLocked; // If true, then only invited users may join + public uint m_EChatRoomEnterResponse; // EChatRoomEnterResponse + } + + + //----------------------------------------------------------------------------- + // Purpose: Sent on entering a lobby, or on failing to enter + // m_EChatRoomEnterResponse will be set to k_EChatRoomEnterResponseSuccess on success, + // or a higher value on failure (see enum EChatRoomEnterResponse) + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamMatchmakingCallbacks + 4)] + internal struct LobbyEnter_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamMatchmakingCallbacks + 4; + + public ulong m_ulSteamIDLobby; // SteamID of the Lobby you have entered + public uint m_rgfChatPermissions; // Permissions of the current user + [MarshalAs(UnmanagedType.I1)] + public bool m_bLocked; // If true, then only invited users may join + public uint m_EChatRoomEnterResponse; // EChatRoomEnterResponse + } + + #endif //----------------------------------------------------------------------------- // Purpose: The lobby metadata has changed // if m_ulSteamIDMember is the steamID of a lobby member, use GetLobbyMemberData() to access per-user details @@ -1112,13 +3140,82 @@ public struct LobbyDataUpdate_t { // will only be false if RequestLobbyData() was called on a lobby that no longer exists } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: The lobby metadata has changed + // if m_ulSteamIDMember is the steamID of a lobby member, use GetLobbyMemberData() to access per-user details + // if m_ulSteamIDMember == m_ulSteamIDLobby, use GetLobbyData() to access lobby metadata + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamMatchmakingCallbacks + 5)] + internal struct LobbyDataUpdate_t_LargePack { + public const int k_iCallback = Constants.k_iSteamMatchmakingCallbacks + 5; + + public ulong m_ulSteamIDLobby; // steamID of the Lobby + public ulong m_ulSteamIDMember; // steamID of the member whose data changed, or the room itself + public byte m_bSuccess; // true if we lobby data was successfully changed; + // will only be false if RequestLobbyData() was called on a lobby that no longer exists + } + + + //----------------------------------------------------------------------------- + // Purpose: The lobby metadata has changed + // if m_ulSteamIDMember is the steamID of a lobby member, use GetLobbyMemberData() to access per-user details + // if m_ulSteamIDMember == m_ulSteamIDLobby, use GetLobbyData() to access lobby metadata + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamMatchmakingCallbacks + 5)] + internal struct LobbyDataUpdate_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamMatchmakingCallbacks + 5; + + public ulong m_ulSteamIDLobby; // steamID of the Lobby + public ulong m_ulSteamIDMember; // steamID of the member whose data changed, or the room itself + public byte m_bSuccess; // true if we lobby data was successfully changed; + // will only be false if RequestLobbyData() was called on a lobby that no longer exists + } + + #endif + //----------------------------------------------------------------------------- + // Purpose: The lobby chat room state has changed + // this is usually sent when a user has joined or left the lobby + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamMatchmakingCallbacks + 6)] + public struct LobbyChatUpdate_t { + public const int k_iCallback = Constants.k_iSteamMatchmakingCallbacks + 6; + + public ulong m_ulSteamIDLobby; // Lobby ID + public ulong m_ulSteamIDUserChanged; // user who's status in the lobby just changed - can be recipient + public ulong m_ulSteamIDMakingChange; // Chat member who made the change (different from SteamIDUserChange if kicking, muting, etc.) + // for example, if one user kicks another from the lobby, this will be set to the id of the user who initiated the kick + public uint m_rgfChatMemberStateChange; // bitfield of EChatMemberStateChange values + } + + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: The lobby chat room state has changed + // this is usually sent when a user has joined or left the lobby + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamMatchmakingCallbacks + 6)] + internal struct LobbyChatUpdate_t_LargePack { + public const int k_iCallback = Constants.k_iSteamMatchmakingCallbacks + 6; + + public ulong m_ulSteamIDLobby; // Lobby ID + public ulong m_ulSteamIDUserChanged; // user who's status in the lobby just changed - can be recipient + public ulong m_ulSteamIDMakingChange; // Chat member who made the change (different from SteamIDUserChange if kicking, muting, etc.) + // for example, if one user kicks another from the lobby, this will be set to the id of the user who initiated the kick + public uint m_rgfChatMemberStateChange; // bitfield of EChatMemberStateChange values + } + + //----------------------------------------------------------------------------- // Purpose: The lobby chat room state has changed // this is usually sent when a user has joined or left the lobby //----------------------------------------------------------------------------- [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamMatchmakingCallbacks + 6)] - public struct LobbyChatUpdate_t { + internal struct LobbyChatUpdate_t_SmallPack { public const int k_iCallback = Constants.k_iSteamMatchmakingCallbacks + 6; public ulong m_ulSteamIDLobby; // Lobby ID @@ -1128,6 +3225,7 @@ public struct LobbyChatUpdate_t { public uint m_rgfChatMemberStateChange; // bitfield of EChatMemberStateChange values } + #endif //----------------------------------------------------------------------------- // Purpose: A chat message for this lobby has been sent // use GetLobbyChatEntry( m_iChatID ) to retrieve the contents of this message @@ -1143,6 +3241,39 @@ public struct LobbyChatMsg_t { public uint m_iChatID; // index of the chat entry to lookup } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: A chat message for this lobby has been sent + // use GetLobbyChatEntry( m_iChatID ) to retrieve the contents of this message + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamMatchmakingCallbacks + 7)] + internal struct LobbyChatMsg_t_LargePack { + public const int k_iCallback = Constants.k_iSteamMatchmakingCallbacks + 7; + + public ulong m_ulSteamIDLobby; // the lobby id this is in + public ulong m_ulSteamIDUser; // steamID of the user who has sent this message + public byte m_eChatEntryType; // type of message + public uint m_iChatID; // index of the chat entry to lookup + } + + + //----------------------------------------------------------------------------- + // Purpose: A chat message for this lobby has been sent + // use GetLobbyChatEntry( m_iChatID ) to retrieve the contents of this message + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamMatchmakingCallbacks + 7)] + internal struct LobbyChatMsg_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamMatchmakingCallbacks + 7; + + public ulong m_ulSteamIDLobby; // the lobby id this is in + public ulong m_ulSteamIDUser; // steamID of the user who has sent this message + public byte m_eChatEntryType; // type of message + public uint m_iChatID; // index of the chat entry to lookup + } + + #endif //----------------------------------------------------------------------------- // Purpose: A game created a game for all the members of the lobby to join, // as triggered by a SetLobbyGameServer() @@ -1160,6 +3291,43 @@ public struct LobbyGameCreated_t { public ushort m_usPort; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: A game created a game for all the members of the lobby to join, + // as triggered by a SetLobbyGameServer() + // it's up to the individual clients to take action on this; the usual + // game behavior is to leave the lobby and connect to the specified game server + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamMatchmakingCallbacks + 9)] + internal struct LobbyGameCreated_t_LargePack { + public const int k_iCallback = Constants.k_iSteamMatchmakingCallbacks + 9; + + public ulong m_ulSteamIDLobby; // the lobby we were in + public ulong m_ulSteamIDGameServer; // the new game server that has been created or found for the lobby members + public uint m_unIP; // IP & Port of the game server (if any) + public ushort m_usPort; + } + + + //----------------------------------------------------------------------------- + // Purpose: A game created a game for all the members of the lobby to join, + // as triggered by a SetLobbyGameServer() + // it's up to the individual clients to take action on this; the usual + // game behavior is to leave the lobby and connect to the specified game server + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamMatchmakingCallbacks + 9)] + internal struct LobbyGameCreated_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamMatchmakingCallbacks + 9; + + public ulong m_ulSteamIDLobby; // the lobby we were in + public ulong m_ulSteamIDGameServer; // the new game server that has been created or found for the lobby members + public uint m_unIP; // IP & Port of the game server (if any) + public ushort m_usPort; + } + + #endif //----------------------------------------------------------------------------- // Purpose: Number of matching lobbies found // iterate the returned lobbies with GetLobbyByIndex(), from values 0 to m_nLobbiesMatching-1 @@ -1171,6 +3339,31 @@ public struct LobbyMatchList_t { public uint m_nLobbiesMatching; // Number of lobbies that matched search criteria and we have SteamIDs for } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: Number of matching lobbies found + // iterate the returned lobbies with GetLobbyByIndex(), from values 0 to m_nLobbiesMatching-1 + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamMatchmakingCallbacks + 10)] + internal struct LobbyMatchList_t_LargePack { + public const int k_iCallback = Constants.k_iSteamMatchmakingCallbacks + 10; + public uint m_nLobbiesMatching; // Number of lobbies that matched search criteria and we have SteamIDs for + } + + + //----------------------------------------------------------------------------- + // Purpose: Number of matching lobbies found + // iterate the returned lobbies with GetLobbyByIndex(), from values 0 to m_nLobbiesMatching-1 + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamMatchmakingCallbacks + 10)] + internal struct LobbyMatchList_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamMatchmakingCallbacks + 10; + public uint m_nLobbiesMatching; // Number of lobbies that matched search criteria and we have SteamIDs for + } + + #endif //----------------------------------------------------------------------------- // Purpose: posted if a user is forcefully removed from a lobby // can occur if a user loses connection to Steam @@ -1184,6 +3377,35 @@ public struct LobbyKicked_t { public byte m_bKickedDueToDisconnect; // true if you were kicked from the lobby due to the user losing connection to Steam (currently always true) } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: posted if a user is forcefully removed from a lobby + // can occur if a user loses connection to Steam + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamMatchmakingCallbacks + 12)] + internal struct LobbyKicked_t_LargePack { + public const int k_iCallback = Constants.k_iSteamMatchmakingCallbacks + 12; + public ulong m_ulSteamIDLobby; // Lobby + public ulong m_ulSteamIDAdmin; // User who kicked you - possibly the ID of the lobby itself + public byte m_bKickedDueToDisconnect; // true if you were kicked from the lobby due to the user losing connection to Steam (currently always true) + } + + + //----------------------------------------------------------------------------- + // Purpose: posted if a user is forcefully removed from a lobby + // can occur if a user loses connection to Steam + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamMatchmakingCallbacks + 12)] + internal struct LobbyKicked_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamMatchmakingCallbacks + 12; + public ulong m_ulSteamIDLobby; // Lobby + public ulong m_ulSteamIDAdmin; // User who kicked you - possibly the ID of the lobby itself + public byte m_bKickedDueToDisconnect; // true if you were kicked from the lobby due to the user losing connection to Steam (currently always true) + } + + #endif //----------------------------------------------------------------------------- // Purpose: Result of our request to create a Lobby // m_eResult == k_EResultOK on success @@ -1205,6 +3427,51 @@ public struct LobbyCreated_t { public ulong m_ulSteamIDLobby; // chat room, zero if failed } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: Result of our request to create a Lobby + // m_eResult == k_EResultOK on success + // at this point, the lobby has been joined and is ready for use + // a LobbyEnter_t callback will also be received (since the local user is joining their own lobby) + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamMatchmakingCallbacks + 13)] + internal struct LobbyCreated_t_LargePack { + public const int k_iCallback = Constants.k_iSteamMatchmakingCallbacks + 13; + + public EResult m_eResult; // k_EResultOK - the lobby was successfully created + // k_EResultNoConnection - your Steam client doesn't have a connection to the back-end + // k_EResultTimeout - you the message to the Steam servers, but it didn't respond + // k_EResultFail - the server responded, but with an unknown internal error + // k_EResultAccessDenied - your game isn't set to allow lobbies, or your client does haven't rights to play the game + // k_EResultLimitExceeded - your game client has created too many lobbies + + public ulong m_ulSteamIDLobby; // chat room, zero if failed + } + + + //----------------------------------------------------------------------------- + // Purpose: Result of our request to create a Lobby + // m_eResult == k_EResultOK on success + // at this point, the lobby has been joined and is ready for use + // a LobbyEnter_t callback will also be received (since the local user is joining their own lobby) + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamMatchmakingCallbacks + 13)] + internal struct LobbyCreated_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamMatchmakingCallbacks + 13; + + public EResult m_eResult; // k_EResultOK - the lobby was successfully created + // k_EResultNoConnection - your Steam client doesn't have a connection to the back-end + // k_EResultTimeout - you the message to the Steam servers, but it didn't respond + // k_EResultFail - the server responded, but with an unknown internal error + // k_EResultAccessDenied - your game isn't set to allow lobbies, or your client does haven't rights to play the game + // k_EResultLimitExceeded - your game client has created too many lobbies + + public ulong m_ulSteamIDLobby; // chat room, zero if failed + } + + #endif // used by now obsolete RequestFriendsLobbiesResponse_t // enum { k_iCallback = k_iSteamMatchmakingCallbacks + 14 }; // used by now obsolete PSNGameBootInviteResult_t @@ -1223,27 +3490,143 @@ public struct FavoritesListAccountsUpdated_t { public EResult m_eResult; } + #if STEAMWORKS_ANYCPU + // used by now obsolete RequestFriendsLobbiesResponse_t + // enum { k_iCallback = k_iSteamMatchmakingCallbacks + 14 }; + // used by now obsolete PSNGameBootInviteResult_t + // enum { k_iCallback = k_iSteamMatchmakingCallbacks + 15 }; + //----------------------------------------------------------------------------- + // Purpose: Result of our request to create a Lobby + // m_eResult == k_EResultOK on success + // at this point, the lobby has been joined and is ready for use + // a LobbyEnter_t callback will also be received (since the local user is joining their own lobby) + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamMatchmakingCallbacks + 16)] + internal struct FavoritesListAccountsUpdated_t_LargePack { + public const int k_iCallback = Constants.k_iSteamMatchmakingCallbacks + 16; + + public EResult m_eResult; + } + + + // used by now obsolete RequestFriendsLobbiesResponse_t + // enum { k_iCallback = k_iSteamMatchmakingCallbacks + 14 }; + // used by now obsolete PSNGameBootInviteResult_t + // enum { k_iCallback = k_iSteamMatchmakingCallbacks + 15 }; + //----------------------------------------------------------------------------- + // Purpose: Result of our request to create a Lobby + // m_eResult == k_EResultOK on success + // at this point, the lobby has been joined and is ready for use + // a LobbyEnter_t callback will also be received (since the local user is joining their own lobby) + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamMatchmakingCallbacks + 16)] + internal struct FavoritesListAccountsUpdated_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamMatchmakingCallbacks + 16; + + public EResult m_eResult; + } + + #endif + //----------------------------------------------------------------------------- + // Callbacks for ISteamGameSearch (which go through the regular Steam callback registration system) + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamGameSearchCallbacks + 1)] + public struct SearchForGameProgressCallback_t { + public const int k_iCallback = Constants.k_iSteamGameSearchCallbacks + 1; + + public ulong m_ullSearchID; // all future callbacks referencing this search will include this Search ID + + public EResult m_eResult; // if search has started this result will be k_EResultOK, any other value indicates search has failed to start or has terminated + public CSteamID m_lobbyID; // lobby ID if lobby search, invalid steamID otherwise + public CSteamID m_steamIDEndedSearch; // if search was terminated, steamID that terminated search + + public int m_nSecondsRemainingEstimate; + public int m_cPlayersSearching; + } + + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Callbacks for ISteamGameSearch (which go through the regular Steam callback registration system) + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamGameSearchCallbacks + 1)] + internal struct SearchForGameProgressCallback_t_LargePack { + public const int k_iCallback = Constants.k_iSteamGameSearchCallbacks + 1; + + public ulong m_ullSearchID; // all future callbacks referencing this search will include this Search ID + + public EResult m_eResult; // if search has started this result will be k_EResultOK, any other value indicates search has failed to start or has terminated + public CSteamID m_lobbyID; // lobby ID if lobby search, invalid steamID otherwise + public CSteamID m_steamIDEndedSearch; // if search was terminated, steamID that terminated search + + public int m_nSecondsRemainingEstimate; + public int m_cPlayersSearching; + } + + //----------------------------------------------------------------------------- // Callbacks for ISteamGameSearch (which go through the regular Steam callback registration system) [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] - [CallbackIdentity(Constants.k_iSteamGameSearchCallbacks + 1)] - public struct SearchForGameProgressCallback_t { - public const int k_iCallback = Constants.k_iSteamGameSearchCallbacks + 1; + [CallbackIdentity(Constants.k_iSteamGameSearchCallbacks + 1)] + internal struct SearchForGameProgressCallback_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamGameSearchCallbacks + 1; + + public ulong m_ullSearchID; // all future callbacks referencing this search will include this Search ID + + public EResult m_eResult; // if search has started this result will be k_EResultOK, any other value indicates search has failed to start or has terminated + public CSteamID m_lobbyID; // lobby ID if lobby search, invalid steamID otherwise + public CSteamID m_steamIDEndedSearch; // if search was terminated, steamID that terminated search + + public int m_nSecondsRemainingEstimate; + public int m_cPlayersSearching; + } + + #endif + // notification to all players searching that a game has been found + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamGameSearchCallbacks + 2)] + public struct SearchForGameResultCallback_t { + public const int k_iCallback = Constants.k_iSteamGameSearchCallbacks + 2; + + public ulong m_ullSearchID; + + public EResult m_eResult; // if game/host was lost this will be an error value + + // if m_bGameFound is true the following are non-zero + public int m_nCountPlayersInGame; + public int m_nCountAcceptedGame; + // if m_steamIDHost is valid the host has started the game + public CSteamID m_steamIDHost; + [MarshalAs(UnmanagedType.I1)] + public bool m_bFinalCallback; + } + + #if STEAMWORKS_ANYCPU + // notification to all players searching that a game has been found + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamGameSearchCallbacks + 2)] + internal struct SearchForGameResultCallback_t_LargePack { + public const int k_iCallback = Constants.k_iSteamGameSearchCallbacks + 2; - public ulong m_ullSearchID; // all future callbacks referencing this search will include this Search ID + public ulong m_ullSearchID; - public EResult m_eResult; // if search has started this result will be k_EResultOK, any other value indicates search has failed to start or has terminated - public CSteamID m_lobbyID; // lobby ID if lobby search, invalid steamID otherwise - public CSteamID m_steamIDEndedSearch; // if search was terminated, steamID that terminated search + public EResult m_eResult; // if game/host was lost this will be an error value - public int m_nSecondsRemainingEstimate; - public int m_cPlayersSearching; + // if m_bGameFound is true the following are non-zero + public int m_nCountPlayersInGame; + public int m_nCountAcceptedGame; + // if m_steamIDHost is valid the host has started the game + public CSteamID m_steamIDHost; + [MarshalAs(UnmanagedType.I1)] + public bool m_bFinalCallback; } + // notification to all players searching that a game has been found [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamGameSearchCallbacks + 2)] - public struct SearchForGameResultCallback_t { + internal struct SearchForGameResultCallback_t_SmallPack { public const int k_iCallback = Constants.k_iSteamGameSearchCallbacks + 2; public ulong m_ullSearchID; @@ -1259,6 +3642,7 @@ public struct SearchForGameResultCallback_t { public bool m_bFinalCallback; } + #endif //----------------------------------------------------------------------------- // ISteamGameSearch : Game Host API callbacks // callback from RequestPlayersForGame when the matchmaking service has started or ended search @@ -1272,6 +3656,35 @@ public struct RequestPlayersForGameProgressCallback_t { public ulong m_ullSearchID; // all future callbacks referencing this search will include this Search ID } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // ISteamGameSearch : Game Host API callbacks + // callback from RequestPlayersForGame when the matchmaking service has started or ended search + // callback will also follow a call from CancelRequestPlayersForGame - m_bSearchInProgress will be false + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamGameSearchCallbacks + 11)] + internal struct RequestPlayersForGameProgressCallback_t_LargePack { + public const int k_iCallback = Constants.k_iSteamGameSearchCallbacks + 11; + + public EResult m_eResult; // m_ullSearchID will be non-zero if this is k_EResultOK + public ulong m_ullSearchID; // all future callbacks referencing this search will include this Search ID + } + + + //----------------------------------------------------------------------------- + // ISteamGameSearch : Game Host API callbacks + // callback from RequestPlayersForGame when the matchmaking service has started or ended search + // callback will also follow a call from CancelRequestPlayersForGame - m_bSearchInProgress will be false + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamGameSearchCallbacks + 11)] + internal struct RequestPlayersForGameProgressCallback_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamGameSearchCallbacks + 11; + + public EResult m_eResult; // m_ullSearchID will be non-zero if this is k_EResultOK + public ulong m_ullSearchID; // all future callbacks referencing this search will include this Search ID + } + + #endif // callback from RequestPlayersForGame // one of these will be sent per player // followed by additional callbacks when players accept or decline the game @@ -1293,6 +3706,51 @@ public struct RequestPlayersForGameResultCallback_t { public ulong m_ullUniqueGameID; } + #if STEAMWORKS_ANYCPU + // callback from RequestPlayersForGame + // one of these will be sent per player + // followed by additional callbacks when players accept or decline the game + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamGameSearchCallbacks + 12)] + internal struct RequestPlayersForGameResultCallback_t_LargePack { + public const int k_iCallback = Constants.k_iSteamGameSearchCallbacks + 12; + + public EResult m_eResult; // m_ullSearchID will be non-zero if this is k_EResultOK + public ulong m_ullSearchID; + + public CSteamID m_SteamIDPlayerFound; // player steamID + public CSteamID m_SteamIDLobby; // if the player is in a lobby, the lobby ID + public PlayerAcceptState_t m_ePlayerAcceptState; + public int m_nPlayerIndex; + public int m_nTotalPlayersFound; // expect this many callbacks at minimum + public int m_nTotalPlayersAcceptedGame; + public int m_nSuggestedTeamIndex; + public ulong m_ullUniqueGameID; + } + + + // callback from RequestPlayersForGame + // one of these will be sent per player + // followed by additional callbacks when players accept or decline the game + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamGameSearchCallbacks + 12)] + internal struct RequestPlayersForGameResultCallback_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamGameSearchCallbacks + 12; + + public EResult m_eResult; // m_ullSearchID will be non-zero if this is k_EResultOK + public ulong m_ullSearchID; + + public CSteamID m_SteamIDPlayerFound; // player steamID + public CSteamID m_SteamIDLobby; // if the player is in a lobby, the lobby ID + public PlayerAcceptState_t m_ePlayerAcceptState; + public int m_nPlayerIndex; + public int m_nTotalPlayersFound; // expect this many callbacks at minimum + public int m_nTotalPlayersAcceptedGame; + public int m_nSuggestedTeamIndex; + public ulong m_ullUniqueGameID; + } + + #endif [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamGameSearchCallbacks + 13)] public struct RequestPlayersForGameFinalResultCallback_t { @@ -1303,6 +3761,29 @@ public struct RequestPlayersForGameFinalResultCallback_t { public ulong m_ullUniqueGameID; } + #if STEAMWORKS_ANYCPU + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamGameSearchCallbacks + 13)] + internal struct RequestPlayersForGameFinalResultCallback_t_LargePack { + public const int k_iCallback = Constants.k_iSteamGameSearchCallbacks + 13; + + public EResult m_eResult; + public ulong m_ullSearchID; + public ulong m_ullUniqueGameID; + } + + + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamGameSearchCallbacks + 13)] + internal struct RequestPlayersForGameFinalResultCallback_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamGameSearchCallbacks + 13; + + public EResult m_eResult; + public ulong m_ullSearchID; + public ulong m_ullUniqueGameID; + } + + #endif // this callback confirms that results were received by the matchmaking service for this player [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamGameSearchCallbacks + 14)] @@ -1314,6 +3795,31 @@ public struct SubmitPlayerResultResultCallback_t { public CSteamID steamIDPlayer; } + #if STEAMWORKS_ANYCPU + // this callback confirms that results were received by the matchmaking service for this player + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamGameSearchCallbacks + 14)] + internal struct SubmitPlayerResultResultCallback_t_LargePack { + public const int k_iCallback = Constants.k_iSteamGameSearchCallbacks + 14; + + public EResult m_eResult; + public ulong ullUniqueGameID; + public CSteamID steamIDPlayer; + } + + + // this callback confirms that results were received by the matchmaking service for this player + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamGameSearchCallbacks + 14)] + internal struct SubmitPlayerResultResultCallback_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamGameSearchCallbacks + 14; + + public EResult m_eResult; + public ulong ullUniqueGameID; + public CSteamID steamIDPlayer; + } + + #endif // this callback confirms that the game is recorded as complete on the matchmaking service // the next call to RequestPlayersForGame will generate a new unique game ID [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] @@ -1325,6 +3831,31 @@ public struct EndGameResultCallback_t { public ulong ullUniqueGameID; } + #if STEAMWORKS_ANYCPU + // this callback confirms that the game is recorded as complete on the matchmaking service + // the next call to RequestPlayersForGame will generate a new unique game ID + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamGameSearchCallbacks + 15)] + internal struct EndGameResultCallback_t_LargePack { + public const int k_iCallback = Constants.k_iSteamGameSearchCallbacks + 15; + + public EResult m_eResult; + public ulong ullUniqueGameID; + } + + + // this callback confirms that the game is recorded as complete on the matchmaking service + // the next call to RequestPlayersForGame will generate a new unique game ID + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamGameSearchCallbacks + 15)] + internal struct EndGameResultCallback_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamGameSearchCallbacks + 15; + + public EResult m_eResult; + public ulong ullUniqueGameID; + } + + #endif // Steam has responded to the user request to join a party via the given Beacon ID. // If successful, the connect string contains game-specific instructions to connect // to the game with that party. @@ -1337,7 +3868,49 @@ public struct JoinPartyCallback_t { public PartyBeaconID_t m_ulBeaconID; public CSteamID m_SteamIDBeaconOwner; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] - private byte[] m_rgchConnectString_; + internal byte[] m_rgchConnectString_; + public string m_rgchConnectString + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchConnectString_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchConnectString_, 256); } + } + } + + #if STEAMWORKS_ANYCPU + // Steam has responded to the user request to join a party via the given Beacon ID. + // If successful, the connect string contains game-specific instructions to connect + // to the game with that party. + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamPartiesCallbacks + 1)] + internal struct JoinPartyCallback_t_LargePack { + public const int k_iCallback = Constants.k_iSteamPartiesCallbacks + 1; + + public EResult m_eResult; + public PartyBeaconID_t m_ulBeaconID; + public CSteamID m_SteamIDBeaconOwner; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] + internal byte[] m_rgchConnectString_; + public string m_rgchConnectString + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchConnectString_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchConnectString_, 256); } + } + } + + + // Steam has responded to the user request to join a party via the given Beacon ID. + // If successful, the connect string contains game-specific instructions to connect + // to the game with that party. + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamPartiesCallbacks + 1)] + internal struct JoinPartyCallback_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamPartiesCallbacks + 1; + + public EResult m_eResult; + public PartyBeaconID_t m_ulBeaconID; + public CSteamID m_SteamIDBeaconOwner; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] + internal byte[] m_rgchConnectString_; public string m_rgchConnectString { get { return InteropHelp.ByteArrayToStringUTF8(m_rgchConnectString_); } @@ -1345,6 +3918,7 @@ public string m_rgchConnectString } } + #endif // Response to CreateBeacon request. If successful, the beacon ID is provided. [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamPartiesCallbacks + 2)] @@ -1355,6 +3929,29 @@ public struct CreateBeaconCallback_t { public PartyBeaconID_t m_ulBeaconID; } + #if STEAMWORKS_ANYCPU + // Response to CreateBeacon request. If successful, the beacon ID is provided. + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamPartiesCallbacks + 2)] + internal struct CreateBeaconCallback_t_LargePack { + public const int k_iCallback = Constants.k_iSteamPartiesCallbacks + 2; + + public EResult m_eResult; + public PartyBeaconID_t m_ulBeaconID; + } + + + // Response to CreateBeacon request. If successful, the beacon ID is provided. + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamPartiesCallbacks + 2)] + internal struct CreateBeaconCallback_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamPartiesCallbacks + 2; + + public EResult m_eResult; + public PartyBeaconID_t m_ulBeaconID; + } + + #endif // Someone has used the beacon to join your party - they are in-flight now // and we've reserved one of the open slots for them. // You should confirm when they join your party by calling OnReservationCompleted(). @@ -1368,6 +3965,35 @@ public struct ReservationNotificationCallback_t { public CSteamID m_steamIDJoiner; } + #if STEAMWORKS_ANYCPU + // Someone has used the beacon to join your party - they are in-flight now + // and we've reserved one of the open slots for them. + // You should confirm when they join your party by calling OnReservationCompleted(). + // Otherwise, Steam may timeout their reservation eventually. + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamPartiesCallbacks + 3)] + internal struct ReservationNotificationCallback_t_LargePack { + public const int k_iCallback = Constants.k_iSteamPartiesCallbacks + 3; + + public PartyBeaconID_t m_ulBeaconID; + public CSteamID m_steamIDJoiner; + } + + + // Someone has used the beacon to join your party - they are in-flight now + // and we've reserved one of the open slots for them. + // You should confirm when they join your party by calling OnReservationCompleted(). + // Otherwise, Steam may timeout their reservation eventually. + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamPartiesCallbacks + 3)] + internal struct ReservationNotificationCallback_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamPartiesCallbacks + 3; + + public PartyBeaconID_t m_ulBeaconID; + public CSteamID m_steamIDJoiner; + } + + #endif // Response to ChangeNumOpenSlots call [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamPartiesCallbacks + 4)] @@ -1377,13 +4003,51 @@ public struct ChangeNumOpenSlotsCallback_t { public EResult m_eResult; } + #if STEAMWORKS_ANYCPU + // Response to ChangeNumOpenSlots call + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamPartiesCallbacks + 4)] + internal struct ChangeNumOpenSlotsCallback_t_LargePack { + public const int k_iCallback = Constants.k_iSteamPartiesCallbacks + 4; + + public EResult m_eResult; + } + + + // Response to ChangeNumOpenSlots call + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamPartiesCallbacks + 4)] + internal struct ChangeNumOpenSlotsCallback_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamPartiesCallbacks + 4; + + public EResult m_eResult; + } + + #endif + // The list of possible Party beacon locations has changed + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamPartiesCallbacks + 5)] + public struct AvailableBeaconLocationsUpdated_t { + public const int k_iCallback = Constants.k_iSteamPartiesCallbacks + 5; + } + + #if STEAMWORKS_ANYCPU + // The list of possible Party beacon locations has changed + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamPartiesCallbacks + 5)] + internal struct AvailableBeaconLocationsUpdated_t_LargePack { + public const int k_iCallback = Constants.k_iSteamPartiesCallbacks + 5; + } + + // The list of possible Party beacon locations has changed [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] [CallbackIdentity(Constants.k_iSteamPartiesCallbacks + 5)] - public struct AvailableBeaconLocationsUpdated_t { + internal struct AvailableBeaconLocationsUpdated_t_SmallPack { public const int k_iCallback = Constants.k_iSteamPartiesCallbacks + 5; } + #endif // The list of active beacons may have changed [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] [CallbackIdentity(Constants.k_iSteamPartiesCallbacks + 6)] @@ -1391,6 +4055,23 @@ public struct ActiveBeaconsUpdated_t { public const int k_iCallback = Constants.k_iSteamPartiesCallbacks + 6; } + #if STEAMWORKS_ANYCPU + // The list of active beacons may have changed + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamPartiesCallbacks + 6)] + internal struct ActiveBeaconsUpdated_t_LargePack { + public const int k_iCallback = Constants.k_iSteamPartiesCallbacks + 6; + } + + + // The list of active beacons may have changed + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamPartiesCallbacks + 6)] + internal struct ActiveBeaconsUpdated_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamPartiesCallbacks + 6; + } + + #endif // callbacks [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] [CallbackIdentity(Constants.k_iSteamMusicCallbacks + 1)] @@ -1398,6 +4079,23 @@ public struct PlaybackStatusHasChanged_t { public const int k_iCallback = Constants.k_iSteamMusicCallbacks + 1; } + #if STEAMWORKS_ANYCPU + // callbacks + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamMusicCallbacks + 1)] + internal struct PlaybackStatusHasChanged_t_LargePack { + public const int k_iCallback = Constants.k_iSteamMusicCallbacks + 1; + } + + + // callbacks + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamMusicCallbacks + 1)] + internal struct PlaybackStatusHasChanged_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamMusicCallbacks + 1; + } + + #endif [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamMusicCallbacks + 2)] public struct VolumeHasChanged_t { @@ -1405,6 +4103,23 @@ public struct VolumeHasChanged_t { public float m_flNewVolume; } + #if STEAMWORKS_ANYCPU + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamMusicCallbacks + 2)] + internal struct VolumeHasChanged_t_LargePack { + public const int k_iCallback = Constants.k_iSteamMusicCallbacks + 2; + public float m_flNewVolume; + } + + + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamMusicCallbacks + 2)] + internal struct VolumeHasChanged_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamMusicCallbacks + 2; + public float m_flNewVolume; + } + + #endif // callbacks [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] [CallbackIdentity(Constants.k_iSteamMusicRemoteCallbacks + 1)] @@ -1412,48 +4127,170 @@ public struct MusicPlayerRemoteWillActivate_t { public const int k_iCallback = Constants.k_iSteamMusicRemoteCallbacks + 1; } + #if STEAMWORKS_ANYCPU + // callbacks + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamMusicRemoteCallbacks + 1)] + internal struct MusicPlayerRemoteWillActivate_t_LargePack { + public const int k_iCallback = Constants.k_iSteamMusicRemoteCallbacks + 1; + } + + + // callbacks + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamMusicRemoteCallbacks + 1)] + internal struct MusicPlayerRemoteWillActivate_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamMusicRemoteCallbacks + 1; + } + + #endif [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] [CallbackIdentity(Constants.k_iSteamMusicRemoteCallbacks + 2)] public struct MusicPlayerRemoteWillDeactivate_t { public const int k_iCallback = Constants.k_iSteamMusicRemoteCallbacks + 2; } + #if STEAMWORKS_ANYCPU + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamMusicRemoteCallbacks + 2)] + internal struct MusicPlayerRemoteWillDeactivate_t_LargePack { + public const int k_iCallback = Constants.k_iSteamMusicRemoteCallbacks + 2; + } + + + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamMusicRemoteCallbacks + 2)] + internal struct MusicPlayerRemoteWillDeactivate_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamMusicRemoteCallbacks + 2; + } + + #endif [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] [CallbackIdentity(Constants.k_iSteamMusicRemoteCallbacks + 3)] public struct MusicPlayerRemoteToFront_t { public const int k_iCallback = Constants.k_iSteamMusicRemoteCallbacks + 3; } + #if STEAMWORKS_ANYCPU + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamMusicRemoteCallbacks + 3)] + internal struct MusicPlayerRemoteToFront_t_LargePack { + public const int k_iCallback = Constants.k_iSteamMusicRemoteCallbacks + 3; + } + + + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamMusicRemoteCallbacks + 3)] + internal struct MusicPlayerRemoteToFront_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamMusicRemoteCallbacks + 3; + } + + #endif [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] [CallbackIdentity(Constants.k_iSteamMusicRemoteCallbacks + 4)] public struct MusicPlayerWillQuit_t { public const int k_iCallback = Constants.k_iSteamMusicRemoteCallbacks + 4; } + #if STEAMWORKS_ANYCPU + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamMusicRemoteCallbacks + 4)] + internal struct MusicPlayerWillQuit_t_LargePack { + public const int k_iCallback = Constants.k_iSteamMusicRemoteCallbacks + 4; + } + + + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamMusicRemoteCallbacks + 4)] + internal struct MusicPlayerWillQuit_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamMusicRemoteCallbacks + 4; + } + + #endif [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] [CallbackIdentity(Constants.k_iSteamMusicRemoteCallbacks + 5)] public struct MusicPlayerWantsPlay_t { public const int k_iCallback = Constants.k_iSteamMusicRemoteCallbacks + 5; } + #if STEAMWORKS_ANYCPU + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamMusicRemoteCallbacks + 5)] + internal struct MusicPlayerWantsPlay_t_LargePack { + public const int k_iCallback = Constants.k_iSteamMusicRemoteCallbacks + 5; + } + + + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamMusicRemoteCallbacks + 5)] + internal struct MusicPlayerWantsPlay_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamMusicRemoteCallbacks + 5; + } + + #endif [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] [CallbackIdentity(Constants.k_iSteamMusicRemoteCallbacks + 6)] public struct MusicPlayerWantsPause_t { public const int k_iCallback = Constants.k_iSteamMusicRemoteCallbacks + 6; } + #if STEAMWORKS_ANYCPU + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamMusicRemoteCallbacks + 6)] + internal struct MusicPlayerWantsPause_t_LargePack { + public const int k_iCallback = Constants.k_iSteamMusicRemoteCallbacks + 6; + } + + + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamMusicRemoteCallbacks + 6)] + internal struct MusicPlayerWantsPause_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamMusicRemoteCallbacks + 6; + } + + #endif [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] [CallbackIdentity(Constants.k_iSteamMusicRemoteCallbacks + 7)] public struct MusicPlayerWantsPlayPrevious_t { public const int k_iCallback = Constants.k_iSteamMusicRemoteCallbacks + 7; } + #if STEAMWORKS_ANYCPU + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamMusicRemoteCallbacks + 7)] + internal struct MusicPlayerWantsPlayPrevious_t_LargePack { + public const int k_iCallback = Constants.k_iSteamMusicRemoteCallbacks + 7; + } + + + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamMusicRemoteCallbacks + 7)] + internal struct MusicPlayerWantsPlayPrevious_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamMusicRemoteCallbacks + 7; + } + + #endif [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] [CallbackIdentity(Constants.k_iSteamMusicRemoteCallbacks + 8)] public struct MusicPlayerWantsPlayNext_t { public const int k_iCallback = Constants.k_iSteamMusicRemoteCallbacks + 8; } + #if STEAMWORKS_ANYCPU + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamMusicRemoteCallbacks + 8)] + internal struct MusicPlayerWantsPlayNext_t_LargePack { + public const int k_iCallback = Constants.k_iSteamMusicRemoteCallbacks + 8; + } + + + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamMusicRemoteCallbacks + 8)] + internal struct MusicPlayerWantsPlayNext_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamMusicRemoteCallbacks + 8; + } + + #endif [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamMusicRemoteCallbacks + 9)] public struct MusicPlayerWantsShuffled_t { @@ -1462,6 +4299,25 @@ public struct MusicPlayerWantsShuffled_t { public bool m_bShuffled; } + #if STEAMWORKS_ANYCPU + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamMusicRemoteCallbacks + 9)] + internal struct MusicPlayerWantsShuffled_t_LargePack { + public const int k_iCallback = Constants.k_iSteamMusicRemoteCallbacks + 9; + [MarshalAs(UnmanagedType.I1)] + public bool m_bShuffled; + } + + + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamMusicRemoteCallbacks + 9)] + internal struct MusicPlayerWantsShuffled_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamMusicRemoteCallbacks + 9; + [MarshalAs(UnmanagedType.I1)] + public bool m_bShuffled; + } + + #endif [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamMusicRemoteCallbacks + 10)] public struct MusicPlayerWantsLooped_t { @@ -1470,6 +4326,25 @@ public struct MusicPlayerWantsLooped_t { public bool m_bLooped; } + #if STEAMWORKS_ANYCPU + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamMusicRemoteCallbacks + 10)] + internal struct MusicPlayerWantsLooped_t_LargePack { + public const int k_iCallback = Constants.k_iSteamMusicRemoteCallbacks + 10; + [MarshalAs(UnmanagedType.I1)] + public bool m_bLooped; + } + + + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamMusicRemoteCallbacks + 10)] + internal struct MusicPlayerWantsLooped_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamMusicRemoteCallbacks + 10; + [MarshalAs(UnmanagedType.I1)] + public bool m_bLooped; + } + + #endif [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamMusicCallbacks + 11)] public struct MusicPlayerWantsVolume_t { @@ -1477,6 +4352,23 @@ public struct MusicPlayerWantsVolume_t { public float m_flNewVolume; } + #if STEAMWORKS_ANYCPU + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamMusicCallbacks + 11)] + internal struct MusicPlayerWantsVolume_t_LargePack { + public const int k_iCallback = Constants.k_iSteamMusicCallbacks + 11; + public float m_flNewVolume; + } + + + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamMusicCallbacks + 11)] + internal struct MusicPlayerWantsVolume_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamMusicCallbacks + 11; + public float m_flNewVolume; + } + + #endif [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamMusicCallbacks + 12)] public struct MusicPlayerSelectsQueueEntry_t { @@ -1484,6 +4376,23 @@ public struct MusicPlayerSelectsQueueEntry_t { public int nID; } + #if STEAMWORKS_ANYCPU + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamMusicCallbacks + 12)] + internal struct MusicPlayerSelectsQueueEntry_t_LargePack { + public const int k_iCallback = Constants.k_iSteamMusicCallbacks + 12; + public int nID; + } + + + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamMusicCallbacks + 12)] + internal struct MusicPlayerSelectsQueueEntry_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamMusicCallbacks + 12; + public int nID; + } + + #endif [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamMusicCallbacks + 13)] public struct MusicPlayerSelectsPlaylistEntry_t { @@ -1491,6 +4400,23 @@ public struct MusicPlayerSelectsPlaylistEntry_t { public int nID; } + #if STEAMWORKS_ANYCPU + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamMusicCallbacks + 13)] + internal struct MusicPlayerSelectsPlaylistEntry_t_LargePack { + public const int k_iCallback = Constants.k_iSteamMusicCallbacks + 13; + public int nID; + } + + + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamMusicCallbacks + 13)] + internal struct MusicPlayerSelectsPlaylistEntry_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamMusicCallbacks + 13; + public int nID; + } + + #endif [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamMusicRemoteCallbacks + 14)] public struct MusicPlayerWantsPlayingRepeatStatus_t { @@ -1498,6 +4424,23 @@ public struct MusicPlayerWantsPlayingRepeatStatus_t { public int m_nPlayingRepeatStatus; } + #if STEAMWORKS_ANYCPU + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamMusicRemoteCallbacks + 14)] + internal struct MusicPlayerWantsPlayingRepeatStatus_t_LargePack { + public const int k_iCallback = Constants.k_iSteamMusicRemoteCallbacks + 14; + public int m_nPlayingRepeatStatus; + } + + + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamMusicRemoteCallbacks + 14)] + internal struct MusicPlayerWantsPlayingRepeatStatus_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamMusicRemoteCallbacks + 14; + public int m_nPlayingRepeatStatus; + } + + #endif // callbacks // callback notification - a user wants to talk to us over the P2P channel via the SendP2PPacket() API // in response, a call to AcceptP2PPacketsFromUser() needs to be made, if you want to talk with them @@ -1508,6 +4451,29 @@ public struct P2PSessionRequest_t { public CSteamID m_steamIDRemote; // user who wants to talk to us } + #if STEAMWORKS_ANYCPU + // callbacks + // callback notification - a user wants to talk to us over the P2P channel via the SendP2PPacket() API + // in response, a call to AcceptP2PPacketsFromUser() needs to be made, if you want to talk with them + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamNetworkingCallbacks + 2)] + internal struct P2PSessionRequest_t_LargePack { + public const int k_iCallback = Constants.k_iSteamNetworkingCallbacks + 2; + public CSteamID m_steamIDRemote; // user who wants to talk to us + } + + + // callbacks + // callback notification - a user wants to talk to us over the P2P channel via the SendP2PPacket() API + // in response, a call to AcceptP2PPacketsFromUser() needs to be made, if you want to talk with them + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamNetworkingCallbacks + 2)] + internal struct P2PSessionRequest_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamNetworkingCallbacks + 2; + public CSteamID m_steamIDRemote; // user who wants to talk to us + } + + #endif // callback notification - packets can't get through to the specified user via the SendP2PPacket() API // all packets queued packets unsent at this point will be dropped // further attempts to send will retry making the connection (but will be dropped if we fail again) @@ -1537,11 +4503,36 @@ public struct SocketStatusCallback_t { /// Posted when a remote host is sending us a message, and we do not already have a session with them [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamNetworkingMessagesCallbacks + 1)] - public struct SteamNetworkingMessagesSessionRequest_t { + public struct SteamNetworkingMessagesSessionRequest_t { + public const int k_iCallback = Constants.k_iSteamNetworkingMessagesCallbacks + 1; + public SteamNetworkingIdentity m_identityRemote; // user who wants to talk to us + } + + #if STEAMWORKS_ANYCPU + // + // Callbacks + // + /// Posted when a remote host is sending us a message, and we do not already have a session with them + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamNetworkingMessagesCallbacks + 1)] + internal struct SteamNetworkingMessagesSessionRequest_t_LargePack { + public const int k_iCallback = Constants.k_iSteamNetworkingMessagesCallbacks + 1; + public SteamNetworkingIdentity m_identityRemote; // user who wants to talk to us + } + + + // + // Callbacks + // + /// Posted when a remote host is sending us a message, and we do not already have a session with them + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamNetworkingMessagesCallbacks + 1)] + internal struct SteamNetworkingMessagesSessionRequest_t_SmallPack { public const int k_iCallback = Constants.k_iSteamNetworkingMessagesCallbacks + 1; public SteamNetworkingIdentity m_identityRemote; // user who wants to talk to us } + #endif /// Posted when we fail to establish a connection, or we detect that communications /// have been disrupted it an unusual way. There is no notification when a peer proactively /// closes the session. ("Closed by peer" is not a concept of UDP-style communications, and @@ -1564,6 +4555,53 @@ public struct SteamNetworkingMessagesSessionFailed_t { public SteamNetConnectionInfo_t m_info; } + #if STEAMWORKS_ANYCPU + /// Posted when we fail to establish a connection, or we detect that communications + /// have been disrupted it an unusual way. There is no notification when a peer proactively + /// closes the session. ("Closed by peer" is not a concept of UDP-style communications, and + /// SteamNetworkingMessages is primarily intended to make porting UDP code easy.) + /// + /// Remember: callbacks are asynchronous. See notes on SendMessageToUser, + /// and k_nSteamNetworkingSend_AutoRestartBrokenSession in particular. + /// + /// Also, if a session times out due to inactivity, no callbacks will be posted. The only + /// way to detect that this is happening is that querying the session state may return + /// none, connecting, and findingroute again. + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamNetworkingMessagesCallbacks + 2)] + internal struct SteamNetworkingMessagesSessionFailed_t_LargePack { + public const int k_iCallback = Constants.k_iSteamNetworkingMessagesCallbacks + 2; + + /// Detailed info about the session that failed. + /// SteamNetConnectionInfo_t::m_identityRemote indicates who this session + /// was with. + public SteamNetConnectionInfo_t m_info; + } + + + /// Posted when we fail to establish a connection, or we detect that communications + /// have been disrupted it an unusual way. There is no notification when a peer proactively + /// closes the session. ("Closed by peer" is not a concept of UDP-style communications, and + /// SteamNetworkingMessages is primarily intended to make porting UDP code easy.) + /// + /// Remember: callbacks are asynchronous. See notes on SendMessageToUser, + /// and k_nSteamNetworkingSend_AutoRestartBrokenSession in particular. + /// + /// Also, if a session times out due to inactivity, no callbacks will be posted. The only + /// way to detect that this is happening is that querying the session state may return + /// none, connecting, and findingroute again. + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamNetworkingMessagesCallbacks + 2)] + internal struct SteamNetworkingMessagesSessionFailed_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamNetworkingMessagesCallbacks + 2; + + /// Detailed info about the session that failed. + /// SteamNetConnectionInfo_t::m_identityRemote indicates who this session + /// was with. + public SteamNetConnectionInfo_t m_info; + } + + #endif /// Callback struct used to notify when a connection has changed state /// This callback is posted whenever a connection is created, destroyed, or changes state. /// The m_info field will contain a complete description of the connection at the time the @@ -1615,6 +4653,111 @@ public struct SteamNetConnectionStatusChangedCallback_t { public ESteamNetworkingConnectionState m_eOldState; } + #if STEAMWORKS_ANYCPU + /// Callback struct used to notify when a connection has changed state + /// This callback is posted whenever a connection is created, destroyed, or changes state. + /// The m_info field will contain a complete description of the connection at the time the + /// change occurred and the callback was posted. In particular, m_eState will have the + /// new connection state. + /// + /// You will usually need to listen for this callback to know when: + /// - A new connection arrives on a listen socket. + /// m_info.m_hListenSocket will be set, m_eOldState = k_ESteamNetworkingConnectionState_None, + /// and m_info.m_eState = k_ESteamNetworkingConnectionState_Connecting. + /// See ISteamNetworkigSockets::AcceptConnection. + /// - A connection you initiated has been accepted by the remote host. + /// m_eOldState = k_ESteamNetworkingConnectionState_Connecting, and + /// m_info.m_eState = k_ESteamNetworkingConnectionState_Connected. + /// Some connections might transition to k_ESteamNetworkingConnectionState_FindingRoute first. + /// - A connection has been actively rejected or closed by the remote host. + /// m_eOldState = k_ESteamNetworkingConnectionState_Connecting or k_ESteamNetworkingConnectionState_Connected, + /// and m_info.m_eState = k_ESteamNetworkingConnectionState_ClosedByPeer. m_info.m_eEndReason + /// and m_info.m_szEndDebug will have for more details. + /// NOTE: upon receiving this callback, you must still destroy the connection using + /// ISteamNetworkingSockets::CloseConnection to free up local resources. (The details + /// passed to the function are not used in this case, since the connection is already closed.) + /// - A problem was detected with the connection, and it has been closed by the local host. + /// The most common failure is timeout, but other configuration or authentication failures + /// can cause this. m_eOldState = k_ESteamNetworkingConnectionState_Connecting or + /// k_ESteamNetworkingConnectionState_Connected, and m_info.m_eState = k_ESteamNetworkingConnectionState_ProblemDetectedLocally. + /// m_info.m_eEndReason and m_info.m_szEndDebug will have for more details. + /// NOTE: upon receiving this callback, you must still destroy the connection using + /// ISteamNetworkingSockets::CloseConnection to free up local resources. (The details + /// passed to the function are not used in this case, since the connection is already closed.) + /// + /// Remember that callbacks are posted to a queue, and networking connections can + /// change at any time. It is possible that the connection has already changed + /// state by the time you process this callback. + /// + /// Also note that callbacks will be posted when connections are created and destroyed by your own API calls. + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamNetworkingSocketsCallbacks + 1)] + internal struct SteamNetConnectionStatusChangedCallback_t_LargePack { + public const int k_iCallback = Constants.k_iSteamNetworkingSocketsCallbacks + 1; + + /// Connection handle + public HSteamNetConnection m_hConn; + + /// Full connection info + public SteamNetConnectionInfo_t m_info; + + /// Previous state. (Current state is in m_info.m_eState) + public ESteamNetworkingConnectionState m_eOldState; + } + + + /// Callback struct used to notify when a connection has changed state + /// This callback is posted whenever a connection is created, destroyed, or changes state. + /// The m_info field will contain a complete description of the connection at the time the + /// change occurred and the callback was posted. In particular, m_eState will have the + /// new connection state. + /// + /// You will usually need to listen for this callback to know when: + /// - A new connection arrives on a listen socket. + /// m_info.m_hListenSocket will be set, m_eOldState = k_ESteamNetworkingConnectionState_None, + /// and m_info.m_eState = k_ESteamNetworkingConnectionState_Connecting. + /// See ISteamNetworkigSockets::AcceptConnection. + /// - A connection you initiated has been accepted by the remote host. + /// m_eOldState = k_ESteamNetworkingConnectionState_Connecting, and + /// m_info.m_eState = k_ESteamNetworkingConnectionState_Connected. + /// Some connections might transition to k_ESteamNetworkingConnectionState_FindingRoute first. + /// - A connection has been actively rejected or closed by the remote host. + /// m_eOldState = k_ESteamNetworkingConnectionState_Connecting or k_ESteamNetworkingConnectionState_Connected, + /// and m_info.m_eState = k_ESteamNetworkingConnectionState_ClosedByPeer. m_info.m_eEndReason + /// and m_info.m_szEndDebug will have for more details. + /// NOTE: upon receiving this callback, you must still destroy the connection using + /// ISteamNetworkingSockets::CloseConnection to free up local resources. (The details + /// passed to the function are not used in this case, since the connection is already closed.) + /// - A problem was detected with the connection, and it has been closed by the local host. + /// The most common failure is timeout, but other configuration or authentication failures + /// can cause this. m_eOldState = k_ESteamNetworkingConnectionState_Connecting or + /// k_ESteamNetworkingConnectionState_Connected, and m_info.m_eState = k_ESteamNetworkingConnectionState_ProblemDetectedLocally. + /// m_info.m_eEndReason and m_info.m_szEndDebug will have for more details. + /// NOTE: upon receiving this callback, you must still destroy the connection using + /// ISteamNetworkingSockets::CloseConnection to free up local resources. (The details + /// passed to the function are not used in this case, since the connection is already closed.) + /// + /// Remember that callbacks are posted to a queue, and networking connections can + /// change at any time. It is possible that the connection has already changed + /// state by the time you process this callback. + /// + /// Also note that callbacks will be posted when connections are created and destroyed by your own API calls. + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamNetworkingSocketsCallbacks + 1)] + internal struct SteamNetConnectionStatusChangedCallback_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamNetworkingSocketsCallbacks + 1; + + /// Connection handle + public HSteamNetConnection m_hConn; + + /// Full connection info + public SteamNetConnectionInfo_t m_info; + + /// Previous state. (Current state is in m_info.m_eState) + public ESteamNetworkingConnectionState m_eOldState; + } + + #endif /// A struct used to describe our readiness to participate in authenticated, /// encrypted communication. In order to do this we need: /// @@ -1628,13 +4771,154 @@ public struct SteamNetConnectionStatusChangedCallback_t { public struct SteamNetAuthenticationStatus_t { public const int k_iCallback = Constants.k_iSteamNetworkingSocketsCallbacks + 2; - /// Status + /// Status + public ESteamNetworkingAvailability m_eAvail; + + /// Non-localized English language status. For diagnostic/debugging + /// purposes only. + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] + internal byte[] m_debugMsg_; + public string m_debugMsg + { + get { return InteropHelp.ByteArrayToStringUTF8(m_debugMsg_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_debugMsg_, 256); } + } + } + + #if STEAMWORKS_ANYCPU + /// A struct used to describe our readiness to participate in authenticated, + /// encrypted communication. In order to do this we need: + /// + /// - The list of trusted CA certificates that might be relevant for this + /// app. + /// - A valid certificate issued by a CA. + /// + /// This callback is posted whenever the state of our readiness changes. + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamNetworkingSocketsCallbacks + 2)] + internal struct SteamNetAuthenticationStatus_t_LargePack { + public const int k_iCallback = Constants.k_iSteamNetworkingSocketsCallbacks + 2; + + /// Status + public ESteamNetworkingAvailability m_eAvail; + + /// Non-localized English language status. For diagnostic/debugging + /// purposes only. + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] + internal byte[] m_debugMsg_; + public string m_debugMsg + { + get { return InteropHelp.ByteArrayToStringUTF8(m_debugMsg_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_debugMsg_, 256); } + } + } + + + /// A struct used to describe our readiness to participate in authenticated, + /// encrypted communication. In order to do this we need: + /// + /// - The list of trusted CA certificates that might be relevant for this + /// app. + /// - A valid certificate issued by a CA. + /// + /// This callback is posted whenever the state of our readiness changes. + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamNetworkingSocketsCallbacks + 2)] + internal struct SteamNetAuthenticationStatus_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamNetworkingSocketsCallbacks + 2; + + /// Status + public ESteamNetworkingAvailability m_eAvail; + + /// Non-localized English language status. For diagnostic/debugging + /// purposes only. + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] + internal byte[] m_debugMsg_; + public string m_debugMsg + { + get { return InteropHelp.ByteArrayToStringUTF8(m_debugMsg_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_debugMsg_, 256); } + } + } + + #endif + /// A struct used to describe our readiness to use the relay network. + /// To do this we first need to fetch the network configuration, + /// which describes what POPs are available. + [CallbackIdentity(Constants.k_iSteamNetworkingUtilsCallbacks + 1)] + public struct SteamRelayNetworkStatus_t { + public const int k_iCallback = Constants.k_iSteamNetworkingUtilsCallbacks + 1; + + /// Summary status. When this is "current", initialization has + /// completed. Anything else means you are not ready yet, or + /// there is a significant problem. + public ESteamNetworkingAvailability m_eAvail; + + /// Nonzero if latency measurement is in progress (or pending, + /// awaiting a prerequisite). + public int m_bPingMeasurementInProgress; + + /// Status obtaining the network config. This is a prerequisite + /// for relay network access. + /// + /// Failure to obtain the network config almost always indicates + /// a problem with the local internet connection. + public ESteamNetworkingAvailability m_eAvailNetworkConfig; + + /// Current ability to communicate with ANY relay. Note that + /// the complete failure to communicate with any relays almost + /// always indicates a problem with the local Internet connection. + /// (However, just because you can reach a single relay doesn't + /// mean that the local connection is in perfect health.) + public ESteamNetworkingAvailability m_eAvailAnyRelay; + + /// Non-localized English language status. For diagnostic/debugging + /// purposes only. + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] + internal byte[] m_debugMsg_; + public string m_debugMsg + { + get { return InteropHelp.ByteArrayToStringUTF8(m_debugMsg_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_debugMsg_, 256); } + } + } + + #if STEAMWORKS_ANYCPU + /// A struct used to describe our readiness to use the relay network. + /// To do this we first need to fetch the network configuration, + /// which describes what POPs are available. + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamNetworkingUtilsCallbacks + 1)] + internal struct SteamRelayNetworkStatus_t_LargePack { + public const int k_iCallback = Constants.k_iSteamNetworkingUtilsCallbacks + 1; + + /// Summary status. When this is "current", initialization has + /// completed. Anything else means you are not ready yet, or + /// there is a significant problem. public ESteamNetworkingAvailability m_eAvail; + /// Nonzero if latency measurement is in progress (or pending, + /// awaiting a prerequisite). + public int m_bPingMeasurementInProgress; + + /// Status obtaining the network config. This is a prerequisite + /// for relay network access. + /// + /// Failure to obtain the network config almost always indicates + /// a problem with the local internet connection. + public ESteamNetworkingAvailability m_eAvailNetworkConfig; + + /// Current ability to communicate with ANY relay. Note that + /// the complete failure to communicate with any relays almost + /// always indicates a problem with the local Internet connection. + /// (However, just because you can reach a single relay doesn't + /// mean that the local connection is in perfect health.) + public ESteamNetworkingAvailability m_eAvailAnyRelay; + /// Non-localized English language status. For diagnostic/debugging /// purposes only. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] - private byte[] m_debugMsg_; + internal byte[] m_debugMsg_; public string m_debugMsg { get { return InteropHelp.ByteArrayToStringUTF8(m_debugMsg_); } @@ -1642,11 +4926,13 @@ public string m_debugMsg } } + /// A struct used to describe our readiness to use the relay network. /// To do this we first need to fetch the network configuration, /// which describes what POPs are available. + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamNetworkingUtilsCallbacks + 1)] - public struct SteamRelayNetworkStatus_t { + internal struct SteamRelayNetworkStatus_t_SmallPack { public const int k_iCallback = Constants.k_iSteamNetworkingUtilsCallbacks + 1; /// Summary status. When this is "current", initialization has @@ -1675,7 +4961,7 @@ public struct SteamRelayNetworkStatus_t { /// Non-localized English language status. For diagnostic/debugging /// purposes only. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] - private byte[] m_debugMsg_; + internal byte[] m_debugMsg_; public string m_debugMsg { get { return InteropHelp.ByteArrayToStringUTF8(m_debugMsg_); } @@ -1683,6 +4969,7 @@ public string m_debugMsg } } + #endif //----------------------------------------------------------------------------- // Purpose: Callback for querying UGC //----------------------------------------------------------------------------- @@ -1691,6 +4978,27 @@ public struct SteamParentalSettingsChanged_t { public const int k_iCallback = Constants.k_ISteamParentalSettingsCallbacks + 1; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: Callback for querying UGC + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_ISteamParentalSettingsCallbacks + 1)] + internal struct SteamParentalSettingsChanged_t_LargePack { + public const int k_iCallback = Constants.k_ISteamParentalSettingsCallbacks + 1; + } + + + //----------------------------------------------------------------------------- + // Purpose: Callback for querying UGC + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_ISteamParentalSettingsCallbacks + 1)] + internal struct SteamParentalSettingsChanged_t_SmallPack { + public const int k_iCallback = Constants.k_ISteamParentalSettingsCallbacks + 1; + } + + #endif // callbacks [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamRemotePlayCallbacks + 1)] @@ -1699,6 +5007,25 @@ public struct SteamRemotePlaySessionConnected_t { public RemotePlaySessionID_t m_unSessionID; } + #if STEAMWORKS_ANYCPU + // callbacks + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemotePlayCallbacks + 1)] + internal struct SteamRemotePlaySessionConnected_t_LargePack { + public const int k_iCallback = Constants.k_iSteamRemotePlayCallbacks + 1; + public RemotePlaySessionID_t m_unSessionID; + } + + + // callbacks + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemotePlayCallbacks + 1)] + internal struct SteamRemotePlaySessionConnected_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamRemotePlayCallbacks + 1; + public RemotePlaySessionID_t m_unSessionID; + } + + #endif [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamRemotePlayCallbacks + 2)] public struct SteamRemotePlaySessionDisconnected_t { @@ -1706,12 +5033,57 @@ public struct SteamRemotePlaySessionDisconnected_t { public RemotePlaySessionID_t m_unSessionID; } + #if STEAMWORKS_ANYCPU + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemotePlayCallbacks + 2)] + internal struct SteamRemotePlaySessionDisconnected_t_LargePack { + public const int k_iCallback = Constants.k_iSteamRemotePlayCallbacks + 2; + public RemotePlaySessionID_t m_unSessionID; + } + + + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemotePlayCallbacks + 2)] + internal struct SteamRemotePlaySessionDisconnected_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamRemotePlayCallbacks + 2; + public RemotePlaySessionID_t m_unSessionID; + } + + #endif [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamRemotePlayCallbacks + 3)] public struct SteamRemotePlayTogetherGuestInvite_t { public const int k_iCallback = Constants.k_iSteamRemotePlayCallbacks + 3; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1024)] - private byte[] m_szConnectURL_; + internal byte[] m_szConnectURL_; + public string m_szConnectURL + { + get { return InteropHelp.ByteArrayToStringUTF8(m_szConnectURL_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_szConnectURL_, 1024); } + } + } + + #if STEAMWORKS_ANYCPU + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemotePlayCallbacks + 3)] + internal struct SteamRemotePlayTogetherGuestInvite_t_LargePack { + public const int k_iCallback = Constants.k_iSteamRemotePlayCallbacks + 3; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1024)] + internal byte[] m_szConnectURL_; + public string m_szConnectURL + { + get { return InteropHelp.ByteArrayToStringUTF8(m_szConnectURL_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_szConnectURL_, 1024); } + } + } + + + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemotePlayCallbacks + 3)] + internal struct SteamRemotePlayTogetherGuestInvite_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamRemotePlayCallbacks + 3; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1024)] + internal byte[] m_szConnectURL_; public string m_szConnectURL { get { return InteropHelp.ByteArrayToStringUTF8(m_szConnectURL_); } @@ -1719,82 +5091,272 @@ public string m_szConnectURL } } - // callbacks + #endif + // callbacks + //----------------------------------------------------------------------------- + // Purpose: The result of a call to FileShare() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 7)] + public struct RemoteStorageFileShareResult_t { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 7; + public EResult m_eResult; // The result of the operation + public UGCHandle_t m_hFile; // The handle that can be shared with users and features + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchFilenameMax)] + internal byte[] m_rgchFilename_; + public string m_rgchFilename // The name of the file that was shared + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchFilename_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchFilename_, Constants.k_cchFilenameMax); } + } + } + + #if STEAMWORKS_ANYCPU + // callbacks + //----------------------------------------------------------------------------- + // Purpose: The result of a call to FileShare() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 7)] + internal struct RemoteStorageFileShareResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 7; + public EResult m_eResult; // The result of the operation + public UGCHandle_t m_hFile; // The handle that can be shared with users and features + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchFilenameMax)] + internal byte[] m_rgchFilename_; + public string m_rgchFilename // The name of the file that was shared + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchFilename_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchFilename_, Constants.k_cchFilenameMax); } + } + } + + + // callbacks + //----------------------------------------------------------------------------- + // Purpose: The result of a call to FileShare() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 7)] + internal struct RemoteStorageFileShareResult_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 7; + public EResult m_eResult; // The result of the operation + public UGCHandle_t m_hFile; // The handle that can be shared with users and features + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchFilenameMax)] + internal byte[] m_rgchFilename_; + public string m_rgchFilename // The name of the file that was shared + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchFilename_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchFilename_, Constants.k_cchFilenameMax); } + } + } + + #endif + // k_iSteamRemoteStorageCallbacks + 8 is deprecated! Do not reuse + //----------------------------------------------------------------------------- + // Purpose: The result of a call to PublishFile() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 9)] + public struct RemoteStoragePublishFileResult_t { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 9; + public EResult m_eResult; // The result of the operation. + public PublishedFileId_t m_nPublishedFileId; + [MarshalAs(UnmanagedType.I1)] + public bool m_bUserNeedsToAcceptWorkshopLegalAgreement; + } + + #if STEAMWORKS_ANYCPU + // k_iSteamRemoteStorageCallbacks + 8 is deprecated! Do not reuse + //----------------------------------------------------------------------------- + // Purpose: The result of a call to PublishFile() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 9)] + internal struct RemoteStoragePublishFileResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 9; + public EResult m_eResult; // The result of the operation. + public PublishedFileId_t m_nPublishedFileId; + [MarshalAs(UnmanagedType.I1)] + public bool m_bUserNeedsToAcceptWorkshopLegalAgreement; + } + + + // k_iSteamRemoteStorageCallbacks + 8 is deprecated! Do not reuse + //----------------------------------------------------------------------------- + // Purpose: The result of a call to PublishFile() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 9)] + internal struct RemoteStoragePublishFileResult_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 9; + public EResult m_eResult; // The result of the operation. + public PublishedFileId_t m_nPublishedFileId; + [MarshalAs(UnmanagedType.I1)] + public bool m_bUserNeedsToAcceptWorkshopLegalAgreement; + } + + #endif + // k_iSteamRemoteStorageCallbacks + 10 is deprecated! Do not reuse + //----------------------------------------------------------------------------- + // Purpose: The result of a call to DeletePublishedFile() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 11)] + public struct RemoteStorageDeletePublishedFileResult_t { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 11; + public EResult m_eResult; // The result of the operation. + public PublishedFileId_t m_nPublishedFileId; + } + + #if STEAMWORKS_ANYCPU + // k_iSteamRemoteStorageCallbacks + 10 is deprecated! Do not reuse + //----------------------------------------------------------------------------- + // Purpose: The result of a call to DeletePublishedFile() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 11)] + internal struct RemoteStorageDeletePublishedFileResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 11; + public EResult m_eResult; // The result of the operation. + public PublishedFileId_t m_nPublishedFileId; + } + + + // k_iSteamRemoteStorageCallbacks + 10 is deprecated! Do not reuse + //----------------------------------------------------------------------------- + // Purpose: The result of a call to DeletePublishedFile() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 11)] + internal struct RemoteStorageDeletePublishedFileResult_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 11; + public EResult m_eResult; // The result of the operation. + public PublishedFileId_t m_nPublishedFileId; + } + + #endif + //----------------------------------------------------------------------------- + // Purpose: The result of a call to EnumerateUserPublishedFiles() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 12)] + public struct RemoteStorageEnumerateUserPublishedFilesResult_t { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 12; + public EResult m_eResult; // The result of the operation. + public int m_nResultsReturned; + public int m_nTotalResultCount; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_unEnumeratePublishedFilesMaxResults)] + public PublishedFileId_t[] m_rgPublishedFileId; + } + + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: The result of a call to EnumerateUserPublishedFiles() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 12)] + internal struct RemoteStorageEnumerateUserPublishedFilesResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 12; + public EResult m_eResult; // The result of the operation. + public int m_nResultsReturned; + public int m_nTotalResultCount; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_unEnumeratePublishedFilesMaxResults)] + public PublishedFileId_t[] m_rgPublishedFileId; + } + + + //----------------------------------------------------------------------------- + // Purpose: The result of a call to EnumerateUserPublishedFiles() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 12)] + internal struct RemoteStorageEnumerateUserPublishedFilesResult_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 12; + public EResult m_eResult; // The result of the operation. + public int m_nResultsReturned; + public int m_nTotalResultCount; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_unEnumeratePublishedFilesMaxResults)] + public PublishedFileId_t[] m_rgPublishedFileId; + } + + #endif //----------------------------------------------------------------------------- - // Purpose: The result of a call to FileShare() + // Purpose: The result of a call to SubscribePublishedFile() //----------------------------------------------------------------------------- [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] - [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 7)] - public struct RemoteStorageFileShareResult_t { - public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 7; - public EResult m_eResult; // The result of the operation - public UGCHandle_t m_hFile; // The handle that can be shared with users and features - [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchFilenameMax)] - private byte[] m_rgchFilename_; - public string m_rgchFilename // The name of the file that was shared - { - get { return InteropHelp.ByteArrayToStringUTF8(m_rgchFilename_); } - set { InteropHelp.StringToByteArrayUTF8(value, m_rgchFilename_, Constants.k_cchFilenameMax); } - } + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 13)] + public struct RemoteStorageSubscribePublishedFileResult_t { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 13; + public EResult m_eResult; // The result of the operation. + public PublishedFileId_t m_nPublishedFileId; } - // k_iSteamRemoteStorageCallbacks + 8 is deprecated! Do not reuse + #if STEAMWORKS_ANYCPU //----------------------------------------------------------------------------- - // Purpose: The result of a call to PublishFile() + // Purpose: The result of a call to SubscribePublishedFile() //----------------------------------------------------------------------------- [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] - [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 9)] - public struct RemoteStoragePublishFileResult_t { - public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 9; + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 13)] + internal struct RemoteStorageSubscribePublishedFileResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 13; public EResult m_eResult; // The result of the operation. public PublishedFileId_t m_nPublishedFileId; - [MarshalAs(UnmanagedType.I1)] - public bool m_bUserNeedsToAcceptWorkshopLegalAgreement; } - // k_iSteamRemoteStorageCallbacks + 10 is deprecated! Do not reuse + //----------------------------------------------------------------------------- - // Purpose: The result of a call to DeletePublishedFile() + // Purpose: The result of a call to SubscribePublishedFile() //----------------------------------------------------------------------------- [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] - [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 11)] - public struct RemoteStorageDeletePublishedFileResult_t { - public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 11; + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 13)] + internal struct RemoteStorageSubscribePublishedFileResult_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 13; public EResult m_eResult; // The result of the operation. public PublishedFileId_t m_nPublishedFileId; } + #endif //----------------------------------------------------------------------------- - // Purpose: The result of a call to EnumerateUserPublishedFiles() + // Purpose: The result of a call to EnumerateSubscribePublishedFiles() //----------------------------------------------------------------------------- [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] - [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 12)] - public struct RemoteStorageEnumerateUserPublishedFilesResult_t { - public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 12; + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 14)] + public struct RemoteStorageEnumerateUserSubscribedFilesResult_t { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 14; public EResult m_eResult; // The result of the operation. public int m_nResultsReturned; public int m_nTotalResultCount; [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_unEnumeratePublishedFilesMaxResults)] public PublishedFileId_t[] m_rgPublishedFileId; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_unEnumeratePublishedFilesMaxResults)] + public uint[] m_rgRTimeSubscribed; } + #if STEAMWORKS_ANYCPU //----------------------------------------------------------------------------- - // Purpose: The result of a call to SubscribePublishedFile() + // Purpose: The result of a call to EnumerateSubscribePublishedFiles() //----------------------------------------------------------------------------- [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] - [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 13)] - public struct RemoteStorageSubscribePublishedFileResult_t { - public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 13; + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 14)] + internal struct RemoteStorageEnumerateUserSubscribedFilesResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 14; public EResult m_eResult; // The result of the operation. - public PublishedFileId_t m_nPublishedFileId; + public int m_nResultsReturned; + public int m_nTotalResultCount; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_unEnumeratePublishedFilesMaxResults)] + public PublishedFileId_t[] m_rgPublishedFileId; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_unEnumeratePublishedFilesMaxResults)] + public uint[] m_rgRTimeSubscribed; } + //----------------------------------------------------------------------------- // Purpose: The result of a call to EnumerateSubscribePublishedFiles() //----------------------------------------------------------------------------- [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 14)] - public struct RemoteStorageEnumerateUserSubscribedFilesResult_t { + internal struct RemoteStorageEnumerateUserSubscribedFilesResult_t_SmallPack { public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 14; public EResult m_eResult; // The result of the operation. public int m_nResultsReturned; @@ -1805,6 +5367,7 @@ public struct RemoteStorageEnumerateUserSubscribedFilesResult_t { public uint[] m_rgRTimeSubscribed; } + #endif //----------------------------------------------------------------------------- // Purpose: The result of a call to UnsubscribePublishedFile() //----------------------------------------------------------------------------- @@ -1816,6 +5379,31 @@ public struct RemoteStorageUnsubscribePublishedFileResult_t { public PublishedFileId_t m_nPublishedFileId; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: The result of a call to UnsubscribePublishedFile() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 15)] + internal struct RemoteStorageUnsubscribePublishedFileResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 15; + public EResult m_eResult; // The result of the operation. + public PublishedFileId_t m_nPublishedFileId; + } + + + //----------------------------------------------------------------------------- + // Purpose: The result of a call to UnsubscribePublishedFile() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 15)] + internal struct RemoteStorageUnsubscribePublishedFileResult_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 15; + public EResult m_eResult; // The result of the operation. + public PublishedFileId_t m_nPublishedFileId; + } + + #endif //----------------------------------------------------------------------------- // Purpose: The result of a call to CommitPublishedFileUpdate() //----------------------------------------------------------------------------- @@ -1829,6 +5417,35 @@ public struct RemoteStorageUpdatePublishedFileResult_t { public bool m_bUserNeedsToAcceptWorkshopLegalAgreement; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: The result of a call to CommitPublishedFileUpdate() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 16)] + internal struct RemoteStorageUpdatePublishedFileResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 16; + public EResult m_eResult; // The result of the operation. + public PublishedFileId_t m_nPublishedFileId; + [MarshalAs(UnmanagedType.I1)] + public bool m_bUserNeedsToAcceptWorkshopLegalAgreement; + } + + + //----------------------------------------------------------------------------- + // Purpose: The result of a call to CommitPublishedFileUpdate() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 16)] + internal struct RemoteStorageUpdatePublishedFileResult_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 16; + public EResult m_eResult; // The result of the operation. + public PublishedFileId_t m_nPublishedFileId; + [MarshalAs(UnmanagedType.I1)] + public bool m_bUserNeedsToAcceptWorkshopLegalAgreement; + } + + #endif //----------------------------------------------------------------------------- // Purpose: The result of a call to UGCDownload() //----------------------------------------------------------------------------- @@ -1841,35 +5458,208 @@ public struct RemoteStorageDownloadUGCResult_t { public AppId_t m_nAppID; // ID of the app that created this file. public int m_nSizeInBytes; // The size of the file that was downloaded, in bytes. [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchFilenameMax)] - private byte[] m_pchFileName_; - public string m_pchFileName // The name of the file that was downloaded. + internal byte[] m_pchFileName_; + public string m_pchFileName // The name of the file that was downloaded. + { + get { return InteropHelp.ByteArrayToStringUTF8(m_pchFileName_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_pchFileName_, Constants.k_cchFilenameMax); } + } + public ulong m_ulSteamIDOwner; // Steam ID of the user who created this content. + } + + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: The result of a call to UGCDownload() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 17)] + internal struct RemoteStorageDownloadUGCResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 17; + public EResult m_eResult; // The result of the operation. + public UGCHandle_t m_hFile; // The handle to the file that was attempted to be downloaded. + public AppId_t m_nAppID; // ID of the app that created this file. + public int m_nSizeInBytes; // The size of the file that was downloaded, in bytes. + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchFilenameMax)] + internal byte[] m_pchFileName_; + public string m_pchFileName // The name of the file that was downloaded. + { + get { return InteropHelp.ByteArrayToStringUTF8(m_pchFileName_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_pchFileName_, Constants.k_cchFilenameMax); } + } + public ulong m_ulSteamIDOwner; // Steam ID of the user who created this content. + } + + + //----------------------------------------------------------------------------- + // Purpose: The result of a call to UGCDownload() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 17)] + internal struct RemoteStorageDownloadUGCResult_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 17; + public EResult m_eResult; // The result of the operation. + public UGCHandle_t m_hFile; // The handle to the file that was attempted to be downloaded. + public AppId_t m_nAppID; // ID of the app that created this file. + public int m_nSizeInBytes; // The size of the file that was downloaded, in bytes. + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchFilenameMax)] + internal byte[] m_pchFileName_; + public string m_pchFileName // The name of the file that was downloaded. + { + get { return InteropHelp.ByteArrayToStringUTF8(m_pchFileName_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_pchFileName_, Constants.k_cchFilenameMax); } + } + public ulong m_ulSteamIDOwner; // Steam ID of the user who created this content. + } + + #endif + //----------------------------------------------------------------------------- + // Purpose: The result of a call to GetPublishedFileDetails() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 18)] + public struct RemoteStorageGetPublishedFileDetailsResult_t { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 18; + public EResult m_eResult; // The result of the operation. + public PublishedFileId_t m_nPublishedFileId; + public AppId_t m_nCreatorAppID; // ID of the app that created this file. + public AppId_t m_nConsumerAppID; // ID of the app that will consume this file. + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchPublishedDocumentTitleMax)] + internal byte[] m_rgchTitle_; + public string m_rgchTitle // title of document + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchTitle_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchTitle_, Constants.k_cchPublishedDocumentTitleMax); } + } + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchPublishedDocumentDescriptionMax)] + internal byte[] m_rgchDescription_; + public string m_rgchDescription // description of document + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchDescription_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchDescription_, Constants.k_cchPublishedDocumentDescriptionMax); } + } + public UGCHandle_t m_hFile; // The handle of the primary file + public UGCHandle_t m_hPreviewFile; // The handle of the preview file + public ulong m_ulSteamIDOwner; // Steam ID of the user who created this content. + public uint m_rtimeCreated; // time when the published file was created + public uint m_rtimeUpdated; // time when the published file was last updated + public ERemoteStoragePublishedFileVisibility m_eVisibility; + [MarshalAs(UnmanagedType.I1)] + public bool m_bBanned; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchTagListMax)] + internal byte[] m_rgchTags_; + public string m_rgchTags // comma separated list of all tags associated with this file + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchTags_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchTags_, Constants.k_cchTagListMax); } + } + [MarshalAs(UnmanagedType.I1)] + public bool m_bTagsTruncated; // whether the list of tags was too long to be returned in the provided buffer + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchFilenameMax)] + internal byte[] m_pchFileName_; + public string m_pchFileName // The name of the primary file + { + get { return InteropHelp.ByteArrayToStringUTF8(m_pchFileName_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_pchFileName_, Constants.k_cchFilenameMax); } + } + public int m_nFileSize; // Size of the primary file + public int m_nPreviewFileSize; // Size of the preview file + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchPublishedFileURLMax)] + internal byte[] m_rgchURL_; + public string m_rgchURL // URL (for a video or a website) + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchURL_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchURL_, Constants.k_cchPublishedFileURLMax); } + } + public EWorkshopFileType m_eFileType; // Type of the file + [MarshalAs(UnmanagedType.I1)] + public bool m_bAcceptedForUse; // developer has specifically flagged this item as accepted in the Workshop + } + + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: The result of a call to GetPublishedFileDetails() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 18)] + internal struct RemoteStorageGetPublishedFileDetailsResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 18; + public EResult m_eResult; // The result of the operation. + public PublishedFileId_t m_nPublishedFileId; + public AppId_t m_nCreatorAppID; // ID of the app that created this file. + public AppId_t m_nConsumerAppID; // ID of the app that will consume this file. + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchPublishedDocumentTitleMax)] + internal byte[] m_rgchTitle_; + public string m_rgchTitle // title of document + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchTitle_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchTitle_, Constants.k_cchPublishedDocumentTitleMax); } + } + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchPublishedDocumentDescriptionMax)] + internal byte[] m_rgchDescription_; + public string m_rgchDescription // description of document + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchDescription_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchDescription_, Constants.k_cchPublishedDocumentDescriptionMax); } + } + public UGCHandle_t m_hFile; // The handle of the primary file + public UGCHandle_t m_hPreviewFile; // The handle of the preview file + public ulong m_ulSteamIDOwner; // Steam ID of the user who created this content. + public uint m_rtimeCreated; // time when the published file was created + public uint m_rtimeUpdated; // time when the published file was last updated + public ERemoteStoragePublishedFileVisibility m_eVisibility; + [MarshalAs(UnmanagedType.I1)] + public bool m_bBanned; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchTagListMax)] + internal byte[] m_rgchTags_; + public string m_rgchTags // comma separated list of all tags associated with this file + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchTags_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchTags_, Constants.k_cchTagListMax); } + } + [MarshalAs(UnmanagedType.I1)] + public bool m_bTagsTruncated; // whether the list of tags was too long to be returned in the provided buffer + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchFilenameMax)] + internal byte[] m_pchFileName_; + public string m_pchFileName // The name of the primary file { get { return InteropHelp.ByteArrayToStringUTF8(m_pchFileName_); } set { InteropHelp.StringToByteArrayUTF8(value, m_pchFileName_, Constants.k_cchFilenameMax); } } - public ulong m_ulSteamIDOwner; // Steam ID of the user who created this content. + public int m_nFileSize; // Size of the primary file + public int m_nPreviewFileSize; // Size of the preview file + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchPublishedFileURLMax)] + internal byte[] m_rgchURL_; + public string m_rgchURL // URL (for a video or a website) + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchURL_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchURL_, Constants.k_cchPublishedFileURLMax); } + } + public EWorkshopFileType m_eFileType; // Type of the file + [MarshalAs(UnmanagedType.I1)] + public bool m_bAcceptedForUse; // developer has specifically flagged this item as accepted in the Workshop } + //----------------------------------------------------------------------------- // Purpose: The result of a call to GetPublishedFileDetails() //----------------------------------------------------------------------------- [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 18)] - public struct RemoteStorageGetPublishedFileDetailsResult_t { + internal struct RemoteStorageGetPublishedFileDetailsResult_t_SmallPack { public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 18; public EResult m_eResult; // The result of the operation. public PublishedFileId_t m_nPublishedFileId; public AppId_t m_nCreatorAppID; // ID of the app that created this file. public AppId_t m_nConsumerAppID; // ID of the app that will consume this file. [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchPublishedDocumentTitleMax)] - private byte[] m_rgchTitle_; + internal byte[] m_rgchTitle_; public string m_rgchTitle // title of document { get { return InteropHelp.ByteArrayToStringUTF8(m_rgchTitle_); } set { InteropHelp.StringToByteArrayUTF8(value, m_rgchTitle_, Constants.k_cchPublishedDocumentTitleMax); } } [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchPublishedDocumentDescriptionMax)] - private byte[] m_rgchDescription_; + internal byte[] m_rgchDescription_; public string m_rgchDescription // description of document { get { return InteropHelp.ByteArrayToStringUTF8(m_rgchDescription_); } @@ -1884,7 +5674,7 @@ public string m_rgchDescription // description of document [MarshalAs(UnmanagedType.I1)] public bool m_bBanned; [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchTagListMax)] - private byte[] m_rgchTags_; + internal byte[] m_rgchTags_; public string m_rgchTags // comma separated list of all tags associated with this file { get { return InteropHelp.ByteArrayToStringUTF8(m_rgchTags_); } @@ -1893,7 +5683,7 @@ public string m_rgchTags // comma separated list of all tags associated with thi [MarshalAs(UnmanagedType.I1)] public bool m_bTagsTruncated; // whether the list of tags was too long to be returned in the provided buffer [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchFilenameMax)] - private byte[] m_pchFileName_; + internal byte[] m_pchFileName_; public string m_pchFileName // The name of the primary file { get { return InteropHelp.ByteArrayToStringUTF8(m_pchFileName_); } @@ -1902,7 +5692,7 @@ public string m_pchFileName // The name of the primary file public int m_nFileSize; // Size of the primary file public int m_nPreviewFileSize; // Size of the preview file [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchPublishedFileURLMax)] - private byte[] m_rgchURL_; + internal byte[] m_rgchURL_; public string m_rgchURL // URL (for a video or a website) { get { return InteropHelp.ByteArrayToStringUTF8(m_rgchURL_); } @@ -1913,6 +5703,7 @@ public string m_pchFileName // The name of the primary file public bool m_bAcceptedForUse; // developer has specifically flagged this item as accepted in the Workshop } + #endif [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 19)] public struct RemoteStorageEnumerateWorkshopFilesResult_t { @@ -1928,6 +5719,39 @@ public struct RemoteStorageEnumerateWorkshopFilesResult_t { public uint m_unStartIndex; } + #if STEAMWORKS_ANYCPU + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 19)] + internal struct RemoteStorageEnumerateWorkshopFilesResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 19; + public EResult m_eResult; + public int m_nResultsReturned; + public int m_nTotalResultCount; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_unEnumeratePublishedFilesMaxResults)] + public PublishedFileId_t[] m_rgPublishedFileId; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_unEnumeratePublishedFilesMaxResults)] + public float[] m_rgScore; + public AppId_t m_nAppId; + public uint m_unStartIndex; + } + + + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 19)] + internal struct RemoteStorageEnumerateWorkshopFilesResult_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 19; + public EResult m_eResult; + public int m_nResultsReturned; + public int m_nTotalResultCount; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_unEnumeratePublishedFilesMaxResults)] + public PublishedFileId_t[] m_rgPublishedFileId; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_unEnumeratePublishedFilesMaxResults)] + public float[] m_rgScore; + public AppId_t m_nAppId; + public uint m_unStartIndex; + } + + #endif //----------------------------------------------------------------------------- // Purpose: The result of GetPublishedItemVoteDetails //----------------------------------------------------------------------------- @@ -1943,6 +5767,39 @@ public struct RemoteStorageGetPublishedItemVoteDetailsResult_t { public float m_fScore; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: The result of GetPublishedItemVoteDetails + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 20)] + internal struct RemoteStorageGetPublishedItemVoteDetailsResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 20; + 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; + } + + + //----------------------------------------------------------------------------- + // Purpose: The result of GetPublishedItemVoteDetails + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 20)] + internal struct RemoteStorageGetPublishedItemVoteDetailsResult_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 20; + 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; + } + + #endif //----------------------------------------------------------------------------- // Purpose: User subscribed to a file for the app (from within the app or on the web) //----------------------------------------------------------------------------- @@ -1954,6 +5811,31 @@ public struct RemoteStoragePublishedFileSubscribed_t { public AppId_t m_nAppID; // ID of the app that will consume this file. } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: User subscribed to a file for the app (from within the app or on the web) + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 21)] + internal struct RemoteStoragePublishedFileSubscribed_t_LargePack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 21; + public PublishedFileId_t m_nPublishedFileId; // The published file id + public AppId_t m_nAppID; // ID of the app that will consume this file. + } + + + //----------------------------------------------------------------------------- + // Purpose: User subscribed to a file for the app (from within the app or on the web) + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 21)] + internal struct RemoteStoragePublishedFileSubscribed_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 21; + public PublishedFileId_t m_nPublishedFileId; // The published file id + public AppId_t m_nAppID; // ID of the app that will consume this file. + } + + #endif //----------------------------------------------------------------------------- // Purpose: User unsubscribed from a file for the app (from within the app or on the web) //----------------------------------------------------------------------------- @@ -1965,6 +5847,31 @@ public struct RemoteStoragePublishedFileUnsubscribed_t { public AppId_t m_nAppID; // ID of the app that will consume this file. } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: User unsubscribed from a file for the app (from within the app or on the web) + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 22)] + internal struct RemoteStoragePublishedFileUnsubscribed_t_LargePack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 22; + public PublishedFileId_t m_nPublishedFileId; // The published file id + public AppId_t m_nAppID; // ID of the app that will consume this file. + } + + + //----------------------------------------------------------------------------- + // Purpose: User unsubscribed from a file for the app (from within the app or on the web) + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 22)] + internal struct RemoteStoragePublishedFileUnsubscribed_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 22; + public PublishedFileId_t m_nPublishedFileId; // The published file id + public AppId_t m_nAppID; // ID of the app that will consume this file. + } + + #endif //----------------------------------------------------------------------------- // Purpose: Published file that a user owns was deleted (from within the app or the web) //----------------------------------------------------------------------------- @@ -1976,6 +5883,31 @@ public struct RemoteStoragePublishedFileDeleted_t { public AppId_t m_nAppID; // ID of the app that will consume this file. } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: Published file that a user owns was deleted (from within the app or the web) + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 23)] + internal struct RemoteStoragePublishedFileDeleted_t_LargePack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 23; + public PublishedFileId_t m_nPublishedFileId; // The published file id + public AppId_t m_nAppID; // ID of the app that will consume this file. + } + + + //----------------------------------------------------------------------------- + // Purpose: Published file that a user owns was deleted (from within the app or the web) + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 23)] + internal struct RemoteStoragePublishedFileDeleted_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 23; + public PublishedFileId_t m_nPublishedFileId; // The published file id + public AppId_t m_nAppID; // ID of the app that will consume this file. + } + + #endif //----------------------------------------------------------------------------- // Purpose: The result of a call to UpdateUserPublishedItemVote() //----------------------------------------------------------------------------- @@ -1987,6 +5919,31 @@ public struct RemoteStorageUpdateUserPublishedItemVoteResult_t { public PublishedFileId_t m_nPublishedFileId; // The published file id } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: The result of a call to UpdateUserPublishedItemVote() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 24)] + internal struct RemoteStorageUpdateUserPublishedItemVoteResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 24; + public EResult m_eResult; // The result of the operation. + public PublishedFileId_t m_nPublishedFileId; // The published file id + } + + + //----------------------------------------------------------------------------- + // Purpose: The result of a call to UpdateUserPublishedItemVote() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 24)] + internal struct RemoteStorageUpdateUserPublishedItemVoteResult_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 24; + public EResult m_eResult; // The result of the operation. + public PublishedFileId_t m_nPublishedFileId; // The published file id + } + + #endif //----------------------------------------------------------------------------- // Purpose: The result of a call to GetUserPublishedItemVoteDetails() //----------------------------------------------------------------------------- @@ -1999,6 +5956,33 @@ public struct RemoteStorageUserVoteDetails_t { public EWorkshopVote m_eVote; // what the user voted } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: The result of a call to GetUserPublishedItemVoteDetails() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 25)] + internal struct RemoteStorageUserVoteDetails_t_LargePack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 25; + public EResult m_eResult; // The result of the operation. + public PublishedFileId_t m_nPublishedFileId; // The published file id + public EWorkshopVote m_eVote; // what the user voted + } + + + //----------------------------------------------------------------------------- + // Purpose: The result of a call to GetUserPublishedItemVoteDetails() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 25)] + internal struct RemoteStorageUserVoteDetails_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 25; + public EResult m_eResult; // The result of the operation. + public PublishedFileId_t m_nPublishedFileId; // The published file id + public EWorkshopVote m_eVote; // what the user voted + } + + #endif [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 26)] public struct RemoteStorageEnumerateUserSharedWorkshopFilesResult_t { @@ -2010,18 +5994,94 @@ public struct RemoteStorageEnumerateUserSharedWorkshopFilesResult_t { public PublishedFileId_t[] m_rgPublishedFileId; } - [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] - [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 27)] - public struct RemoteStorageSetUserPublishedFileActionResult_t { - public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 27; - public EResult m_eResult; // The result of the operation. - public PublishedFileId_t m_nPublishedFileId; // The published file id - public EWorkshopFileAction m_eAction; // the action that was attempted - } + #if STEAMWORKS_ANYCPU + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 26)] + internal struct RemoteStorageEnumerateUserSharedWorkshopFilesResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 26; + public EResult m_eResult; // The result of the operation. + public int m_nResultsReturned; + public int m_nTotalResultCount; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_unEnumeratePublishedFilesMaxResults)] + public PublishedFileId_t[] m_rgPublishedFileId; + } + + + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 26)] + internal struct RemoteStorageEnumerateUserSharedWorkshopFilesResult_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 26; + public EResult m_eResult; // The result of the operation. + public int m_nResultsReturned; + public int m_nTotalResultCount; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_unEnumeratePublishedFilesMaxResults)] + public PublishedFileId_t[] m_rgPublishedFileId; + } + + #endif + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 27)] + public struct RemoteStorageSetUserPublishedFileActionResult_t { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 27; + public EResult m_eResult; // The result of the operation. + public PublishedFileId_t m_nPublishedFileId; // The published file id + public EWorkshopFileAction m_eAction; // the action that was attempted + } + + #if STEAMWORKS_ANYCPU + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 27)] + internal struct RemoteStorageSetUserPublishedFileActionResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 27; + public EResult m_eResult; // The result of the operation. + public PublishedFileId_t m_nPublishedFileId; // The published file id + public EWorkshopFileAction m_eAction; // the action that was attempted + } + + + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 27)] + internal struct RemoteStorageSetUserPublishedFileActionResult_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 27; + public EResult m_eResult; // The result of the operation. + public PublishedFileId_t m_nPublishedFileId; // The published file id + public EWorkshopFileAction m_eAction; // the action that was attempted + } + + #endif + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 28)] + public struct RemoteStorageEnumeratePublishedFilesByUserActionResult_t { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 28; + public EResult m_eResult; // The result of the operation. + public EWorkshopFileAction m_eAction; // the action that was filtered on + public int m_nResultsReturned; + public int m_nTotalResultCount; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_unEnumeratePublishedFilesMaxResults)] + public PublishedFileId_t[] m_rgPublishedFileId; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_unEnumeratePublishedFilesMaxResults)] + public uint[] m_rgRTimeUpdated; + } + + #if STEAMWORKS_ANYCPU + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 28)] + internal struct RemoteStorageEnumeratePublishedFilesByUserActionResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 28; + public EResult m_eResult; // The result of the operation. + public EWorkshopFileAction m_eAction; // the action that was filtered on + public int m_nResultsReturned; + public int m_nTotalResultCount; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_unEnumeratePublishedFilesMaxResults)] + public PublishedFileId_t[] m_rgPublishedFileId; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_unEnumeratePublishedFilesMaxResults)] + public uint[] m_rgRTimeUpdated; + } + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 28)] - public struct RemoteStorageEnumeratePublishedFilesByUserActionResult_t { + internal struct RemoteStorageEnumeratePublishedFilesByUserActionResult_t_SmallPack { public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 28; public EResult m_eResult; // The result of the operation. public EWorkshopFileAction m_eAction; // the action that was filtered on @@ -2033,6 +6093,7 @@ public struct RemoteStorageEnumeratePublishedFilesByUserActionResult_t { public uint[] m_rgRTimeUpdated; } + #endif //----------------------------------------------------------------------------- // Purpose: Called periodically while a PublishWorkshopFile is in progress //----------------------------------------------------------------------------- @@ -2045,6 +6106,33 @@ public struct RemoteStoragePublishFileProgress_t { public bool m_bPreview; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: Called periodically while a PublishWorkshopFile is in progress + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 29)] + internal struct RemoteStoragePublishFileProgress_t_LargePack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 29; + public double m_dPercentFile; + [MarshalAs(UnmanagedType.I1)] + public bool m_bPreview; + } + + + //----------------------------------------------------------------------------- + // Purpose: Called periodically while a PublishWorkshopFile is in progress + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 29)] + internal struct RemoteStoragePublishFileProgress_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 29; + public double m_dPercentFile; + [MarshalAs(UnmanagedType.I1)] + public bool m_bPreview; + } + + #endif //----------------------------------------------------------------------------- // Purpose: Called when the content for a published file is updated //----------------------------------------------------------------------------- @@ -2057,6 +6145,33 @@ public struct RemoteStoragePublishedFileUpdated_t { public ulong m_ulUnused; // not used anymore } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: Called when the content for a published file is updated + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 30)] + internal struct RemoteStoragePublishedFileUpdated_t_LargePack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 30; + public PublishedFileId_t m_nPublishedFileId; // The published file id + public AppId_t m_nAppID; // ID of the app that will consume this file. + public ulong m_ulUnused; // not used anymore + } + + + //----------------------------------------------------------------------------- + // Purpose: Called when the content for a published file is updated + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 30)] + internal struct RemoteStoragePublishedFileUpdated_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 30; + public PublishedFileId_t m_nPublishedFileId; // The published file id + public AppId_t m_nAppID; // ID of the app that will consume this file. + public ulong m_ulUnused; // not used anymore + } + + #endif //----------------------------------------------------------------------------- // Purpose: Called when a FileWriteAsync completes //----------------------------------------------------------------------------- @@ -2067,6 +6182,29 @@ public struct RemoteStorageFileWriteAsyncComplete_t { public EResult m_eResult; // result } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: Called when a FileWriteAsync completes + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 31)] + internal struct RemoteStorageFileWriteAsyncComplete_t_LargePack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 31; + public EResult m_eResult; // result + } + + + //----------------------------------------------------------------------------- + // Purpose: Called when a FileWriteAsync completes + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 31)] + internal struct RemoteStorageFileWriteAsyncComplete_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 31; + public EResult m_eResult; // result + } + + #endif //----------------------------------------------------------------------------- // Purpose: Called when a FileReadAsync completes //----------------------------------------------------------------------------- @@ -2080,6 +6218,35 @@ public struct RemoteStorageFileReadAsyncComplete_t { public uint m_cubRead; // amount read - will the <= the amount requested } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: Called when a FileReadAsync completes + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 32)] + internal struct RemoteStorageFileReadAsyncComplete_t_LargePack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 32; + public SteamAPICall_t m_hFileReadAsync; // call handle of the async read which was made + public EResult m_eResult; // result + public uint m_nOffset; // offset in the file this read was at + public uint m_cubRead; // amount read - will the <= the amount requested + } + + + //----------------------------------------------------------------------------- + // Purpose: Called when a FileReadAsync completes + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 32)] + internal struct RemoteStorageFileReadAsyncComplete_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 32; + public SteamAPICall_t m_hFileReadAsync; // call handle of the async read which was made + public EResult m_eResult; // result + public uint m_nOffset; // offset in the file this read was at + public uint m_cubRead; // amount read - will the <= the amount requested + } + + #endif //----------------------------------------------------------------------------- // Purpose: one or more files for this app have changed locally after syncing // to remote session changes @@ -2091,6 +6258,31 @@ public struct RemoteStorageLocalFileChange_t { public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 33; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: one or more files for this app have changed locally after syncing + // to remote session changes + // Note: only posted if this happens DURING the local app session + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 33)] + internal struct RemoteStorageLocalFileChange_t_LargePack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 33; + } + + + //----------------------------------------------------------------------------- + // Purpose: one or more files for this app have changed locally after syncing + // to remote session changes + // Note: only posted if this happens DURING the local app session + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamRemoteStorageCallbacks + 33)] + internal struct RemoteStorageLocalFileChange_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamRemoteStorageCallbacks + 33; + } + + #endif // callbacks //----------------------------------------------------------------------------- // Purpose: Screenshot successfully written or otherwise added to the library @@ -2104,6 +6296,35 @@ public struct ScreenshotReady_t { public EResult m_eResult; } + #if STEAMWORKS_ANYCPU + // callbacks + //----------------------------------------------------------------------------- + // Purpose: Screenshot successfully written or otherwise added to the library + // and can now be tagged + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamScreenshotsCallbacks + 1)] + internal struct ScreenshotReady_t_LargePack { + public const int k_iCallback = Constants.k_iSteamScreenshotsCallbacks + 1; + public ScreenshotHandle m_hLocal; + public EResult m_eResult; + } + + + // callbacks + //----------------------------------------------------------------------------- + // Purpose: Screenshot successfully written or otherwise added to the library + // and can now be tagged + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamScreenshotsCallbacks + 1)] + internal struct ScreenshotReady_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamScreenshotsCallbacks + 1; + public ScreenshotHandle m_hLocal; + public EResult m_eResult; + } + + #endif //----------------------------------------------------------------------------- // Purpose: Screenshot has been requested by the user. Only sent if // HookScreenshots() has been called, in which case Steam will not take @@ -2115,44 +6336,185 @@ public struct ScreenshotRequested_t { public const int k_iCallback = Constants.k_iSteamScreenshotsCallbacks + 2; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: Screenshot has been requested by the user. Only sent if + // HookScreenshots() has been called, in which case Steam will not take + // the screenshot itself. + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamScreenshotsCallbacks + 2)] + internal struct ScreenshotRequested_t_LargePack { + public const int k_iCallback = Constants.k_iSteamScreenshotsCallbacks + 2; + } + + + //----------------------------------------------------------------------------- + // Purpose: Screenshot has been requested by the user. Only sent if + // HookScreenshots() has been called, in which case Steam will not take + // the screenshot itself. + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamScreenshotsCallbacks + 2)] + internal struct ScreenshotRequested_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamScreenshotsCallbacks + 2; + } + + #endif + //----------------------------------------------------------------------------- + // Purpose: Callback for querying UGC + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamTimelineCallbacks + 1)] + public struct SteamTimelineGamePhaseRecordingExists_t { + public const int k_iCallback = Constants.k_iSteamTimelineCallbacks + 1; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchMaxPhaseIDLength)] + internal byte[] m_rgchPhaseID_; + public string m_rgchPhaseID + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchPhaseID_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchPhaseID_, Constants.k_cchMaxPhaseIDLength); } + } + public ulong m_ulRecordingMS; + public ulong m_ulLongestClipMS; + public uint m_unClipCount; + public uint m_unScreenshotCount; + } + + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: Callback for querying UGC + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamTimelineCallbacks + 1)] + internal struct SteamTimelineGamePhaseRecordingExists_t_LargePack { + public const int k_iCallback = Constants.k_iSteamTimelineCallbacks + 1; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchMaxPhaseIDLength)] + internal byte[] m_rgchPhaseID_; + public string m_rgchPhaseID + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchPhaseID_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchPhaseID_, Constants.k_cchMaxPhaseIDLength); } + } + public ulong m_ulRecordingMS; + public ulong m_ulLongestClipMS; + public uint m_unClipCount; + public uint m_unScreenshotCount; + } + + + //----------------------------------------------------------------------------- + // Purpose: Callback for querying UGC + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamTimelineCallbacks + 1)] + internal struct SteamTimelineGamePhaseRecordingExists_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamTimelineCallbacks + 1; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchMaxPhaseIDLength)] + internal byte[] m_rgchPhaseID_; + public string m_rgchPhaseID + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchPhaseID_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchPhaseID_, Constants.k_cchMaxPhaseIDLength); } + } + public ulong m_ulRecordingMS; + public ulong m_ulLongestClipMS; + public uint m_unClipCount; + public uint m_unScreenshotCount; + } + + #endif + //----------------------------------------------------------------------------- + // Purpose: Callback for querying UGC + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamTimelineCallbacks + 2)] + public struct SteamTimelineEventRecordingExists_t { + public const int k_iCallback = Constants.k_iSteamTimelineCallbacks + 2; + public ulong m_ulEventID; + [MarshalAs(UnmanagedType.I1)] + public bool m_bRecordingExists; + } + + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: Callback for querying UGC + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamTimelineCallbacks + 2)] + internal struct SteamTimelineEventRecordingExists_t_LargePack { + public const int k_iCallback = Constants.k_iSteamTimelineCallbacks + 2; + public ulong m_ulEventID; + [MarshalAs(UnmanagedType.I1)] + public bool m_bRecordingExists; + } + + + //----------------------------------------------------------------------------- + // Purpose: Callback for querying UGC + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamTimelineCallbacks + 2)] + internal struct SteamTimelineEventRecordingExists_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamTimelineCallbacks + 2; + public ulong m_ulEventID; + [MarshalAs(UnmanagedType.I1)] + public bool m_bRecordingExists; + } + + #endif //----------------------------------------------------------------------------- // Purpose: Callback for querying UGC //----------------------------------------------------------------------------- [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] - [CallbackIdentity(Constants.k_iSteamTimelineCallbacks + 1)] - public struct SteamTimelineGamePhaseRecordingExists_t { - public const int k_iCallback = Constants.k_iSteamTimelineCallbacks + 1; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchMaxPhaseIDLength)] - private byte[] m_rgchPhaseID_; - public string m_rgchPhaseID + [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 1)] + public struct SteamUGCQueryCompleted_t { + public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 1; + public UGCQueryHandle_t m_handle; + public EResult m_eResult; + public uint m_unNumResultsReturned; + public uint m_unTotalMatchingResults; + [MarshalAs(UnmanagedType.I1)] + public bool m_bCachedData; // indicates whether this data was retrieved from the local on-disk cache + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchPublishedFileURLMax)] + internal byte[] m_rgchNextCursor_; + public string m_rgchNextCursor // If a paging cursor was used, then this will be the next cursor to get the next result set. { - get { return InteropHelp.ByteArrayToStringUTF8(m_rgchPhaseID_); } - set { InteropHelp.StringToByteArrayUTF8(value, m_rgchPhaseID_, Constants.k_cchMaxPhaseIDLength); } + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchNextCursor_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchNextCursor_, Constants.k_cchPublishedFileURLMax); } } - public ulong m_ulRecordingMS; - public ulong m_ulLongestClipMS; - public uint m_unClipCount; - public uint m_unScreenshotCount; } + #if STEAMWORKS_ANYCPU //----------------------------------------------------------------------------- // Purpose: Callback for querying UGC //----------------------------------------------------------------------------- [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] - [CallbackIdentity(Constants.k_iSteamTimelineCallbacks + 2)] - public struct SteamTimelineEventRecordingExists_t { - public const int k_iCallback = Constants.k_iSteamTimelineCallbacks + 2; - public ulong m_ulEventID; + [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 1)] + internal struct SteamUGCQueryCompleted_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 1; + public UGCQueryHandle_t m_handle; + public EResult m_eResult; + public uint m_unNumResultsReturned; + public uint m_unTotalMatchingResults; [MarshalAs(UnmanagedType.I1)] - public bool m_bRecordingExists; + public bool m_bCachedData; // indicates whether this data was retrieved from the local on-disk cache + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchPublishedFileURLMax)] + internal byte[] m_rgchNextCursor_; + public string m_rgchNextCursor // If a paging cursor was used, then this will be the next cursor to get the next result set. + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchNextCursor_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchNextCursor_, Constants.k_cchPublishedFileURLMax); } + } } + //----------------------------------------------------------------------------- // Purpose: Callback for querying UGC //----------------------------------------------------------------------------- [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 1)] - public struct SteamUGCQueryCompleted_t { + internal struct SteamUGCQueryCompleted_t_SmallPack { public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 1; public UGCQueryHandle_t m_handle; public EResult m_eResult; @@ -2161,7 +6523,7 @@ public struct SteamUGCQueryCompleted_t { [MarshalAs(UnmanagedType.I1)] public bool m_bCachedData; // indicates whether this data was retrieved from the local on-disk cache [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchPublishedFileURLMax)] - private byte[] m_rgchNextCursor_; + internal byte[] m_rgchNextCursor_; public string m_rgchNextCursor // If a paging cursor was used, then this will be the next cursor to get the next result set. { get { return InteropHelp.ByteArrayToStringUTF8(m_rgchNextCursor_); } @@ -2169,6 +6531,7 @@ public struct SteamUGCQueryCompleted_t { } } + #endif //----------------------------------------------------------------------------- // Purpose: Callback for requesting details on one piece of UGC //----------------------------------------------------------------------------- @@ -2181,6 +6544,33 @@ public struct SteamUGCRequestUGCDetailsResult_t { public bool m_bCachedData; // indicates whether this data was retrieved from the local on-disk cache } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: Callback for requesting details on one piece of UGC + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 2)] + internal struct SteamUGCRequestUGCDetailsResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 2; + public SteamUGCDetails_t m_details; + [MarshalAs(UnmanagedType.I1)] + public bool m_bCachedData; // indicates whether this data was retrieved from the local on-disk cache + } + + + //----------------------------------------------------------------------------- + // Purpose: Callback for requesting details on one piece of UGC + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 2)] + internal struct SteamUGCRequestUGCDetailsResult_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 2; + public SteamUGCDetails_t m_details; + [MarshalAs(UnmanagedType.I1)] + public bool m_bCachedData; // indicates whether this data was retrieved from the local on-disk cache + } + + #endif //----------------------------------------------------------------------------- // Purpose: result for ISteamUGC::CreateItem() //----------------------------------------------------------------------------- @@ -2194,6 +6584,35 @@ public struct CreateItemResult_t { public bool m_bUserNeedsToAcceptWorkshopLegalAgreement; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: result for ISteamUGC::CreateItem() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 3)] + internal struct CreateItemResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 3; + public EResult m_eResult; + public PublishedFileId_t m_nPublishedFileId; // new item got this UGC PublishFileID + [MarshalAs(UnmanagedType.I1)] + public bool m_bUserNeedsToAcceptWorkshopLegalAgreement; + } + + + //----------------------------------------------------------------------------- + // Purpose: result for ISteamUGC::CreateItem() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 3)] + internal struct CreateItemResult_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 3; + public EResult m_eResult; + public PublishedFileId_t m_nPublishedFileId; // new item got this UGC PublishFileID + [MarshalAs(UnmanagedType.I1)] + public bool m_bUserNeedsToAcceptWorkshopLegalAgreement; + } + + #endif //----------------------------------------------------------------------------- // Purpose: result for ISteamUGC::SubmitItemUpdate() //----------------------------------------------------------------------------- @@ -2207,6 +6626,35 @@ public struct SubmitItemUpdateResult_t { public PublishedFileId_t m_nPublishedFileId; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: result for ISteamUGC::SubmitItemUpdate() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 4)] + internal struct SubmitItemUpdateResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 4; + public EResult m_eResult; + [MarshalAs(UnmanagedType.I1)] + public bool m_bUserNeedsToAcceptWorkshopLegalAgreement; + public PublishedFileId_t m_nPublishedFileId; + } + + + //----------------------------------------------------------------------------- + // Purpose: result for ISteamUGC::SubmitItemUpdate() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 4)] + internal struct SubmitItemUpdateResult_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 4; + public EResult m_eResult; + [MarshalAs(UnmanagedType.I1)] + public bool m_bUserNeedsToAcceptWorkshopLegalAgreement; + public PublishedFileId_t m_nPublishedFileId; + } + + #endif //----------------------------------------------------------------------------- // Purpose: a Workshop item has been installed or updated //----------------------------------------------------------------------------- @@ -2220,6 +6668,35 @@ public struct ItemInstalled_t { public ulong m_unManifestID; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: a Workshop item has been installed or updated + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 5)] + internal struct ItemInstalled_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 5; + public AppId_t m_unAppID; + public PublishedFileId_t m_nPublishedFileId; + public UGCHandle_t m_hLegacyContent; + public ulong m_unManifestID; + } + + + //----------------------------------------------------------------------------- + // Purpose: a Workshop item has been installed or updated + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 5)] + internal struct ItemInstalled_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 5; + public AppId_t m_unAppID; + public PublishedFileId_t m_nPublishedFileId; + public UGCHandle_t m_hLegacyContent; + public ulong m_unManifestID; + } + + #endif //----------------------------------------------------------------------------- // Purpose: result of DownloadItem(), existing item files can be accessed again //----------------------------------------------------------------------------- @@ -2232,6 +6709,33 @@ public struct DownloadItemResult_t { public EResult m_eResult; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: result of DownloadItem(), existing item files can be accessed again + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 6)] + internal struct DownloadItemResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 6; + public AppId_t m_unAppID; + public PublishedFileId_t m_nPublishedFileId; + public EResult m_eResult; + } + + + //----------------------------------------------------------------------------- + // Purpose: result of DownloadItem(), existing item files can be accessed again + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 6)] + internal struct DownloadItemResult_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 6; + public AppId_t m_unAppID; + public PublishedFileId_t m_nPublishedFileId; + public EResult m_eResult; + } + + #endif //----------------------------------------------------------------------------- // Purpose: result of AddItemToFavorites() or RemoveItemFromFavorites() //----------------------------------------------------------------------------- @@ -2245,6 +6749,35 @@ public struct UserFavoriteItemsListChanged_t { public bool m_bWasAddRequest; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: result of AddItemToFavorites() or RemoveItemFromFavorites() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 7)] + internal struct UserFavoriteItemsListChanged_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 7; + public PublishedFileId_t m_nPublishedFileId; + public EResult m_eResult; + [MarshalAs(UnmanagedType.I1)] + public bool m_bWasAddRequest; + } + + + //----------------------------------------------------------------------------- + // Purpose: result of AddItemToFavorites() or RemoveItemFromFavorites() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 7)] + internal struct UserFavoriteItemsListChanged_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 7; + public PublishedFileId_t m_nPublishedFileId; + public EResult m_eResult; + [MarshalAs(UnmanagedType.I1)] + public bool m_bWasAddRequest; + } + + #endif //----------------------------------------------------------------------------- // Purpose: The result of a call to SetUserItemVote() //----------------------------------------------------------------------------- @@ -2258,12 +6791,77 @@ public struct SetUserItemVoteResult_t { public bool m_bVoteUp; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: The result of a call to SetUserItemVote() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 8)] + internal struct SetUserItemVoteResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 8; + public PublishedFileId_t m_nPublishedFileId; + public EResult m_eResult; + [MarshalAs(UnmanagedType.I1)] + public bool m_bVoteUp; + } + + + //----------------------------------------------------------------------------- + // Purpose: The result of a call to SetUserItemVote() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 8)] + internal struct SetUserItemVoteResult_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 8; + public PublishedFileId_t m_nPublishedFileId; + public EResult m_eResult; + [MarshalAs(UnmanagedType.I1)] + public bool m_bVoteUp; + } + + #endif + //----------------------------------------------------------------------------- + // Purpose: The result of a call to GetUserItemVote() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 9)] + public struct GetUserItemVoteResult_t { + public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 9; + 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; + } + + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: The result of a call to GetUserItemVote() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 9)] + internal struct GetUserItemVoteResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 9; + 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; + } + + //----------------------------------------------------------------------------- // Purpose: The result of a call to GetUserItemVote() //----------------------------------------------------------------------------- [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 9)] - public struct GetUserItemVoteResult_t { + internal struct GetUserItemVoteResult_t_SmallPack { public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 9; public PublishedFileId_t m_nPublishedFileId; public EResult m_eResult; @@ -2275,6 +6873,7 @@ public struct GetUserItemVoteResult_t { public bool m_bVoteSkipped; } + #endif //----------------------------------------------------------------------------- // Purpose: The result of a call to StartPlaytimeTracking() //----------------------------------------------------------------------------- @@ -2285,6 +6884,29 @@ public struct StartPlaytimeTrackingResult_t { public EResult m_eResult; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: The result of a call to StartPlaytimeTracking() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 10)] + internal struct StartPlaytimeTrackingResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 10; + public EResult m_eResult; + } + + + //----------------------------------------------------------------------------- + // Purpose: The result of a call to StartPlaytimeTracking() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 10)] + internal struct StartPlaytimeTrackingResult_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 10; + public EResult m_eResult; + } + + #endif //----------------------------------------------------------------------------- // Purpose: The result of a call to StopPlaytimeTracking() //----------------------------------------------------------------------------- @@ -2295,6 +6917,29 @@ public struct StopPlaytimeTrackingResult_t { public EResult m_eResult; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: The result of a call to StopPlaytimeTracking() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 11)] + internal struct StopPlaytimeTrackingResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 11; + public EResult m_eResult; + } + + + //----------------------------------------------------------------------------- + // Purpose: The result of a call to StopPlaytimeTracking() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 11)] + internal struct StopPlaytimeTrackingResult_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 11; + public EResult m_eResult; + } + + #endif //----------------------------------------------------------------------------- // Purpose: The result of a call to AddDependency //----------------------------------------------------------------------------- @@ -2307,6 +6952,33 @@ public struct AddUGCDependencyResult_t { public PublishedFileId_t m_nChildPublishedFileId; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: The result of a call to AddDependency + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 12)] + internal struct AddUGCDependencyResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 12; + public EResult m_eResult; + public PublishedFileId_t m_nPublishedFileId; + public PublishedFileId_t m_nChildPublishedFileId; + } + + + //----------------------------------------------------------------------------- + // Purpose: The result of a call to AddDependency + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 12)] + internal struct AddUGCDependencyResult_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 12; + public EResult m_eResult; + public PublishedFileId_t m_nPublishedFileId; + public PublishedFileId_t m_nChildPublishedFileId; + } + + #endif //----------------------------------------------------------------------------- // Purpose: The result of a call to RemoveDependency //----------------------------------------------------------------------------- @@ -2319,6 +6991,33 @@ public struct RemoveUGCDependencyResult_t { public PublishedFileId_t m_nChildPublishedFileId; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: The result of a call to RemoveDependency + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 13)] + internal struct RemoveUGCDependencyResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 13; + public EResult m_eResult; + public PublishedFileId_t m_nPublishedFileId; + public PublishedFileId_t m_nChildPublishedFileId; + } + + + //----------------------------------------------------------------------------- + // Purpose: The result of a call to RemoveDependency + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 13)] + internal struct RemoveUGCDependencyResult_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 13; + public EResult m_eResult; + public PublishedFileId_t m_nPublishedFileId; + public PublishedFileId_t m_nChildPublishedFileId; + } + + #endif //----------------------------------------------------------------------------- // Purpose: The result of a call to AddAppDependency //----------------------------------------------------------------------------- @@ -2331,6 +7030,33 @@ public struct AddAppDependencyResult_t { public AppId_t m_nAppID; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: The result of a call to AddAppDependency + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 14)] + internal struct AddAppDependencyResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 14; + public EResult m_eResult; + public PublishedFileId_t m_nPublishedFileId; + public AppId_t m_nAppID; + } + + + //----------------------------------------------------------------------------- + // Purpose: The result of a call to AddAppDependency + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 14)] + internal struct AddAppDependencyResult_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 14; + public EResult m_eResult; + public PublishedFileId_t m_nPublishedFileId; + public AppId_t m_nAppID; + } + + #endif //----------------------------------------------------------------------------- // Purpose: The result of a call to RemoveAppDependency //----------------------------------------------------------------------------- @@ -2343,6 +7069,33 @@ public struct RemoveAppDependencyResult_t { public AppId_t m_nAppID; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: The result of a call to RemoveAppDependency + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 15)] + internal struct RemoveAppDependencyResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 15; + public EResult m_eResult; + public PublishedFileId_t m_nPublishedFileId; + public AppId_t m_nAppID; + } + + + //----------------------------------------------------------------------------- + // Purpose: The result of a call to RemoveAppDependency + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 15)] + internal struct RemoveAppDependencyResult_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 15; + public EResult m_eResult; + public PublishedFileId_t m_nPublishedFileId; + public AppId_t m_nAppID; + } + + #endif //----------------------------------------------------------------------------- // Purpose: The result of a call to GetAppDependencies. Callback may be called // multiple times until all app dependencies have been returned. @@ -2359,6 +7112,41 @@ public struct GetAppDependenciesResult_t { public uint m_nTotalNumAppDependencies; // total found } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: The result of a call to GetAppDependencies. Callback may be called + // multiple times until all app dependencies have been returned. + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 16)] + internal struct GetAppDependenciesResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 16; + public EResult m_eResult; + public PublishedFileId_t m_nPublishedFileId; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] + public AppId_t[] m_rgAppIDs; + public uint m_nNumAppDependencies; // number returned in this struct + public uint m_nTotalNumAppDependencies; // total found + } + + + //----------------------------------------------------------------------------- + // Purpose: The result of a call to GetAppDependencies. Callback may be called + // multiple times until all app dependencies have been returned. + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 16)] + internal struct GetAppDependenciesResult_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 16; + public EResult m_eResult; + public PublishedFileId_t m_nPublishedFileId; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] + public AppId_t[] m_rgAppIDs; + public uint m_nNumAppDependencies; // number returned in this struct + public uint m_nTotalNumAppDependencies; // total found + } + + #endif //----------------------------------------------------------------------------- // Purpose: The result of a call to DeleteItem //----------------------------------------------------------------------------- @@ -2370,6 +7158,31 @@ public struct DeleteItemResult_t { public PublishedFileId_t m_nPublishedFileId; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: The result of a call to DeleteItem + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 17)] + internal struct DeleteItemResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 17; + public EResult m_eResult; + public PublishedFileId_t m_nPublishedFileId; + } + + + //----------------------------------------------------------------------------- + // Purpose: The result of a call to DeleteItem + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 17)] + internal struct DeleteItemResult_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 17; + public EResult m_eResult; + public PublishedFileId_t m_nPublishedFileId; + } + + #endif //----------------------------------------------------------------------------- // Purpose: signal that the list of subscribed items changed //----------------------------------------------------------------------------- @@ -2380,6 +7193,29 @@ public struct UserSubscribedItemsListChanged_t { public AppId_t m_nAppID; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: signal that the list of subscribed items changed + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 18)] + internal struct UserSubscribedItemsListChanged_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 18; + public AppId_t m_nAppID; + } + + + //----------------------------------------------------------------------------- + // Purpose: signal that the list of subscribed items changed + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 18)] + internal struct UserSubscribedItemsListChanged_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 18; + public AppId_t m_nAppID; + } + + #endif //----------------------------------------------------------------------------- // Purpose: Status of the user's acceptable/rejection of the app's specific Workshop EULA //----------------------------------------------------------------------------- @@ -2397,6 +7233,73 @@ public struct WorkshopEULAStatus_t { public bool m_bNeedsAction; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: Status of the user's acceptable/rejection of the app's specific Workshop EULA + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 20)] + internal struct WorkshopEULAStatus_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 20; + public EResult m_eResult; + public AppId_t m_nAppID; + public uint m_unVersion; + public RTime32 m_rtAction; + [MarshalAs(UnmanagedType.I1)] + public bool m_bAccepted; + [MarshalAs(UnmanagedType.I1)] + public bool m_bNeedsAction; + } + + + //----------------------------------------------------------------------------- + // Purpose: Status of the user's acceptable/rejection of the app's specific Workshop EULA + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUGCCallbacks + 20)] + internal struct WorkshopEULAStatus_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUGCCallbacks + 20; + public EResult m_eResult; + public AppId_t m_nAppID; + public uint m_unVersion; + public RTime32 m_rtAction; + [MarshalAs(UnmanagedType.I1)] + public bool m_bAccepted; + [MarshalAs(UnmanagedType.I1)] + public bool m_bNeedsAction; + } + + #endif + // callbacks + //----------------------------------------------------------------------------- + // Purpose: Called when an authenticated connection to the Steam back-end has been established. + // This means the Steam client now has a working connection to the Steam servers. + // Usually this will have occurred before the game has launched, and should + // only be seen if the user has dropped connection due to a networking issue + // or a Steam server update. + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamUserCallbacks + 1)] + public struct SteamServersConnected_t { + public const int k_iCallback = Constants.k_iSteamUserCallbacks + 1; + } + + #if STEAMWORKS_ANYCPU + // callbacks + //----------------------------------------------------------------------------- + // Purpose: Called when an authenticated connection to the Steam back-end has been established. + // This means the Steam client now has a working connection to the Steam servers. + // Usually this will have occurred before the game has launched, and should + // only be seen if the user has dropped connection due to a networking issue + // or a Steam server update. + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamUserCallbacks + 1)] + internal struct SteamServersConnected_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUserCallbacks + 1; + } + + // callbacks //----------------------------------------------------------------------------- // Purpose: Called when an authenticated connection to the Steam back-end has been established. @@ -2407,10 +7310,11 @@ public struct WorkshopEULAStatus_t { //----------------------------------------------------------------------------- [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] [CallbackIdentity(Constants.k_iSteamUserCallbacks + 1)] - public struct SteamServersConnected_t { + internal struct SteamServersConnected_t_SmallPack { public const int k_iCallback = Constants.k_iSteamUserCallbacks + 1; } + #endif //----------------------------------------------------------------------------- // Purpose: called when a connection attempt has failed // this will occur periodically if the Steam client is not connected, @@ -2425,6 +7329,37 @@ public struct SteamServerConnectFailure_t { public bool m_bStillRetrying; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: called when a connection attempt has failed + // this will occur periodically if the Steam client is not connected, + // and has failed in it's retry to establish a connection + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserCallbacks + 2)] + internal struct SteamServerConnectFailure_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUserCallbacks + 2; + public EResult m_eResult; + [MarshalAs(UnmanagedType.I1)] + public bool m_bStillRetrying; + } + + + //----------------------------------------------------------------------------- + // Purpose: called when a connection attempt has failed + // this will occur periodically if the Steam client is not connected, + // and has failed in it's retry to establish a connection + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserCallbacks + 2)] + internal struct SteamServerConnectFailure_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUserCallbacks + 2; + public EResult m_eResult; + [MarshalAs(UnmanagedType.I1)] + public bool m_bStillRetrying; + } + + #endif //----------------------------------------------------------------------------- // Purpose: called if the client has lost connection to the Steam servers // real-time services will be disabled until a matching SteamServersConnected_t has been posted @@ -2436,6 +7371,31 @@ public struct SteamServersDisconnected_t { public EResult m_eResult; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: called if the client has lost connection to the Steam servers + // real-time services will be disabled until a matching SteamServersConnected_t has been posted + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserCallbacks + 3)] + internal struct SteamServersDisconnected_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUserCallbacks + 3; + public EResult m_eResult; + } + + + //----------------------------------------------------------------------------- + // Purpose: called if the client has lost connection to the Steam servers + // real-time services will be disabled until a matching SteamServersConnected_t has been posted + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserCallbacks + 3)] + internal struct SteamServersDisconnected_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUserCallbacks + 3; + public EResult m_eResult; + } + + #endif //----------------------------------------------------------------------------- // Purpose: Sent by the Steam server to the client telling it to disconnect from the specified game server, // which it may be in the process of or already connected to. @@ -2454,6 +7414,45 @@ public struct ClientGameServerDeny_t { public uint m_uReason; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: Sent by the Steam server to the client telling it to disconnect from the specified game server, + // which it may be in the process of or already connected to. + // The game client should immediately disconnect upon receiving this message. + // This can usually occur if the user doesn't have rights to play on the game server. + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserCallbacks + 13)] + internal struct ClientGameServerDeny_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUserCallbacks + 13; + + public uint m_uAppID; + public uint m_unGameServerIP; + public ushort m_usGameServerPort; + public ushort m_bSecure; + public uint m_uReason; + } + + + //----------------------------------------------------------------------------- + // Purpose: Sent by the Steam server to the client telling it to disconnect from the specified game server, + // which it may be in the process of or already connected to. + // The game client should immediately disconnect upon receiving this message. + // This can usually occur if the user doesn't have rights to play on the game server. + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserCallbacks + 13)] + internal struct ClientGameServerDeny_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUserCallbacks + 13; + + public uint m_uAppID; + public uint m_unGameServerIP; + public ushort m_usGameServerPort; + public ushort m_bSecure; + public uint m_uReason; + } + + #endif //----------------------------------------------------------------------------- // Purpose: called when the callback system for this client is in an error state (and has flushed pending callbacks) // When getting this message the client should disconnect from Steam, reset any stored Steam state and reconnect. @@ -2466,6 +7465,33 @@ public struct IPCFailure_t { public byte m_eFailureType; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: called when the callback system for this client is in an error state (and has flushed pending callbacks) + // When getting this message the client should disconnect from Steam, reset any stored Steam state and reconnect. + // This usually occurs in the rare event the Steam client has some kind of fatal error. + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserCallbacks + 17)] + internal struct IPCFailure_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUserCallbacks + 17; + public byte m_eFailureType; + } + + + //----------------------------------------------------------------------------- + // Purpose: called when the callback system for this client is in an error state (and has flushed pending callbacks) + // When getting this message the client should disconnect from Steam, reset any stored Steam state and reconnect. + // This usually occurs in the rare event the Steam client has some kind of fatal error. + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserCallbacks + 17)] + internal struct IPCFailure_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUserCallbacks + 17; + public byte m_eFailureType; + } + + #endif //----------------------------------------------------------------------------- // Purpose: Signaled whenever licenses change //----------------------------------------------------------------------------- @@ -2475,6 +7501,27 @@ public struct LicensesUpdated_t { public const int k_iCallback = Constants.k_iSteamUserCallbacks + 25; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: Signaled whenever licenses change + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamUserCallbacks + 25)] + internal struct LicensesUpdated_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUserCallbacks + 25; + } + + + //----------------------------------------------------------------------------- + // Purpose: Signaled whenever licenses change + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamUserCallbacks + 25)] + internal struct LicensesUpdated_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUserCallbacks + 25; + } + + #endif //----------------------------------------------------------------------------- // callback for BeginAuthSession //----------------------------------------------------------------------------- @@ -2500,6 +7547,35 @@ public struct MicroTxnAuthorizationResponse_t { public byte m_bAuthorized; // if user authorized transaction } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: called when a user has responded to a microtransaction authorization request + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserCallbacks + 52)] + internal struct MicroTxnAuthorizationResponse_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUserCallbacks + 52; + + public uint m_unAppID; // AppID for this microtransaction + public ulong m_ulOrderID; // OrderID provided for the microtransaction + public byte m_bAuthorized; // if user authorized transaction + } + + + //----------------------------------------------------------------------------- + // Purpose: called when a user has responded to a microtransaction authorization request + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserCallbacks + 52)] + internal struct MicroTxnAuthorizationResponse_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUserCallbacks + 52; + + public uint m_unAppID; // AppID for this microtransaction + public ulong m_ulOrderID; // OrderID provided for the microtransaction + public byte m_bAuthorized; // if user authorized transaction + } + + #endif //----------------------------------------------------------------------------- // Purpose: Result from RequestEncryptedAppTicket //----------------------------------------------------------------------------- @@ -2511,6 +7587,31 @@ public struct EncryptedAppTicketResponse_t { public EResult m_eResult; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: Result from RequestEncryptedAppTicket + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserCallbacks + 54)] + internal struct EncryptedAppTicketResponse_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUserCallbacks + 54; + + public EResult m_eResult; + } + + + //----------------------------------------------------------------------------- + // Purpose: Result from RequestEncryptedAppTicket + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserCallbacks + 54)] + internal struct EncryptedAppTicketResponse_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUserCallbacks + 54; + + public EResult m_eResult; + } + + #endif //----------------------------------------------------------------------------- // callback for GetAuthSessionTicket //----------------------------------------------------------------------------- @@ -2522,6 +7623,31 @@ public struct GetAuthSessionTicketResponse_t { public EResult m_eResult; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // callback for GetAuthSessionTicket + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserCallbacks + 63)] + internal struct GetAuthSessionTicketResponse_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUserCallbacks + 63; + public HAuthTicket m_hAuthTicket; + public EResult m_eResult; + } + + + //----------------------------------------------------------------------------- + // callback for GetAuthSessionTicket + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserCallbacks + 63)] + internal struct GetAuthSessionTicketResponse_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUserCallbacks + 63; + public HAuthTicket m_hAuthTicket; + public EResult m_eResult; + } + + #endif //----------------------------------------------------------------------------- // Purpose: sent to your game in response to a steam://gamewebcallback/ command //----------------------------------------------------------------------------- @@ -2530,23 +7656,92 @@ public struct GetAuthSessionTicketResponse_t { public struct GameWebCallback_t { public const int k_iCallback = Constants.k_iSteamUserCallbacks + 64; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] - private byte[] m_szURL_; + internal byte[] m_szURL_; + public string m_szURL + { + get { return InteropHelp.ByteArrayToStringUTF8(m_szURL_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_szURL_, 256); } + } + } + + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: sent to your game in response to a steam://gamewebcallback/ command + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserCallbacks + 64)] + internal struct GameWebCallback_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUserCallbacks + 64; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] + internal byte[] m_szURL_; + public string m_szURL + { + get { return InteropHelp.ByteArrayToStringUTF8(m_szURL_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_szURL_, 256); } + } + } + + + //----------------------------------------------------------------------------- + // Purpose: sent to your game in response to a steam://gamewebcallback/ command + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserCallbacks + 64)] + internal struct GameWebCallback_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUserCallbacks + 64; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] + internal byte[] m_szURL_; + public string m_szURL + { + get { return InteropHelp.ByteArrayToStringUTF8(m_szURL_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_szURL_, 256); } + } + } + + #endif + //----------------------------------------------------------------------------- + // Purpose: sent to your game in response to ISteamUser::RequestStoreAuthURL + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserCallbacks + 65)] + public struct StoreAuthURLResponse_t { + public const int k_iCallback = Constants.k_iSteamUserCallbacks + 65; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 512)] + internal byte[] m_szURL_; + public string m_szURL + { + get { return InteropHelp.ByteArrayToStringUTF8(m_szURL_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_szURL_, 512); } + } + } + + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: sent to your game in response to ISteamUser::RequestStoreAuthURL + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserCallbacks + 65)] + internal struct StoreAuthURLResponse_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUserCallbacks + 65; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 512)] + internal byte[] m_szURL_; public string m_szURL { get { return InteropHelp.ByteArrayToStringUTF8(m_szURL_); } - set { InteropHelp.StringToByteArrayUTF8(value, m_szURL_, 256); } + set { InteropHelp.StringToByteArrayUTF8(value, m_szURL_, 512); } } } + //----------------------------------------------------------------------------- // Purpose: sent to your game in response to ISteamUser::RequestStoreAuthURL //----------------------------------------------------------------------------- [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamUserCallbacks + 65)] - public struct StoreAuthURLResponse_t { + internal struct StoreAuthURLResponse_t_SmallPack { public const int k_iCallback = Constants.k_iSteamUserCallbacks + 65; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 512)] - private byte[] m_szURL_; + internal byte[] m_szURL_; public string m_szURL { get { return InteropHelp.ByteArrayToStringUTF8(m_szURL_); } @@ -2554,6 +7749,7 @@ public string m_szURL } } + #endif //----------------------------------------------------------------------------- // Purpose: sent in response to ISteamUser::GetMarketEligibility //----------------------------------------------------------------------------- @@ -2570,6 +7766,41 @@ public struct MarketEligibilityResponse_t { public int m_cdayNewDeviceCooldown; // The number of days after initial device authorization a user must wait before using the market on that device } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: sent in response to ISteamUser::GetMarketEligibility + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserCallbacks + 66)] + internal struct MarketEligibilityResponse_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUserCallbacks + 66; + [MarshalAs(UnmanagedType.I1)] + public bool m_bAllowed; + public EMarketNotAllowedReasonFlags m_eNotAllowedReason; + public RTime32 m_rtAllowedAtTime; + + public int m_cdaySteamGuardRequiredDays; // The number of days any user is required to have had Steam Guard before they can use the market + public int m_cdayNewDeviceCooldown; // The number of days after initial device authorization a user must wait before using the market on that device + } + + + //----------------------------------------------------------------------------- + // Purpose: sent in response to ISteamUser::GetMarketEligibility + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserCallbacks + 66)] + internal struct MarketEligibilityResponse_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUserCallbacks + 66; + [MarshalAs(UnmanagedType.I1)] + public bool m_bAllowed; + public EMarketNotAllowedReasonFlags m_eNotAllowedReason; + public RTime32 m_rtAllowedAtTime; + + public int m_cdaySteamGuardRequiredDays; // The number of days any user is required to have had Steam Guard before they can use the market + public int m_cdayNewDeviceCooldown; // The number of days after initial device authorization a user must wait before using the market on that device + } + + #endif //----------------------------------------------------------------------------- // Purpose: sent for games with enabled anti indulgence / duration control, for // enabled users. Lets the game know whether the user can keep playing or @@ -2597,6 +7828,63 @@ public struct DurationControl_t { public int m_csecsRemaining; // playtime remaining until the user hits a regulatory limit } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: sent for games with enabled anti indulgence / duration control, for + // enabled users. Lets the game know whether the user can keep playing or + // whether the game should exit, and returns info about remaining gameplay time. + // + // This callback is fired asynchronously in response to timers triggering. + // It is also fired in response to calls to GetDurationControl(). + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserCallbacks + 67)] + internal struct DurationControl_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUserCallbacks + 67; + + public EResult m_eResult; // result of call (always k_EResultOK for asynchronous timer-based notifications) + public AppId_t m_appid; // appid generating playtime + + [MarshalAs(UnmanagedType.I1)] + public bool m_bApplicable; // is duration control applicable to user + game combination + public int m_csecsLast5h; // playtime since most recent 5 hour gap in playtime, only counting up to regulatory limit of playtime, in seconds + + public EDurationControlProgress m_progress; // recommended progress (either everything is fine, or please exit game) + public EDurationControlNotification m_notification; // notification to show, if any (always k_EDurationControlNotification_None for API calls) + + public int m_csecsToday; // playtime on current calendar day + public int m_csecsRemaining; // playtime remaining until the user hits a regulatory limit + } + + + //----------------------------------------------------------------------------- + // Purpose: sent for games with enabled anti indulgence / duration control, for + // enabled users. Lets the game know whether the user can keep playing or + // whether the game should exit, and returns info about remaining gameplay time. + // + // This callback is fired asynchronously in response to timers triggering. + // It is also fired in response to calls to GetDurationControl(). + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserCallbacks + 67)] + internal struct DurationControl_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUserCallbacks + 67; + + public EResult m_eResult; // result of call (always k_EResultOK for asynchronous timer-based notifications) + public AppId_t m_appid; // appid generating playtime + + [MarshalAs(UnmanagedType.I1)] + public bool m_bApplicable; // is duration control applicable to user + game combination + public int m_csecsLast5h; // playtime since most recent 5 hour gap in playtime, only counting up to regulatory limit of playtime, in seconds + + public EDurationControlProgress m_progress; // recommended progress (either everything is fine, or please exit game) + public EDurationControlNotification m_notification; // notification to show, if any (always k_EDurationControlNotification_None for API calls) + + public int m_csecsToday; // playtime on current calendar day + public int m_csecsRemaining; // playtime remaining until the user hits a regulatory limit + } + + #endif //----------------------------------------------------------------------------- // callback for GetTicketForWebApi //----------------------------------------------------------------------------- @@ -2611,6 +7899,37 @@ public struct GetTicketForWebApiResponse_t { public byte[] m_rgubTicket; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // callback for GetTicketForWebApi + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserCallbacks + 68)] + internal struct GetTicketForWebApiResponse_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUserCallbacks + 68; + public HAuthTicket m_hAuthTicket; + public EResult m_eResult; + public int m_cubTicket; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_nCubTicketMaxLength)] + public byte[] m_rgubTicket; + } + + + //----------------------------------------------------------------------------- + // callback for GetTicketForWebApi + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserCallbacks + 68)] + internal struct GetTicketForWebApiResponse_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUserCallbacks + 68; + public HAuthTicket m_hAuthTicket; + public EResult m_eResult; + public int m_cubTicket; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_nCubTicketMaxLength)] + public byte[] m_rgubTicket; + } + + #endif // callbacks //----------------------------------------------------------------------------- // Purpose: called when the latests stats and achievements have been received @@ -2639,6 +7958,31 @@ public struct UserStatsStored_t { public EResult m_eResult; // success / error } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: result of a request to store the user stats for a game + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserStatsCallbacks + 2)] + internal struct UserStatsStored_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUserStatsCallbacks + 2; + public ulong m_nGameID; // Game these stats are for + public EResult m_eResult; // success / error + } + + + //----------------------------------------------------------------------------- + // Purpose: result of a request to store the user stats for a game + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserStatsCallbacks + 2)] + internal struct UserStatsStored_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUserStatsCallbacks + 2; + public ulong m_nGameID; // Game these stats are for + public EResult m_eResult; // success / error + } + + #endif //----------------------------------------------------------------------------- // Purpose: result of a request to store the achievements for a game, or an // "indicate progress" call. If both m_nCurProgress and m_nMaxProgress @@ -2653,7 +7997,57 @@ public struct UserAchievementStored_t { [MarshalAs(UnmanagedType.I1)] public bool m_bGroupAchievement; // if this is a "group" achievement [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchStatNameMax)] - private byte[] m_rgchAchievementName_; + internal byte[] m_rgchAchievementName_; + public string m_rgchAchievementName // name of the achievement + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchAchievementName_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchAchievementName_, Constants.k_cchStatNameMax); } + } + public uint m_nCurProgress; // current progress towards the achievement + public uint m_nMaxProgress; // "out of" this many + } + + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: result of a request to store the achievements for a game, or an + // "indicate progress" call. If both m_nCurProgress and m_nMaxProgress + // are zero, that means the achievement has been fully unlocked. + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserStatsCallbacks + 3)] + internal struct UserAchievementStored_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUserStatsCallbacks + 3; + + public ulong m_nGameID; // Game this is for + [MarshalAs(UnmanagedType.I1)] + public bool m_bGroupAchievement; // if this is a "group" achievement + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchStatNameMax)] + internal byte[] m_rgchAchievementName_; + public string m_rgchAchievementName // name of the achievement + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchAchievementName_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchAchievementName_, Constants.k_cchStatNameMax); } + } + public uint m_nCurProgress; // current progress towards the achievement + public uint m_nMaxProgress; // "out of" this many + } + + + //----------------------------------------------------------------------------- + // Purpose: result of a request to store the achievements for a game, or an + // "indicate progress" call. If both m_nCurProgress and m_nMaxProgress + // are zero, that means the achievement has been fully unlocked. + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserStatsCallbacks + 3)] + internal struct UserAchievementStored_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUserStatsCallbacks + 3; + + public ulong m_nGameID; // Game this is for + [MarshalAs(UnmanagedType.I1)] + public bool m_bGroupAchievement; // if this is a "group" achievement + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchStatNameMax)] + internal byte[] m_rgchAchievementName_; public string m_rgchAchievementName // name of the achievement { get { return InteropHelp.ByteArrayToStringUTF8(m_rgchAchievementName_); } @@ -2663,6 +8057,7 @@ public string m_rgchAchievementName // name of the achievement public uint m_nMaxProgress; // "out of" this many } + #endif //----------------------------------------------------------------------------- // Purpose: call result for finding a leaderboard, returned as a result of FindOrCreateLeaderboard() or FindLeaderboard() // use CCallResult<> to map this async result to a member function @@ -2675,6 +8070,33 @@ public struct LeaderboardFindResult_t { public byte m_bLeaderboardFound; // 0 if no leaderboard found } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: call result for finding a leaderboard, returned as a result of FindOrCreateLeaderboard() or FindLeaderboard() + // use CCallResult<> to map this async result to a member function + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserStatsCallbacks + 4)] + internal struct LeaderboardFindResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUserStatsCallbacks + 4; + public SteamLeaderboard_t m_hSteamLeaderboard; // handle to the leaderboard serarched for, 0 if no leaderboard found + public byte m_bLeaderboardFound; // 0 if no leaderboard found + } + + + //----------------------------------------------------------------------------- + // Purpose: call result for finding a leaderboard, returned as a result of FindOrCreateLeaderboard() or FindLeaderboard() + // use CCallResult<> to map this async result to a member function + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserStatsCallbacks + 4)] + internal struct LeaderboardFindResult_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUserStatsCallbacks + 4; + public SteamLeaderboard_t m_hSteamLeaderboard; // handle to the leaderboard serarched for, 0 if no leaderboard found + public byte m_bLeaderboardFound; // 0 if no leaderboard found + } + + #endif //----------------------------------------------------------------------------- // Purpose: call result indicating scores for a leaderboard have been downloaded and are ready to be retrieved, returned as a result of DownloadLeaderboardEntries() // use CCallResult<> to map this async result to a member function @@ -2688,13 +8110,76 @@ public struct LeaderboardScoresDownloaded_t { public int m_cEntryCount; // the number of entries downloaded } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: call result indicating scores for a leaderboard have been downloaded and are ready to be retrieved, returned as a result of DownloadLeaderboardEntries() + // use CCallResult<> to map this async result to a member function + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserStatsCallbacks + 5)] + internal struct LeaderboardScoresDownloaded_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUserStatsCallbacks + 5; + public SteamLeaderboard_t m_hSteamLeaderboard; + public SteamLeaderboardEntries_t m_hSteamLeaderboardEntries; // the handle to pass into GetDownloadedLeaderboardEntries() + public int m_cEntryCount; // the number of entries downloaded + } + + + //----------------------------------------------------------------------------- + // Purpose: call result indicating scores for a leaderboard have been downloaded and are ready to be retrieved, returned as a result of DownloadLeaderboardEntries() + // use CCallResult<> to map this async result to a member function + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserStatsCallbacks + 5)] + internal struct LeaderboardScoresDownloaded_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUserStatsCallbacks + 5; + public SteamLeaderboard_t m_hSteamLeaderboard; + public SteamLeaderboardEntries_t m_hSteamLeaderboardEntries; // the handle to pass into GetDownloadedLeaderboardEntries() + public int m_cEntryCount; // the number of entries downloaded + } + + #endif + //----------------------------------------------------------------------------- + // Purpose: call result indicating scores has been uploaded, returned as a result of UploadLeaderboardScore() + // use CCallResult<> to map this async result to a member function + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserStatsCallbacks + 6)] + public struct LeaderboardScoreUploaded_t { + public const int k_iCallback = Constants.k_iSteamUserStatsCallbacks + 6; + public byte m_bSuccess; // 1 if the call was successful + public SteamLeaderboard_t m_hSteamLeaderboard; // the leaderboard handle that was + public int m_nScore; // the score that was attempted to set + public byte m_bScoreChanged; // true if the score in the leaderboard change, false if the existing score was better + public int m_nGlobalRankNew; // the new global rank of the user in this leaderboard + public int m_nGlobalRankPrevious; // the previous global rank of the user in this leaderboard; 0 if the user had no existing entry in the leaderboard + } + + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: call result indicating scores has been uploaded, returned as a result of UploadLeaderboardScore() + // use CCallResult<> to map this async result to a member function + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserStatsCallbacks + 6)] + internal struct LeaderboardScoreUploaded_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUserStatsCallbacks + 6; + public byte m_bSuccess; // 1 if the call was successful + public SteamLeaderboard_t m_hSteamLeaderboard; // the leaderboard handle that was + public int m_nScore; // the score that was attempted to set + public byte m_bScoreChanged; // true if the score in the leaderboard change, false if the existing score was better + public int m_nGlobalRankNew; // the new global rank of the user in this leaderboard + public int m_nGlobalRankPrevious; // the previous global rank of the user in this leaderboard; 0 if the user had no existing entry in the leaderboard + } + + //----------------------------------------------------------------------------- // Purpose: call result indicating scores has been uploaded, returned as a result of UploadLeaderboardScore() // use CCallResult<> to map this async result to a member function //----------------------------------------------------------------------------- [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamUserStatsCallbacks + 6)] - public struct LeaderboardScoreUploaded_t { + internal struct LeaderboardScoreUploaded_t_SmallPack { public const int k_iCallback = Constants.k_iSteamUserStatsCallbacks + 6; public byte m_bSuccess; // 1 if the call was successful public SteamLeaderboard_t m_hSteamLeaderboard; // the leaderboard handle that was @@ -2704,6 +8189,7 @@ public struct LeaderboardScoreUploaded_t { public int m_nGlobalRankPrevious; // the previous global rank of the user in this leaderboard; 0 if the user had no existing entry in the leaderboard } + #endif [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamUserStatsCallbacks + 7)] public struct NumberOfCurrentPlayers_t { @@ -2712,6 +8198,25 @@ public struct NumberOfCurrentPlayers_t { public int m_cPlayers; // Number of players currently playing } + #if STEAMWORKS_ANYCPU + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserStatsCallbacks + 7)] + internal struct NumberOfCurrentPlayers_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUserStatsCallbacks + 7; + public byte m_bSuccess; // 1 if the call was successful + public int m_cPlayers; // Number of players currently playing + } + + + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserStatsCallbacks + 7)] + internal struct NumberOfCurrentPlayers_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUserStatsCallbacks + 7; + public byte m_bSuccess; // 1 if the call was successful + public int m_cPlayers; // Number of players currently playing + } + + #endif //----------------------------------------------------------------------------- // Purpose: Callback indicating that a user's stats have been unloaded. // Call RequestUserStats again to access stats for this user @@ -2723,6 +8228,31 @@ public struct UserStatsUnloaded_t { public CSteamID m_steamIDUser; // User whose stats have been unloaded } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: Callback indicating that a user's stats have been unloaded. + // Call RequestUserStats again to access stats for this user + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserStatsCallbacks + 8)] + internal struct UserStatsUnloaded_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUserStatsCallbacks + 8; + public CSteamID m_steamIDUser; // User whose stats have been unloaded + } + + + //----------------------------------------------------------------------------- + // Purpose: Callback indicating that a user's stats have been unloaded. + // Call RequestUserStats again to access stats for this user + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserStatsCallbacks + 8)] + internal struct UserStatsUnloaded_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUserStatsCallbacks + 8; + public CSteamID m_steamIDUser; // User whose stats have been unloaded + } + + #endif //----------------------------------------------------------------------------- // Purpose: Callback indicating that an achievement icon has been fetched //----------------------------------------------------------------------------- @@ -2733,7 +8263,51 @@ public struct UserAchievementIconFetched_t { public CGameID m_nGameID; // Game this is for [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchStatNameMax)] - private byte[] m_rgchAchievementName_; + internal byte[] m_rgchAchievementName_; + public string m_rgchAchievementName // name of the achievement + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchAchievementName_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchAchievementName_, Constants.k_cchStatNameMax); } + } + [MarshalAs(UnmanagedType.I1)] + public bool m_bAchieved; // Is the icon for the achieved or not achieved version? + public int m_nIconHandle; // Handle to the image, which can be used in SteamUtils()->GetImageRGBA(), 0 means no image is set for the achievement + } + + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: Callback indicating that an achievement icon has been fetched + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserStatsCallbacks + 9)] + internal struct UserAchievementIconFetched_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUserStatsCallbacks + 9; + + public CGameID m_nGameID; // Game this is for + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchStatNameMax)] + internal byte[] m_rgchAchievementName_; + public string m_rgchAchievementName // name of the achievement + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchAchievementName_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchAchievementName_, Constants.k_cchStatNameMax); } + } + [MarshalAs(UnmanagedType.I1)] + public bool m_bAchieved; // Is the icon for the achieved or not achieved version? + public int m_nIconHandle; // Handle to the image, which can be used in SteamUtils()->GetImageRGBA(), 0 means no image is set for the achievement + } + + + //----------------------------------------------------------------------------- + // Purpose: Callback indicating that an achievement icon has been fetched + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserStatsCallbacks + 9)] + internal struct UserAchievementIconFetched_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUserStatsCallbacks + 9; + + public CGameID m_nGameID; // Game this is for + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchStatNameMax)] + internal byte[] m_rgchAchievementName_; public string m_rgchAchievementName // name of the achievement { get { return InteropHelp.ByteArrayToStringUTF8(m_rgchAchievementName_); } @@ -2744,6 +8318,7 @@ public string m_rgchAchievementName // name of the achievement public int m_nIconHandle; // Handle to the image, which can be used in SteamUtils()->GetImageRGBA(), 0 means no image is set for the achievement } + #endif //----------------------------------------------------------------------------- // Purpose: Callback indicating that global achievement percentages are fetched //----------------------------------------------------------------------------- @@ -2756,6 +8331,33 @@ public struct GlobalAchievementPercentagesReady_t { public EResult m_eResult; // Result of the operation } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: Callback indicating that global achievement percentages are fetched + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserStatsCallbacks + 10)] + internal struct GlobalAchievementPercentagesReady_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUserStatsCallbacks + 10; + + public ulong m_nGameID; // Game this is for + public EResult m_eResult; // Result of the operation + } + + + //----------------------------------------------------------------------------- + // Purpose: Callback indicating that global achievement percentages are fetched + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserStatsCallbacks + 10)] + internal struct GlobalAchievementPercentagesReady_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUserStatsCallbacks + 10; + + public ulong m_nGameID; // Game this is for + public EResult m_eResult; // Result of the operation + } + + #endif //----------------------------------------------------------------------------- // Purpose: call result indicating UGC has been uploaded, returned as a result of SetLeaderboardUGC() //----------------------------------------------------------------------------- @@ -2767,6 +8369,31 @@ public struct LeaderboardUGCSet_t { public SteamLeaderboard_t m_hSteamLeaderboard; // the leaderboard handle that was } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: call result indicating UGC has been uploaded, returned as a result of SetLeaderboardUGC() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserStatsCallbacks + 11)] + internal struct LeaderboardUGCSet_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUserStatsCallbacks + 11; + public EResult m_eResult; // The result of the operation + public SteamLeaderboard_t m_hSteamLeaderboard; // the leaderboard handle that was + } + + + //----------------------------------------------------------------------------- + // Purpose: call result indicating UGC has been uploaded, returned as a result of SetLeaderboardUGC() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserStatsCallbacks + 11)] + internal struct LeaderboardUGCSet_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUserStatsCallbacks + 11; + public EResult m_eResult; // The result of the operation + public SteamLeaderboard_t m_hSteamLeaderboard; // the leaderboard handle that was + } + + #endif //----------------------------------------------------------------------------- // Purpose: callback indicating global stats have been received. // Returned as a result of RequestGlobalStats() @@ -2779,6 +8406,33 @@ public struct GlobalStatsReceived_t { public EResult m_eResult; // The result of the request } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: callback indicating global stats have been received. + // Returned as a result of RequestGlobalStats() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserStatsCallbacks + 12)] + internal struct GlobalStatsReceived_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUserStatsCallbacks + 12; + public ulong m_nGameID; // Game global stats were requested for + public EResult m_eResult; // The result of the request + } + + + //----------------------------------------------------------------------------- + // Purpose: callback indicating global stats have been received. + // Returned as a result of RequestGlobalStats() + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUserStatsCallbacks + 12)] + internal struct GlobalStatsReceived_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUserStatsCallbacks + 12; + public ulong m_nGameID; // Game global stats were requested for + public EResult m_eResult; // The result of the request + } + + #endif // callbacks //----------------------------------------------------------------------------- // Purpose: The country of the user changed @@ -2789,47 +8443,164 @@ public struct IPCountry_t { public const int k_iCallback = Constants.k_iSteamUtilsCallbacks + 1; } + #if STEAMWORKS_ANYCPU + // callbacks + //----------------------------------------------------------------------------- + // Purpose: The country of the user changed + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamUtilsCallbacks + 1)] + internal struct IPCountry_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUtilsCallbacks + 1; + } + + + // callbacks + //----------------------------------------------------------------------------- + // Purpose: The country of the user changed + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamUtilsCallbacks + 1)] + internal struct IPCountry_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUtilsCallbacks + 1; + } + + #endif + //----------------------------------------------------------------------------- + // Purpose: Fired when running on a handheld PC or laptop with less than 10 minutes of battery is left, fires then every minute + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUtilsCallbacks + 2)] + public struct LowBatteryPower_t { + public const int k_iCallback = Constants.k_iSteamUtilsCallbacks + 2; + public byte m_nMinutesBatteryLeft; + } + + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: Fired when running on a handheld PC or laptop with less than 10 minutes of battery is left, fires then every minute + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUtilsCallbacks + 2)] + internal struct LowBatteryPower_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUtilsCallbacks + 2; + public byte m_nMinutesBatteryLeft; + } + + + //----------------------------------------------------------------------------- + // Purpose: Fired when running on a handheld PC or laptop with less than 10 minutes of battery is left, fires then every minute + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUtilsCallbacks + 2)] + internal struct LowBatteryPower_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUtilsCallbacks + 2; + public byte m_nMinutesBatteryLeft; + } + + #endif + //----------------------------------------------------------------------------- + // Purpose: called when a SteamAsyncCall_t has completed (or failed) + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUtilsCallbacks + 3)] + public struct SteamAPICallCompleted_t { + public const int k_iCallback = Constants.k_iSteamUtilsCallbacks + 3; + public SteamAPICall_t m_hAsyncCall; + public int m_iCallback; + public uint m_cubParam; + } + + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: called when a SteamAsyncCall_t has completed (or failed) + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUtilsCallbacks + 3)] + internal struct SteamAPICallCompleted_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUtilsCallbacks + 3; + public SteamAPICall_t m_hAsyncCall; + public int m_iCallback; + public uint m_cubParam; + } + + + //----------------------------------------------------------------------------- + // Purpose: called when a SteamAsyncCall_t has completed (or failed) + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUtilsCallbacks + 3)] + internal struct SteamAPICallCompleted_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUtilsCallbacks + 3; + public SteamAPICall_t m_hAsyncCall; + public int m_iCallback; + public uint m_cubParam; + } + + #endif + //----------------------------------------------------------------------------- + // called when Steam wants to shutdown + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamUtilsCallbacks + 4)] + public struct SteamShutdown_t { + public const int k_iCallback = Constants.k_iSteamUtilsCallbacks + 4; + } + + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // called when Steam wants to shutdown + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamUtilsCallbacks + 4)] + internal struct SteamShutdown_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUtilsCallbacks + 4; + } + + + //----------------------------------------------------------------------------- + // called when Steam wants to shutdown + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamUtilsCallbacks + 4)] + internal struct SteamShutdown_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUtilsCallbacks + 4; + } + + #endif //----------------------------------------------------------------------------- - // Purpose: Fired when running on a handheld PC or laptop with less than 10 minutes of battery is left, fires then every minute + // callback for CheckFileSignature //----------------------------------------------------------------------------- [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] - [CallbackIdentity(Constants.k_iSteamUtilsCallbacks + 2)] - public struct LowBatteryPower_t { - public const int k_iCallback = Constants.k_iSteamUtilsCallbacks + 2; - public byte m_nMinutesBatteryLeft; + [CallbackIdentity(Constants.k_iSteamUtilsCallbacks + 5)] + public struct CheckFileSignature_t { + public const int k_iCallback = Constants.k_iSteamUtilsCallbacks + 5; + public ECheckFileSignature m_eCheckFileSignature; } + #if STEAMWORKS_ANYCPU //----------------------------------------------------------------------------- - // Purpose: called when a SteamAsyncCall_t has completed (or failed) + // callback for CheckFileSignature //----------------------------------------------------------------------------- [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] - [CallbackIdentity(Constants.k_iSteamUtilsCallbacks + 3)] - public struct SteamAPICallCompleted_t { - public const int k_iCallback = Constants.k_iSteamUtilsCallbacks + 3; - public SteamAPICall_t m_hAsyncCall; - public int m_iCallback; - public uint m_cubParam; + [CallbackIdentity(Constants.k_iSteamUtilsCallbacks + 5)] + internal struct CheckFileSignature_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUtilsCallbacks + 5; + public ECheckFileSignature m_eCheckFileSignature; } - //----------------------------------------------------------------------------- - // called when Steam wants to shutdown - //----------------------------------------------------------------------------- - [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] - [CallbackIdentity(Constants.k_iSteamUtilsCallbacks + 4)] - public struct SteamShutdown_t { - public const int k_iCallback = Constants.k_iSteamUtilsCallbacks + 4; - } //----------------------------------------------------------------------------- // callback for CheckFileSignature //----------------------------------------------------------------------------- [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamUtilsCallbacks + 5)] - public struct CheckFileSignature_t { + internal struct CheckFileSignature_t_SmallPack { public const int k_iCallback = Constants.k_iSteamUtilsCallbacks + 5; public ECheckFileSignature m_eCheckFileSignature; } + #endif // k_iSteamUtilsCallbacks + 13 is taken //----------------------------------------------------------------------------- // Full Screen gamepad text input has been closed @@ -2844,6 +8615,37 @@ public struct GamepadTextInputDismissed_t { public AppId_t m_unAppID; } + #if STEAMWORKS_ANYCPU + // k_iSteamUtilsCallbacks + 13 is taken + //----------------------------------------------------------------------------- + // Full Screen gamepad text input has been closed + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUtilsCallbacks + 14)] + internal struct GamepadTextInputDismissed_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUtilsCallbacks + 14; + [MarshalAs(UnmanagedType.I1)] + public bool m_bSubmitted; // true if user entered & accepted text (Call ISteamUtils::GetEnteredGamepadTextInput() for text), false if canceled input + public uint m_unSubmittedText; + public AppId_t m_unAppID; + } + + + // k_iSteamUtilsCallbacks + 13 is taken + //----------------------------------------------------------------------------- + // Full Screen gamepad text input has been closed + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUtilsCallbacks + 14)] + internal struct GamepadTextInputDismissed_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUtilsCallbacks + 14; + [MarshalAs(UnmanagedType.I1)] + public bool m_bSubmitted; // true if user entered & accepted text (Call ISteamUtils::GetEnteredGamepadTextInput() for text), false if canceled input + public uint m_unSubmittedText; + public AppId_t m_unAppID; + } + + #endif // k_iSteamUtilsCallbacks + 15 through 35 are taken [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] [CallbackIdentity(Constants.k_iSteamUtilsCallbacks + 36)] @@ -2851,6 +8653,23 @@ public struct AppResumingFromSuspend_t { public const int k_iCallback = Constants.k_iSteamUtilsCallbacks + 36; } + #if STEAMWORKS_ANYCPU + // k_iSteamUtilsCallbacks + 15 through 35 are taken + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamUtilsCallbacks + 36)] + internal struct AppResumingFromSuspend_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUtilsCallbacks + 36; + } + + + // k_iSteamUtilsCallbacks + 15 through 35 are taken + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamUtilsCallbacks + 36)] + internal struct AppResumingFromSuspend_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUtilsCallbacks + 36; + } + + #endif // k_iSteamUtilsCallbacks + 37 is taken //----------------------------------------------------------------------------- // The floating on-screen keyboard has been closed @@ -2861,6 +8680,29 @@ public struct FloatingGamepadTextInputDismissed_t { public const int k_iCallback = Constants.k_iSteamUtilsCallbacks + 38; } + #if STEAMWORKS_ANYCPU + // k_iSteamUtilsCallbacks + 37 is taken + //----------------------------------------------------------------------------- + // The floating on-screen keyboard has been closed + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamUtilsCallbacks + 38)] + internal struct FloatingGamepadTextInputDismissed_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUtilsCallbacks + 38; + } + + + // k_iSteamUtilsCallbacks + 37 is taken + //----------------------------------------------------------------------------- + // The floating on-screen keyboard has been closed + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value, Size = 1)] + [CallbackIdentity(Constants.k_iSteamUtilsCallbacks + 38)] + internal struct FloatingGamepadTextInputDismissed_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUtilsCallbacks + 38; + } + + #endif //----------------------------------------------------------------------------- // The text filtering dictionary has changed //----------------------------------------------------------------------------- @@ -2871,6 +8713,29 @@ public struct FilterTextDictionaryChanged_t { public int m_eLanguage; // One of ELanguage, or k_LegallyRequiredFiltering } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // The text filtering dictionary has changed + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUtilsCallbacks + 39)] + internal struct FilterTextDictionaryChanged_t_LargePack { + public const int k_iCallback = Constants.k_iSteamUtilsCallbacks + 39; + public int m_eLanguage; // One of ELanguage, or k_LegallyRequiredFiltering + } + + + //----------------------------------------------------------------------------- + // The text filtering dictionary has changed + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamUtilsCallbacks + 39)] + internal struct FilterTextDictionaryChanged_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamUtilsCallbacks + 39; + public int m_eLanguage; // One of ELanguage, or k_LegallyRequiredFiltering + } + + #endif [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamVideoCallbacks + 11)] public struct GetVideoURLResult_t { @@ -2878,7 +8743,39 @@ public struct GetVideoURLResult_t { public EResult m_eResult; public AppId_t m_unVideoAppID; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] - private byte[] m_rgchURL_; + internal byte[] m_rgchURL_; + public string m_rgchURL + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchURL_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchURL_, 256); } + } + } + + #if STEAMWORKS_ANYCPU + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamVideoCallbacks + 11)] + internal struct GetVideoURLResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamVideoCallbacks + 11; + public EResult m_eResult; + public AppId_t m_unVideoAppID; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] + internal byte[] m_rgchURL_; + public string m_rgchURL + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchURL_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchURL_, 256); } + } + } + + + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamVideoCallbacks + 11)] + internal struct GetVideoURLResult_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamVideoCallbacks + 11; + public EResult m_eResult; + public AppId_t m_unVideoAppID; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] + internal byte[] m_rgchURL_; public string m_rgchURL { get { return InteropHelp.ByteArrayToStringUTF8(m_rgchURL_); } @@ -2886,6 +8783,7 @@ public string m_rgchURL } } + #endif [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamVideoCallbacks + 24)] public struct GetOPFSettingsResult_t { @@ -2894,6 +8792,25 @@ public struct GetOPFSettingsResult_t { public AppId_t m_unVideoAppID; } + #if STEAMWORKS_ANYCPU + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamVideoCallbacks + 24)] + internal struct GetOPFSettingsResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamVideoCallbacks + 24; + public EResult m_eResult; + public AppId_t m_unVideoAppID; + } + + + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamVideoCallbacks + 24)] + internal struct GetOPFSettingsResult_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamVideoCallbacks + 24; + public EResult m_eResult; + public AppId_t m_unVideoAppID; + } + + #endif [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamVideoCallbacks + 4)] public struct BroadcastUploadStart_t { @@ -2902,6 +8819,25 @@ public struct BroadcastUploadStart_t { public bool m_bIsRTMP; } + #if STEAMWORKS_ANYCPU + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamVideoCallbacks + 4)] + internal struct BroadcastUploadStart_t_LargePack { + public const int k_iCallback = Constants.k_iSteamVideoCallbacks + 4; + [MarshalAs(UnmanagedType.I1)] + public bool m_bIsRTMP; + } + + + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamVideoCallbacks + 4)] + internal struct BroadcastUploadStart_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamVideoCallbacks + 4; + [MarshalAs(UnmanagedType.I1)] + public bool m_bIsRTMP; + } + + #endif [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] [CallbackIdentity(Constants.k_iSteamVideoCallbacks + 5)] public struct BroadcastUploadStop_t { @@ -2909,6 +8845,23 @@ public struct BroadcastUploadStop_t { public EBroadcastUploadResult m_eResult; } + #if STEAMWORKS_ANYCPU + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamVideoCallbacks + 5)] + internal struct BroadcastUploadStop_t_LargePack { + public const int k_iCallback = Constants.k_iSteamVideoCallbacks + 5; + public EBroadcastUploadResult m_eResult; + } + + + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamVideoCallbacks + 5)] + internal struct BroadcastUploadStop_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamVideoCallbacks + 5; + public EBroadcastUploadResult m_eResult; + } + + #endif /// Callback struct used to notify when a connection has changed state /// A struct used to describe a "fake IP" we have been assigned to /// use as an identifier. This callback is posted when @@ -2948,6 +8901,87 @@ public struct SteamNetworkingFakeIPResult_t { public ushort[] m_unPorts; } + #if STEAMWORKS_ANYCPU + /// Callback struct used to notify when a connection has changed state + /// A struct used to describe a "fake IP" we have been assigned to + /// use as an identifier. This callback is posted when + /// ISteamNetworkingSoockets::BeginAsyncRequestFakeIP completes. + /// See also ISteamNetworkingSockets::GetFakeIP + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamNetworkingSocketsCallbacks + 3)] + internal struct SteamNetworkingFakeIPResult_t_LargePack { + public const int k_iCallback = Constants.k_iSteamNetworkingSocketsCallbacks + 3; + + /// Status/result of the allocation request. Possible failure values are: + /// - k_EResultBusy - you called GetFakeIP but the request has not completed. + /// - k_EResultInvalidParam - you called GetFakeIP with an invalid port index + /// - k_EResultLimitExceeded - You asked for too many ports, or made an + /// additional request after one had already succeeded + /// - k_EResultNoMatch - GetFakeIP was called, but no request has been made + /// + /// Note that, with the exception of k_EResultBusy (if you are polling), + /// it is highly recommended to treat all failures as fatal. + public EResult m_eResult; + + /// Local identity of the ISteamNetworkingSockets object that made + /// this request and is assigned the IP. This is needed in the callback + /// in the case where there are multiple ISteamNetworkingSockets objects. + /// (E.g. one for the user, and another for the local gameserver). + public SteamNetworkingIdentity m_identity; + + /// Fake IPv4 IP address that we have been assigned. NOTE: this + /// IP address is not exclusively ours! Steam tries to avoid sharing + /// IP addresses, but this may not always be possible. The IP address + /// may be currently in use by another host, but with different port(s). + /// The exact same IP:port address may have been used previously. + /// Steam tries to avoid reusing ports until they have not been in use for + /// some time, but this may not always be possible. + public uint m_unIP; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_nMaxReturnPorts)] + public ushort[] m_unPorts; + } + + + /// Callback struct used to notify when a connection has changed state + /// A struct used to describe a "fake IP" we have been assigned to + /// use as an identifier. This callback is posted when + /// ISteamNetworkingSoockets::BeginAsyncRequestFakeIP completes. + /// See also ISteamNetworkingSockets::GetFakeIP + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + [CallbackIdentity(Constants.k_iSteamNetworkingSocketsCallbacks + 3)] + internal struct SteamNetworkingFakeIPResult_t_SmallPack { + public const int k_iCallback = Constants.k_iSteamNetworkingSocketsCallbacks + 3; + + /// Status/result of the allocation request. Possible failure values are: + /// - k_EResultBusy - you called GetFakeIP but the request has not completed. + /// - k_EResultInvalidParam - you called GetFakeIP with an invalid port index + /// - k_EResultLimitExceeded - You asked for too many ports, or made an + /// additional request after one had already succeeded + /// - k_EResultNoMatch - GetFakeIP was called, but no request has been made + /// + /// Note that, with the exception of k_EResultBusy (if you are polling), + /// it is highly recommended to treat all failures as fatal. + public EResult m_eResult; + + /// Local identity of the ISteamNetworkingSockets object that made + /// this request and is assigned the IP. This is needed in the callback + /// in the case where there are multiple ISteamNetworkingSockets objects. + /// (E.g. one for the user, and another for the local gameserver). + public SteamNetworkingIdentity m_identity; + + /// Fake IPv4 IP address that we have been assigned. NOTE: this + /// IP address is not exclusively ours! Steam tries to avoid sharing + /// IP addresses, but this may not always be possible. The IP address + /// may be currently in use by another host, but with different port(s). + /// The exact same IP:port address may have been used previously. + /// Steam tries to avoid reusing ports until they have not been in use for + /// some time, but this may not always be possible. + public uint m_unIP; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_nMaxReturnPorts)] + public ushort[] m_unPorts; + } + + #endif } #endif // !DISABLESTEAMWORKS diff --git a/com.rlabrecque.steamworks.net/Runtime/autogen/SteamStructs.cs b/com.rlabrecque.steamworks.net/Runtime/autogen/SteamStructs.cs index e8fda833..d4b7f655 100644 --- a/com.rlabrecque.steamworks.net/Runtime/autogen/SteamStructs.cs +++ b/com.rlabrecque.steamworks.net/Runtime/autogen/SteamStructs.cs @@ -25,6 +25,29 @@ public struct FriendGameInfo_t { public CSteamID m_steamIDLobby; } + #if STEAMWORKS_ANYCPU + // friend game played information + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + internal struct FriendGameInfo_t_LargePack { + public CGameID m_gameID; + public uint m_unGameIP; + public ushort m_usGamePort; + public ushort m_usQueryPort; + public CSteamID m_steamIDLobby; + } + + + // friend game played information + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + internal struct FriendGameInfo_t_SmallPack { + public CGameID m_gameID; + public uint m_unGameIP; + public ushort m_usGamePort; + public ushort m_usQueryPort; + public CSteamID m_steamIDLobby; + } + + #endif [StructLayout(LayoutKind.Sequential, Pack = 1)] public struct InputAnalogActionData_t { // Type of data coming from this action, this will match what got specified in the action set @@ -82,6 +105,81 @@ public struct InputMotionData_t { public float rotVelZ; // Local Yaw } + #if STEAMWORKS_ANYCPU + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + internal struct InputMotionData_t_LargePack { + // Gyro Quaternion: + // Absolute rotation of the controller since wakeup, using the Accelerometer reading at startup to determine the first value. + // This means real world "up" is know, but heading is not known. + // Every rotation packet is integrated using sensor time delta, and that change is used to update this quaternion. + // A Quaternion Identity ( x:0, y:0, z:0, w:1 ) will be sent in the first few packets while the controller's IMU is still waking up; + // some controllers have a short "warmup" period before these values should be used. + + // After the first time GetMotionData is called per controller handle, the IMU will be active until your app is closed. + // The exception is the Sony Dualshock, which will stay on until the controller has been turned off. + + // Filtering: When rotating the controller at low speeds, low level noise is filtered out without noticeable latency. High speed movement is always unfiltered. + // Drift: Gyroscopic "Drift" can be fixed using the Steam Input "Gyro Calibration" button. Users will have to be informed of this feature. + public float rotQuatX; + public float rotQuatY; + public float rotQuatZ; + public float rotQuatW; + + // Positional acceleration + // This represents only the latest hardware packet's state. + // Values range from -SHRT_MAX..SHRT_MAX + // This represents -2G..+2G along each axis + public float posAccelX; // +tive when controller's Right hand side is pointed toward the sky. + public float posAccelY; // +tive when controller's charging port (forward side of controller) is pointed toward the sky. + public float posAccelZ; // +tive when controller's sticks point toward the sky. + + // Angular velocity + // Values range from -SHRT_MAX..SHRT_MAX + // These values map to a real world range of -2000..+2000 degrees per second on each axis (SDL standard) + // This represents only the latest hardware packet's state. + public float rotVelX; // Local Pitch + public float rotVelY; // Local Roll + public float rotVelZ; // Local Yaw + } + + + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + internal struct InputMotionData_t_SmallPack { + // Gyro Quaternion: + // Absolute rotation of the controller since wakeup, using the Accelerometer reading at startup to determine the first value. + // This means real world "up" is know, but heading is not known. + // Every rotation packet is integrated using sensor time delta, and that change is used to update this quaternion. + // A Quaternion Identity ( x:0, y:0, z:0, w:1 ) will be sent in the first few packets while the controller's IMU is still waking up; + // some controllers have a short "warmup" period before these values should be used. + + // After the first time GetMotionData is called per controller handle, the IMU will be active until your app is closed. + // The exception is the Sony Dualshock, which will stay on until the controller has been turned off. + + // Filtering: When rotating the controller at low speeds, low level noise is filtered out without noticeable latency. High speed movement is always unfiltered. + // Drift: Gyroscopic "Drift" can be fixed using the Steam Input "Gyro Calibration" button. Users will have to be informed of this feature. + public float rotQuatX; + public float rotQuatY; + public float rotQuatZ; + public float rotQuatW; + + // Positional acceleration + // This represents only the latest hardware packet's state. + // Values range from -SHRT_MAX..SHRT_MAX + // This represents -2G..+2G along each axis + public float posAccelX; // +tive when controller's Right hand side is pointed toward the sky. + public float posAccelY; // +tive when controller's charging port (forward side of controller) is pointed toward the sky. + public float posAccelZ; // +tive when controller's sticks point toward the sky. + + // Angular velocity + // Values range from -SHRT_MAX..SHRT_MAX + // These values map to a real world range of -2000..+2000 degrees per second on each axis (SDL standard) + // This represents only the latest hardware packet's state. + public float rotVelX; // Local Pitch + public float rotVelY; // Local Roll + public float rotVelZ; // Local Yaw + } + + #endif [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] public struct SteamItemDetails_t { public SteamItemInstanceID_t m_itemId; @@ -90,12 +188,46 @@ public struct SteamItemDetails_t { public ushort m_unFlags; // see ESteamItemFlags } + #if STEAMWORKS_ANYCPU + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + internal struct SteamItemDetails_t_LargePack { + public SteamItemInstanceID_t m_itemId; + public SteamItemDef_t m_iDefinition; + public ushort m_unQuantity; + public ushort m_unFlags; // see ESteamItemFlags + } + + + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + internal struct SteamItemDetails_t_SmallPack { + public SteamItemInstanceID_t m_itemId; + public SteamItemDef_t m_iDefinition; + public ushort m_unQuantity; + public ushort m_unFlags; // see ESteamItemFlags + } + + #endif [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] public struct SteamPartyBeaconLocation_t { public ESteamPartyBeaconLocationType m_eType; public ulong m_ulLocationID; } + #if STEAMWORKS_ANYCPU + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + internal struct SteamPartyBeaconLocation_t_LargePack { + public ESteamPartyBeaconLocationType m_eType; + public ulong m_ulLocationID; + } + + + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + internal struct SteamPartyBeaconLocation_t_SmallPack { + public ESteamPartyBeaconLocationType m_eType; + public ulong m_ulLocationID; + } + + #endif // connection state to a specified user, returned by GetP2PSessionState() // this is under-the-hood info about what's going on with a SendP2PPacket(), shouldn't be needed except for debuggin [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] @@ -110,6 +242,37 @@ public struct P2PSessionState_t { public ushort m_nRemotePort; // Only exists for compatibility with older authentication api's } + #if STEAMWORKS_ANYCPU + // connection state to a specified user, returned by GetP2PSessionState() + // this is under-the-hood info about what's going on with a SendP2PPacket(), shouldn't be needed except for debuggin + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + internal struct P2PSessionState_t_LargePack { + public byte m_bConnectionActive; // true if we've got an active open connection + public byte m_bConnecting; // true if we're currently trying to establish a connection + public byte m_eP2PSessionError; // last error recorded (see enum above) + public byte m_bUsingRelay; // true if it's going through a relay server (TURN) + public int m_nBytesQueuedForSend; + public int m_nPacketsQueuedForSend; + public uint m_nRemoteIP; // potential IP:Port of remote host. Could be TURN server. + public ushort m_nRemotePort; // Only exists for compatibility with older authentication api's + } + + + // connection state to a specified user, returned by GetP2PSessionState() + // this is under-the-hood info about what's going on with a SendP2PPacket(), shouldn't be needed except for debuggin + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + internal struct P2PSessionState_t_SmallPack { + public byte m_bConnectionActive; // true if we've got an active open connection + public byte m_bConnecting; // true if we're currently trying to establish a connection + public byte m_eP2PSessionError; // last error recorded (see enum above) + public byte m_bUsingRelay; // true if it's going through a relay server (TURN) + public int m_nBytesQueuedForSend; + public int m_nPacketsQueuedForSend; + public uint m_nRemoteIP; // potential IP:Port of remote host. Could be TURN server. + public ushort m_nRemotePort; // Only exists for compatibility with older authentication api's + } + + #endif // Mouse motion event data, valid when m_eType is k_ERemotePlayInputMouseMotion [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] public struct RemotePlayInputMouseMotion_t { @@ -121,6 +284,31 @@ public struct RemotePlayInputMouseMotion_t { public int m_nDeltaY; // Relative mouse motion in the Y direction } + #if STEAMWORKS_ANYCPU + // Mouse motion event data, valid when m_eType is k_ERemotePlayInputMouseMotion + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + internal struct RemotePlayInputMouseMotion_t_LargePack { + [MarshalAs(UnmanagedType.I1)] + public bool m_bAbsolute; // True if this is absolute mouse motion and m_flNormalizedX and m_flNormalizedY are valid + public float m_flNormalizedX; // The absolute X position of the mouse, normalized to the display, if m_bAbsolute is true + public float m_flNormalizedY; // The absolute Y position of the mouse, normalized to the display, if m_bAbsolute is true + public int m_nDeltaX; // Relative mouse motion in the X direction + public int m_nDeltaY; // Relative mouse motion in the Y direction + } + + + // Mouse motion event data, valid when m_eType is k_ERemotePlayInputMouseMotion + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + internal struct RemotePlayInputMouseMotion_t_SmallPack { + [MarshalAs(UnmanagedType.I1)] + public bool m_bAbsolute; // True if this is absolute mouse motion and m_flNormalizedX and m_flNormalizedY are valid + public float m_flNormalizedX; // The absolute X position of the mouse, normalized to the display, if m_bAbsolute is true + public float m_flNormalizedY; // The absolute Y position of the mouse, normalized to the display, if m_bAbsolute is true + public int m_nDeltaX; // Relative mouse motion in the X direction + public int m_nDeltaY; // Relative mouse motion in the Y direction + } + + #endif // Mouse wheel event data, valid when m_eType is k_ERemotePlayInputMouseWheel [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] public struct RemotePlayInputMouseWheel_t { @@ -128,6 +316,23 @@ public struct RemotePlayInputMouseWheel_t { public float m_flAmount; // 1.0f is a single click of the wheel, 120 units on Windows } + #if STEAMWORKS_ANYCPU + // Mouse wheel event data, valid when m_eType is k_ERemotePlayInputMouseWheel + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + internal struct RemotePlayInputMouseWheel_t_LargePack { + public ERemotePlayMouseWheelDirection m_eDirection; + public float m_flAmount; // 1.0f is a single click of the wheel, 120 units on Windows + } + + + // Mouse wheel event data, valid when m_eType is k_ERemotePlayInputMouseWheel + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + internal struct RemotePlayInputMouseWheel_t_SmallPack { + public ERemotePlayMouseWheelDirection m_eDirection; + public float m_flAmount; // 1.0f is a single click of the wheel, 120 units on Windows + } + + #endif // Key event data, valid when m_eType is k_ERemotePlayInputKeyDown or k_ERemotePlayInputKeyUp [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] public struct RemotePlayInputKey_t { @@ -136,6 +341,25 @@ public struct RemotePlayInputKey_t { public uint m_unKeycode; // UCS-4 character generated by the keypress, or 0 if it wasn't a character key, e.g. Delete or Left Arrow } + #if STEAMWORKS_ANYCPU + // Key event data, valid when m_eType is k_ERemotePlayInputKeyDown or k_ERemotePlayInputKeyUp + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + internal struct RemotePlayInputKey_t_LargePack { + public int m_eScancode; // Keyboard scancode, common values are defined in ERemotePlayScancode + public uint m_unModifiers; // Mask of ERemotePlayKeyModifier active for this key event + public uint m_unKeycode; // UCS-4 character generated by the keypress, or 0 if it wasn't a character key, e.g. Delete or Left Arrow + } + + + // Key event data, valid when m_eType is k_ERemotePlayInputKeyDown or k_ERemotePlayInputKeyUp + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + internal struct RemotePlayInputKey_t_SmallPack { + public int m_eScancode; // Keyboard scancode, common values are defined in ERemotePlayScancode + public uint m_unModifiers; // Mask of ERemotePlayKeyModifier active for this key event + public uint m_unKeycode; // UCS-4 character generated by the keypress, or 0 if it wasn't a character key, e.g. Delete or Left Arrow + } + + #endif //----------------------------------------------------------------------------- // Purpose: Structure that contains an array of const char * strings and the number of those strings //----------------------------------------------------------------------------- @@ -145,6 +369,27 @@ public struct SteamParamStringArray_t { public int m_nNumStrings; } + #if STEAMWORKS_ANYCPU + //----------------------------------------------------------------------------- + // Purpose: Structure that contains an array of const char * strings and the number of those strings + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + internal struct SteamParamStringArray_t_LargePack { + public IntPtr m_ppStrings; + public int m_nNumStrings; + } + + + //----------------------------------------------------------------------------- + // Purpose: Structure that contains an array of const char * strings and the number of those strings + //----------------------------------------------------------------------------- + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + internal struct SteamParamStringArray_t_SmallPack { + public IntPtr m_ppStrings; + public int m_nNumStrings; + } + + #endif // Details for a single published file/UGC [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] public struct SteamUGCDetails_t { @@ -154,14 +399,14 @@ public struct SteamUGCDetails_t { public AppId_t m_nCreatorAppID; // ID of the app that created this file. public AppId_t m_nConsumerAppID; // ID of the app that will consume this file. [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchPublishedDocumentTitleMax)] - private byte[] m_rgchTitle_; + internal byte[] m_rgchTitle_; public string m_rgchTitle // title of document { get { return InteropHelp.ByteArrayToStringUTF8(m_rgchTitle_); } set { InteropHelp.StringToByteArrayUTF8(value, m_rgchTitle_, Constants.k_cchPublishedDocumentTitleMax); } } [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchPublishedDocumentDescriptionMax)] - private byte[] m_rgchDescription_; + internal byte[] m_rgchDescription_; public string m_rgchDescription // description of document { get { return InteropHelp.ByteArrayToStringUTF8(m_rgchDescription_); } @@ -179,7 +424,7 @@ public string m_rgchDescription // description of document [MarshalAs(UnmanagedType.I1)] public bool m_bTagsTruncated; // whether the list of tags was too long to be returned in the provided buffer [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchTagListMax)] - private byte[] m_rgchTags_; + internal byte[] m_rgchTags_; public string m_rgchTags // comma separated list of all tags associated with this file { get { return InteropHelp.ByteArrayToStringUTF8(m_rgchTags_); } @@ -189,7 +434,7 @@ public string m_rgchTags // comma separated list of all tags associated w public UGCHandle_t m_hFile; // The handle of the primary file public UGCHandle_t m_hPreviewFile; // The handle of the preview file [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchFilenameMax)] - private byte[] m_pchFileName_; + internal byte[] m_pchFileName_; public string m_pchFileName // The cloud filename of the primary file { get { return InteropHelp.ByteArrayToStringUTF8(m_pchFileName_); } @@ -198,7 +443,7 @@ public string m_pchFileName // The cloud filename of the primary file public int m_nFileSize; // Size of the primary file (for legacy items which only support one file). This may not be accurate for non-legacy items which can be greater than 4gb in size. public int m_nPreviewFileSize; // Size of the preview file [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchPublishedFileURLMax)] - private byte[] m_rgchURL_; + internal byte[] m_rgchURL_; public string m_rgchURL // URL (for a video or a website) { get { return InteropHelp.ByteArrayToStringUTF8(m_rgchURL_); } @@ -213,48 +458,400 @@ public string m_pchFileName // The cloud filename of the primary file public ulong m_ulTotalFilesSize; // Total size of all files (non-legacy), excluding the preview file } - // a single entry in a leaderboard, as returned by GetDownloadedLeaderboardEntry() + #if STEAMWORKS_ANYCPU + // Details for a single published file/UGC [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] - public struct LeaderboardEntry_t { - public CSteamID m_steamIDUser; // user with the entry - use SteamFriends()->GetFriendPersonaName() & SteamFriends()->GetFriendAvatar() to get more info - public int m_nGlobalRank; // [1..N], where N is the number of users with an entry in the leaderboard - public int m_nScore; // score as set in the leaderboard - public int m_cDetails; // number of int32 details available for this entry - public UGCHandle_t m_hUGC; // handle for UGC attached to the entry - } - - /// Store key/value pair used in matchmaking queries. - /// - /// Actually, the name Key/Value is a bit misleading. The "key" is better - /// understood as "filter operation code" and the "value" is the operand to this - /// filter operation. The meaning of the operand depends upon the filter. - [StructLayout(LayoutKind.Sequential)] - public struct MatchMakingKeyValuePair_t { - MatchMakingKeyValuePair_t(string strKey, string strValue) { - m_szKey = strKey; - m_szValue = strValue; + internal struct SteamUGCDetails_t_LargePack { + public PublishedFileId_t m_nPublishedFileId; + public EResult m_eResult; // The result of the operation. + public EWorkshopFileType m_eFileType; // Type of the file + public AppId_t m_nCreatorAppID; // ID of the app that created this file. + public AppId_t m_nConsumerAppID; // ID of the app that will consume this file. + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchPublishedDocumentTitleMax)] + internal byte[] m_rgchTitle_; + public string m_rgchTitle // title of document + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchTitle_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchTitle_, Constants.k_cchPublishedDocumentTitleMax); } } - - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] - public string m_szKey; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] - public string m_szValue; - } - - // structure that contains client callback data - // see callbacks documentation for more details - /// Internal structure used in manual callback dispatch - [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] - public struct CallbackMsg_t { - public int m_hSteamUser; // Specific user to whom this callback applies. - public int m_iCallback; // Callback identifier. (Corresponds to the k_iCallback enum in the callback structure.) - public IntPtr m_pubParam; // Points to the callback structure - public int m_cubParam; // Size of the data pointed to by m_pubParam - } + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchPublishedDocumentDescriptionMax)] + internal byte[] m_rgchDescription_; + public string m_rgchDescription // description of document + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchDescription_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchDescription_, Constants.k_cchPublishedDocumentDescriptionMax); } + } + public ulong m_ulSteamIDOwner; // Steam ID of the user who created this content. + public uint m_rtimeCreated; // time when the published file was created + public uint m_rtimeUpdated; // time when the published file was last updated + public uint m_rtimeAddedToUserList; // time when the user added the published file to their list (not always applicable) + public ERemoteStoragePublishedFileVisibility m_eVisibility; // visibility + [MarshalAs(UnmanagedType.I1)] + public bool m_bBanned; // whether the file was banned + [MarshalAs(UnmanagedType.I1)] + public bool m_bAcceptedForUse; // developer has specifically flagged this item as accepted in the Workshop + [MarshalAs(UnmanagedType.I1)] + public bool m_bTagsTruncated; // whether the list of tags was too long to be returned in the provided buffer + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchTagListMax)] + internal byte[] m_rgchTags_; + public string m_rgchTags // comma separated list of all tags associated with this file + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchTags_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchTags_, Constants.k_cchTagListMax); } + } + // file/url information + public UGCHandle_t m_hFile; // The handle of the primary file + public UGCHandle_t m_hPreviewFile; // The handle of the preview file + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchFilenameMax)] + internal byte[] m_pchFileName_; + public string m_pchFileName // The cloud filename of the primary file + { + get { return InteropHelp.ByteArrayToStringUTF8(m_pchFileName_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_pchFileName_, Constants.k_cchFilenameMax); } + } + public int m_nFileSize; // Size of the primary file (for legacy items which only support one file). This may not be accurate for non-legacy items which can be greater than 4gb in size. + public int m_nPreviewFileSize; // Size of the preview file + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchPublishedFileURLMax)] + internal byte[] m_rgchURL_; + public string m_rgchURL // URL (for a video or a website) + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchURL_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchURL_, Constants.k_cchPublishedFileURLMax); } + } + // voting information + public uint m_unVotesUp; // number of votes up + public uint m_unVotesDown; // number of votes down + public float m_flScore; // calculated score + // collection details + public uint m_unNumChildren; + public ulong m_ulTotalFilesSize; // Total size of all files (non-legacy), excluding the preview file + } + + + // Details for a single published file/UGC + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + internal struct SteamUGCDetails_t_SmallPack { + public PublishedFileId_t m_nPublishedFileId; + public EResult m_eResult; // The result of the operation. + public EWorkshopFileType m_eFileType; // Type of the file + public AppId_t m_nCreatorAppID; // ID of the app that created this file. + public AppId_t m_nConsumerAppID; // ID of the app that will consume this file. + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchPublishedDocumentTitleMax)] + internal byte[] m_rgchTitle_; + public string m_rgchTitle // title of document + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchTitle_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchTitle_, Constants.k_cchPublishedDocumentTitleMax); } + } + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchPublishedDocumentDescriptionMax)] + internal byte[] m_rgchDescription_; + public string m_rgchDescription // description of document + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchDescription_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchDescription_, Constants.k_cchPublishedDocumentDescriptionMax); } + } + public ulong m_ulSteamIDOwner; // Steam ID of the user who created this content. + public uint m_rtimeCreated; // time when the published file was created + public uint m_rtimeUpdated; // time when the published file was last updated + public uint m_rtimeAddedToUserList; // time when the user added the published file to their list (not always applicable) + public ERemoteStoragePublishedFileVisibility m_eVisibility; // visibility + [MarshalAs(UnmanagedType.I1)] + public bool m_bBanned; // whether the file was banned + [MarshalAs(UnmanagedType.I1)] + public bool m_bAcceptedForUse; // developer has specifically flagged this item as accepted in the Workshop + [MarshalAs(UnmanagedType.I1)] + public bool m_bTagsTruncated; // whether the list of tags was too long to be returned in the provided buffer + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchTagListMax)] + internal byte[] m_rgchTags_; + public string m_rgchTags // comma separated list of all tags associated with this file + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchTags_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchTags_, Constants.k_cchTagListMax); } + } + // file/url information + public UGCHandle_t m_hFile; // The handle of the primary file + public UGCHandle_t m_hPreviewFile; // The handle of the preview file + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchFilenameMax)] + internal byte[] m_pchFileName_; + public string m_pchFileName // The cloud filename of the primary file + { + get { return InteropHelp.ByteArrayToStringUTF8(m_pchFileName_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_pchFileName_, Constants.k_cchFilenameMax); } + } + public int m_nFileSize; // Size of the primary file (for legacy items which only support one file). This may not be accurate for non-legacy items which can be greater than 4gb in size. + public int m_nPreviewFileSize; // Size of the preview file + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchPublishedFileURLMax)] + internal byte[] m_rgchURL_; + public string m_rgchURL // URL (for a video or a website) + { + get { return InteropHelp.ByteArrayToStringUTF8(m_rgchURL_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_rgchURL_, Constants.k_cchPublishedFileURLMax); } + } + // voting information + public uint m_unVotesUp; // number of votes up + public uint m_unVotesDown; // number of votes down + public float m_flScore; // calculated score + // collection details + public uint m_unNumChildren; + public ulong m_ulTotalFilesSize; // Total size of all files (non-legacy), excluding the preview file + } + + #endif + // a single entry in a leaderboard, as returned by GetDownloadedLeaderboardEntry() + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + public struct LeaderboardEntry_t { + public CSteamID m_steamIDUser; // user with the entry - use SteamFriends()->GetFriendPersonaName() & SteamFriends()->GetFriendAvatar() to get more info + public int m_nGlobalRank; // [1..N], where N is the number of users with an entry in the leaderboard + public int m_nScore; // score as set in the leaderboard + public int m_cDetails; // number of int32 details available for this entry + public UGCHandle_t m_hUGC; // handle for UGC attached to the entry + } + + #if STEAMWORKS_ANYCPU + // a single entry in a leaderboard, as returned by GetDownloadedLeaderboardEntry() + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + internal struct LeaderboardEntry_t_LargePack { + public CSteamID m_steamIDUser; // user with the entry - use SteamFriends()->GetFriendPersonaName() & SteamFriends()->GetFriendAvatar() to get more info + public int m_nGlobalRank; // [1..N], where N is the number of users with an entry in the leaderboard + public int m_nScore; // score as set in the leaderboard + public int m_cDetails; // number of int32 details available for this entry + public UGCHandle_t m_hUGC; // handle for UGC attached to the entry + } + + + // a single entry in a leaderboard, as returned by GetDownloadedLeaderboardEntry() + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + internal struct LeaderboardEntry_t_SmallPack { + public CSteamID m_steamIDUser; // user with the entry - use SteamFriends()->GetFriendPersonaName() & SteamFriends()->GetFriendAvatar() to get more info + public int m_nGlobalRank; // [1..N], where N is the number of users with an entry in the leaderboard + public int m_nScore; // score as set in the leaderboard + public int m_cDetails; // number of int32 details available for this entry + public UGCHandle_t m_hUGC; // handle for UGC attached to the entry + } + + #endif + /// Store key/value pair used in matchmaking queries. + /// + /// Actually, the name Key/Value is a bit misleading. The "key" is better + /// understood as "filter operation code" and the "value" is the operand to this + /// filter operation. The meaning of the operand depends upon the filter. + [StructLayout(LayoutKind.Sequential)] + public struct MatchMakingKeyValuePair_t { + MatchMakingKeyValuePair_t(string strKey, string strValue) { + m_szKey = strKey; + m_szValue = strValue; + } + + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] + public string m_szKey; + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] + public string m_szValue; + } + + #if STEAMWORKS_ANYCPU + /// Store key/value pair used in matchmaking queries. + /// + /// Actually, the name Key/Value is a bit misleading. The "key" is better + /// understood as "filter operation code" and the "value" is the operand to this + /// filter operation. The meaning of the operand depends upon the filter. + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + internal struct MatchMakingKeyValuePair_t_LargePack { + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] + public string m_szKey; + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] + public string m_szValue; + } + + + /// Store key/value pair used in matchmaking queries. + /// + /// Actually, the name Key/Value is a bit misleading. The "key" is better + /// understood as "filter operation code" and the "value" is the operand to this + /// filter operation. The meaning of the operand depends upon the filter. + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + internal struct MatchMakingKeyValuePair_t_SmallPack { + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] + public string m_szKey; + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] + public string m_szValue; + } + + #endif + // structure that contains client callback data + // see callbacks documentation for more details + /// Internal structure used in manual callback dispatch + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + public struct CallbackMsg_t { + public int m_hSteamUser; // Specific user to whom this callback applies. + public int m_iCallback; // Callback identifier. (Corresponds to the k_iCallback enum in the callback structure.) + public IntPtr m_pubParam; // Points to the callback structure + public int m_cubParam; // Size of the data pointed to by m_pubParam + } + + #if STEAMWORKS_ANYCPU + // structure that contains client callback data + // see callbacks documentation for more details + /// Internal structure used in manual callback dispatch + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + internal struct CallbackMsg_t_LargePack { + public int m_hSteamUser; // Specific user to whom this callback applies. + public int m_iCallback; // Callback identifier. (Corresponds to the k_iCallback enum in the callback structure.) + public IntPtr m_pubParam; // Points to the callback structure + public int m_cubParam; // Size of the data pointed to by m_pubParam + } + + + // structure that contains client callback data + // see callbacks documentation for more details + /// Internal structure used in manual callback dispatch + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + internal struct CallbackMsg_t_SmallPack { + public int m_hSteamUser; // Specific user to whom this callback applies. + public int m_iCallback; // Callback identifier. (Corresponds to the k_iCallback enum in the callback structure.) + public IntPtr m_pubParam; // Points to the callback structure + public int m_cubParam; // Size of the data pointed to by m_pubParam + } + + #endif + /// Describe the state of a connection. + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + public struct SteamNetConnectionInfo_t { + + /// Who is on the other end? Depending on the connection type and phase of the connection, we might not know + public SteamNetworkingIdentity m_identityRemote; + + /// Arbitrary user data set by the local application code + public long m_nUserData; + + /// Handle to listen socket this was connected on, or k_HSteamListenSocket_Invalid if we initiated the connection + public HSteamListenSocket m_hListenSocket; + + /// Remote address. Might be all 0's if we don't know it, or if this is N/A. + /// (E.g. Basically everything except direct UDP connection.) + public SteamNetworkingIPAddr m_addrRemote; + public ushort m__pad1; + + /// What data center is the remote host in? (0 if we don't know.) + public SteamNetworkingPOPID m_idPOPRemote; + + /// What relay are we using to communicate with the remote host? + /// (0 if not applicable.) + public SteamNetworkingPOPID m_idPOPRelay; + + /// High level state of the connection + public ESteamNetworkingConnectionState m_eState; + + /// Basic cause of the connection termination or problem. + /// See ESteamNetConnectionEnd for the values used + public int m_eEndReason; + + /// Human-readable, but non-localized explanation for connection + /// termination or problem. This is intended for debugging / + /// diagnostic purposes only, not to display to users. It might + /// have some details specific to the issue. + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchSteamNetworkingMaxConnectionCloseReason)] + internal byte[] m_szEndDebug_; + public string m_szEndDebug + { + get { return InteropHelp.ByteArrayToStringUTF8(m_szEndDebug_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_szEndDebug_, Constants.k_cchSteamNetworkingMaxConnectionCloseReason); } + } + + /// Debug description. This includes the internal connection ID, + /// connection type (and peer information), and any name + /// given to the connection by the app. This string is used in various + /// internal logging messages. + /// + /// Note that the connection ID *usually* matches the HSteamNetConnection + /// handle, but in certain cases with symmetric connections it might not. + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchSteamNetworkingMaxConnectionDescription)] + internal byte[] m_szConnectionDescription_; + public string m_szConnectionDescription + { + get { return InteropHelp.ByteArrayToStringUTF8(m_szConnectionDescription_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_szConnectionDescription_, Constants.k_cchSteamNetworkingMaxConnectionDescription); } + } + + /// Misc flags. Bitmask of k_nSteamNetworkConnectionInfoFlags_Xxxx + public int m_nFlags; + + /// Internal stuff, room to change API easily + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 63)] + public uint[] reserved; + } + + #if STEAMWORKS_ANYCPU + /// Describe the state of a connection. + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + internal struct SteamNetConnectionInfo_t_LargePack { + + /// Who is on the other end? Depending on the connection type and phase of the connection, we might not know + public SteamNetworkingIdentity m_identityRemote; + + /// Arbitrary user data set by the local application code + public long m_nUserData; + + /// Handle to listen socket this was connected on, or k_HSteamListenSocket_Invalid if we initiated the connection + public HSteamListenSocket m_hListenSocket; + + /// Remote address. Might be all 0's if we don't know it, or if this is N/A. + /// (E.g. Basically everything except direct UDP connection.) + public SteamNetworkingIPAddr m_addrRemote; + public ushort m__pad1; + + /// What data center is the remote host in? (0 if we don't know.) + public SteamNetworkingPOPID m_idPOPRemote; + + /// What relay are we using to communicate with the remote host? + /// (0 if not applicable.) + public SteamNetworkingPOPID m_idPOPRelay; + + /// High level state of the connection + public ESteamNetworkingConnectionState m_eState; + + /// Basic cause of the connection termination or problem. + /// See ESteamNetConnectionEnd for the values used + public int m_eEndReason; + + /// Human-readable, but non-localized explanation for connection + /// termination or problem. This is intended for debugging / + /// diagnostic purposes only, not to display to users. It might + /// have some details specific to the issue. + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchSteamNetworkingMaxConnectionCloseReason)] + internal byte[] m_szEndDebug_; + public string m_szEndDebug + { + get { return InteropHelp.ByteArrayToStringUTF8(m_szEndDebug_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_szEndDebug_, Constants.k_cchSteamNetworkingMaxConnectionCloseReason); } + } + + /// Debug description. This includes the internal connection ID, + /// connection type (and peer information), and any name + /// given to the connection by the app. This string is used in various + /// internal logging messages. + /// + /// Note that the connection ID *usually* matches the HSteamNetConnection + /// handle, but in certain cases with symmetric connections it might not. + [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchSteamNetworkingMaxConnectionDescription)] + internal byte[] m_szConnectionDescription_; + public string m_szConnectionDescription + { + get { return InteropHelp.ByteArrayToStringUTF8(m_szConnectionDescription_); } + set { InteropHelp.StringToByteArrayUTF8(value, m_szConnectionDescription_, Constants.k_cchSteamNetworkingMaxConnectionDescription); } + } + + /// Misc flags. Bitmask of k_nSteamNetworkConnectionInfoFlags_Xxxx + public int m_nFlags; + + /// Internal stuff, room to change API easily + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 63)] + public uint[] reserved; + } + /// Describe the state of a connection. [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] - public struct SteamNetConnectionInfo_t { + internal struct SteamNetConnectionInfo_t_SmallPack { /// Who is on the other end? Depending on the connection type and phase of the connection, we might not know public SteamNetworkingIdentity m_identityRemote; @@ -289,7 +886,7 @@ public struct SteamNetConnectionInfo_t { /// diagnostic purposes only, not to display to users. It might /// have some details specific to the issue. [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchSteamNetworkingMaxConnectionCloseReason)] - private byte[] m_szEndDebug_; + internal byte[] m_szEndDebug_; public string m_szEndDebug { get { return InteropHelp.ByteArrayToStringUTF8(m_szEndDebug_); } @@ -304,7 +901,7 @@ public string m_szEndDebug /// Note that the connection ID *usually* matches the HSteamNetConnection /// handle, but in certain cases with symmetric connections it might not. [MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cchSteamNetworkingMaxConnectionDescription)] - private byte[] m_szConnectionDescription_; + internal byte[] m_szConnectionDescription_; public string m_szConnectionDescription { get { return InteropHelp.ByteArrayToStringUTF8(m_szConnectionDescription_); } @@ -319,6 +916,7 @@ public string m_szConnectionDescription public uint[] reserved; } + #endif /// Quick connection state, pared down to something you could call /// more frequently without it being too big of a perf hit. [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] @@ -398,6 +996,167 @@ public struct SteamNetConnectionRealTimeStatus_t { public uint[] reserved; } + #if STEAMWORKS_ANYCPU + /// Quick connection state, pared down to something you could call + /// more frequently without it being too big of a perf hit. + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + internal struct SteamNetConnectionRealTimeStatus_t_LargePack { + + /// High level state of the connection + public ESteamNetworkingConnectionState m_eState; + + /// Current ping (ms) + public int m_nPing; + + /// Connection quality measured locally, 0...1. (Percentage of packets delivered + /// end-to-end in order). + public float m_flConnectionQualityLocal; + + /// Packet delivery success rate as observed from remote host + public float m_flConnectionQualityRemote; + + /// Current data rates from recent history. + public float m_flOutPacketsPerSec; + public float m_flOutBytesPerSec; + public float m_flInPacketsPerSec; + public float m_flInBytesPerSec; + + /// Estimate rate that we believe that we can send data to our peer. + /// Note that this could be significantly higher than m_flOutBytesPerSec, + /// meaning the capacity of the channel is higher than you are sending data. + /// (That's OK!) + public int m_nSendRateBytesPerSecond; + + /// Number of bytes pending to be sent. This is data that you have recently + /// requested to be sent but has not yet actually been put on the wire. The + /// reliable number ALSO includes data that was previously placed on the wire, + /// but has now been scheduled for re-transmission. Thus, it's possible to + /// observe m_cbPendingReliable increasing between two checks, even if no + /// calls were made to send reliable data between the checks. Data that is + /// awaiting the Nagle delay will appear in these numbers. + public int m_cbPendingUnreliable; + public int m_cbPendingReliable; + + /// Number of bytes of reliable data that has been placed the wire, but + /// for which we have not yet received an acknowledgment, and thus we may + /// have to re-transmit. + public int m_cbSentUnackedReliable; + + /// If you queued a message right now, approximately how long would that message + /// wait in the queue before we actually started putting its data on the wire in + /// a packet? + /// + /// In general, data that is sent by the application is limited by the bandwidth + /// of the channel. If you send data faster than this, it must be queued and + /// put on the wire at a metered rate. Even sending a small amount of data (e.g. + /// a few MTU, say ~3k) will require some of the data to be delayed a bit. + /// + /// Ignoring multiple lanes, the estimated delay will be approximately equal to + /// + /// ( m_cbPendingUnreliable+m_cbPendingReliable ) / m_nSendRateBytesPerSecond + /// + /// plus or minus one MTU. It depends on how much time has elapsed since the last + /// packet was put on the wire. For example, the queue might have *just* been emptied, + /// and the last packet placed on the wire, and we are exactly up against the send + /// rate limit. In that case we might need to wait for one packet's worth of time to + /// elapse before we can send again. On the other extreme, the queue might have data + /// in it waiting for Nagle. (This will always be less than one packet, because as + /// soon as we have a complete packet we would send it.) In that case, we might be + /// ready to send data now, and this value will be 0. + /// + /// This value is only valid if multiple lanes are not used. If multiple lanes are + /// in use, then the queue time will be different for each lane, and you must use + /// the value in SteamNetConnectionRealTimeLaneStatus_t. + /// + /// Nagle delay is ignored for the purposes of this calculation. + public SteamNetworkingMicroseconds m_usecQueueTime; + + // Internal stuff, room to change API easily + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] + public uint[] reserved; + } + + + /// Quick connection state, pared down to something you could call + /// more frequently without it being too big of a perf hit. + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + internal struct SteamNetConnectionRealTimeStatus_t_SmallPack { + + /// High level state of the connection + public ESteamNetworkingConnectionState m_eState; + + /// Current ping (ms) + public int m_nPing; + + /// Connection quality measured locally, 0...1. (Percentage of packets delivered + /// end-to-end in order). + public float m_flConnectionQualityLocal; + + /// Packet delivery success rate as observed from remote host + public float m_flConnectionQualityRemote; + + /// Current data rates from recent history. + public float m_flOutPacketsPerSec; + public float m_flOutBytesPerSec; + public float m_flInPacketsPerSec; + public float m_flInBytesPerSec; + + /// Estimate rate that we believe that we can send data to our peer. + /// Note that this could be significantly higher than m_flOutBytesPerSec, + /// meaning the capacity of the channel is higher than you are sending data. + /// (That's OK!) + public int m_nSendRateBytesPerSecond; + + /// Number of bytes pending to be sent. This is data that you have recently + /// requested to be sent but has not yet actually been put on the wire. The + /// reliable number ALSO includes data that was previously placed on the wire, + /// but has now been scheduled for re-transmission. Thus, it's possible to + /// observe m_cbPendingReliable increasing between two checks, even if no + /// calls were made to send reliable data between the checks. Data that is + /// awaiting the Nagle delay will appear in these numbers. + public int m_cbPendingUnreliable; + public int m_cbPendingReliable; + + /// Number of bytes of reliable data that has been placed the wire, but + /// for which we have not yet received an acknowledgment, and thus we may + /// have to re-transmit. + public int m_cbSentUnackedReliable; + + /// If you queued a message right now, approximately how long would that message + /// wait in the queue before we actually started putting its data on the wire in + /// a packet? + /// + /// In general, data that is sent by the application is limited by the bandwidth + /// of the channel. If you send data faster than this, it must be queued and + /// put on the wire at a metered rate. Even sending a small amount of data (e.g. + /// a few MTU, say ~3k) will require some of the data to be delayed a bit. + /// + /// Ignoring multiple lanes, the estimated delay will be approximately equal to + /// + /// ( m_cbPendingUnreliable+m_cbPendingReliable ) / m_nSendRateBytesPerSecond + /// + /// plus or minus one MTU. It depends on how much time has elapsed since the last + /// packet was put on the wire. For example, the queue might have *just* been emptied, + /// and the last packet placed on the wire, and we are exactly up against the send + /// rate limit. In that case we might need to wait for one packet's worth of time to + /// elapse before we can send again. On the other extreme, the queue might have data + /// in it waiting for Nagle. (This will always be less than one packet, because as + /// soon as we have a complete packet we would send it.) In that case, we might be + /// ready to send data now, and this value will be 0. + /// + /// This value is only valid if multiple lanes are not used. If multiple lanes are + /// in use, then the queue time will be different for each lane, and you must use + /// the value in SteamNetConnectionRealTimeLaneStatus_t. + /// + /// Nagle delay is ignored for the purposes of this calculation. + public SteamNetworkingMicroseconds m_usecQueueTime; + + // Internal stuff, room to change API easily + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] + public uint[] reserved; + } + + #endif /// Quick status of a particular lane [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] public struct SteamNetConnectionRealTimeLaneStatus_t { @@ -418,6 +1177,49 @@ public struct SteamNetConnectionRealTimeLaneStatus_t { public uint[] reserved; } + #if STEAMWORKS_ANYCPU + /// Quick status of a particular lane + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + internal struct SteamNetConnectionRealTimeLaneStatus_t_LargePack { + // Counters for this particular lane. See the corresponding variables + // in SteamNetConnectionRealTimeStatus_t + public int m_cbPendingUnreliable; + public int m_cbPendingReliable; + public int m_cbSentUnackedReliable; + public int _reservePad1; // Reserved for future use + + /// Lane-specific queue time. This value takes into consideration lane priorities + /// and weights, and how much data is queued in each lane, and attempts to predict + /// how any data currently queued will be sent out. + public SteamNetworkingMicroseconds m_usecQueueTime; + + // Internal stuff, room to change API easily + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 10)] + public uint[] reserved; + } + + + /// Quick status of a particular lane + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + internal struct SteamNetConnectionRealTimeLaneStatus_t_SmallPack { + // Counters for this particular lane. See the corresponding variables + // in SteamNetConnectionRealTimeStatus_t + public int m_cbPendingUnreliable; + public int m_cbPendingReliable; + public int m_cbSentUnackedReliable; + public int _reservePad1; // Reserved for future use + + /// Lane-specific queue time. This value takes into consideration lane priorities + /// and weights, and how much data is queued in each lane, and attempts to predict + /// how any data currently queued will be sent out. + public SteamNetworkingMicroseconds m_usecQueueTime; + + // Internal stuff, room to change API easily + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 10)] + public uint[] reserved; + } + + #endif // // Ping location / measurement // @@ -440,6 +1242,53 @@ public struct SteamNetworkPingLocation_t { public byte[] m_data; } + #if STEAMWORKS_ANYCPU + // + // Ping location / measurement + // + /// Object that describes a "location" on the Internet with sufficient + /// detail that we can reasonably estimate an upper bound on the ping between + /// the two hosts, even if a direct route between the hosts is not possible, + /// and the connection must be routed through the Steam Datagram Relay network. + /// This does not contain any information that identifies the host. Indeed, + /// if two hosts are in the same building or otherwise have nearly identical + /// networking characteristics, then it's valid to use the same location + /// object for both of them. + /// + /// NOTE: This object should only be used in the same process! Do not serialize it, + /// send it over the wire, or persist it in a file or database! If you need + /// to do that, convert it to a string representation using the methods in + /// ISteamNetworkingUtils(). + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + internal struct SteamNetworkPingLocation_t_LargePack { + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 512)] + public byte[] m_data; + } + + + // + // Ping location / measurement + // + /// Object that describes a "location" on the Internet with sufficient + /// detail that we can reasonably estimate an upper bound on the ping between + /// the two hosts, even if a direct route between the hosts is not possible, + /// and the connection must be routed through the Steam Datagram Relay network. + /// This does not contain any information that identifies the host. Indeed, + /// if two hosts are in the same building or otherwise have nearly identical + /// networking characteristics, then it's valid to use the same location + /// object for both of them. + /// + /// NOTE: This object should only be used in the same process! Do not serialize it, + /// send it over the wire, or persist it in a file or database! If you need + /// to do that, convert it to a string representation using the methods in + /// ISteamNetworkingUtils(). + [StructLayout(LayoutKind.Sequential, Pack = Packsize.value)] + internal struct SteamNetworkPingLocation_t_SmallPack { + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 512)] + public byte[] m_data; + } + + #endif } #endif // !DISABLESTEAMWORKS