diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..fb22870
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,100 @@
+# Remove the line below if you want to inherit .editorconfig settings from higher directories
+root = true
+
+# C# files
+[*.cs]
+indent_style = tab
+indent_size = tab
+tab_size = 4
+
+# New line preferences
+end_of_line = crlf
+insert_final_newline = true
+
+
+#### C# Coding Conventions ####
+
+# Expression-bodied members
+csharp_style_expression_bodied_accessors = true:silent
+csharp_style_expression_bodied_constructors = false:silent
+csharp_style_expression_bodied_indexers = true:silent
+csharp_style_expression_bodied_lambdas = true:silent
+csharp_style_expression_bodied_local_functions = false:silent
+csharp_style_expression_bodied_methods = false:silent
+csharp_style_expression_bodied_operators = false:silent
+csharp_style_expression_bodied_properties = true:silent
+
+# Pattern matching preferences
+csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
+csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
+csharp_style_prefer_not_pattern = true:suggestion
+csharp_style_prefer_pattern_matching = true:silent
+csharp_style_prefer_switch_expression = true:suggestion
+
+# Null-checking preferences
+csharp_style_conditional_delegate_call = true:suggestion
+
+# Code-block preferences
+csharp_prefer_braces = true:silent
+
+# Expression-level preferences
+csharp_prefer_simple_default_expression = true:suggestion
+csharp_style_deconstructed_variable_declaration = true:suggestion
+csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion
+csharp_style_inlined_variable_declaration = true:suggestion
+csharp_style_pattern_local_over_anonymous_function = true:suggestion
+csharp_style_prefer_index_operator = true:suggestion
+csharp_style_prefer_range_operator = true:suggestion
+csharp_style_throw_expression = true:suggestion
+csharp_style_unused_value_assignment_preference = discard_variable:suggestion
+csharp_style_unused_value_expression_statement_preference = discard_variable:silent
+
+# 'using' directive preferences
+csharp_using_directive_placement = outside_namespace:silent
+
+#### C# Formatting Rules ####
+
+# New line preferences
+csharp_new_line_before_catch = true
+csharp_new_line_before_else = true
+csharp_new_line_before_finally = true
+csharp_new_line_before_members_in_anonymous_types = true
+csharp_new_line_before_members_in_object_initializers = true
+csharp_new_line_before_open_brace = all
+csharp_new_line_between_query_expression_clauses = true
+
+# Indentation preferences
+csharp_indent_block_contents = true
+csharp_indent_braces = false
+csharp_indent_case_contents = true
+csharp_indent_case_contents_when_block = true
+csharp_indent_labels = no_change
+csharp_indent_switch_labels = true
+
+# Space preferences
+csharp_space_after_cast = false
+csharp_space_after_colon_in_inheritance_clause = true
+csharp_space_after_comma = true
+csharp_space_after_dot = false
+csharp_space_after_keywords_in_control_flow_statements = true
+csharp_space_after_semicolon_in_for_statement = true
+csharp_space_around_binary_operators = before_and_after
+csharp_space_around_declaration_statements = false
+csharp_space_before_colon_in_inheritance_clause = true
+csharp_space_before_comma = false
+csharp_space_before_dot = false
+csharp_space_before_open_square_brackets = false
+csharp_space_before_semicolon_in_for_statement = false
+csharp_space_between_empty_square_brackets = false
+csharp_space_between_method_call_empty_parameter_list_parentheses = false
+csharp_space_between_method_call_name_and_opening_parenthesis = false
+csharp_space_between_method_call_parameter_list_parentheses = true
+csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
+csharp_space_between_method_declaration_name_and_open_parenthesis = false
+csharp_space_between_method_declaration_parameter_list_parentheses = true
+csharp_space_between_parentheses = control_flow_statements
+csharp_space_between_square_brackets = false
+
+# Wrapping preferences
+csharp_preserve_single_line_blocks = true
+csharp_preserve_single_line_statements = true
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 0000000..0da82a8
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,34 @@
+---
+name: Bug report
+about: Create a report to help us improve
+title: ''
+labels: ''
+assignees: garrynewman
+
+---
+
+**Describe the bug**
+A clear and concise description of what the bug is.
+
+**To Reproduce**
+Steps to reproduce the behavior:
+1. Set x to y
+2. Run for x minutes
+3. Call x
+4. See error
+
+**Calling Code**
+```
+// The code you're using to call into Steamworks
+Steamworks.DoBug();
+```
+
+**Expected behavior**
+A clear and concise description of what you expected to happen.
+
+**Desktop (please complete the following information):**
+ - OS: [e.g. iOS]
+- Unity: [e.g Unity 2019.3]
+
+**Additional context**
+Add any other context about the problem here.
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
new file mode 100644
index 0000000..bbcbbe7
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,20 @@
+---
+name: Feature request
+about: Suggest an idea for this project
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+**Is your feature request related to a problem? Please describe.**
+A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
+
+**Describe the solution you'd like**
+A clear and concise description of what you want to happen.
+
+**Describe alternatives you've considered**
+A clear and concise description of any alternative solutions or features you've considered.
+
+**Additional context**
+Add any other context or screenshots about the feature request here.
diff --git a/.github/ISSUE_TEMPLATE/something-else.md b/.github/ISSUE_TEMPLATE/something-else.md
new file mode 100644
index 0000000..bfc3ed4
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/something-else.md
@@ -0,0 +1,10 @@
+---
+name: Something Else
+about: Describe this issue template's purpose here.
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+
diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml
new file mode 100644
index 0000000..11ee059
--- /dev/null
+++ b/.github/workflows/dotnetcore.yml
@@ -0,0 +1,35 @@
+name: Build All
+
+on: [push]
+
+jobs:
+ build:
+
+ runs-on: windows-latest
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Setup dotnet 6.0.x
+ uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: '6.0.x'
+ include-prerelease: true
+
+ - name: Restore Win64
+ run: dotnet restore Facepunch.Steamworks\Facepunch.Steamworks.Win64.csproj
+ - name: Restore Win32
+ run: dotnet restore Facepunch.Steamworks\Facepunch.Steamworks.Win32.csproj
+ - name: Restore Posix
+ run: dotnet restore Facepunch.Steamworks\Facepunch.Steamworks.Posix.csproj
+
+ - name: Build Win64
+ run: dotnet build Facepunch.Steamworks\Facepunch.Steamworks.Win64.csproj
+ - name: Build Win32
+ run: dotnet build Facepunch.Steamworks\Facepunch.Steamworks.Win32.csproj
+ - name: Build Posix
+ run: dotnet build Facepunch.Steamworks\Facepunch.Steamworks.Posix.csproj
+
+ - uses: actions/upload-artifact@v1
+ with:
+ name: Compiled Files
+ path: Facepunch.Steamworks/bin
diff --git a/CompileFix.bat b/CompileFix.bat
index 3580950..ac4bb3c 100644
--- a/CompileFix.bat
+++ b/CompileFix.bat
@@ -1,5 +1,5 @@
-cd Facepunch.Steamworks
-dotnet restore .\Facepunch.Steamworks.Posix32.csproj
-dotnet restore .\Facepunch.Steamworks.Posix64.csproj
-dotnet restore .\Facepunch.Steamworks.Win32.csproj
-dotnet restore .\Facepunch.Steamworks.Win64.csproj
\ No newline at end of file
+dotnet restore .\Facepunch.Steamworks\Facepunch.Steamworks.Posix.csproj
+dotnet restore .\Facepunch.Steamworks\Facepunch.Steamworks.Win32.csproj
+dotnet restore .\Facepunch.Steamworks\Facepunch.Steamworks.Win64.csproj
+dotnet restore .\Facepunch.Steamworks.Test\Facepunch.Steamworks.TestWin32.csproj
+dotnet restore .\Facepunch.Steamworks.Test\Facepunch.Steamworks.TestWin64.csproj
\ No newline at end of file
diff --git a/Facepunch.Steamworks.Test/AppTest.cs b/Facepunch.Steamworks.Test/AppTest.cs
index 5ef8213..693abe2 100644
--- a/Facepunch.Steamworks.Test/AppTest.cs
+++ b/Facepunch.Steamworks.Test/AppTest.cs
@@ -15,7 +15,14 @@ namespace Steamworks
[AssemblyInitialize]
public static void AssemblyInit( TestContext context )
{
- Steamworks.SteamClient.OnCallbackException = ( e ) =>
+ Steamworks.Dispatch.OnDebugCallback = ( type, str, server ) =>
+ {
+ Console.WriteLine( $"[Callback {type} {(server ? "server" : "client")}]" );
+ Console.WriteLine( str );
+ Console.WriteLine( $"" );
+ };
+
+ Steamworks.Dispatch.OnException = ( e ) =>
{
Console.Error.WriteLine( e.Message );
Console.Error.WriteLine( e.StackTrace );
@@ -39,15 +46,15 @@ namespace Steamworks
Steamworks.SteamServer.Init( 252490, serverInit );
+ //
+ // Needs to happen before LogOnAnonymous
+ //
+ SteamNetworkingSockets.RequestFakeIP();
+
SteamServer.LogOnAnonymous();
}
- static void OnNewUrlLaunchParameters()
- {
- // Wow!
- }
-
[TestMethod]
public void GameLangauge()
{
@@ -95,7 +102,7 @@ namespace Steamworks
[TestMethod]
public async Task GetFileDetails()
{
- var fileinfo = await SteamApps.GetFileDetailsAsync( "hl2.exe" );
+ var fileinfo = await SteamApps.GetFileDetailsAsync( "RustClient.exe" );
Console.WriteLine( $"fileinfo.SizeInBytes: {fileinfo?.SizeInBytes}" );
Console.WriteLine( $"fileinfo.Sha1: {fileinfo?.Sha1}" );
diff --git a/Facepunch.Steamworks.Test/ClanTest.cs b/Facepunch.Steamworks.Test/ClanTest.cs
new file mode 100644
index 0000000..eefb64e
--- /dev/null
+++ b/Facepunch.Steamworks.Test/ClanTest.cs
@@ -0,0 +1,59 @@
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Steamworks
+{
+ [DeploymentItem("steam_api64.dll")]
+ [DeploymentItem("steam_api.dll")]
+ [TestClass]
+ public class ClanTest
+ {
+ [TestMethod]
+ public void GetName()
+ {
+ var clan = new Clan(103582791433666425);
+
+ Assert.AreEqual("Steamworks Development", clan.Name);
+ }
+
+ [TestMethod]
+ public void GetClanTag()
+ {
+ var clan = new Clan(103582791433666425);
+
+ Assert.AreEqual("SteamworksDev", clan.Tag);
+ }
+
+ [TestMethod]
+ public async Task GetOwner()
+ {
+ var clan = new Clan(103582791433666425);
+ await clan.RequestOfficerList();
+
+ Assert.AreNotEqual(new SteamId(), clan.Owner.Id);
+ }
+
+ [TestMethod]
+ public void GetOfficers()
+ {
+ var clan = new Clan(103582791433666425);
+ foreach (var officer in clan.GetOfficers())
+ {
+ Console.WriteLine($"{officer.Name} : {officer.Id}");
+ }
+ }
+
+ [TestMethod]
+ public async Task RequestOfficerList()
+ {
+ var clan = new Clan(103582791433666425);
+ bool res = await clan.RequestOfficerList();
+
+ Assert.AreEqual(true, res);
+ }
+ }
+}
diff --git a/Facepunch.Steamworks.Test/Facepunch.Steamworks.TestWin32.csproj b/Facepunch.Steamworks.Test/Facepunch.Steamworks.TestWin32.csproj
index 03f2d4b..b5d97a7 100644
--- a/Facepunch.Steamworks.Test/Facepunch.Steamworks.TestWin32.csproj
+++ b/Facepunch.Steamworks.Test/Facepunch.Steamworks.TestWin32.csproj
@@ -1,147 +1,55 @@
-
-
-
-
- Debug
- AnyCPU
- {3F6183AD-D966-44F2-A6EB-42E61E591B49}
- Library
- Properties
- Facepunch.Steamworks.TestWin32
- Facepunch.Steamworks.TestWin32
- v4.6
- 512
- {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- 10.0
- $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
- $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages
- False
- UnitTest
-
-
-
-
+
- true
- full
- false
- bin\Debug\
TRACE;DEBUG;TEST_WIN32
- prompt
- 4
x86
true
- pdbonly
- true
- bin\Release\
TRACE;TEST_WIN32
- prompt
- 4
x64
true
- true
bin\x64\Debug\
- DEBUG;TRACE
- full
- x64
- prompt
MinimumRecommendedRules.ruleset
true
bin\x64\Release\
- TRACE
- true
- pdbonly
- x64
- prompt
MinimumRecommendedRules.ruleset
true
- true
bin\x86\Debug\
- DEBUG;TRACE
- full
x64
- prompt
MinimumRecommendedRules.ruleset
true
bin\x86\Release\
- TRACE
- true
- pdbonly
x64
- prompt
MinimumRecommendedRules.ruleset
true
+
+ net6.0
+ false
+
-
- ..\packages\MSTest.TestFramework.2.0.0-beta4\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll
-
-
- ..\packages\MSTest.TestFramework.2.0.0-beta4\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll
-
-
- ..\packages\Newtonsoft.Json.9.0.2-beta1\lib\net45\Newtonsoft.Json.dll
- True
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ Always
+
-
+
+
+
+
-
+
-
-
- {2d6247f6-8ab2-405f-a00e-3a364b808a55}
- Facepunch.Steamworks.Win32
-
-
-
-
-
-
- This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Facepunch.Steamworks.Test/Facepunch.Steamworks.TestWin64.csproj b/Facepunch.Steamworks.Test/Facepunch.Steamworks.TestWin64.csproj
index 9f40a26..2a18571 100644
--- a/Facepunch.Steamworks.Test/Facepunch.Steamworks.TestWin64.csproj
+++ b/Facepunch.Steamworks.Test/Facepunch.Steamworks.TestWin64.csproj
@@ -1,147 +1,54 @@
-
-
-
-
- Debug
- AnyCPU
- {165081E3-BD96-404B-B83E-A635F1AF7CDE}
- Library
- Properties
- Facepunch.Steamworks.TestWin64
- Facepunch.Steamworks.TestWin64
- v4.6
- 512
- {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- 10.0
- $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
- $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages
- False
- UnitTest
-
-
-
-
+
- true
- full
- false
- bin\Debug\
TRACE;DEBUG;TEST_WIN64
- prompt
- 4
x64
true
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
x64
true
- true
bin\x64\Debug\
- DEBUG;TRACE
- full
- x64
- prompt
MinimumRecommendedRules.ruleset
true
bin\x64\Release\
- TRACE
- true
- pdbonly
- x64
- prompt
MinimumRecommendedRules.ruleset
true
- true
bin\x86\Debug\
- DEBUG;TRACE
- full
x64
- prompt
MinimumRecommendedRules.ruleset
true
bin\x86\Release\
- TRACE
- true
- pdbonly
x64
- prompt
MinimumRecommendedRules.ruleset
true
+
+ net6.0
+ false
+
-
- ..\packages\MSTest.TestFramework.2.0.0-beta4\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll
-
-
- ..\packages\MSTest.TestFramework.2.0.0-beta4\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll
-
-
- ..\packages\Newtonsoft.Json.9.0.2-beta1\lib\net45\Newtonsoft.Json.dll
- True
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ Always
+
-
+
+
+
+
-
+
-
-
- {8c73da93-73ad-4445-9a2c-15d4a44337d3}
- Facepunch.Steamworks.Win64
-
-
-
-
-
-
- This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Facepunch.Steamworks.Test/FriendsTest.cs b/Facepunch.Steamworks.Test/FriendsTest.cs
index f8183f9..946e757 100644
--- a/Facepunch.Steamworks.Test/FriendsTest.cs
+++ b/Facepunch.Steamworks.Test/FriendsTest.cs
@@ -7,6 +7,7 @@ using Steamworks.Data;
namespace Steamworks
{
[DeploymentItem( "steam_api64.dll" )]
+ [DeploymentItem( "steam_api.dll" )]
[TestClass]
public class FriendsTest
{
@@ -112,43 +113,20 @@ namespace Steamworks
}
}
- /*
- [TestMethod]
- public void FriendListWithoutRefresh()
- {
- using ( var client = new Facepunch.Steamworks.Client( 252490 ) )
- {
- Assert.IsTrue( client.IsValid );
+ [TestMethod]
+ public async Task OpenWebOverlay()
+ {
+ if ( SteamUtils.IsOverlayEnabled )
+ Console.WriteLine( "Overlay Is Enabled" );
+ else
+ Console.WriteLine( "Overlay Is Not Enabled" );
- foreach ( var friend in client.Friends.All )
- {
- Console.WriteLine( "{0}: {1} (Friend:{2}) (Blocked:{3})", friend.Id, friend.Name, friend.IsFriend, friend.IsBlocked );
- }
- }
- }
+ SteamFriends.OpenWebOverlay( "https://www.google.com/" );
+
+ await Task.Delay( 2000 );
+ }
-
- [TestMethod]
- public void CachedAvatar()
- {
- using (var client = new Facepunch.Steamworks.Client(252490))
- {
- Assert.IsTrue(client.IsValid);
-
- var friend = client.Friends.All.First();
-
- var image = client.Friends.GetCachedAvatar( Steamworks.Friends.AvatarSize.Medium, friend.Id );
-
- if (image != null)
- {
- Assert.AreEqual(image.Width, 64);
- Assert.AreEqual(image.Height, 64);
- Assert.AreEqual(image.Data.Length, image.Width * image.Height * 4);
- }
- }
- }
- */
public static void DrawImage( Image img )
{
var grad = " -:+#";
diff --git a/Facepunch.Steamworks.Test/GameServerStatsTest.cs b/Facepunch.Steamworks.Test/GameServerStatsTest.cs
new file mode 100644
index 0000000..b1f2cbb
--- /dev/null
+++ b/Facepunch.Steamworks.Test/GameServerStatsTest.cs
@@ -0,0 +1,32 @@
+using System;
+using System.Linq;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Steamworks.Data;
+
+namespace Steamworks
+{
+ [TestClass]
+ [DeploymentItem( "steam_api64.dll" )]
+ [DeploymentItem( "steam_api.dll" )]
+ public class GameServerStatsTest
+ {
+ static SteamId Garry = 76561197960279927;
+
+ [TestMethod]
+ public async Task GetAchievement()
+ {
+ var result = await SteamServerStats.RequestUserStatsAsync( Garry );
+ Assert.AreEqual( result, Result.OK );
+
+ var value = SteamServerStats.GetAchievement( Garry, "COLLECT_100_WOOD" );
+ Assert.IsTrue( value );
+
+ value = SteamServerStats.GetAchievement( Garry, "ACHIVEMENT_THAT_DOESNT_EXIST" );
+ Assert.IsFalse( value );
+ }
+ }
+
+}
diff --git a/Facepunch.Steamworks.Test/GameServerTest.cs b/Facepunch.Steamworks.Test/GameServerTest.cs
index 6ed4150..090ba6b 100644
--- a/Facepunch.Steamworks.Test/GameServerTest.cs
+++ b/Facepunch.Steamworks.Test/GameServerTest.cs
@@ -5,7 +5,8 @@ using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Steamworks
{
[DeploymentItem( "steam_api64.dll" )]
- [TestClass]
+ [DeploymentItem( "steam_api.dll" )]
+ [TestClass]
public partial class GameServerTest
{
[TestMethod]
diff --git a/Facepunch.Steamworks.Test/InputTest.cs b/Facepunch.Steamworks.Test/InputTest.cs
index 0c425db..b2eb60a 100644
--- a/Facepunch.Steamworks.Test/InputTest.cs
+++ b/Facepunch.Steamworks.Test/InputTest.cs
@@ -11,7 +11,8 @@ namespace Steamworks
{
[TestClass]
[DeploymentItem( "steam_api64.dll" )]
- [DeploymentItem( "controller_config/game_actions_252490.vdf" )]
+ [DeploymentItem( "steam_api.dll" )]
+ [DeploymentItem( "controller_config/game_actions_252490.vdf" )]
public class InputTest
{
[TestMethod]
diff --git a/Facepunch.Steamworks.Test/InventoryTest.cs b/Facepunch.Steamworks.Test/InventoryTest.cs
index 27f04fe..dee610d 100644
--- a/Facepunch.Steamworks.Test/InventoryTest.cs
+++ b/Facepunch.Steamworks.Test/InventoryTest.cs
@@ -10,7 +10,8 @@ namespace Steamworks
{
[TestClass]
[DeploymentItem( "steam_api64.dll" )]
- public class InventoryTest
+ [DeploymentItem( "steam_api.dll" )]
+ public class InventoryTest
{
[TestMethod]
public async Task LoadItemDefinitionsAsync()
@@ -194,8 +195,8 @@ namespace Steamworks
{
await SteamInventory.WaitForDefinitions();
- byte[] data = null;
- int itemCount = 0;
+ byte[] data;
+ int itemCount;
// Serialize
{
diff --git a/Facepunch.Steamworks.Test/NetworkingSockets.cs b/Facepunch.Steamworks.Test/NetworkingSockets.cs
index 9fca88b..5e77c6f 100644
--- a/Facepunch.Steamworks.Test/NetworkingSockets.cs
+++ b/Facepunch.Steamworks.Test/NetworkingSockets.cs
@@ -9,14 +9,22 @@ using Steamworks.Data;
namespace Steamworks
{
- [TestClass]
+ [TestClass]
[DeploymentItem( "steam_api64.dll" )]
- public class NetworkingSocketsTest
+ [DeploymentItem( "steam_api.dll" )]
+ public partial class NetworkingSocketsTest
{
+ void DebugOutput( NetDebugOutput type, string text )
+ {
+ Console.WriteLine( $"[NET:{type}]\t\t{text}" );
+ }
[TestMethod]
public async Task CreateRelayServer()
{
+ SteamNetworkingUtils.DebugLevel = NetDebugOutput.Everything;
+ SteamNetworkingUtils.OnDebugOutput += DebugOutput;
+
var si = SteamNetworkingSockets.CreateRelaySocket();
Console.WriteLine( $"Created Socket: {si}" );
@@ -30,6 +38,9 @@ namespace Steamworks
[TestMethod]
public async Task CreateNormalServer()
{
+ SteamNetworkingUtils.DebugLevel = NetDebugOutput.Everything;
+ SteamNetworkingUtils.OnDebugOutput += DebugOutput;
+
var si = SteamNetworkingSockets.CreateNormalSocket( Data.NetAddress.AnyIp( 21893 ) );
Console.WriteLine( $"Created Socket: {si}" );
@@ -40,15 +51,41 @@ namespace Steamworks
si.Close();
}
+ [TestMethod]
+ public async Task CreateRelayServerFakeIP()
+ {
+ SteamNetworkingUtils.DebugLevel = NetDebugOutput.Everything;
+ SteamNetworkingUtils.OnDebugOutput += DebugOutput;
+
+ var si = SteamNetworkingSockets.CreateRelaySocketFakeIP();
+
+ Console.WriteLine( $"Created Socket: {si}" );
+
+ // Give it a second for something to happen
+ await Task.Delay( 1000 );
+
+ si.Close();
+ }
+
[TestMethod]
public async Task RelayEndtoEnd()
{
- var socket = SteamNetworkingSockets.CreateRelaySocket( 7788 );
+ SteamNetworkingUtils.InitRelayNetworkAccess();
+ SteamNetworkingUtils.DebugLevel = NetDebugOutput.Warning;
+ SteamNetworkingUtils.OnDebugOutput += DebugOutput;
+
+ // For some reason giving steam a couple of seconds here
+ // seems to prevent it returning null connections from ConnectNormal
+ await Task.Delay( 2000 );
+
+ Console.WriteLine( $"----- Creating Socket Relay Socket.." );
+ var socket = SteamNetworkingSockets.CreateRelaySocket( 6 );
var server = socket.RunAsync();
await Task.Delay( 1000 );
- var connection = SteamNetworkingSockets.ConnectRelay( SteamClient.SteamId, 7788 );
+ Console.WriteLine( $"----- Connecting To Socket via SteamId ({SteamClient.SteamId})" );
+ var connection = SteamNetworkingSockets.ConnectRelay( SteamClient.SteamId, 6 );
var client = connection.RunAsync();
await Task.WhenAll( server, client );
@@ -57,229 +94,68 @@ namespace Steamworks
[TestMethod]
public async Task NormalEndtoEnd()
{
+ SteamNetworkingUtils.DebugLevel = NetDebugOutput.Everything;
+ SteamNetworkingUtils.OnDebugOutput += DebugOutput;
+
+ // For some reason giving steam a couple of seconds here
+ // seems to prevent it returning null connections from ConnectNormal
+ await Task.Delay( 2000 );
+
+ //
+ // Start the server
+ //
+ Console.WriteLine( "CreateNormalSocket" );
var socket = SteamNetworkingSockets.CreateNormalSocket( NetAddress.AnyIp( 12445 ) );
var server = socket.RunAsync();
- await Task.Delay( 1000 );
-
- var connection = SteamNetworkingSockets.ConnectNormal( NetAddress.From( System.Net.IPAddress.Parse( "127.0.0.1" ), 12445 ) );
+ //
+ // Start the client
+ //
+ Console.WriteLine( "ConnectNormal" );
+ var connection = SteamNetworkingSockets.ConnectNormal( NetAddress.From( "127.0.0.1", 12445 ) );
var client = connection.RunAsync();
await Task.WhenAll( server, client );
}
- private class TestConnectionInterface : ConnectionInterface
+ [TestMethod]
+ public async Task RelayEndtoEndFakeIP()
{
- public override void OnConnectionChanged( ConnectionInfo data )
- {
- Console.WriteLine( $"[Connection][{Connection}] [{data.State}]" );
+ SteamNetworkingUtils.InitRelayNetworkAccess();
+ SteamNetworkingUtils.DebugLevel = NetDebugOutput.Warning;
+ SteamNetworkingUtils.OnDebugOutput += DebugOutput;
- base.OnConnectionChanged( data );
- }
+ // For some reason giving steam a couple of seconds here
+ // seems to prevent it returning null connections from ConnectNormal
+ await Task.Delay( 2000 );
- public override void OnConnecting( ConnectionInfo data )
- {
- Console.WriteLine( $" - OnConnecting" );
- base.OnConnecting( data );
- }
+ Console.WriteLine( $"----- Creating Socket Relay Socket.." );
+ var socket = SteamNetworkingSockets.CreateRelaySocketFakeIP();
+ var server = socket.RunAsync();
- ///
- /// Client is connected. They move from connecting to Connections
- ///
- public override void OnConnected( ConnectionInfo data )
- {
- Console.WriteLine( $" - OnConnected" );
- base.OnConnected( data );
- }
+ await Task.Delay( 1000 );
- ///
- /// The connection has been closed remotely or disconnected locally. Check data.State for details.
- ///
- public override void OnDisconnected( ConnectionInfo data )
- {
- Console.WriteLine( $" - OnDisconnected" );
- base.OnDisconnected( data );
- }
+ Console.WriteLine( $"----- Retrieving Fake IP.." );
+ SteamNetworkingSockets.GetFakeIP( 0, out NetAddress address );
- internal async Task RunAsync()
- {
- Console.WriteLine( "[Connection] RunAsync" );
+ Console.WriteLine( $"----- Connecting To Socket via Fake IP ({address})" );
+ var connection = SteamNetworkingSockets.ConnectNormal( address );
+ var client = connection.RunAsync();
- var sw = System.Diagnostics.Stopwatch.StartNew();
-
- while ( Connecting )
- {
- await Task.Delay( 10 );
-
- if ( sw.Elapsed.TotalSeconds > 30 )
- break;
- }
-
- if ( !Connected )
- {
- Console.WriteLine( "[Connection] Couldn't connect!" );
- Console.WriteLine( Connection.DetailedStatus() );
- return;
- }
-
- Console.WriteLine( "[Connection] Hey We're Connected!" );
-
-
- sw = System.Diagnostics.Stopwatch.StartNew();
- while ( Connected )
- {
- Receive();
- await Task.Delay( 100 );
-
- if ( sw.Elapsed.TotalSeconds > 10 )
- {
- Assert.Fail( "Client Took Too Long" );
- break;
- }
- }
- }
-
- public override unsafe void OnMessage( IntPtr data, int size, long messageNum, long recvTime, int channel )
- {
- // We're only sending strings, so it's fine to read this like this
- var str = UTF8Encoding.UTF8.GetString( (byte*) data, size );
-
- Console.WriteLine( $"[Connection][{messageNum}][{recvTime}][{channel}] \"{str}\"" );
-
- if ( str.Contains( "Hello" ) )
- {
- Connection.SendMessage( "Hello, How are you!?" );
-
- Connection.SendMessage( "How do you like 20 messages in a row?" );
-
- for ( int i=0; i<20; i++ )
- {
- Connection.SendMessage( $"BLAMMO!" );
- }
- }
-
- if ( str.Contains( "status" ))
- {
- Console.WriteLine( Connection.DetailedStatus() );
- }
-
- if ( str.Contains( "how about yourself" ) )
- {
- Connection.SendMessage( "I'm great, but I have to go now, bye." );
- }
-
- if ( str.Contains( "hater" ) )
- {
- Close();
- }
-
- }
+ await Task.WhenAll( server, client );
}
-
- private class TestSocketInterface : SocketInterface
+ [TestMethod]
+ public void NetAddressTest()
{
- public bool HasFinished = false;
-
- public override void OnConnectionChanged( Connection connection, ConnectionInfo data )
{
- Console.WriteLine( $"[Socket{Socket}][{connection}] [{data.State}]" );
-
- base.OnConnectionChanged( connection, data );
+ var n = NetAddress.From( "127.0.0.1", 12445 );
+ Assert.AreEqual( n.ToString(), "127.0.0.1:12445" );
}
- public override void OnConnecting( Connection connection, ConnectionInfo data )
{
- Console.WriteLine( $" - OnConnecting" );
- base.OnConnecting( connection, data );
- }
-
- ///
- /// Client is connected. They move from connecting to Connections
- ///
- public override void OnConnected( Connection connection, ConnectionInfo data )
- {
- Console.WriteLine( $" - OnConnected" );
- base.OnConnected( connection, data );
- }
-
- ///
- /// The connection has been closed remotely or disconnected locally. Check data.State for details.
- ///
- public override void OnDisconnected( Connection connection, ConnectionInfo data )
- {
- Console.WriteLine( $" - OnDisconnected" );
- base.OnDisconnected( connection, data );
- }
-
- internal async Task RunAsync()
- {
- var sw = System.Diagnostics.Stopwatch.StartNew();
-
- while ( Connected.Count == 0 )
- {
- await Task.Delay( 10 );
-
- if ( sw.Elapsed.TotalSeconds > 2 )
- {
- Assert.Fail( "Client Took Too Long To Connect" );
- break;
- }
- }
-
- await Task.Delay( 1000 );
-
- var singleClient = Connected.First();
-
- singleClient.SendMessage( "Hey?" );
- await Task.Delay( 100 );
- singleClient.SendMessage( "Anyone?" );
- await Task.Delay( 100 );
- singleClient.SendMessage( "What's this?" );
- await Task.Delay( 100 );
- singleClient.SendMessage( "What's your status?" );
- await Task.Delay( 10 );
- singleClient.SendMessage( "Greetings!!??" );
- await Task.Delay( 100 );
- singleClient.SendMessage( "Hello Client!?" );
-
- sw = System.Diagnostics.Stopwatch.StartNew();
-
- while ( Connected.Contains( singleClient ) )
- {
- Receive();
- await Task.Delay( 100 );
-
- if ( sw.Elapsed.TotalSeconds > 10 )
- {
- Assert.Fail( "Socket Took Too Long" );
- break;
- }
- }
-
- await Task.Delay( 1000 );
-
- Close();
- }
-
- public override unsafe void OnMessage( Connection connection, NetIdentity identity, IntPtr data, int size, long messageNum, long recvTime, int channel )
- {
- // We're only sending strings, so it's fine to read this like this
- var str = UTF8Encoding.UTF8.GetString( (byte*)data, size );
-
- Console.WriteLine( $"[SOCKET][{connection}[{identity}][{messageNum}][{recvTime}][{channel}] \"{str}\"" );
-
- if ( str.Contains( "Hello, How are you" ) )
- {
- connection.SendMessage( "I'm great thanks, how about yourself?" );
- }
-
- if ( str.Contains( "bye" ) )
- {
- connection.SendMessage( "See you later, hater." );
- connection.Flush();
- connection.Close( true, 10, "Said Bye" );
- }
+ var n = NetAddress.AnyIp( 5543 );
+ Assert.AreEqual( n.ToString(), "[::]:5543" );
}
}
}
diff --git a/Facepunch.Steamworks.Test/NetworkingSocketsTest.TestConnectionInterface.cs b/Facepunch.Steamworks.Test/NetworkingSocketsTest.TestConnectionInterface.cs
new file mode 100644
index 0000000..03661cd
--- /dev/null
+++ b/Facepunch.Steamworks.Test/NetworkingSocketsTest.TestConnectionInterface.cs
@@ -0,0 +1,130 @@
+using System;
+using System.Net;
+using System.Text;
+using System.Threading.Tasks;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Steamworks.Data;
+
+namespace Steamworks
+{
+ public partial class NetworkingSocketsTest
+ {
+ private class TestConnectionInterface : ConnectionManager
+ {
+ public override void OnConnectionChanged( ConnectionInfo data )
+ {
+ Console.WriteLine( $"[Connection][{Connection}] [{data.State}]" );
+
+ base.OnConnectionChanged( data );
+ }
+
+ public override void OnConnecting( ConnectionInfo data )
+ {
+ Console.WriteLine( $" - OnConnecting" );
+ base.OnConnecting( data );
+ }
+
+ ///
+ /// Client is connected. They move from connecting to Connections
+ ///
+ public override void OnConnected( ConnectionInfo data )
+ {
+ Console.WriteLine( $" - OnConnected" );
+ base.OnConnected( data );
+ }
+
+ ///
+ /// The connection has been closed remotely or disconnected locally. Check data.State for details.
+ ///
+ public override void OnDisconnected( ConnectionInfo data )
+ {
+ Console.WriteLine( $" - OnDisconnected" );
+ base.OnDisconnected( data );
+ }
+
+ internal async Task RunAsync()
+ {
+ Console.WriteLine( "[Connection] RunAsync" );
+
+ var sw = System.Diagnostics.Stopwatch.StartNew();
+
+ Console.WriteLine( "[Connection] Connecting" );
+ while ( Connecting )
+ {
+ await Task.Delay( 10 );
+
+ if ( sw.Elapsed.TotalSeconds > 10 )
+ break;
+ }
+
+ if ( !Connected )
+ {
+ Console.WriteLine( "[Connection] Couldn't connect!" );
+ Console.WriteLine( Connection.DetailedStatus() );
+ return;
+ }
+
+ Console.WriteLine( "[Connection] Hey We're Connected!" );
+
+
+ sw = System.Diagnostics.Stopwatch.StartNew();
+ while ( Connected )
+ {
+ Receive();
+ await Task.Delay( 100 );
+
+ if ( sw.Elapsed.TotalSeconds > 30 )
+ {
+ Assert.Fail( "Client Took Too Long" );
+ break;
+ }
+ }
+ }
+
+ public override unsafe void OnMessage( IntPtr data, int size, long messageNum, long recvTime, int channel )
+ {
+ // We're only sending strings, so it's fine to read this like this
+ var str = UTF8Encoding.UTF8.GetString( (byte*) data, size );
+
+ Console.WriteLine( $"[Connection][{messageNum}][{recvTime}][{channel}] \"{str}\"" );
+
+ if ( str.Contains( "Hello" ) )
+ {
+ Console.WriteLine( $"[Connection][{messageNum}][{recvTime}][{channel}] Sending: Hello, How are you!?" );
+ Connection.SendMessage( "Hello, How are you!?" );
+
+ Console.WriteLine( $"[Connection][{messageNum}][{recvTime}][{channel}] Sending: How do you like 20 messages in a row?" );
+ Connection.SendMessage( "How do you like 20 messages in a row?" );
+
+ var connections = new[] { Connection };
+ var results = new Result[1];
+ for ( int i=0; i<20; i++ )
+ {
+ Console.WriteLine( $"[Connection][{messageNum}][{recvTime}][{channel}] Sending: BLAMMO {i}!" );
+ SendMessages( connections, connections.Length, $"BLAMMO {i}!", results: results );
+ Assert.AreEqual( Result.OK, results[0] );
+ }
+
+ Connection.Flush();
+ }
+
+ if ( str.Contains( "status" ))
+ {
+ Console.WriteLine( Connection.DetailedStatus() );
+ }
+
+ if ( str.Contains( "how about yourself" ) )
+ {
+ Connection.SendMessage( "I'm great, but I have to go now, bye." );
+ }
+
+ if ( str.Contains( "hater" ) )
+ {
+ Close();
+ }
+
+ }
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/Facepunch.Steamworks.Test/NetworkingSocketsTest.TestSocketInterface.cs b/Facepunch.Steamworks.Test/NetworkingSocketsTest.TestSocketInterface.cs
new file mode 100644
index 0000000..ed5b9bd
--- /dev/null
+++ b/Facepunch.Steamworks.Test/NetworkingSocketsTest.TestSocketInterface.cs
@@ -0,0 +1,137 @@
+using System;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Steamworks.Data;
+
+namespace Steamworks
+{
+ public partial class NetworkingSocketsTest
+ {
+ private class TestSocketInterface : SocketManager
+ {
+ public bool HasFinished = false;
+
+ public override void OnConnectionChanged( Connection connection, ConnectionInfo data )
+ {
+ Console.WriteLine( $"[Socket{Socket}][connection:{connection}][data.Identity:{data.Identity}] [data.State:{data.State}]" );
+
+ base.OnConnectionChanged( connection, data );
+ }
+
+ public override void OnConnecting( Connection connection, ConnectionInfo data )
+ {
+ Console.WriteLine( $" - OnConnecting" );
+ base.OnConnecting( connection, data );
+ }
+
+ ///
+ /// Client is connected. They move from connecting to Connections
+ ///
+ public override void OnConnected( Connection connection, ConnectionInfo data )
+ {
+ Console.WriteLine( $"" );
+ Console.WriteLine( $"Socket -> OnConnected:" );
+ Console.WriteLine( $" data.Address: {data.Address}" );
+ Console.WriteLine( $" data.Identity: {data.Identity}" );
+ Console.WriteLine( $" data.Identity.Steamid: {data.Identity.SteamId}" );
+ Console.WriteLine( $" data.Identity.IsIpAddress: {data.Identity.IsIpAddress}" );
+ Console.WriteLine( $" data.Identity.IsLocalHost: {data.Identity.IsLocalHost}" );
+ Console.WriteLine( $" data.Identity.IsSteamId: {data.Identity.IsSteamId}" );
+ Console.WriteLine( $" data.Identity.Address: {data.Identity.Address}" );
+ Console.WriteLine( $" data.Identity.Address.Address: {data.Identity.Address.Address}" );
+ Console.WriteLine( $" data.Identity.Address.Port: {data.Identity.Address.Port}" );
+ Console.WriteLine( $"" );
+
+ base.OnConnected( connection, data );
+ }
+
+ ///
+ /// The connection has been closed remotely or disconnected locally. Check data.State for details.
+ ///
+ public override void OnDisconnected( Connection connection, ConnectionInfo data )
+ {
+ Console.WriteLine( $" - OnDisconnected" );
+
+ base.OnDisconnected( connection, data );
+ }
+
+ internal async Task RunAsync()
+ {
+ var sw = System.Diagnostics.Stopwatch.StartNew();
+
+ while ( Connected.Count == 0 )
+ {
+ await Task.Delay( 10 );
+
+ if ( sw.Elapsed.TotalSeconds > 10 )
+ {
+ Assert.Fail( "Client Took Too Long To Connect" );
+ break;
+ }
+ }
+
+ await Task.Delay( 1000 );
+
+ var singleClient = Connected.First();
+
+ singleClient.SendMessage( "Hey?" );
+ await Task.Delay( 100 );
+ singleClient.SendMessage( "Anyone?" );
+ await Task.Delay( 100 );
+ singleClient.SendMessage( "What's this?" );
+ await Task.Delay( 100 );
+ singleClient.SendMessage( "What's your status?" );
+ await Task.Delay( 10 );
+ singleClient.SendMessage( "Greetings!!??" );
+ await Task.Delay( 100 );
+ singleClient.SendMessage( "Hello Client!?" );
+
+ sw = System.Diagnostics.Stopwatch.StartNew();
+
+ Console.WriteLine( $"Socket: Listening" );
+
+ while ( Connected.Contains( singleClient ) )
+ {
+ Receive();
+ await Task.Delay( 100 );
+
+ if ( sw.Elapsed.TotalSeconds > 30 )
+ {
+ Console.WriteLine( "Socket: This all took too long - throwing an exception" );
+ Assert.Fail( "Socket Took Too Long" );
+ break;
+ }
+ }
+
+ Console.WriteLine( $"Socket: Closing connection because {Connected.Count()} Connected" );
+
+ await Task.Delay( 1000 );
+
+ Close();
+ }
+
+ public override unsafe void OnMessage( Connection connection, NetIdentity identity, IntPtr data, int size, long messageNum, long recvTime, int channel )
+ {
+ // We're only sending strings, so it's fine to read this like this
+ var str = UTF8Encoding.UTF8.GetString( (byte*)data, size );
+
+ Console.WriteLine( $"[SOCKET][{connection}[{identity}][{messageNum}][{recvTime}][{channel}] \"{str}\"" );
+
+ if ( str.Contains( "Hello, How are you" ) )
+ {
+ connection.SendMessage( "I'm great thanks, how about yourself?" );
+ }
+
+ if ( str.Contains( "bye" ) )
+ {
+ connection.SendMessage( "See you later, hater." );
+ connection.Flush();
+ connection.Close( true, 10, "Said Bye" );
+ }
+ }
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/Facepunch.Steamworks.Test/NetworkingUtils.cs b/Facepunch.Steamworks.Test/NetworkingUtils.cs
index 6f8d974..d2f7fb6 100644
--- a/Facepunch.Steamworks.Test/NetworkingUtils.cs
+++ b/Facepunch.Steamworks.Test/NetworkingUtils.cs
@@ -9,9 +9,10 @@ namespace Steamworks
{
[TestClass]
[DeploymentItem( "steam_api64.dll" )]
+ [DeploymentItem( "steam_api.dll" )]
public class NetworkUtilsTest
{
- static string GarrysLocation = "lhr=19+1,ams=25+2/25+1,par=29+2,fra=31+3/30+1,lux=33+3,vie=44+4/41+1,waw=47+4/45+1,sto2=48+4/46+2,sto=50+5/46+2,iad=107+10/91+1,sgp=186+18,gru=252+25/234+1";
+ static string GarrysLocation = "lhr=4+0,ams=13+1/10+0,par=17+1/12+0,lux=17+1,fra=18+1/18+0,sto=25+2,sto2=26+2,mad=27+2,vie=31+3/30+0,iad=90+9/75+0,sgp=173+17/174+17,gru=200+20/219+0";
[TestMethod]
public async Task LocalPingLocation()
@@ -37,7 +38,7 @@ namespace Steamworks
[TestMethod]
public void PingLocationParse()
{
- var pl = Data.PingLocation.TryParseFromString( GarrysLocation );
+ var pl = Data.NetPingLocation.TryParseFromString( GarrysLocation );
Assert.IsTrue( pl.HasValue );
@@ -49,7 +50,7 @@ namespace Steamworks
{
await SteamNetworkingUtils.WaitForPingDataAsync();
- var garrysping = Data.PingLocation.TryParseFromString( GarrysLocation );
+ var garrysping = Data.NetPingLocation.TryParseFromString( GarrysLocation );
Assert.IsTrue( garrysping.HasValue );
var ping = SteamNetworkingUtils.EstimatePingTo( garrysping.Value );
@@ -59,4 +60,4 @@ namespace Steamworks
}
}
-}
+}
\ No newline at end of file
diff --git a/Facepunch.Steamworks.Test/RemotePlayTest.cs b/Facepunch.Steamworks.Test/RemotePlayTest.cs
new file mode 100644
index 0000000..64e3add
--- /dev/null
+++ b/Facepunch.Steamworks.Test/RemotePlayTest.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace Steamworks
+{
+ [TestClass]
+ [DeploymentItem( "steam_api64.dll" )]
+ [DeploymentItem( "steam_api.dll" )]
+ public class RemotePlayTest
+ {
+ [TestMethod]
+ public void BasicUsability()
+ {
+ Console.WriteLine( $"Sessions: {SteamRemotePlay.SessionCount}" );
+
+ var session = SteamRemotePlay.GetSession( 4 );
+
+ Assert.IsFalse( session.IsValid );
+ Assert.IsFalse( session.SteamId.IsValid );
+ }
+
+ }
+
+}
diff --git a/Facepunch.Steamworks.Test/RemoteStorageTest.cs b/Facepunch.Steamworks.Test/RemoteStorageTest.cs
index 157315d..512c5eb 100644
--- a/Facepunch.Steamworks.Test/RemoteStorageTest.cs
+++ b/Facepunch.Steamworks.Test/RemoteStorageTest.cs
@@ -10,7 +10,8 @@ namespace Steamworks
{
[TestClass]
[DeploymentItem( "steam_api64.dll" )]
- public class RemoteStorageTest
+ [DeploymentItem( "steam_api.dll" )]
+ public class RemoteStorageTest
{
[TestMethod]
public void Quotas()
diff --git a/Facepunch.Steamworks.Test/ServerlistTest.cs b/Facepunch.Steamworks.Test/ServerlistTest.cs
index 2568564..5a06d77 100644
--- a/Facepunch.Steamworks.Test/ServerlistTest.cs
+++ b/Facepunch.Steamworks.Test/ServerlistTest.cs
@@ -11,7 +11,8 @@ namespace Steamworks
{
[TestClass]
[DeploymentItem( "steam_api64.dll" )]
- public partial class ServerListTest
+ [DeploymentItem( "steam_api.dll" )]
+ public partial class ServerListTest
{
[TestMethod]
public void IpAddressConversions()
diff --git a/Facepunch.Steamworks.Test/SteamMatchmakingTest.cs b/Facepunch.Steamworks.Test/SteamMatchmakingTest.cs
index abfe446..0846e94 100644
--- a/Facepunch.Steamworks.Test/SteamMatchmakingTest.cs
+++ b/Facepunch.Steamworks.Test/SteamMatchmakingTest.cs
@@ -10,7 +10,8 @@ namespace Steamworks
{
[TestClass]
[DeploymentItem( "steam_api64.dll" )]
- public class SteamMatchmakingTest
+ [DeploymentItem( "steam_api.dll" )]
+ public class SteamMatchmakingTest
{
[TestMethod]
public async Task LobbyList()
diff --git a/Facepunch.Steamworks.Test/SteamNetworkingTest.cs b/Facepunch.Steamworks.Test/SteamNetworkingTest.cs
index c07d15e..8675f7f 100644
--- a/Facepunch.Steamworks.Test/SteamNetworkingTest.cs
+++ b/Facepunch.Steamworks.Test/SteamNetworkingTest.cs
@@ -10,13 +10,13 @@ namespace Steamworks
{
[TestClass]
[DeploymentItem( "steam_api64.dll" )]
- public class SteamNetworkingTest
+ [DeploymentItem( "steam_api.dll" )]
+ public class SteamNetworkingTest
{
[TestMethod]
public async Task SendP2PPacket()
{
var sent = SteamNetworking.SendP2PPacket( SteamClient.SteamId, new byte[] { 1, 2, 3 } );
-
Assert.IsTrue( sent );
while ( !SteamNetworking.IsP2PPacketAvailable() )
diff --git a/Facepunch.Steamworks.Test/UgcEditor.cs b/Facepunch.Steamworks.Test/UgcEditor.cs
index 6edba5d..76ca8a1 100644
--- a/Facepunch.Steamworks.Test/UgcEditor.cs
+++ b/Facepunch.Steamworks.Test/UgcEditor.cs
@@ -10,7 +10,8 @@ namespace Steamworks
{
[TestClass]
[DeploymentItem( "steam_api64.dll" )]
- public class UgcEditor
+ [DeploymentItem( "steam_api.dll" )]
+ public class UgcEditor
{
[TestMethod]
public async Task CreateFile()
@@ -129,7 +130,7 @@ namespace Steamworks
[TestMethod]
public async Task CreateAndThenEditFile()
{
- PublishedFileId fileid = default;
+ PublishedFileId fileid;
//
// Make a file
diff --git a/Facepunch.Steamworks.Test/UgcQuery.cs b/Facepunch.Steamworks.Test/UgcQuery.cs
index 041e4f5..254141e 100644
--- a/Facepunch.Steamworks.Test/UgcQuery.cs
+++ b/Facepunch.Steamworks.Test/UgcQuery.cs
@@ -10,7 +10,8 @@ namespace Steamworks
{
[TestClass]
[DeploymentItem( "steam_api64.dll" )]
- public class UgcQueryTests
+ [DeploymentItem( "steam_api.dll" )]
+ public class UgcQueryTests
{
[TestMethod]
public async Task QueryAll()
diff --git a/Facepunch.Steamworks.Test/UgcTest.cs b/Facepunch.Steamworks.Test/UgcTest.cs
index 9c15019..1008809 100644
--- a/Facepunch.Steamworks.Test/UgcTest.cs
+++ b/Facepunch.Steamworks.Test/UgcTest.cs
@@ -10,7 +10,8 @@ namespace Steamworks
{
[TestClass]
[DeploymentItem( "steam_api64.dll" )]
- public class UgcTest
+ [DeploymentItem( "steam_api.dll" )]
+ public class UgcTest
{
[TestMethod]
public void Download()
@@ -34,6 +35,7 @@ namespace Steamworks
Console.WriteLine( $"Description: {itemInfo?.Description}" );
Console.WriteLine( $"Owner: {itemInfo?.Owner}" );
Console.WriteLine( $"Score: {itemInfo?.Score}" );
+ Console.WriteLine( $"PreviewImageUrl: {itemInfo?.PreviewImageUrl}" );
}
}
}
diff --git a/Facepunch.Steamworks.Test/UserStatsTest.cs b/Facepunch.Steamworks.Test/UserStatsTest.cs
index 1f41180..0969447 100644
--- a/Facepunch.Steamworks.Test/UserStatsTest.cs
+++ b/Facepunch.Steamworks.Test/UserStatsTest.cs
@@ -10,7 +10,8 @@ namespace Steamworks
{
[TestClass]
[DeploymentItem( "steam_api64.dll" )]
- public class UserStatsTest
+ [DeploymentItem( "steam_api.dll" )]
+ public class UserStatsTest
{
[TestMethod]
public async Task AchievementList()
@@ -167,6 +168,30 @@ namespace Steamworks
Assert.AreNotEqual( 0, deaths.GetInt() );
}
+ [TestMethod]
+ public async Task GetFriendStats()
+ {
+ var friend = new Friend( 76561197965732579 ); // Hezzy
+
+ // Download stats
+ var status = await friend.RequestUserStatsAsync();
+ Assert.AreNotEqual( false, status );
+
+ var deaths = friend.GetStatInt( "deaths" );
+
+ Console.WriteLine( $"Hezzy has died {deaths} times" );
+
+ Assert.AreNotEqual( 0, deaths );
+
+ var unlocked = friend.GetAchievement( "COLLECT_100_WOOD" );
+ Assert.AreNotEqual( false, unlocked );
+
+ var when = friend.GetAchievementUnlockTime( "COLLECT_100_WOOD" );
+ Assert.AreNotEqual( when, DateTime.MinValue );
+
+ Console.WriteLine( $"Hezzy unlocked COLLECT_100_WOOD {when}" );
+ }
+
[TestMethod]
public async Task GetStatGlobalInt()
{
diff --git a/Facepunch.Steamworks.Test/UserTest.cs b/Facepunch.Steamworks.Test/UserTest.cs
index 48ef38e..f550106 100644
--- a/Facepunch.Steamworks.Test/UserTest.cs
+++ b/Facepunch.Steamworks.Test/UserTest.cs
@@ -11,7 +11,8 @@ namespace Steamworks
{
[TestClass]
[DeploymentItem( "steam_api64.dll" )]
- public class UserTest
+ [DeploymentItem( "steam_api.dll" )]
+ public class UserTest
{
[TestMethod]
public void GetVoice()
@@ -135,19 +136,43 @@ namespace Steamworks
[TestMethod]
public async Task RequestEncryptedAppTicketAsyncWithData()
{
- var data = await SteamUser.RequestEncryptedAppTicketAsync( new byte[] { 0, 1, 2, 3, 4, 5, 6, 7 } );
- Assert.IsNotNull( data );
+ for ( int i=0; i<10; i++ )
+ {
+ var data = await SteamUser.RequestEncryptedAppTicketAsync( new byte[] { 0, 1, 2, 3, 4, 5, 6, 7 } );
- Console.WriteLine( $"data: {string.Join( "", data.Select( x => x.ToString( "x" ) ))}" );
+ if ( data == null )
+ {
+ Console.WriteLine( $"Attempt {i}: Returned null.. waiting 1 seconds" );
+ await Task.Delay( 10000 );
+ continue;
+ }
+
+ Console.WriteLine( $"data: {BitConverter.ToString( data )}" );
+ return;
+ }
+
+ Assert.Fail();
}
[TestMethod]
public async Task RequestEncryptedAppTicketAsync()
{
- var data = await SteamUser.RequestEncryptedAppTicketAsync();
- Assert.IsNotNull( data );
+ for ( int i = 0; i < 6; i++ )
+ {
+ var data = await SteamUser.RequestEncryptedAppTicketAsync();
- Console.WriteLine( $"data: {string.Join( "", data.Select( x => x.ToString( "x" ) ) )}" );
+ if ( data == null )
+ {
+ Console.WriteLine( $"Attempt {i}: Returned null.. waiting 1 seconds" );
+ await Task.Delay( 10000 );
+ continue;
+ }
+
+ Console.WriteLine( $"data: {BitConverter.ToString( data )}" );
+ return;
+ }
+
+ Assert.Fail();
}
}
diff --git a/Facepunch.Steamworks.Test/UtilsTest.cs b/Facepunch.Steamworks.Test/UtilsTest.cs
index 05b4cf7..225faec 100644
--- a/Facepunch.Steamworks.Test/UtilsTest.cs
+++ b/Facepunch.Steamworks.Test/UtilsTest.cs
@@ -9,7 +9,8 @@ namespace Steamworks
{
[TestClass]
[DeploymentItem( "steam_api64.dll" )]
- public class UtilsTest
+ [DeploymentItem( "steam_api.dll" )]
+ public class UtilsTest
{
[TestMethod]
public void SecondsSinceAppActive()
diff --git a/Facepunch.Steamworks.Test/bin/Debug/steam_api.dll b/Facepunch.Steamworks.Test/bin/Debug/steam_api.dll
deleted file mode 100644
index 060b6b9..0000000
Binary files a/Facepunch.Steamworks.Test/bin/Debug/steam_api.dll and /dev/null differ
diff --git a/Facepunch.Steamworks.Test/bin/Debug/steamclient.dll b/Facepunch.Steamworks.Test/bin/Debug/steamclient.dll
index b01cd7a..216cf68 100644
Binary files a/Facepunch.Steamworks.Test/bin/Debug/steamclient.dll and b/Facepunch.Steamworks.Test/bin/Debug/steamclient.dll differ
diff --git a/Facepunch.Steamworks.Test/bin/Debug/steamclient64.dll b/Facepunch.Steamworks.Test/bin/Debug/steamclient64.dll
index 451bb46..9d78727 100644
Binary files a/Facepunch.Steamworks.Test/bin/Debug/steamclient64.dll and b/Facepunch.Steamworks.Test/bin/Debug/steamclient64.dll differ
diff --git a/Facepunch.Steamworks.Test/bin/Debug/tier0_s.dll b/Facepunch.Steamworks.Test/bin/Debug/tier0_s.dll
index 311c469..e4a2392 100644
Binary files a/Facepunch.Steamworks.Test/bin/Debug/tier0_s.dll and b/Facepunch.Steamworks.Test/bin/Debug/tier0_s.dll differ
diff --git a/Facepunch.Steamworks.Test/bin/Debug/tier0_s64.dll b/Facepunch.Steamworks.Test/bin/Debug/tier0_s64.dll
index d51e145..155dad4 100644
Binary files a/Facepunch.Steamworks.Test/bin/Debug/tier0_s64.dll and b/Facepunch.Steamworks.Test/bin/Debug/tier0_s64.dll differ
diff --git a/Facepunch.Steamworks.Test/bin/Debug/vstdlib_s.dll b/Facepunch.Steamworks.Test/bin/Debug/vstdlib_s.dll
index 096945e..8ad7e87 100644
Binary files a/Facepunch.Steamworks.Test/bin/Debug/vstdlib_s.dll and b/Facepunch.Steamworks.Test/bin/Debug/vstdlib_s.dll differ
diff --git a/Facepunch.Steamworks.Test/bin/Debug/vstdlib_s64.dll b/Facepunch.Steamworks.Test/bin/Debug/vstdlib_s64.dll
index dfcfaa4..394e8a2 100644
Binary files a/Facepunch.Steamworks.Test/bin/Debug/vstdlib_s64.dll and b/Facepunch.Steamworks.Test/bin/Debug/vstdlib_s64.dll differ
diff --git a/Facepunch.Steamworks.Test/bin/Release/steam_api.dll b/Facepunch.Steamworks.Test/bin/Release/steam_api.dll
deleted file mode 100644
index 060b6b9..0000000
Binary files a/Facepunch.Steamworks.Test/bin/Release/steam_api.dll and /dev/null differ
diff --git a/Facepunch.Steamworks.Test/bin/Release/steam_api64.dll b/Facepunch.Steamworks.Test/bin/Release/steam_api64.dll
deleted file mode 100644
index 328dade..0000000
Binary files a/Facepunch.Steamworks.Test/bin/Release/steam_api64.dll and /dev/null differ
diff --git a/Facepunch.Steamworks.Test/bin/Release/steamclient.dll b/Facepunch.Steamworks.Test/bin/Release/steamclient.dll
index b01cd7a..216cf68 100644
Binary files a/Facepunch.Steamworks.Test/bin/Release/steamclient.dll and b/Facepunch.Steamworks.Test/bin/Release/steamclient.dll differ
diff --git a/Facepunch.Steamworks.Test/bin/Release/steamclient64.dll b/Facepunch.Steamworks.Test/bin/Release/steamclient64.dll
index 451bb46..9d78727 100644
Binary files a/Facepunch.Steamworks.Test/bin/Release/steamclient64.dll and b/Facepunch.Steamworks.Test/bin/Release/steamclient64.dll differ
diff --git a/Facepunch.Steamworks.Test/bin/Release/tier0_s.dll b/Facepunch.Steamworks.Test/bin/Release/tier0_s.dll
index 311c469..e4a2392 100644
Binary files a/Facepunch.Steamworks.Test/bin/Release/tier0_s.dll and b/Facepunch.Steamworks.Test/bin/Release/tier0_s.dll differ
diff --git a/Facepunch.Steamworks.Test/bin/Release/tier0_s64.dll b/Facepunch.Steamworks.Test/bin/Release/tier0_s64.dll
index d51e145..155dad4 100644
Binary files a/Facepunch.Steamworks.Test/bin/Release/tier0_s64.dll and b/Facepunch.Steamworks.Test/bin/Release/tier0_s64.dll differ
diff --git a/Facepunch.Steamworks.Test/bin/Release/vstdlib_s.dll b/Facepunch.Steamworks.Test/bin/Release/vstdlib_s.dll
index 096945e..8ad7e87 100644
Binary files a/Facepunch.Steamworks.Test/bin/Release/vstdlib_s.dll and b/Facepunch.Steamworks.Test/bin/Release/vstdlib_s.dll differ
diff --git a/Facepunch.Steamworks.Test/bin/Release/vstdlib_s64.dll b/Facepunch.Steamworks.Test/bin/Release/vstdlib_s64.dll
index dfcfaa4..394e8a2 100644
Binary files a/Facepunch.Steamworks.Test/bin/Release/vstdlib_s64.dll and b/Facepunch.Steamworks.Test/bin/Release/vstdlib_s64.dll differ
diff --git a/Facepunch.Steamworks.Test/bin/x64/Debug/Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll b/Facepunch.Steamworks.Test/bin/x64/Debug/Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll
deleted file mode 100644
index ba15291..0000000
Binary files a/Facepunch.Steamworks.Test/bin/x64/Debug/Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.dll and /dev/null differ
diff --git a/Facepunch.Steamworks.Test/bin/x64/Debug/Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll b/Facepunch.Steamworks.Test/bin/x64/Debug/Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll
deleted file mode 100644
index 39bd4f3..0000000
Binary files a/Facepunch.Steamworks.Test/bin/x64/Debug/Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Interface.dll and /dev/null differ
diff --git a/Facepunch.Steamworks.Test/bin/x64/Debug/Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll b/Facepunch.Steamworks.Test/bin/x64/Debug/Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll
deleted file mode 100644
index a4db1c1..0000000
Binary files a/Facepunch.Steamworks.Test/bin/x64/Debug/Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.dll and /dev/null differ
diff --git a/Facepunch.Steamworks.Test/bin/x64/Debug/Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll b/Facepunch.Steamworks.Test/bin/x64/Debug/Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll
deleted file mode 100644
index c426bea..0000000
Binary files a/Facepunch.Steamworks.Test/bin/x64/Debug/Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll and /dev/null differ
diff --git a/Facepunch.Steamworks.Test/bin/x64/Debug/Microsoft.VisualStudio.TestPlatform.TestFramework.dll b/Facepunch.Steamworks.Test/bin/x64/Debug/Microsoft.VisualStudio.TestPlatform.TestFramework.dll
deleted file mode 100644
index d4afc5e..0000000
Binary files a/Facepunch.Steamworks.Test/bin/x64/Debug/Microsoft.VisualStudio.TestPlatform.TestFramework.dll and /dev/null differ
diff --git a/Facepunch.Steamworks.Test/bin/x64/Debug/Newtonsoft.Json.dll b/Facepunch.Steamworks.Test/bin/x64/Debug/Newtonsoft.Json.dll
deleted file mode 100644
index 5523f5c..0000000
Binary files a/Facepunch.Steamworks.Test/bin/x64/Debug/Newtonsoft.Json.dll and /dev/null differ
diff --git a/Facepunch.Steamworks.Test/bin/x64/Debug/steam_api64.dll b/Facepunch.Steamworks.Test/bin/x64/Debug/steam_api64.dll
deleted file mode 100644
index 328dade..0000000
Binary files a/Facepunch.Steamworks.Test/bin/x64/Debug/steam_api64.dll and /dev/null differ
diff --git a/Facepunch.Steamworks.Test/steam_api.dll b/Facepunch.Steamworks.Test/steam_api.dll
new file mode 100644
index 0000000..319bb83
Binary files /dev/null and b/Facepunch.Steamworks.Test/steam_api.dll differ
diff --git a/Facepunch.Steamworks.Test/steam_api64.dll b/Facepunch.Steamworks.Test/steam_api64.dll
new file mode 100644
index 0000000..e1ca692
Binary files /dev/null and b/Facepunch.Steamworks.Test/steam_api64.dll differ
diff --git a/Facepunch.Steamworks.sln b/Facepunch.Steamworks.sln
index 62426b9..26ca56b 100644
--- a/Facepunch.Steamworks.sln
+++ b/Facepunch.Steamworks.sln
@@ -7,11 +7,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Generator", "Generator\Gene
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Facepunch.Steamworks.Win64", "Facepunch.Steamworks\Facepunch.Steamworks.Win64.csproj", "{8C73DA93-73AD-4445-9A2C-15D4A44337D3}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Facepunch.Steamworks.Posix64", "Facepunch.Steamworks\Facepunch.Steamworks.Posix64.csproj", "{12478BAE-7C1F-4FFD-B903-E1DDA6426DDF}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Facepunch.Steamworks.Win32", "Facepunch.Steamworks\Facepunch.Steamworks.Win32.csproj", "{2D6247F6-8AB2-405F-A00E-3A364B808A55}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Facepunch.Steamworks.Posix32", "Facepunch.Steamworks\Facepunch.Steamworks.Posix32.csproj", "{C62FF421-BE44-4DB0-B99A-E13E007A30B9}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Facepunch.Steamworks.Posix", "Facepunch.Steamworks\Facepunch.Steamworks.Posix.csproj", "{C62FF421-BE44-4DB0-B99A-E13E007A30B9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Facepunch.Steamworks.TestWin32", "Facepunch.Steamworks.Test\Facepunch.Steamworks.TestWin32.csproj", "{3F6183AD-D966-44F2-A6EB-42E61E591B49}"
EndProject
@@ -51,18 +49,6 @@ Global
{8C73DA93-73AD-4445-9A2C-15D4A44337D3}.Release|x64.Build.0 = Release|Any CPU
{8C73DA93-73AD-4445-9A2C-15D4A44337D3}.Release|x86.ActiveCfg = Release|Any CPU
{8C73DA93-73AD-4445-9A2C-15D4A44337D3}.Release|x86.Build.0 = Release|Any CPU
- {12478BAE-7C1F-4FFD-B903-E1DDA6426DDF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {12478BAE-7C1F-4FFD-B903-E1DDA6426DDF}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {12478BAE-7C1F-4FFD-B903-E1DDA6426DDF}.Debug|x64.ActiveCfg = Debug|Any CPU
- {12478BAE-7C1F-4FFD-B903-E1DDA6426DDF}.Debug|x64.Build.0 = Debug|Any CPU
- {12478BAE-7C1F-4FFD-B903-E1DDA6426DDF}.Debug|x86.ActiveCfg = Debug|Any CPU
- {12478BAE-7C1F-4FFD-B903-E1DDA6426DDF}.Debug|x86.Build.0 = Debug|Any CPU
- {12478BAE-7C1F-4FFD-B903-E1DDA6426DDF}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {12478BAE-7C1F-4FFD-B903-E1DDA6426DDF}.Release|Any CPU.Build.0 = Release|Any CPU
- {12478BAE-7C1F-4FFD-B903-E1DDA6426DDF}.Release|x64.ActiveCfg = Release|Any CPU
- {12478BAE-7C1F-4FFD-B903-E1DDA6426DDF}.Release|x64.Build.0 = Release|Any CPU
- {12478BAE-7C1F-4FFD-B903-E1DDA6426DDF}.Release|x86.ActiveCfg = Release|Any CPU
- {12478BAE-7C1F-4FFD-B903-E1DDA6426DDF}.Release|x86.Build.0 = Release|Any CPU
{2D6247F6-8AB2-405F-A00E-3A364B808A55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2D6247F6-8AB2-405F-A00E-3A364B808A55}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2D6247F6-8AB2-405F-A00E-3A364B808A55}.Debug|x64.ActiveCfg = Debug|Any CPU
diff --git a/Facepunch.Steamworks/Callbacks/CallResult.cs b/Facepunch.Steamworks/Callbacks/CallResult.cs
new file mode 100644
index 0000000..edfa66a
--- /dev/null
+++ b/Facepunch.Steamworks/Callbacks/CallResult.cs
@@ -0,0 +1,98 @@
+using Steamworks.Data;
+using System;
+using System.Collections.Generic;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace Steamworks
+{
+ ///
+ /// An awaitable version of a SteamAPICall_t
+ ///
+ internal struct CallResult : INotifyCompletion where T : struct, ICallbackData
+ {
+ SteamAPICall_t call;
+ ISteamUtils utils;
+ bool server;
+
+ public CallResult( SteamAPICall_t call, bool server )
+ {
+ this.call = call;
+ this.server = server;
+
+ utils = (server ? SteamUtils.InterfaceServer : SteamUtils.InterfaceClient) as ISteamUtils;
+
+ if ( utils == null )
+ utils = SteamUtils.Interface as ISteamUtils;
+ }
+
+ ///
+ /// This gets called if IsComplete returned false on the first call.
+ /// The Action "continues" the async call. We pass it to the Dispatch
+ /// to be called when the callback returns.
+ ///
+ public void OnCompleted( Action continuation )
+ {
+ if (IsCompleted)
+ continuation();
+ else
+ Dispatch.OnCallComplete(call, continuation, server);
+ }
+
+ ///
+ /// Gets the result. This is called internally by the async shit.
+ ///
+ public T? GetResult()
+ {
+ bool failed = false;
+ if ( !utils.IsAPICallCompleted( call, ref failed ) || failed )
+ return null;
+
+ var t = default( T );
+ var size = t.DataSize;
+ var ptr = Marshal.AllocHGlobal( size );
+
+ try
+ {
+ if ( !utils.GetAPICallResult( call, ptr, size, (int)t.CallbackType, ref failed ) || failed )
+ {
+ Dispatch.OnDebugCallback?.Invoke( t.CallbackType, "!GetAPICallResult or failed", server );
+ return null;
+ }
+
+ Dispatch.OnDebugCallback?.Invoke( t.CallbackType, Dispatch.CallbackToString( t.CallbackType, ptr, size ), server );
+
+ return ((T)Marshal.PtrToStructure( ptr, typeof( T ) ));
+ }
+ finally
+ {
+ Marshal.FreeHGlobal( ptr );
+ }
+ }
+
+ ///
+ /// Return true if complete or failed
+ ///
+ public bool IsCompleted
+ {
+ get
+ {
+ bool failed = false;
+ if ( utils.IsAPICallCompleted( call, ref failed ) || failed )
+ return true;
+
+ return false;
+ }
+ }
+
+ ///
+ /// This is what makes this struct awaitable
+ ///
+ internal CallResult GetAwaiter()
+ {
+ return this;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Facepunch.Steamworks/Callbacks/Callback.cs b/Facepunch.Steamworks/Callbacks/Callback.cs
deleted file mode 100644
index a5cc3c9..0000000
--- a/Facepunch.Steamworks/Callbacks/Callback.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-using System;
-using System.Runtime.InteropServices;
-using System.Collections.Generic;
-using Steamworks.Data;
-
-namespace Steamworks
-{
- [StructLayout( LayoutKind.Sequential )]
- internal partial class Callback
- {
- [UnmanagedFunctionPointer( CallingConvention.ThisCall )]
- public delegate void Run( IntPtr thisptr, IntPtr pvParam );
-
- [UnmanagedFunctionPointer( CallingConvention.ThisCall )]
- public delegate void RunCall( IntPtr thisptr, IntPtr pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall );
-
- [UnmanagedFunctionPointer( CallingConvention.ThisCall )]
- public delegate int GetCallbackSizeBytes( IntPtr thisptr );
-
- internal enum Flags : byte
- {
- Registered = 0x01,
- GameServer = 0x02
- }
-
- public IntPtr vTablePtr;
- public byte CallbackFlags;
- public int CallbackId;
-
- //
- // These are functions that are on CCallback but are never called
- // We could just send a IntPtr.Zero but it's probably safer to throw a
- // big apeshit message if steam changes its behaviour at some point
- //
- [MonoPInvokeCallback]
- internal static void RunStub( IntPtr self, IntPtr param, bool failure, SteamAPICall_t call ) =>
- throw new System.Exception( "Something changed in the Steam API and now CCallbackBack is calling the CallResult function [Run( void *pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall )]" );
-
- [MonoPInvokeCallback]
- internal static int SizeStub( IntPtr self ) =>
- throw new System.Exception( "Something changed in the Steam API and now CCallbackBack is calling the GetSize function [GetCallbackSizeBytes()]" );
- };
-}
diff --git a/Facepunch.Steamworks/Callbacks/Event.cs b/Facepunch.Steamworks/Callbacks/Event.cs
deleted file mode 100644
index 181ba50..0000000
--- a/Facepunch.Steamworks/Callbacks/Event.cs
+++ /dev/null
@@ -1,135 +0,0 @@
-using Steamworks.Data;
-using System;
-using System.Collections.Generic;
-using System.Runtime.InteropServices;
-
-namespace Steamworks
-{
- //
- // Created on registration of a callback
- //
- internal class Event : IDisposable
- {
- internal static List AllClient = new List();
- internal static List AllServer = new List();
-
- internal static void DisposeAllClient()
- {
- foreach ( var a in AllClient.ToArray() )
- {
- a.Dispose();
- }
-
- AllClient.Clear();
- }
-
- internal static void DisposeAllServer()
- {
- foreach ( var a in AllServer.ToArray() )
- {
- a.Dispose();
- }
-
- AllServer.Clear();
- }
-
- internal static void Register( Callback.Run func, int size, int callbackId, bool gameserver )
- {
- var r = new Event();
- r.vTablePtr = BuildVTable( func, r.Allocations );
-
- //
- // Create the callback object
- //
- var cb = new Callback();
- cb.vTablePtr = r.vTablePtr;
- cb.CallbackFlags = gameserver ? (byte)0x02 : (byte)0;
- cb.CallbackId = callbackId;
-
- //
- // Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native
- //
- r.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned );
-
- //
- // Register the callback with Steam
- //
- SteamClient.RegisterCallback( r.PinnedCallback.AddrOfPinnedObject(), cb.CallbackId );
-
- r.IsAllocated = true;
-
- if ( gameserver )
- Event.AllServer.Add( r );
- else
- Event.AllClient.Add( r );
- }
-
- static IntPtr BuildVTable( Callback.Run run, List allocations )
- {
- var RunStub = (Callback.RunCall)Callback.RunStub;
- var SizeStub = (Callback.GetCallbackSizeBytes)Callback.SizeStub;
-
- allocations.Add( GCHandle.Alloc( run ) );
- allocations.Add( GCHandle.Alloc( RunStub ) );
- allocations.Add( GCHandle.Alloc( SizeStub ) );
-
- var a = Marshal.GetFunctionPointerForDelegate( run );
- var b = Marshal.GetFunctionPointerForDelegate( RunStub );
- var c = Marshal.GetFunctionPointerForDelegate( SizeStub );
-
- var vt = Marshal.AllocHGlobal( IntPtr.Size * 3 );
-
- // Windows switches the function positions
- #if PLATFORM_WIN
- Marshal.WriteIntPtr( vt, IntPtr.Size * 0, b );
- Marshal.WriteIntPtr( vt, IntPtr.Size * 1, a );
- Marshal.WriteIntPtr( vt, IntPtr.Size * 2, c );
- #else
- Marshal.WriteIntPtr( vt, IntPtr.Size * 0, a );
- Marshal.WriteIntPtr( vt, IntPtr.Size * 1, b );
- Marshal.WriteIntPtr( vt, IntPtr.Size * 2, c );
- #endif
-
- return vt;
- }
-
- bool IsAllocated;
- List Allocations = new List();
- internal IntPtr vTablePtr;
- internal GCHandle PinnedCallback;
-
-
- public void Dispose()
- {
- if ( !IsAllocated ) return;
- IsAllocated = false;
-
- if ( !PinnedCallback.IsAllocated )
- throw new System.Exception( "Callback isn't allocated!?" );
-
- SteamClient.UnregisterCallback( PinnedCallback.AddrOfPinnedObject() );
-
- foreach ( var a in Allocations )
- {
- if ( a.IsAllocated )
- a.Free();
- }
-
- Allocations = null;
-
- PinnedCallback.Free();
-
- if ( vTablePtr != IntPtr.Zero )
- {
- Marshal.FreeHGlobal( vTablePtr );
- vTablePtr = IntPtr.Zero;
- }
- }
-
- ~Event()
- {
- Dispose();
- }
-
- }
-}
\ No newline at end of file
diff --git a/Facepunch.Steamworks/Callbacks/ICallbackData.cs b/Facepunch.Steamworks/Callbacks/ICallbackData.cs
new file mode 100644
index 0000000..78610dd
--- /dev/null
+++ b/Facepunch.Steamworks/Callbacks/ICallbackData.cs
@@ -0,0 +1,17 @@
+using Steamworks.Data;
+using System;
+using System.Collections.Generic;
+using System.Runtime.InteropServices;
+using System.Threading.Tasks;
+
+namespace Steamworks
+{
+ ///
+ /// Gives us a generic way to get the CallbackId of structs
+ ///
+ internal interface ICallbackData
+ {
+ CallbackType CallbackType { get; }
+ int DataSize { get; }
+ }
+}
\ No newline at end of file
diff --git a/Facepunch.Steamworks/Classes/ConnectionInterface.cs b/Facepunch.Steamworks/Classes/ConnectionInterface.cs
deleted file mode 100644
index 2d116aa..0000000
--- a/Facepunch.Steamworks/Classes/ConnectionInterface.cs
+++ /dev/null
@@ -1,120 +0,0 @@
-using Steamworks.Data;
-using System;
-using System.Runtime.InteropServices;
-
-namespace Steamworks
-{
- public class ConnectionInterface
- {
- public Connection Connection;
- public bool Connected = false;
- public bool Connecting = true;
-
- public string ConnectionName
- {
- get => Connection.ConnectionName;
- set => Connection.ConnectionName = value;
- }
-
- public long UserData
- {
- get => Connection.UserData;
- set => Connection.UserData = value;
- }
-
- public void Close() => Connection.Close();
-
- public override string ToString() => Connection.ToString();
-
- public virtual void OnConnectionChanged( ConnectionInfo data )
- {
- switch ( data.State )
- {
- case ConnectionState.Connecting:
- OnConnecting( data );
- break;
- case ConnectionState.Connected:
- OnConnected( data );
- break;
- case ConnectionState.ClosedByPeer:
- case ConnectionState.ProblemDetectedLocally:
- case ConnectionState.None:
- OnDisconnected( data );
- break;
- }
- }
-
- ///
- /// We're trying to connect!
- ///
- public virtual void OnConnecting( ConnectionInfo data )
- {
- Connecting = true;
- }
-
- ///
- /// Client is connected. They move from connecting to Connections
- ///
- public virtual void OnConnected( ConnectionInfo data )
- {
- Connected = true;
- Connecting = false;
- }
-
- ///
- /// The connection has been closed remotely or disconnected locally. Check data.State for details.
- ///
- public virtual void OnDisconnected( ConnectionInfo data )
- {
- Connected = false;
- Connecting = false;
- }
-
- public void Receive( int bufferSize = 32 )
- {
- int processed = 0;
- IntPtr messageBuffer = Marshal.AllocHGlobal( IntPtr.Size * bufferSize );
-
- try
- {
- processed = SteamNetworkingSockets.Internal.ReceiveMessagesOnConnection( Connection, messageBuffer, bufferSize );
-
- for ( int i = 0; i < processed; i++ )
- {
- ReceiveMessage( Marshal.ReadIntPtr( messageBuffer, i * IntPtr.Size ) );
- }
- }
- finally
- {
- Marshal.FreeHGlobal( messageBuffer );
- }
-
- //
- // Overwhelmed our buffer, keep going
- //
- if ( processed == bufferSize )
- Receive( bufferSize );
- }
-
- internal unsafe void ReceiveMessage( IntPtr msgPtr )
- {
- var msg = Marshal.PtrToStructure( msgPtr );
- try
- {
- OnMessage( msg.DataPtr, msg.DataSize, msg.RecvTime, msg.MessageNumber, msg.Channel );
- }
- finally
- {
- //
- // Releases the message
- //
- msg.Release( msgPtr );
- }
- }
-
- public virtual void OnMessage( IntPtr data, int size, long messageNum, long recvTime, int channel )
- {
-
- }
- }
-}
\ No newline at end of file
diff --git a/Facepunch.Steamworks/Classes/Dispatch.cs b/Facepunch.Steamworks/Classes/Dispatch.cs
new file mode 100644
index 0000000..ad7700d
--- /dev/null
+++ b/Facepunch.Steamworks/Classes/Dispatch.cs
@@ -0,0 +1,334 @@
+using System;
+using System.Collections.Generic;
+using System.Runtime.InteropServices;
+using System.Threading.Tasks;
+using Steamworks.Data;
+using Steamworks;
+using System.Linq;
+
+namespace Steamworks
+{
+ ///
+ /// Responsible for all callback/callresult handling
+ ///
+ /// This manually pumps Steam's message queue and dispatches those
+ /// events to any waiting callbacks/callresults.
+ ///
+ public static class Dispatch
+ {
+ ///
+ /// If set then we'll call this function every time a callback is generated.
+ ///
+ /// This is SLOW!! - it's for debugging - don't keep it on all the time. If you want to access a specific
+ /// callback then please create an issue on github and I'll add it!
+ ///
+ /// Params are : [Callback Type] [Callback Contents] [server]
+ ///
+ ///
+ public static Action OnDebugCallback;
+
+ ///
+ /// Called if an exception happens during a callback/callresult.
+ /// This is needed because the exception isn't always accessible when running
+ /// async.. and can fail silently. With this hooked you won't be stuck wondering
+ /// what happened.
+ ///
+ public static Action OnException;
+
+ #region interop
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ManualDispatch_Init", CallingConvention = CallingConvention.Cdecl )]
+ internal static extern void SteamAPI_ManualDispatch_Init();
+
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ManualDispatch_RunFrame", CallingConvention = CallingConvention.Cdecl )]
+ internal static extern void SteamAPI_ManualDispatch_RunFrame( HSteamPipe pipe );
+
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ManualDispatch_GetNextCallback", CallingConvention = CallingConvention.Cdecl )]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ internal static extern bool SteamAPI_ManualDispatch_GetNextCallback( HSteamPipe pipe, [In, Out] ref CallbackMsg_t msg );
+
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ManualDispatch_FreeLastCallback", CallingConvention = CallingConvention.Cdecl )]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ internal static extern bool SteamAPI_ManualDispatch_FreeLastCallback( HSteamPipe pipe );
+
+ [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
+ internal struct CallbackMsg_t
+ {
+ public HSteamUser m_hSteamUser; // Specific user to whom this callback applies.
+ public CallbackType Type; // Callback identifier. (Corresponds to the k_iCallback enum in the callback structure.)
+ public IntPtr Data; // Points to the callback structure
+ public int DataSize; // Size of the data pointed to by m_pubParam
+ };
+
+ #endregion
+
+ internal static HSteamPipe ClientPipe { get; set; }
+ internal static HSteamPipe ServerPipe { get; set; }
+
+ ///
+ /// This gets called from Client/Server Init
+ /// It's important to switch to the manual dispatcher
+ ///
+ internal static void Init()
+ {
+ SteamAPI_ManualDispatch_Init();
+ }
+
+ ///
+ /// Make sure we don't call Frame in a callback - because that'll cause some issues for everyone.
+ ///
+ static bool runningFrame = false;
+
+ ///
+ /// Calls RunFrame and processes events from this Steam Pipe
+ ///
+ internal static void Frame( HSteamPipe pipe )
+ {
+ if ( runningFrame )
+ return;
+
+ try
+ {
+ runningFrame = true;
+
+ SteamAPI_ManualDispatch_RunFrame( pipe );
+ SteamNetworkingUtils.OutputDebugMessages();
+
+ CallbackMsg_t msg = default;
+
+ while ( SteamAPI_ManualDispatch_GetNextCallback( pipe, ref msg ) )
+ {
+ try
+ {
+ ProcessCallback( msg, pipe == ServerPipe );
+ }
+ finally
+ {
+ SteamAPI_ManualDispatch_FreeLastCallback( pipe );
+ }
+ }
+ }
+ catch ( System.Exception e )
+ {
+ OnException?.Invoke( e );
+ }
+ finally
+ {
+ runningFrame = false;
+ }
+ }
+
+ ///
+ /// To be safe we don't call the continuation functions while iterating
+ /// the Callback list. This is maybe overly safe because the only way this
+ /// could be an issue is if the callback list is modified in the continuation
+ /// which would only happen if starting or shutting down in the callback.
+ ///
+ static List> actionsToCall = new List>();
+
+ ///
+ /// A callback is a general global message
+ ///
+ private static void ProcessCallback( CallbackMsg_t msg, bool isServer )
+ {
+ OnDebugCallback?.Invoke( msg.Type, CallbackToString( msg.Type, msg.Data, msg.DataSize ), isServer );
+
+ // Is this a special callback telling us that the call result is ready?
+ if ( msg.Type == CallbackType.SteamAPICallCompleted )
+ {
+ ProcessResult( msg );
+ return;
+ }
+
+ if ( Callbacks.TryGetValue( msg.Type, out var list ) )
+ {
+ actionsToCall.Clear();
+
+ foreach ( var item in list )
+ {
+ if ( item.server != isServer )
+ continue;
+
+ actionsToCall.Add( item.action );
+ }
+
+ foreach ( var action in actionsToCall )
+ {
+ action( msg.Data );
+ }
+
+ actionsToCall.Clear();
+ }
+ }
+
+ ///
+ /// Given a callback, try to turn it into a string
+ ///
+ internal static string CallbackToString( CallbackType type, IntPtr data, int expectedsize )
+ {
+ if ( !CallbackTypeFactory.All.TryGetValue( type, out var t ) )
+ return $"[{type} not in sdk]";
+
+ var strct = data.ToType( t );
+ if ( strct == null )
+ return "[null]";
+
+ var str = "";
+
+ var fields = t.GetFields( System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic );
+
+ if ( fields.Length == 0 )
+ return "[no fields]";
+
+ var columnSize = fields.Max( x => x.Name.Length ) + 1;
+
+ if ( columnSize < 10 )
+ columnSize = 10;
+
+ foreach ( var field in fields )
+ {
+ var spaces = (columnSize - field.Name.Length);
+ if ( spaces < 0 ) spaces = 0;
+
+ str += $"{new String( ' ', spaces )}{field.Name}: {field.GetValue( strct )}\n";
+ }
+
+ return str.Trim( '\n' );
+ }
+
+ ///
+ /// A result is a reply to a specific command
+ ///
+ private static void ProcessResult( CallbackMsg_t msg )
+ {
+ var result = msg.Data.ToType();
+
+ //
+ // Do we have an entry added via OnCallComplete
+ //
+ if ( !ResultCallbacks.TryGetValue( result.AsyncCall, out var callbackInfo ) )
+ {
+ //
+ // This can happen if the callback result was immediately available
+ // so we just returned that without actually going through the callback
+ // dance. It's okay for this to fail.
+ //
+
+ //
+ // But still let everyone know that this happened..
+ //
+ OnDebugCallback?.Invoke( (CallbackType)result.Callback, $"[no callback waiting/required]", false );
+ return;
+ }
+
+ // Remove it before we do anything, incase the continuation throws exceptions
+ ResultCallbacks.Remove( result.AsyncCall );
+
+ // At this point whatever async routine called this
+ // continues running.
+ callbackInfo.continuation();
+ }
+
+ ///
+ /// Pumps the queue in an async loop so we don't
+ /// have to think about it. This has the advantage that
+ /// you can call .Wait() on async shit and it still works.
+ ///
+ internal static async void LoopClientAsync()
+ {
+ while ( ClientPipe != 0 )
+ {
+ Frame( ClientPipe );
+ await Task.Delay( 16 );
+ }
+ }
+
+ ///
+ /// Pumps the queue in an async loop so we don't
+ /// have to think about it. This has the advantage that
+ /// you can call .Wait() on async shit and it still works.
+ ///
+ internal static async void LoopServerAsync()
+ {
+ while ( ServerPipe != 0 )
+ {
+ Frame( ServerPipe );
+ await Task.Delay( 32 );
+ }
+ }
+
+ struct ResultCallback
+ {
+ public Action continuation;
+ public bool server;
+ }
+
+ static Dictionary ResultCallbacks = new Dictionary();
+
+ ///
+ /// Watch for a steam api call
+ ///
+ internal static void OnCallComplete( SteamAPICall_t call, Action continuation, bool server ) where T : struct, ICallbackData
+ {
+ ResultCallbacks[call.Value] = new ResultCallback
+ {
+ continuation = continuation,
+ server = server
+ };
+ }
+
+ struct Callback
+ {
+ public Action action;
+ public bool server;
+ }
+
+ static Dictionary> Callbacks = new Dictionary>();
+
+ ///
+ /// Install a global callback. The passed function will get called if it's all good.
+ ///
+ internal static void Install( Action p, bool server = false ) where T : ICallbackData
+ {
+ var t = default( T );
+ var type = t.CallbackType;
+
+ if ( !Callbacks.TryGetValue( type, out var list ) )
+ {
+ list = new List();
+ Callbacks[type] = list;
+ }
+
+ list.Add( new Callback
+ {
+ action = x => p( x.ToType() ),
+ server = server
+ } );
+ }
+
+ internal static void ShutdownServer()
+ {
+ ServerPipe = 0;
+
+ foreach ( var callback in Callbacks )
+ {
+ Callbacks[callback.Key].RemoveAll( x => x.server );
+ }
+
+ ResultCallbacks = ResultCallbacks.Where( x => !x.Value.server )
+ .ToDictionary( x => x.Key, x => x.Value );
+ }
+
+ internal static void ShutdownClient()
+ {
+ ClientPipe = 0;
+
+ foreach ( var callback in Callbacks )
+ {
+ Callbacks[callback.Key].RemoveAll( x => !x.server );
+ }
+
+ ResultCallbacks = ResultCallbacks.Where( x => x.Value.server )
+ .ToDictionary( x => x.Key, x => x.Value );
+ }
+ }
+}
\ No newline at end of file
diff --git a/Facepunch.Steamworks/Classes/SocketInterface.cs b/Facepunch.Steamworks/Classes/SocketInterface.cs
deleted file mode 100644
index 813d082..0000000
--- a/Facepunch.Steamworks/Classes/SocketInterface.cs
+++ /dev/null
@@ -1,112 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Runtime.InteropServices;
-using Steamworks.Data;
-
-namespace Steamworks
-{
- public class SocketInterface
- {
- public List Connecting = new List();
- public List Connected = new List();
- public Socket Socket { get; internal set; }
-
- public bool Close() => Socket.Close();
-
- public override string ToString() => Socket.ToString();
-
- public virtual void OnConnectionChanged( Connection connection, ConnectionInfo data )
- {
- switch ( data.State )
- {
- case ConnectionState.Connecting:
- OnConnecting( connection, data );
- break;
- case ConnectionState.Connected:
- OnConnected( connection, data );
- break;
- case ConnectionState.ClosedByPeer:
- case ConnectionState.ProblemDetectedLocally:
- case ConnectionState.None:
- OnDisconnected( connection, data );
- break;
- }
- }
-
- ///
- /// Default behaviour is to accept every connection
- ///
- public virtual void OnConnecting( Connection connection, ConnectionInfo data )
- {
- connection.Accept();
- Connecting.Add( connection );
- }
-
- ///
- /// Client is connected. They move from connecting to Connections
- ///
- public virtual void OnConnected( Connection connection, ConnectionInfo data )
- {
- Connecting.Remove( connection );
- Connected.Add( connection );
- }
-
- ///
- /// The connection has been closed remotely or disconnected locally. Check data.State for details.
- ///
- public virtual void OnDisconnected( Connection connection, ConnectionInfo data )
- {
- connection.Close();
-
- Connecting.Remove( connection );
- Connected.Remove( connection );
- }
-
- public void Receive( int bufferSize = 32 )
- {
- int processed = 0;
- IntPtr messageBuffer = Marshal.AllocHGlobal( IntPtr.Size * bufferSize );
-
- try
- {
- processed = SteamNetworkingSockets.Internal.ReceiveMessagesOnListenSocket( Socket, messageBuffer, bufferSize );
-
- for ( int i = 0; i < processed; i++ )
- {
- ReceiveMessage( Marshal.ReadIntPtr( messageBuffer, i * IntPtr.Size ) );
- }
- }
- finally
- {
- Marshal.FreeHGlobal( messageBuffer );
- }
-
- //
- // Overwhelmed our buffer, keep going
- //
- if ( processed == bufferSize )
- Receive( bufferSize );
- }
-
- internal unsafe void ReceiveMessage( IntPtr msgPtr )
- {
- var msg = Marshal.PtrToStructure( msgPtr );
- try
- {
- OnMessage( msg.Connection, msg.Identity, msg.DataPtr, msg.DataSize, msg.RecvTime, msg.MessageNumber, msg.Channel );
- }
- finally
- {
- //
- // Releases the message
- //
- msg.Release( msgPtr );
- }
- }
-
- public virtual void OnMessage( Connection connection, NetIdentity identity, IntPtr data, int size, long messageNum, long recvTime, int channel )
- {
-
- }
- }
-}
\ No newline at end of file
diff --git a/Facepunch.Steamworks/Classes/SteamApi.cs b/Facepunch.Steamworks/Classes/SteamApi.cs
new file mode 100644
index 0000000..a8b882b
--- /dev/null
+++ b/Facepunch.Steamworks/Classes/SteamApi.cs
@@ -0,0 +1,50 @@
+using System;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Threading.Tasks;
+using Steamworks.Data;
+
+
+namespace Steamworks
+{
+ internal static class SteamAPI
+ {
+ internal static class Native
+ {
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_Init", CallingConvention = CallingConvention.Cdecl )]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ public static extern bool SteamAPI_Init();
+
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_Shutdown", CallingConvention = CallingConvention.Cdecl )]
+ public static extern void SteamAPI_Shutdown();
+
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_GetHSteamPipe", CallingConvention = CallingConvention.Cdecl )]
+ public static extern HSteamPipe SteamAPI_GetHSteamPipe();
+
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_RestartAppIfNecessary", CallingConvention = CallingConvention.Cdecl )]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ public static extern bool SteamAPI_RestartAppIfNecessary( uint unOwnAppID );
+
+ }
+ static internal bool Init()
+ {
+ return Native.SteamAPI_Init();
+ }
+
+ static internal void Shutdown()
+ {
+ Native.SteamAPI_Shutdown();
+ }
+
+ static internal HSteamPipe GetHSteamPipe()
+ {
+ return Native.SteamAPI_GetHSteamPipe();
+ }
+
+ static internal bool RestartAppIfNecessary( uint unOwnAppID )
+ {
+ return Native.SteamAPI_RestartAppIfNecessary( unOwnAppID );
+ }
+
+ }
+}
diff --git a/Facepunch.Steamworks/Generated/SteamGameServer.cs b/Facepunch.Steamworks/Classes/SteamGameServer.cs
similarity index 78%
rename from Facepunch.Steamworks/Generated/SteamGameServer.cs
rename to Facepunch.Steamworks/Classes/SteamGameServer.cs
index f9713c1..679d66b 100644
--- a/Facepunch.Steamworks/Generated/SteamGameServer.cs
+++ b/Facepunch.Steamworks/Classes/SteamGameServer.cs
@@ -17,9 +17,6 @@ namespace Steamworks
[DllImport( Platform.LibraryName, EntryPoint = "SteamGameServer_Shutdown", CallingConvention = CallingConvention.Cdecl )]
public static extern void SteamGameServer_Shutdown();
- [DllImport( Platform.LibraryName, EntryPoint = "SteamGameServer_GetHSteamUser", CallingConvention = CallingConvention.Cdecl )]
- public static extern HSteamUser SteamGameServer_GetHSteamUser();
-
[DllImport( Platform.LibraryName, EntryPoint = "SteamGameServer_GetHSteamPipe", CallingConvention = CallingConvention.Cdecl )]
public static extern HSteamPipe SteamGameServer_GetHSteamPipe();
@@ -34,11 +31,6 @@ namespace Steamworks
Native.SteamGameServer_Shutdown();
}
- static internal HSteamUser GetHSteamUser()
- {
- return Native.SteamGameServer_GetHSteamUser();
- }
-
static internal HSteamPipe GetHSteamPipe()
{
return Native.SteamGameServer_GetHSteamPipe();
diff --git a/Facepunch.Steamworks/Classes/SteamInternal.cs b/Facepunch.Steamworks/Classes/SteamInternal.cs
new file mode 100644
index 0000000..bc9ea6d
--- /dev/null
+++ b/Facepunch.Steamworks/Classes/SteamInternal.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Threading.Tasks;
+using Steamworks.Data;
+
+
+namespace Steamworks
+{
+ internal static class SteamInternal
+ {
+ internal static class Native
+ {
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamInternal_GameServer_Init", CallingConvention = CallingConvention.Cdecl )]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ public static extern bool SteamInternal_GameServer_Init( uint unIP, ushort usPort, ushort usGamePort, ushort usQueryPort, int eServerMode, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersionString );
+ }
+
+ static internal bool GameServer_Init( uint unIP, ushort usPort, ushort usGamePort, ushort usQueryPort, int eServerMode, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersionString )
+ {
+ return Native.SteamInternal_GameServer_Init( unIP, usPort, usGamePort, usQueryPort, eServerMode, pchVersionString );
+ }
+ }
+}
diff --git a/Facepunch.Steamworks/Enum/ConnectionState.cs b/Facepunch.Steamworks/Enum/ConnectionState.cs
deleted file mode 100644
index 7b2b4ad..0000000
--- a/Facepunch.Steamworks/Enum/ConnectionState.cs
+++ /dev/null
@@ -1,107 +0,0 @@
-namespace Steamworks.Data
-{
- /// High level connection status
- public enum ConnectionState
- {
-
- /// Dummy value used to indicate an error condition in the API.
- /// Specified connection doesn't exist or has already been closed.
- None = 0,
-
- /// We are trying to establish whether peers can talk to each other,
- /// whether they WANT to talk to each other, perform basic auth,
- /// and exchange crypt keys.
- ///
- /// - For connections on the "client" side (initiated locally):
- /// We're in the process of trying to establish a connection.
- /// Depending on the connection type, we might not know who they are.
- /// Note that it is not possible to tell if we are waiting on the
- /// network to complete handshake packets, or for the application layer
- /// to accept the connection.
- ///
- /// - For connections on the "server" side (accepted through listen socket):
- /// We have completed some basic handshake and the client has presented
- /// some proof of identity. The connection is ready to be accepted
- /// using AcceptConnection().
- ///
- /// In either case, any unreliable packets sent now are almost certain
- /// to be dropped. Attempts to receive packets are guaranteed to fail.
- /// You may send messages if the send mode allows for them to be queued.
- /// but if you close the connection before the connection is actually
- /// established, any queued messages will be discarded immediately.
- /// (We will not attempt to flush the queue and confirm delivery to the
- /// remote host, which ordinarily happens when a connection is closed.)
- Connecting = 1,
-
- /// Some connection types use a back channel or trusted 3rd party
- /// for earliest communication. If the server accepts the connection,
- /// then these connections switch into the rendezvous state. During this
- /// state, we still have not yet established an end-to-end route (through
- /// the relay network), and so if you send any messages unreliable, they
- /// are going to be discarded.
- FindingRoute = 2,
-
- /// We've received communications from our peer (and we know
- /// who they are) and are all good. If you close the connection now,
- /// we will make our best effort to flush out any reliable sent data that
- /// has not been acknowledged by the peer. (But note that this happens
- /// from within the application process, so unlike a TCP connection, you are
- /// not totally handing it off to the operating system to deal with it.)
- Connected = 3,
-
- /// Connection has been closed by our peer, but not closed locally.
- /// The connection still exists from an API perspective. You must close the
- /// handle to free up resources. If there are any messages in the inbound queue,
- /// you may retrieve them. Otherwise, nothing may be done with the connection
- /// except to close it.
- ///
- /// This stats is similar to CLOSE_WAIT in the TCP state machine.
- ClosedByPeer = 4,
-
- /// A disruption in the connection has been detected locally. (E.g. timeout,
- /// local internet connection disrupted, etc.)
- ///
- /// The connection still exists from an API perspective. You must close the
- /// handle to free up resources.
- ///
- /// Attempts to send further messages will fail. Any remaining received messages
- /// in the queue are available.
- ProblemDetectedLocally = 5,
-
- //
- // The following values are used internally and will not be returned by any API.
- // We document them here to provide a little insight into the state machine that is used
- // under the hood.
- //
-
- /// We've disconnected on our side, and from an API perspective the connection is closed.
- /// No more data may be sent or received. All reliable data has been flushed, or else
- /// we've given up and discarded it. We do not yet know for sure that the peer knows
- /// the connection has been closed, however, so we're just hanging around so that if we do
- /// get a packet from them, we can send them the appropriate packets so that they can
- /// know why the connection was closed (and not have to rely on a timeout, which makes
- /// it appear as if something is wrong).
- FinWait = -1,
-
- /// We've disconnected on our side, and from an API perspective the connection is closed.
- /// No more data may be sent or received. From a network perspective, however, on the wire,
- /// we have not yet given any indication to the peer that the connection is closed.
- /// We are in the process of flushing out the last bit of reliable data. Once that is done,
- /// we will inform the peer that the connection has been closed, and transition to the
- /// FinWait state.
- ///
- /// Note that no indication is given to the remote host that we have closed the connection,
- /// until the data has been flushed. If the remote host attempts to send us data, we will
- /// do whatever is necessary to keep the connection alive until it can be closed properly.
- /// But in fact the data will be discarded, since there is no way for the application to
- /// read it back. Typically this is not a problem, as application protocols that utilize
- /// the lingering functionality are designed for the remote host to wait for the response
- /// before sending any more data.
- Linger = -2,
-
- /// Connection is completely inactive and ready to be destroyed
- Dead = -3,
-
- Force32Bit = 0x7fffffff
- };
-}
\ No newline at end of file
diff --git a/Facepunch.Steamworks/Enum/DebugOutputType.cs b/Facepunch.Steamworks/Enum/DebugOutputType.cs
deleted file mode 100644
index 5f36bbd..0000000
--- a/Facepunch.Steamworks/Enum/DebugOutputType.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-namespace Steamworks.Data
-{
- enum DebugOutputType : int
- {
- None = 0,
- Bug = 1, // You used the API incorrectly, or an internal error happened
- Error = 2, // Run-time error condition that isn't the result of a bug. (E.g. we are offline, cannot bind a port, etc)
- Important = 3, // Nothing is wrong, but this is an important notification
- Warning = 4,
- Msg = 5, // Recommended amount
- Verbose = 6, // Quite a bit
- Debug = 7, // Practically everything
- Everything = 8, // Wall of text, detailed packet contents breakdown, etc
-
- Force32Bit = 0x7fffffff
- };
-}
diff --git a/Facepunch.Steamworks/Enum/NetConfig.cs b/Facepunch.Steamworks/Enum/NetConfig.cs
deleted file mode 100644
index c45fd64..0000000
--- a/Facepunch.Steamworks/Enum/NetConfig.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-namespace Steamworks.Data
-{
- internal enum NetConfig : int
- {
- Invalid = 0,
- FakePacketLoss_Send = 2,
- FakePacketLoss_Recv = 3,
- FakePacketLag_Send = 4,
- FakePacketLag_Recv = 5,
-
- FakePacketReorder_Send = 6,
- FakePacketReorder_Recv = 7,
-
- FakePacketReorder_Time = 8,
-
- FakePacketDup_Send = 26,
- FakePacketDup_Recv = 27,
-
- FakePacketDup_TimeMax = 28,
-
- TimeoutInitial = 24,
-
- TimeoutConnected = 25,
-
- SendBufferSize = 9,
-
- SendRateMin = 10,
- SendRateMax = 11,
-
- NagleTime = 12,
-
- IP_AllowWithoutAuth = 23,
-
- SDRClient_ConsecutitivePingTimeoutsFailInitial = 19,
-
- SDRClient_ConsecutitivePingTimeoutsFail = 20,
-
- SDRClient_MinPingsBeforePingAccurate = 21,
-
- SDRClient_SingleSocket = 22,
-
- SDRClient_ForceRelayCluster = 29,
-
- SDRClient_DebugTicketAddress = 30,
-
- SDRClient_ForceProxyAddr = 31,
-
- LogLevel_AckRTT = 13,
- LogLevel_PacketDecode = 14,
- LogLevel_Message = 15,
- LogLevel_PacketGaps = 16,
- LogLevel_P2PRendezvous = 17,
- LogLevel_SDRRelayPings = 18,
-
- Force32Bit = 0x7fffffff
- }
-}
diff --git a/Facepunch.Steamworks/Enum/NetConfigResult.cs b/Facepunch.Steamworks/Enum/NetConfigResult.cs
deleted file mode 100644
index 8f8c6a2..0000000
--- a/Facepunch.Steamworks/Enum/NetConfigResult.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-namespace Steamworks.Data
-{
- enum NetConfigResult
- {
- BadValue = -1, // No such configuration value
- BadScopeObj = -2, // Bad connection handle, etc
- BufferTooSmall = -3, // Couldn't fit the result in your buffer
- OK = 1,
- OKInherited = 2, // A value was not set at this level, but the effective (inherited) value was returned.
-
- Force32Bit = 0x7fffffff
- };
-}
diff --git a/Facepunch.Steamworks/Enum/NetConfigType.cs b/Facepunch.Steamworks/Enum/NetConfigType.cs
deleted file mode 100644
index 7e7b60d..0000000
--- a/Facepunch.Steamworks/Enum/NetConfigType.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-namespace Steamworks.Data
-{
- enum NetConfigType
- {
- Int32 = 1,
- Int64 = 2,
- Float = 3,
- String = 4,
- FunctionPtr = 5, // NOTE: When setting callbacks, you should put the pointer into a variable and pass a pointer to that variable.
-
- Force32Bit = 0x7fffffff
- };
-}
diff --git a/Facepunch.Steamworks/Enum/NetScope.cs b/Facepunch.Steamworks/Enum/NetScope.cs
deleted file mode 100644
index 4d03d5b..0000000
--- a/Facepunch.Steamworks/Enum/NetScope.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-namespace Steamworks.Data
-{
- internal enum NetScope : int
- {
- Global = 1,
- SocketsInterface = 2,
- ListenSocket = 3,
- Connection = 4,
-
- Force32Bit = 0x7fffffff
- }
-}
diff --git a/Facepunch.Steamworks/Facepunch.Steamworks.Posix64.csproj b/Facepunch.Steamworks/Facepunch.Steamworks.Posix.csproj
similarity index 57%
rename from Facepunch.Steamworks/Facepunch.Steamworks.Posix64.csproj
rename to Facepunch.Steamworks/Facepunch.Steamworks.Posix.csproj
index df8fd32..eb41812 100644
--- a/Facepunch.Steamworks/Facepunch.Steamworks.Posix64.csproj
+++ b/Facepunch.Steamworks/Facepunch.Steamworks.Posix.csproj
@@ -1,11 +1,11 @@
- Facepunch.Steamworks.Posix64
- $(DefineConstants);PLATFORM_POSIX64;PLATFORM_POSIX;PLATFORM_64
- netstandard2.0;net46
+ Facepunch.Steamworks.Posix
+ $(DefineConstants);PLATFORM_POSIX
+ netstandard2.1;net6.0;net46
true
- 7.1
+ 10
true
false
Steamworks
diff --git a/Facepunch.Steamworks/Facepunch.Steamworks.Posix32.csproj b/Facepunch.Steamworks/Facepunch.Steamworks.Posix32.csproj
deleted file mode 100644
index e0ef778..0000000
--- a/Facepunch.Steamworks/Facepunch.Steamworks.Posix32.csproj
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
- Facepunch.Steamworks.Posix32
- $(DefineConstants);PLATFORM_POSIX32;PLATFORM_POSIX;PLATFORM_32
- netstandard2.0;net46
- true
- 7.1
- true
- false
- Steamworks
-
-
-
-
-
diff --git a/Facepunch.Steamworks/Facepunch.Steamworks.Win32.csproj b/Facepunch.Steamworks/Facepunch.Steamworks.Win32.csproj
index ce68aa0..25bab61 100644
--- a/Facepunch.Steamworks/Facepunch.Steamworks.Win32.csproj
+++ b/Facepunch.Steamworks/Facepunch.Steamworks.Win32.csproj
@@ -2,21 +2,41 @@
Facepunch.Steamworks.Win32
- $(DefineConstants);PLATFORM_WIN32;PLATFORM_WIN;PLATFORM_32
- netstandard2.0;net46
- true
- 7.1
+ $(DefineConstants);PLATFORM_WIN32;PLATFORM_WIN
+ netstandard2.1;net6.0;net46
+ true
true
true
Steamworks
+
+ C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client
+ Garry Newman
+ Facepunch.Steamworks.win32
+ Steamworks implementation with an emphasis on making things easy. For Windows x86.
+ https://github.com/Facepunch/Facepunch.Steamworks
+ Facepunch.Steamworks.jpg
+ facepunch;steam;unity;steamworks;valve
+ 10
+ MIT
+ https://github.com/Facepunch/Facepunch.Steamworks.git
+ git
+ true
+
+
-
+
+ true
+ /
+
+
Always
+ true
+ content
-
\ No newline at end of file
+
diff --git a/Facepunch.Steamworks/Facepunch.Steamworks.Win64.csproj b/Facepunch.Steamworks/Facepunch.Steamworks.Win64.csproj
index bcfe00c..dcd5682 100644
--- a/Facepunch.Steamworks/Facepunch.Steamworks.Win64.csproj
+++ b/Facepunch.Steamworks/Facepunch.Steamworks.Win64.csproj
@@ -3,34 +3,53 @@
Facepunch.Steamworks.Win64
$(DefineConstants);PLATFORM_WIN64;PLATFORM_WIN;PLATFORM_64
- netstandard2.0;net46
- true
- 7.1
+ netstandard2.1;net6.0;net46
+ true
true
- false
+ true
+ Steamworks
-
-
- Always
-
-
-
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client
Garry Newman
Facepunch.Steamworks
- Another fucking c# Steamworks implementation
+ Steamworks implementation with an emphasis on making things easy. For Windows x64.
https://github.com/Facepunch/Facepunch.Steamworks
- https://files.facepunch.com/garry/c5edce1c-0c21-4c5d-95b6-37743be7455d.jpg
+ Facepunch.Steamworks.jpg
facepunch;steam;unity;steamworks;valve
- 2.2.0
- latest
+ 10
MIT
https://github.com/Facepunch/Facepunch.Steamworks.git
git
+ true
+
+
+
+ true
+ /
+
+
+ Always
+ true
+ content
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Facepunch.Steamworks/Facepunch.Steamworks.jpg b/Facepunch.Steamworks/Facepunch.Steamworks.jpg
new file mode 100644
index 0000000..b70822b
Binary files /dev/null and b/Facepunch.Steamworks/Facepunch.Steamworks.jpg differ
diff --git a/Facepunch.Steamworks/Facepunch.Steamworks.targets b/Facepunch.Steamworks/Facepunch.Steamworks.targets
index d463e4f..a6fcce2 100644
--- a/Facepunch.Steamworks/Facepunch.Steamworks.targets
+++ b/Facepunch.Steamworks/Facepunch.Steamworks.targets
@@ -5,6 +5,11 @@
true
+
+ 2.3.4
+ 2.3.4
+
+
$(DefineConstants);TRACE;DEBUG
1701;1702;1705;618;1591
@@ -28,9 +33,5 @@
-
-
-
-
-
+
diff --git a/Facepunch.Steamworks/Generated/CustomEnums.cs b/Facepunch.Steamworks/Generated/CustomEnums.cs
new file mode 100644
index 0000000..885b918
--- /dev/null
+++ b/Facepunch.Steamworks/Generated/CustomEnums.cs
@@ -0,0 +1,444 @@
+using System;
+using System.Runtime.InteropServices;
+using System.Linq;
+using Steamworks.Data;
+using System.Threading.Tasks;
+
+namespace Steamworks
+{
+ public enum CallbackType
+ {
+ SteamServersConnected = 101,
+ SteamServerConnectFailure = 102,
+ SteamServersDisconnected = 103,
+ ClientGameServerDeny = 113,
+ GSPolicyResponse = 115,
+ IPCFailure = 117,
+ LicensesUpdated = 125,
+ ValidateAuthTicketResponse = 143,
+ MicroTxnAuthorizationResponse = 152,
+ EncryptedAppTicketResponse = 154,
+ GetAuthSessionTicketResponse = 163,
+ GameWebCallback = 164,
+ StoreAuthURLResponse = 165,
+ MarketEligibilityResponse = 166,
+ DurationControl = 167,
+ GSClientApprove = 201,
+ GSClientDeny = 202,
+ GSClientKick = 203,
+ GSClientAchievementStatus = 206,
+ GSGameplayStats = 207,
+ GSClientGroupStatus = 208,
+ GSReputation = 209,
+ AssociateWithClanResult = 210,
+ ComputeNewPlayerCompatibilityResult = 211,
+ PersonaStateChange = 304,
+ GameOverlayActivated = 331,
+ GameServerChangeRequested = 332,
+ GameLobbyJoinRequested = 333,
+ AvatarImageLoaded = 334,
+ ClanOfficerListResponse = 335,
+ FriendRichPresenceUpdate = 336,
+ GameRichPresenceJoinRequested = 337,
+ GameConnectedClanChatMsg = 338,
+ GameConnectedChatJoin = 339,
+ GameConnectedChatLeave = 340,
+ DownloadClanActivityCountsResult = 341,
+ JoinClanChatRoomCompletionResult = 342,
+ GameConnectedFriendChatMsg = 343,
+ FriendsGetFollowerCount = 344,
+ FriendsIsFollowing = 345,
+ FriendsEnumerateFollowingList = 346,
+ SetPersonaNameResponse = 347,
+ UnreadChatMessagesChanged = 348,
+ OverlayBrowserProtocolNavigation = 349,
+ EquippedProfileItemsChanged = 350,
+ EquippedProfileItems = 351,
+ FavoritesListChanged = 502,
+ LobbyInvite = 503,
+ LobbyEnter = 504,
+ LobbyDataUpdate = 505,
+ LobbyChatUpdate = 506,
+ LobbyChatMsg = 507,
+ LobbyGameCreated = 509,
+ LobbyMatchList = 510,
+ LobbyKicked = 512,
+ LobbyCreated = 513,
+ PSNGameBootInviteResult = 515,
+ FavoritesListAccountsUpdated = 516,
+ IPCountry = 701,
+ LowBatteryPower = 702,
+ SteamAPICallCompleted = 703,
+ SteamShutdown = 704,
+ CheckFileSignature = 705,
+ GamepadTextInputDismissed = 714,
+ AppResumingFromSuspend = 736,
+ FloatingGamepadTextInputDismissed = 738,
+ DlcInstalled = 1005,
+ RegisterActivationCodeResponse = 1008,
+ NewUrlLaunchParameters = 1014,
+ AppProofOfPurchaseKeyResponse = 1021,
+ FileDetailsResult = 1023,
+ TimedTrialStatus = 1030,
+ UserStatsReceived = 1101,
+ UserStatsStored = 1102,
+ UserAchievementStored = 1103,
+ LeaderboardFindResult = 1104,
+ LeaderboardScoresDownloaded = 1105,
+ LeaderboardScoreUploaded = 1106,
+ NumberOfCurrentPlayers = 1107,
+ UserStatsUnloaded = 1108,
+ GSStatsUnloaded = 1108,
+ UserAchievementIconFetched = 1109,
+ GlobalAchievementPercentagesReady = 1110,
+ LeaderboardUGCSet = 1111,
+ // PS3TrophiesInstalled = 1112,
+ GlobalStatsReceived = 1112,
+ // SocketStatusCallback = 1201,
+ P2PSessionRequest = 1202,
+ P2PSessionConnectFail = 1203,
+ SteamNetConnectionStatusChangedCallback = 1221,
+ SteamNetAuthenticationStatus = 1222,
+ SteamNetworkingFakeIPResult = 1223,
+ SteamNetworkingMessagesSessionRequest = 1251,
+ SteamNetworkingMessagesSessionFailed = 1252,
+ SteamRelayNetworkStatus = 1281,
+ RemoteStorageFileShareResult = 1307,
+ RemoteStoragePublishFileResult = 1309,
+ RemoteStorageDeletePublishedFileResult = 1311,
+ RemoteStorageEnumerateUserPublishedFilesResult = 1312,
+ RemoteStorageSubscribePublishedFileResult = 1313,
+ RemoteStorageEnumerateUserSubscribedFilesResult = 1314,
+ RemoteStorageUnsubscribePublishedFileResult = 1315,
+ RemoteStorageUpdatePublishedFileResult = 1316,
+ RemoteStorageDownloadUGCResult = 1317,
+ RemoteStorageGetPublishedFileDetailsResult = 1318,
+ RemoteStorageEnumerateWorkshopFilesResult = 1319,
+ RemoteStorageGetPublishedItemVoteDetailsResult = 1320,
+ RemoteStoragePublishedFileSubscribed = 1321,
+ RemoteStoragePublishedFileUnsubscribed = 1322,
+ RemoteStoragePublishedFileDeleted = 1323,
+ RemoteStorageUpdateUserPublishedItemVoteResult = 1324,
+ RemoteStorageUserVoteDetails = 1325,
+ RemoteStorageEnumerateUserSharedWorkshopFilesResult = 1326,
+ RemoteStorageSetUserPublishedFileActionResult = 1327,
+ RemoteStorageEnumeratePublishedFilesByUserActionResult = 1328,
+ RemoteStoragePublishFileProgress = 1329,
+ RemoteStoragePublishedFileUpdated = 1330,
+ RemoteStorageFileWriteAsyncComplete = 1331,
+ RemoteStorageFileReadAsyncComplete = 1332,
+ RemoteStorageLocalFileChange = 1333,
+ GSStatsReceived = 1800,
+ GSStatsStored = 1801,
+ HTTPRequestCompleted = 2101,
+ HTTPRequestHeadersReceived = 2102,
+ HTTPRequestDataReceived = 2103,
+ ScreenshotReady = 2301,
+ ScreenshotRequested = 2302,
+ SteamInputDeviceConnected = 2801,
+ SteamInputDeviceDisconnected = 2802,
+ SteamInputConfigurationLoaded = 2803,
+ SteamUGCQueryCompleted = 3401,
+ SteamUGCRequestUGCDetailsResult = 3402,
+ CreateItemResult = 3403,
+ SubmitItemUpdateResult = 3404,
+ ItemInstalled = 3405,
+ DownloadItemResult = 3406,
+ UserFavoriteItemsListChanged = 3407,
+ SetUserItemVoteResult = 3408,
+ GetUserItemVoteResult = 3409,
+ StartPlaytimeTrackingResult = 3410,
+ StopPlaytimeTrackingResult = 3411,
+ AddUGCDependencyResult = 3412,
+ RemoveUGCDependencyResult = 3413,
+ AddAppDependencyResult = 3414,
+ RemoveAppDependencyResult = 3415,
+ GetAppDependenciesResult = 3416,
+ DeleteItemResult = 3417,
+ UserSubscribedItemsListChanged = 3418,
+ WorkshopEULAStatus = 3420,
+ SteamAppInstalled = 3901,
+ SteamAppUninstalled = 3902,
+ PlaybackStatusHasChanged = 4001,
+ VolumeHasChanged = 4002,
+ MusicPlayerWantsVolume = 4011,
+ MusicPlayerSelectsQueueEntry = 4012,
+ MusicPlayerSelectsPlaylistEntry = 4013,
+ MusicPlayerRemoteWillActivate = 4101,
+ MusicPlayerRemoteWillDeactivate = 4102,
+ MusicPlayerRemoteToFront = 4103,
+ MusicPlayerWillQuit = 4104,
+ MusicPlayerWantsPlay = 4105,
+ MusicPlayerWantsPause = 4106,
+ MusicPlayerWantsPlayPrevious = 4107,
+ MusicPlayerWantsPlayNext = 4108,
+ MusicPlayerWantsShuffled = 4109,
+ MusicPlayerWantsLooped = 4110,
+ MusicPlayerWantsPlayingRepeatStatus = 4114,
+ HTML_BrowserReady = 4501,
+ HTML_NeedsPaint = 4502,
+ HTML_StartRequest = 4503,
+ HTML_CloseBrowser = 4504,
+ HTML_URLChanged = 4505,
+ HTML_FinishedRequest = 4506,
+ HTML_OpenLinkInNewTab = 4507,
+ HTML_ChangedTitle = 4508,
+ HTML_SearchResults = 4509,
+ HTML_CanGoBackAndForward = 4510,
+ HTML_HorizontalScroll = 4511,
+ HTML_VerticalScroll = 4512,
+ HTML_LinkAtPosition = 4513,
+ HTML_JSAlert = 4514,
+ HTML_JSConfirm = 4515,
+ HTML_FileOpenDialog = 4516,
+ HTML_NewWindow = 4521,
+ HTML_SetCursor = 4522,
+ HTML_StatusText = 4523,
+ HTML_ShowToolTip = 4524,
+ HTML_UpdateToolTip = 4525,
+ HTML_HideToolTip = 4526,
+ HTML_BrowserRestarted = 4527,
+ GetVideoURLResult = 4611,
+ GetOPFSettingsResult = 4624,
+ SteamInventoryResultReady = 4700,
+ SteamInventoryFullUpdate = 4701,
+ SteamInventoryDefinitionUpdate = 4702,
+ SteamInventoryEligiblePromoItemDefIDs = 4703,
+ SteamInventoryStartPurchaseResult = 4704,
+ SteamInventoryRequestPricesResult = 4705,
+ SteamParentalSettingsChanged = 5001,
+ SearchForGameProgressCallback = 5201,
+ SearchForGameResultCallback = 5202,
+ RequestPlayersForGameProgressCallback = 5211,
+ RequestPlayersForGameResultCallback = 5212,
+ RequestPlayersForGameFinalResultCallback = 5213,
+ SubmitPlayerResultResultCallback = 5214,
+ EndGameResultCallback = 5215,
+ JoinPartyCallback = 5301,
+ CreateBeaconCallback = 5302,
+ ReservationNotificationCallback = 5303,
+ ChangeNumOpenSlotsCallback = 5304,
+ AvailableBeaconLocationsUpdated = 5305,
+ ActiveBeaconsUpdated = 5306,
+ SteamRemotePlaySessionConnected = 5701,
+ SteamRemotePlaySessionDisconnected = 5702,
+ }
+ internal static partial class CallbackTypeFactory
+ {
+ internal static System.Collections.Generic.Dictionary All = new System.Collections.Generic.Dictionary
+ {
+ { CallbackType.SteamServersConnected, typeof( SteamServersConnected_t )},
+ { CallbackType.SteamServerConnectFailure, typeof( SteamServerConnectFailure_t )},
+ { CallbackType.SteamServersDisconnected, typeof( SteamServersDisconnected_t )},
+ { CallbackType.ClientGameServerDeny, typeof( ClientGameServerDeny_t )},
+ { CallbackType.GSPolicyResponse, typeof( GSPolicyResponse_t )},
+ { CallbackType.IPCFailure, typeof( IPCFailure_t )},
+ { CallbackType.LicensesUpdated, typeof( LicensesUpdated_t )},
+ { CallbackType.ValidateAuthTicketResponse, typeof( ValidateAuthTicketResponse_t )},
+ { CallbackType.MicroTxnAuthorizationResponse, typeof( MicroTxnAuthorizationResponse_t )},
+ { CallbackType.EncryptedAppTicketResponse, typeof( EncryptedAppTicketResponse_t )},
+ { CallbackType.GetAuthSessionTicketResponse, typeof( GetAuthSessionTicketResponse_t )},
+ { CallbackType.GameWebCallback, typeof( GameWebCallback_t )},
+ { CallbackType.StoreAuthURLResponse, typeof( StoreAuthURLResponse_t )},
+ { CallbackType.MarketEligibilityResponse, typeof( MarketEligibilityResponse_t )},
+ { CallbackType.DurationControl, typeof( DurationControl_t )},
+ { CallbackType.GSClientApprove, typeof( GSClientApprove_t )},
+ { CallbackType.GSClientDeny, typeof( GSClientDeny_t )},
+ { CallbackType.GSClientKick, typeof( GSClientKick_t )},
+ { CallbackType.GSClientAchievementStatus, typeof( GSClientAchievementStatus_t )},
+ { CallbackType.GSGameplayStats, typeof( GSGameplayStats_t )},
+ { CallbackType.GSClientGroupStatus, typeof( GSClientGroupStatus_t )},
+ { CallbackType.GSReputation, typeof( GSReputation_t )},
+ { CallbackType.AssociateWithClanResult, typeof( AssociateWithClanResult_t )},
+ { CallbackType.ComputeNewPlayerCompatibilityResult, typeof( ComputeNewPlayerCompatibilityResult_t )},
+ { CallbackType.PersonaStateChange, typeof( PersonaStateChange_t )},
+ { CallbackType.GameOverlayActivated, typeof( GameOverlayActivated_t )},
+ { CallbackType.GameServerChangeRequested, typeof( GameServerChangeRequested_t )},
+ { CallbackType.GameLobbyJoinRequested, typeof( GameLobbyJoinRequested_t )},
+ { CallbackType.AvatarImageLoaded, typeof( AvatarImageLoaded_t )},
+ { CallbackType.ClanOfficerListResponse, typeof( ClanOfficerListResponse_t )},
+ { CallbackType.FriendRichPresenceUpdate, typeof( FriendRichPresenceUpdate_t )},
+ { CallbackType.GameRichPresenceJoinRequested, typeof( GameRichPresenceJoinRequested_t )},
+ { CallbackType.GameConnectedClanChatMsg, typeof( GameConnectedClanChatMsg_t )},
+ { CallbackType.GameConnectedChatJoin, typeof( GameConnectedChatJoin_t )},
+ { CallbackType.GameConnectedChatLeave, typeof( GameConnectedChatLeave_t )},
+ { CallbackType.DownloadClanActivityCountsResult, typeof( DownloadClanActivityCountsResult_t )},
+ { CallbackType.JoinClanChatRoomCompletionResult, typeof( JoinClanChatRoomCompletionResult_t )},
+ { CallbackType.GameConnectedFriendChatMsg, typeof( GameConnectedFriendChatMsg_t )},
+ { CallbackType.FriendsGetFollowerCount, typeof( FriendsGetFollowerCount_t )},
+ { CallbackType.FriendsIsFollowing, typeof( FriendsIsFollowing_t )},
+ { CallbackType.FriendsEnumerateFollowingList, typeof( FriendsEnumerateFollowingList_t )},
+ { CallbackType.SetPersonaNameResponse, typeof( SetPersonaNameResponse_t )},
+ { CallbackType.UnreadChatMessagesChanged, typeof( UnreadChatMessagesChanged_t )},
+ { CallbackType.OverlayBrowserProtocolNavigation, typeof( OverlayBrowserProtocolNavigation_t )},
+ { CallbackType.EquippedProfileItemsChanged, typeof( EquippedProfileItemsChanged_t )},
+ { CallbackType.EquippedProfileItems, typeof( EquippedProfileItems_t )},
+ { CallbackType.FavoritesListChanged, typeof( FavoritesListChanged_t )},
+ { CallbackType.LobbyInvite, typeof( LobbyInvite_t )},
+ { CallbackType.LobbyEnter, typeof( LobbyEnter_t )},
+ { CallbackType.LobbyDataUpdate, typeof( LobbyDataUpdate_t )},
+ { CallbackType.LobbyChatUpdate, typeof( LobbyChatUpdate_t )},
+ { CallbackType.LobbyChatMsg, typeof( LobbyChatMsg_t )},
+ { CallbackType.LobbyGameCreated, typeof( LobbyGameCreated_t )},
+ { CallbackType.LobbyMatchList, typeof( LobbyMatchList_t )},
+ { CallbackType.LobbyKicked, typeof( LobbyKicked_t )},
+ { CallbackType.LobbyCreated, typeof( LobbyCreated_t )},
+ { CallbackType.PSNGameBootInviteResult, typeof( PSNGameBootInviteResult_t )},
+ { CallbackType.FavoritesListAccountsUpdated, typeof( FavoritesListAccountsUpdated_t )},
+ { CallbackType.IPCountry, typeof( IPCountry_t )},
+ { CallbackType.LowBatteryPower, typeof( LowBatteryPower_t )},
+ { CallbackType.SteamAPICallCompleted, typeof( SteamAPICallCompleted_t )},
+ { CallbackType.SteamShutdown, typeof( SteamShutdown_t )},
+ { CallbackType.CheckFileSignature, typeof( CheckFileSignature_t )},
+ { CallbackType.GamepadTextInputDismissed, typeof( GamepadTextInputDismissed_t )},
+ { CallbackType.AppResumingFromSuspend, typeof( AppResumingFromSuspend_t )},
+ { CallbackType.FloatingGamepadTextInputDismissed, typeof( FloatingGamepadTextInputDismissed_t )},
+ { CallbackType.DlcInstalled, typeof( DlcInstalled_t )},
+ { CallbackType.RegisterActivationCodeResponse, typeof( RegisterActivationCodeResponse_t )},
+ { CallbackType.NewUrlLaunchParameters, typeof( NewUrlLaunchParameters_t )},
+ { CallbackType.AppProofOfPurchaseKeyResponse, typeof( AppProofOfPurchaseKeyResponse_t )},
+ { CallbackType.FileDetailsResult, typeof( FileDetailsResult_t )},
+ { CallbackType.TimedTrialStatus, typeof( TimedTrialStatus_t )},
+ { CallbackType.UserStatsReceived, typeof( UserStatsReceived_t )},
+ { CallbackType.UserStatsStored, typeof( UserStatsStored_t )},
+ { CallbackType.UserAchievementStored, typeof( UserAchievementStored_t )},
+ { CallbackType.LeaderboardFindResult, typeof( LeaderboardFindResult_t )},
+ { CallbackType.LeaderboardScoresDownloaded, typeof( LeaderboardScoresDownloaded_t )},
+ { CallbackType.LeaderboardScoreUploaded, typeof( LeaderboardScoreUploaded_t )},
+ { CallbackType.NumberOfCurrentPlayers, typeof( NumberOfCurrentPlayers_t )},
+ { CallbackType.UserStatsUnloaded, typeof( UserStatsUnloaded_t )},
+ // { CallbackType.GSStatsUnloaded, typeof( GSStatsUnloaded_t )},
+ { CallbackType.UserAchievementIconFetched, typeof( UserAchievementIconFetched_t )},
+ { CallbackType.GlobalAchievementPercentagesReady, typeof( GlobalAchievementPercentagesReady_t )},
+ { CallbackType.LeaderboardUGCSet, typeof( LeaderboardUGCSet_t )},
+ { CallbackType.GlobalStatsReceived, typeof( GlobalStatsReceived_t )},
+ { CallbackType.P2PSessionRequest, typeof( P2PSessionRequest_t )},
+ { CallbackType.P2PSessionConnectFail, typeof( P2PSessionConnectFail_t )},
+ { CallbackType.SteamNetConnectionStatusChangedCallback, typeof( SteamNetConnectionStatusChangedCallback_t )},
+ { CallbackType.SteamNetAuthenticationStatus, typeof( SteamNetAuthenticationStatus_t )},
+ { CallbackType.SteamNetworkingFakeIPResult, typeof( SteamNetworkingFakeIPResult_t )},
+ { CallbackType.SteamNetworkingMessagesSessionRequest, typeof( SteamNetworkingMessagesSessionRequest_t )},
+ { CallbackType.SteamNetworkingMessagesSessionFailed, typeof( SteamNetworkingMessagesSessionFailed_t )},
+ { CallbackType.SteamRelayNetworkStatus, typeof( SteamRelayNetworkStatus_t )},
+ { CallbackType.RemoteStorageFileShareResult, typeof( RemoteStorageFileShareResult_t )},
+ { CallbackType.RemoteStoragePublishFileResult, typeof( RemoteStoragePublishFileResult_t )},
+ { CallbackType.RemoteStorageDeletePublishedFileResult, typeof( RemoteStorageDeletePublishedFileResult_t )},
+ { CallbackType.RemoteStorageEnumerateUserPublishedFilesResult, typeof( RemoteStorageEnumerateUserPublishedFilesResult_t )},
+ { CallbackType.RemoteStorageSubscribePublishedFileResult, typeof( RemoteStorageSubscribePublishedFileResult_t )},
+ { CallbackType.RemoteStorageEnumerateUserSubscribedFilesResult, typeof( RemoteStorageEnumerateUserSubscribedFilesResult_t )},
+ { CallbackType.RemoteStorageUnsubscribePublishedFileResult, typeof( RemoteStorageUnsubscribePublishedFileResult_t )},
+ { CallbackType.RemoteStorageUpdatePublishedFileResult, typeof( RemoteStorageUpdatePublishedFileResult_t )},
+ { CallbackType.RemoteStorageDownloadUGCResult, typeof( RemoteStorageDownloadUGCResult_t )},
+ { CallbackType.RemoteStorageGetPublishedFileDetailsResult, typeof( RemoteStorageGetPublishedFileDetailsResult_t )},
+ { CallbackType.RemoteStorageEnumerateWorkshopFilesResult, typeof( RemoteStorageEnumerateWorkshopFilesResult_t )},
+ { CallbackType.RemoteStorageGetPublishedItemVoteDetailsResult, typeof( RemoteStorageGetPublishedItemVoteDetailsResult_t )},
+ { CallbackType.RemoteStoragePublishedFileSubscribed, typeof( RemoteStoragePublishedFileSubscribed_t )},
+ { CallbackType.RemoteStoragePublishedFileUnsubscribed, typeof( RemoteStoragePublishedFileUnsubscribed_t )},
+ { CallbackType.RemoteStoragePublishedFileDeleted, typeof( RemoteStoragePublishedFileDeleted_t )},
+ { CallbackType.RemoteStorageUpdateUserPublishedItemVoteResult, typeof( RemoteStorageUpdateUserPublishedItemVoteResult_t )},
+ { CallbackType.RemoteStorageUserVoteDetails, typeof( RemoteStorageUserVoteDetails_t )},
+ { CallbackType.RemoteStorageEnumerateUserSharedWorkshopFilesResult, typeof( RemoteStorageEnumerateUserSharedWorkshopFilesResult_t )},
+ { CallbackType.RemoteStorageSetUserPublishedFileActionResult, typeof( RemoteStorageSetUserPublishedFileActionResult_t )},
+ { CallbackType.RemoteStorageEnumeratePublishedFilesByUserActionResult, typeof( RemoteStorageEnumeratePublishedFilesByUserActionResult_t )},
+ { CallbackType.RemoteStoragePublishFileProgress, typeof( RemoteStoragePublishFileProgress_t )},
+ { CallbackType.RemoteStoragePublishedFileUpdated, typeof( RemoteStoragePublishedFileUpdated_t )},
+ { CallbackType.RemoteStorageFileWriteAsyncComplete, typeof( RemoteStorageFileWriteAsyncComplete_t )},
+ { CallbackType.RemoteStorageFileReadAsyncComplete, typeof( RemoteStorageFileReadAsyncComplete_t )},
+ { CallbackType.RemoteStorageLocalFileChange, typeof( RemoteStorageLocalFileChange_t )},
+ { CallbackType.GSStatsReceived, typeof( GSStatsReceived_t )},
+ { CallbackType.GSStatsStored, typeof( GSStatsStored_t )},
+ { CallbackType.HTTPRequestCompleted, typeof( HTTPRequestCompleted_t )},
+ { CallbackType.HTTPRequestHeadersReceived, typeof( HTTPRequestHeadersReceived_t )},
+ { CallbackType.HTTPRequestDataReceived, typeof( HTTPRequestDataReceived_t )},
+ { CallbackType.ScreenshotReady, typeof( ScreenshotReady_t )},
+ { CallbackType.ScreenshotRequested, typeof( ScreenshotRequested_t )},
+ { CallbackType.SteamInputDeviceConnected, typeof( SteamInputDeviceConnected_t )},
+ { CallbackType.SteamInputDeviceDisconnected, typeof( SteamInputDeviceDisconnected_t )},
+ { CallbackType.SteamInputConfigurationLoaded, typeof( SteamInputConfigurationLoaded_t )},
+ { CallbackType.SteamUGCQueryCompleted, typeof( SteamUGCQueryCompleted_t )},
+ { CallbackType.SteamUGCRequestUGCDetailsResult, typeof( SteamUGCRequestUGCDetailsResult_t )},
+ { CallbackType.CreateItemResult, typeof( CreateItemResult_t )},
+ { CallbackType.SubmitItemUpdateResult, typeof( SubmitItemUpdateResult_t )},
+ { CallbackType.ItemInstalled, typeof( ItemInstalled_t )},
+ { CallbackType.DownloadItemResult, typeof( DownloadItemResult_t )},
+ { CallbackType.UserFavoriteItemsListChanged, typeof( UserFavoriteItemsListChanged_t )},
+ { CallbackType.SetUserItemVoteResult, typeof( SetUserItemVoteResult_t )},
+ { CallbackType.GetUserItemVoteResult, typeof( GetUserItemVoteResult_t )},
+ { CallbackType.StartPlaytimeTrackingResult, typeof( StartPlaytimeTrackingResult_t )},
+ { CallbackType.StopPlaytimeTrackingResult, typeof( StopPlaytimeTrackingResult_t )},
+ { CallbackType.AddUGCDependencyResult, typeof( AddUGCDependencyResult_t )},
+ { CallbackType.RemoveUGCDependencyResult, typeof( RemoveUGCDependencyResult_t )},
+ { CallbackType.AddAppDependencyResult, typeof( AddAppDependencyResult_t )},
+ { CallbackType.RemoveAppDependencyResult, typeof( RemoveAppDependencyResult_t )},
+ { CallbackType.GetAppDependenciesResult, typeof( GetAppDependenciesResult_t )},
+ { CallbackType.DeleteItemResult, typeof( DeleteItemResult_t )},
+ { CallbackType.UserSubscribedItemsListChanged, typeof( UserSubscribedItemsListChanged_t )},
+ { CallbackType.WorkshopEULAStatus, typeof( WorkshopEULAStatus_t )},
+ { CallbackType.SteamAppInstalled, typeof( SteamAppInstalled_t )},
+ { CallbackType.SteamAppUninstalled, typeof( SteamAppUninstalled_t )},
+ { CallbackType.PlaybackStatusHasChanged, typeof( PlaybackStatusHasChanged_t )},
+ { CallbackType.VolumeHasChanged, typeof( VolumeHasChanged_t )},
+ { CallbackType.MusicPlayerWantsVolume, typeof( MusicPlayerWantsVolume_t )},
+ { CallbackType.MusicPlayerSelectsQueueEntry, typeof( MusicPlayerSelectsQueueEntry_t )},
+ { CallbackType.MusicPlayerSelectsPlaylistEntry, typeof( MusicPlayerSelectsPlaylistEntry_t )},
+ { CallbackType.MusicPlayerRemoteWillActivate, typeof( MusicPlayerRemoteWillActivate_t )},
+ { CallbackType.MusicPlayerRemoteWillDeactivate, typeof( MusicPlayerRemoteWillDeactivate_t )},
+ { CallbackType.MusicPlayerRemoteToFront, typeof( MusicPlayerRemoteToFront_t )},
+ { CallbackType.MusicPlayerWillQuit, typeof( MusicPlayerWillQuit_t )},
+ { CallbackType.MusicPlayerWantsPlay, typeof( MusicPlayerWantsPlay_t )},
+ { CallbackType.MusicPlayerWantsPause, typeof( MusicPlayerWantsPause_t )},
+ { CallbackType.MusicPlayerWantsPlayPrevious, typeof( MusicPlayerWantsPlayPrevious_t )},
+ { CallbackType.MusicPlayerWantsPlayNext, typeof( MusicPlayerWantsPlayNext_t )},
+ { CallbackType.MusicPlayerWantsShuffled, typeof( MusicPlayerWantsShuffled_t )},
+ { CallbackType.MusicPlayerWantsLooped, typeof( MusicPlayerWantsLooped_t )},
+ { CallbackType.MusicPlayerWantsPlayingRepeatStatus, typeof( MusicPlayerWantsPlayingRepeatStatus_t )},
+ { CallbackType.HTML_BrowserReady, typeof( HTML_BrowserReady_t )},
+ { CallbackType.HTML_NeedsPaint, typeof( HTML_NeedsPaint_t )},
+ { CallbackType.HTML_StartRequest, typeof( HTML_StartRequest_t )},
+ { CallbackType.HTML_CloseBrowser, typeof( HTML_CloseBrowser_t )},
+ { CallbackType.HTML_URLChanged, typeof( HTML_URLChanged_t )},
+ { CallbackType.HTML_FinishedRequest, typeof( HTML_FinishedRequest_t )},
+ { CallbackType.HTML_OpenLinkInNewTab, typeof( HTML_OpenLinkInNewTab_t )},
+ { CallbackType.HTML_ChangedTitle, typeof( HTML_ChangedTitle_t )},
+ { CallbackType.HTML_SearchResults, typeof( HTML_SearchResults_t )},
+ { CallbackType.HTML_CanGoBackAndForward, typeof( HTML_CanGoBackAndForward_t )},
+ { CallbackType.HTML_HorizontalScroll, typeof( HTML_HorizontalScroll_t )},
+ { CallbackType.HTML_VerticalScroll, typeof( HTML_VerticalScroll_t )},
+ { CallbackType.HTML_LinkAtPosition, typeof( HTML_LinkAtPosition_t )},
+ { CallbackType.HTML_JSAlert, typeof( HTML_JSAlert_t )},
+ { CallbackType.HTML_JSConfirm, typeof( HTML_JSConfirm_t )},
+ { CallbackType.HTML_FileOpenDialog, typeof( HTML_FileOpenDialog_t )},
+ { CallbackType.HTML_NewWindow, typeof( HTML_NewWindow_t )},
+ { CallbackType.HTML_SetCursor, typeof( HTML_SetCursor_t )},
+ { CallbackType.HTML_StatusText, typeof( HTML_StatusText_t )},
+ { CallbackType.HTML_ShowToolTip, typeof( HTML_ShowToolTip_t )},
+ { CallbackType.HTML_UpdateToolTip, typeof( HTML_UpdateToolTip_t )},
+ { CallbackType.HTML_HideToolTip, typeof( HTML_HideToolTip_t )},
+ { CallbackType.HTML_BrowserRestarted, typeof( HTML_BrowserRestarted_t )},
+ { CallbackType.GetVideoURLResult, typeof( GetVideoURLResult_t )},
+ { CallbackType.GetOPFSettingsResult, typeof( GetOPFSettingsResult_t )},
+ { CallbackType.SteamInventoryResultReady, typeof( SteamInventoryResultReady_t )},
+ { CallbackType.SteamInventoryFullUpdate, typeof( SteamInventoryFullUpdate_t )},
+ { CallbackType.SteamInventoryDefinitionUpdate, typeof( SteamInventoryDefinitionUpdate_t )},
+ { CallbackType.SteamInventoryEligiblePromoItemDefIDs, typeof( SteamInventoryEligiblePromoItemDefIDs_t )},
+ { CallbackType.SteamInventoryStartPurchaseResult, typeof( SteamInventoryStartPurchaseResult_t )},
+ { CallbackType.SteamInventoryRequestPricesResult, typeof( SteamInventoryRequestPricesResult_t )},
+ { CallbackType.SteamParentalSettingsChanged, typeof( SteamParentalSettingsChanged_t )},
+ { CallbackType.SearchForGameProgressCallback, typeof( SearchForGameProgressCallback_t )},
+ { CallbackType.SearchForGameResultCallback, typeof( SearchForGameResultCallback_t )},
+ { CallbackType.RequestPlayersForGameProgressCallback, typeof( RequestPlayersForGameProgressCallback_t )},
+ { CallbackType.RequestPlayersForGameResultCallback, typeof( RequestPlayersForGameResultCallback_t )},
+ { CallbackType.RequestPlayersForGameFinalResultCallback, typeof( RequestPlayersForGameFinalResultCallback_t )},
+ { CallbackType.SubmitPlayerResultResultCallback, typeof( SubmitPlayerResultResultCallback_t )},
+ { CallbackType.EndGameResultCallback, typeof( EndGameResultCallback_t )},
+ { CallbackType.JoinPartyCallback, typeof( JoinPartyCallback_t )},
+ { CallbackType.CreateBeaconCallback, typeof( CreateBeaconCallback_t )},
+ { CallbackType.ReservationNotificationCallback, typeof( ReservationNotificationCallback_t )},
+ { CallbackType.ChangeNumOpenSlotsCallback, typeof( ChangeNumOpenSlotsCallback_t )},
+ { CallbackType.AvailableBeaconLocationsUpdated, typeof( AvailableBeaconLocationsUpdated_t )},
+ { CallbackType.ActiveBeaconsUpdated, typeof( ActiveBeaconsUpdated_t )},
+ { CallbackType.SteamRemotePlaySessionConnected, typeof( SteamRemotePlaySessionConnected_t )},
+ { CallbackType.SteamRemotePlaySessionDisconnected, typeof( SteamRemotePlaySessionDisconnected_t )},
+ };
+ }
+}
diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamAppList.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamAppList.cs
new file mode 100644
index 0000000..b674575
--- /dev/null
+++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamAppList.cs
@@ -0,0 +1,83 @@
+using System;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Threading.Tasks;
+using Steamworks.Data;
+
+
+namespace Steamworks
+{
+ internal unsafe class ISteamAppList : SteamInterface
+ {
+
+ internal ISteamAppList( bool IsGameServer )
+ {
+ SetupInterface( IsGameServer );
+ }
+
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamAppList_v001", CallingConvention = Platform.CC)]
+ internal static extern IntPtr SteamAPI_SteamAppList_v001();
+ public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamAppList_v001();
+
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamAppList_GetNumInstalledApps", CallingConvention = Platform.CC)]
+ private static extern uint _GetNumInstalledApps( IntPtr self );
+
+ #endregion
+ internal uint GetNumInstalledApps()
+ {
+ var returnValue = _GetNumInstalledApps( Self );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamAppList_GetInstalledApps", CallingConvention = Platform.CC)]
+ private static extern uint _GetInstalledApps( IntPtr self, [In,Out] AppId[] pvecAppID, uint unMaxAppIDs );
+
+ #endregion
+ internal uint GetInstalledApps( [In,Out] AppId[] pvecAppID, uint unMaxAppIDs )
+ {
+ var returnValue = _GetInstalledApps( Self, pvecAppID, unMaxAppIDs );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamAppList_GetAppName", CallingConvention = Platform.CC)]
+ private static extern int _GetAppName( IntPtr self, AppId nAppID, IntPtr pchName, int cchNameMax );
+
+ #endregion
+ internal int GetAppName( AppId nAppID, out string pchName )
+ {
+ using var mempchName = Helpers.TakeMemory();
+ var returnValue = _GetAppName( Self, nAppID, mempchName, (1024 * 32) );
+ pchName = Helpers.MemoryToString( mempchName );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamAppList_GetAppInstallDir", CallingConvention = Platform.CC)]
+ private static extern int _GetAppInstallDir( IntPtr self, AppId nAppID, IntPtr pchDirectory, int cchNameMax );
+
+ #endregion
+ internal int GetAppInstallDir( AppId nAppID, out string pchDirectory )
+ {
+ using var mempchDirectory = Helpers.TakeMemory();
+ var returnValue = _GetAppInstallDir( Self, nAppID, mempchDirectory, (1024 * 32) );
+ pchDirectory = Helpers.MemoryToString( mempchDirectory );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamAppList_GetAppBuildId", CallingConvention = Platform.CC)]
+ private static extern int _GetAppBuildId( IntPtr self, AppId nAppID );
+
+ #endregion
+ internal int GetAppBuildId( AppId nAppID )
+ {
+ var returnValue = _GetAppBuildId( Self, nAppID );
+ return returnValue;
+ }
+
+ }
+}
diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamApps.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamApps.cs
index af26303..2888c39 100644
--- a/Facepunch.Steamworks/Generated/Interfaces/ISteamApps.cs
+++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamApps.cs
@@ -7,80 +7,23 @@ using Steamworks.Data;
namespace Steamworks
{
- internal class ISteamApps : SteamInterface
+ internal unsafe class ISteamApps : SteamInterface
{
- public override string InterfaceName => "STEAMAPPS_INTERFACE_VERSION008";
- public override void InitInternals()
+ internal ISteamApps( bool IsGameServer )
{
- _BIsSubscribed = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
- _BIsLowViolence = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
- _BIsCybercafe = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
- _BIsVACBanned = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
- _GetCurrentGameLanguage = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
- _GetAvailableGameLanguages = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
- _BIsSubscribedApp = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
- _BIsDlcInstalled = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
- _GetEarliestPurchaseUnixTime = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) );
- _BIsSubscribedFromFreeWeekend = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) );
- _GetDLCCount = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) );
- _BGetDLCDataByIndex = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) );
- _InstallDLC = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) );
- _UninstallDLC = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) );
- _RequestAppProofOfPurchaseKey = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) );
- _GetCurrentBetaName = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) );
- _MarkContentCorrupt = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) );
- _GetInstalledDepots = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) );
- _GetAppInstallDir = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) );
- _BIsAppInstalled = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) );
- _GetAppOwner = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) );
- _GetLaunchQueryParam = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 168 ) ) );
- _GetDlcDownloadProgress = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 176 ) ) );
- _GetAppBuildId = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 184 ) ) );
- _RequestAllProofOfPurchaseKeys = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 192 ) ) );
- _GetFileDetails = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 200 ) ) );
- _GetLaunchCommandLine = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 208 ) ) );
- _BIsSubscribedFromFamilySharing = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 216 ) ) );
- }
- internal override void Shutdown()
- {
- base.Shutdown();
-
- _BIsSubscribed = null;
- _BIsLowViolence = null;
- _BIsCybercafe = null;
- _BIsVACBanned = null;
- _GetCurrentGameLanguage = null;
- _GetAvailableGameLanguages = null;
- _BIsSubscribedApp = null;
- _BIsDlcInstalled = null;
- _GetEarliestPurchaseUnixTime = null;
- _BIsSubscribedFromFreeWeekend = null;
- _GetDLCCount = null;
- _BGetDLCDataByIndex = null;
- _InstallDLC = null;
- _UninstallDLC = null;
- _RequestAppProofOfPurchaseKey = null;
- _GetCurrentBetaName = null;
- _MarkContentCorrupt = null;
- _GetInstalledDepots = null;
- _GetAppInstallDir = null;
- _BIsAppInstalled = null;
- _GetAppOwner = null;
- _GetLaunchQueryParam = null;
- _GetDlcDownloadProgress = null;
- _GetAppBuildId = null;
- _RequestAllProofOfPurchaseKeys = null;
- _GetFileDetails = null;
- _GetLaunchCommandLine = null;
- _BIsSubscribedFromFamilySharing = null;
+ SetupInterface( IsGameServer );
}
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamApps_v008", CallingConvention = Platform.CC)]
+ internal static extern IntPtr SteamAPI_SteamApps_v008();
+ public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamApps_v008();
+
+
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsSubscribed", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FBIsSubscribed( IntPtr self );
- private FBIsSubscribed _BIsSubscribed;
+ private static extern bool _BIsSubscribed( IntPtr self );
#endregion
internal bool BIsSubscribed()
@@ -90,10 +33,9 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsLowViolence", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FBIsLowViolence( IntPtr self );
- private FBIsLowViolence _BIsLowViolence;
+ private static extern bool _BIsLowViolence( IntPtr self );
#endregion
internal bool BIsLowViolence()
@@ -103,10 +45,9 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsCybercafe", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FBIsCybercafe( IntPtr self );
- private FBIsCybercafe _BIsCybercafe;
+ private static extern bool _BIsCybercafe( IntPtr self );
#endregion
internal bool BIsCybercafe()
@@ -116,10 +57,9 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsVACBanned", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FBIsVACBanned( IntPtr self );
- private FBIsVACBanned _BIsVACBanned;
+ private static extern bool _BIsVACBanned( IntPtr self );
#endregion
internal bool BIsVACBanned()
@@ -129,9 +69,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate Utf8StringPointer FGetCurrentGameLanguage( IntPtr self );
- private FGetCurrentGameLanguage _GetCurrentGameLanguage;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetCurrentGameLanguage", CallingConvention = Platform.CC)]
+ private static extern Utf8StringPointer _GetCurrentGameLanguage( IntPtr self );
#endregion
internal string GetCurrentGameLanguage()
@@ -141,9 +80,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate Utf8StringPointer FGetAvailableGameLanguages( IntPtr self );
- private FGetAvailableGameLanguages _GetAvailableGameLanguages;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetAvailableGameLanguages", CallingConvention = Platform.CC)]
+ private static extern Utf8StringPointer _GetAvailableGameLanguages( IntPtr self );
#endregion
internal string GetAvailableGameLanguages()
@@ -153,10 +91,9 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsSubscribedApp", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FBIsSubscribedApp( IntPtr self, AppId appID );
- private FBIsSubscribedApp _BIsSubscribedApp;
+ private static extern bool _BIsSubscribedApp( IntPtr self, AppId appID );
#endregion
internal bool BIsSubscribedApp( AppId appID )
@@ -166,10 +103,9 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsDlcInstalled", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FBIsDlcInstalled( IntPtr self, AppId appID );
- private FBIsDlcInstalled _BIsDlcInstalled;
+ private static extern bool _BIsDlcInstalled( IntPtr self, AppId appID );
#endregion
internal bool BIsDlcInstalled( AppId appID )
@@ -179,9 +115,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate uint FGetEarliestPurchaseUnixTime( IntPtr self, AppId nAppID );
- private FGetEarliestPurchaseUnixTime _GetEarliestPurchaseUnixTime;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetEarliestPurchaseUnixTime", CallingConvention = Platform.CC)]
+ private static extern uint _GetEarliestPurchaseUnixTime( IntPtr self, AppId nAppID );
#endregion
internal uint GetEarliestPurchaseUnixTime( AppId nAppID )
@@ -191,10 +126,9 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsSubscribedFromFreeWeekend", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FBIsSubscribedFromFreeWeekend( IntPtr self );
- private FBIsSubscribedFromFreeWeekend _BIsSubscribedFromFreeWeekend;
+ private static extern bool _BIsSubscribedFromFreeWeekend( IntPtr self );
#endregion
internal bool BIsSubscribedFromFreeWeekend()
@@ -204,9 +138,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate int FGetDLCCount( IntPtr self );
- private FGetDLCCount _GetDLCCount;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetDLCCount", CallingConvention = Platform.CC)]
+ private static extern int _GetDLCCount( IntPtr self );
#endregion
internal int GetDLCCount()
@@ -216,24 +149,22 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BGetDLCDataByIndex", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FBGetDLCDataByIndex( IntPtr self, int iDLC, ref AppId pAppID, [MarshalAs( UnmanagedType.U1 )] ref bool pbAvailable, IntPtr pchName, int cchNameBufferSize );
- private FBGetDLCDataByIndex _BGetDLCDataByIndex;
+ private static extern bool _BGetDLCDataByIndex( IntPtr self, int iDLC, ref AppId pAppID, [MarshalAs( UnmanagedType.U1 )] ref bool pbAvailable, IntPtr pchName, int cchNameBufferSize );
#endregion
internal bool BGetDLCDataByIndex( int iDLC, ref AppId pAppID, [MarshalAs( UnmanagedType.U1 )] ref bool pbAvailable, out string pchName )
{
- IntPtr mempchName = Helpers.TakeMemory();
+ using var mempchName = Helpers.TakeMemory();
var returnValue = _BGetDLCDataByIndex( Self, iDLC, ref pAppID, ref pbAvailable, mempchName, (1024 * 32) );
pchName = Helpers.MemoryToString( mempchName );
return returnValue;
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FInstallDLC( IntPtr self, AppId nAppID );
- private FInstallDLC _InstallDLC;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_InstallDLC", CallingConvention = Platform.CC)]
+ private static extern void _InstallDLC( IntPtr self, AppId nAppID );
#endregion
internal void InstallDLC( AppId nAppID )
@@ -242,9 +173,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FUninstallDLC( IntPtr self, AppId nAppID );
- private FUninstallDLC _UninstallDLC;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_UninstallDLC", CallingConvention = Platform.CC)]
+ private static extern void _UninstallDLC( IntPtr self, AppId nAppID );
#endregion
internal void UninstallDLC( AppId nAppID )
@@ -253,9 +183,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FRequestAppProofOfPurchaseKey( IntPtr self, AppId nAppID );
- private FRequestAppProofOfPurchaseKey _RequestAppProofOfPurchaseKey;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_RequestAppProofOfPurchaseKey", CallingConvention = Platform.CC)]
+ private static extern void _RequestAppProofOfPurchaseKey( IntPtr self, AppId nAppID );
#endregion
internal void RequestAppProofOfPurchaseKey( AppId nAppID )
@@ -264,25 +193,23 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetCurrentBetaName", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FGetCurrentBetaName( IntPtr self, IntPtr pchName, int cchNameBufferSize );
- private FGetCurrentBetaName _GetCurrentBetaName;
+ private static extern bool _GetCurrentBetaName( IntPtr self, IntPtr pchName, int cchNameBufferSize );
#endregion
internal bool GetCurrentBetaName( out string pchName )
{
- IntPtr mempchName = Helpers.TakeMemory();
+ using var mempchName = Helpers.TakeMemory();
var returnValue = _GetCurrentBetaName( Self, mempchName, (1024 * 32) );
pchName = Helpers.MemoryToString( mempchName );
return returnValue;
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_MarkContentCorrupt", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FMarkContentCorrupt( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bMissingFilesOnly );
- private FMarkContentCorrupt _MarkContentCorrupt;
+ private static extern bool _MarkContentCorrupt( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bMissingFilesOnly );
#endregion
internal bool MarkContentCorrupt( [MarshalAs( UnmanagedType.U1 )] bool bMissingFilesOnly )
@@ -292,9 +219,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate uint FGetInstalledDepots( IntPtr self, AppId appID, [In,Out] DepotId_t[] pvecDepots, uint cMaxDepots );
- private FGetInstalledDepots _GetInstalledDepots;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetInstalledDepots", CallingConvention = Platform.CC)]
+ private static extern uint _GetInstalledDepots( IntPtr self, AppId appID, [In,Out] DepotId_t[] pvecDepots, uint cMaxDepots );
#endregion
internal uint GetInstalledDepots( AppId appID, [In,Out] DepotId_t[] pvecDepots, uint cMaxDepots )
@@ -304,24 +230,22 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate uint FGetAppInstallDir( IntPtr self, AppId appID, IntPtr pchFolder, uint cchFolderBufferSize );
- private FGetAppInstallDir _GetAppInstallDir;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetAppInstallDir", CallingConvention = Platform.CC)]
+ private static extern uint _GetAppInstallDir( IntPtr self, AppId appID, IntPtr pchFolder, uint cchFolderBufferSize );
#endregion
internal uint GetAppInstallDir( AppId appID, out string pchFolder )
{
- IntPtr mempchFolder = Helpers.TakeMemory();
+ using var mempchFolder = Helpers.TakeMemory();
var returnValue = _GetAppInstallDir( Self, appID, mempchFolder, (1024 * 32) );
pchFolder = Helpers.MemoryToString( mempchFolder );
return returnValue;
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsAppInstalled", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FBIsAppInstalled( IntPtr self, AppId appID );
- private FBIsAppInstalled _BIsAppInstalled;
+ private static extern bool _BIsAppInstalled( IntPtr self, AppId appID );
#endregion
internal bool BIsAppInstalled( AppId appID )
@@ -331,31 +255,19 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- #if PLATFORM_WIN
- private delegate void FGetAppOwner( IntPtr self, ref SteamId retVal );
- #else
- private delegate SteamId FGetAppOwner( IntPtr self );
- #endif
- private FGetAppOwner _GetAppOwner;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetAppOwner", CallingConvention = Platform.CC)]
+ private static extern SteamId _GetAppOwner( IntPtr self );
#endregion
internal SteamId GetAppOwner()
{
- #if PLATFORM_WIN
- var retVal = default( SteamId );
- _GetAppOwner( Self, ref retVal );
- return retVal;
- #else
var returnValue = _GetAppOwner( Self );
return returnValue;
- #endif
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate Utf8StringPointer FGetLaunchQueryParam( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey );
- private FGetLaunchQueryParam _GetLaunchQueryParam;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetLaunchQueryParam", CallingConvention = Platform.CC)]
+ private static extern Utf8StringPointer _GetLaunchQueryParam( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey );
#endregion
internal string GetLaunchQueryParam( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey )
@@ -365,10 +277,9 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetDlcDownloadProgress", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FGetDlcDownloadProgress( IntPtr self, AppId nAppID, ref ulong punBytesDownloaded, ref ulong punBytesTotal );
- private FGetDlcDownloadProgress _GetDlcDownloadProgress;
+ private static extern bool _GetDlcDownloadProgress( IntPtr self, AppId nAppID, ref ulong punBytesDownloaded, ref ulong punBytesTotal );
#endregion
internal bool GetDlcDownloadProgress( AppId nAppID, ref ulong punBytesDownloaded, ref ulong punBytesTotal )
@@ -378,9 +289,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate int FGetAppBuildId( IntPtr self );
- private FGetAppBuildId _GetAppBuildId;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetAppBuildId", CallingConvention = Platform.CC)]
+ private static extern int _GetAppBuildId( IntPtr self );
#endregion
internal int GetAppBuildId()
@@ -390,9 +300,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FRequestAllProofOfPurchaseKeys( IntPtr self );
- private FRequestAllProofOfPurchaseKeys _RequestAllProofOfPurchaseKeys;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_RequestAllProofOfPurchaseKeys", CallingConvention = Platform.CC)]
+ private static extern void _RequestAllProofOfPurchaseKeys( IntPtr self );
#endregion
internal void RequestAllProofOfPurchaseKeys()
@@ -401,36 +310,33 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate SteamAPICall_t FGetFileDetails( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszFileName );
- private FGetFileDetails _GetFileDetails;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetFileDetails", CallingConvention = Platform.CC)]
+ private static extern SteamAPICall_t _GetFileDetails( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszFileName );
#endregion
- internal async Task GetFileDetails( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszFileName )
+ internal CallResult GetFileDetails( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszFileName )
{
var returnValue = _GetFileDetails( Self, pszFileName );
- return await FileDetailsResult_t.GetResultAsync( returnValue );
+ return new CallResult( returnValue, IsServer );
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate int FGetLaunchCommandLine( IntPtr self, IntPtr pszCommandLine, int cubCommandLine );
- private FGetLaunchCommandLine _GetLaunchCommandLine;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetLaunchCommandLine", CallingConvention = Platform.CC)]
+ private static extern int _GetLaunchCommandLine( IntPtr self, IntPtr pszCommandLine, int cubCommandLine );
#endregion
internal int GetLaunchCommandLine( out string pszCommandLine )
{
- IntPtr mempszCommandLine = Helpers.TakeMemory();
+ using var mempszCommandLine = Helpers.TakeMemory();
var returnValue = _GetLaunchCommandLine( Self, mempszCommandLine, (1024 * 32) );
pszCommandLine = Helpers.MemoryToString( mempszCommandLine );
return returnValue;
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsSubscribedFromFamilySharing", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FBIsSubscribedFromFamilySharing( IntPtr self );
- private FBIsSubscribedFromFamilySharing _BIsSubscribedFromFamilySharing;
+ private static extern bool _BIsSubscribedFromFamilySharing( IntPtr self );
#endregion
internal bool BIsSubscribedFromFamilySharing()
@@ -439,5 +345,29 @@ namespace Steamworks
return returnValue;
}
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsTimedTrial", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _BIsTimedTrial( IntPtr self, ref uint punSecondsAllowed, ref uint punSecondsPlayed );
+
+ #endregion
+ internal bool BIsTimedTrial( ref uint punSecondsAllowed, ref uint punSecondsPlayed )
+ {
+ var returnValue = _BIsTimedTrial( Self, ref punSecondsAllowed, ref punSecondsPlayed );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_SetDlcContext", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _SetDlcContext( IntPtr self, AppId nAppID );
+
+ #endregion
+ internal bool SetDlcContext( AppId nAppID )
+ {
+ var returnValue = _SetDlcContext( Self, nAppID );
+ return returnValue;
+ }
+
}
}
diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamClient.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamClient.cs
new file mode 100644
index 0000000..418f5da
--- /dev/null
+++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamClient.cs
@@ -0,0 +1,414 @@
+using System;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Threading.Tasks;
+using Steamworks.Data;
+
+
+namespace Steamworks
+{
+ internal unsafe class ISteamClient : SteamInterface
+ {
+
+ internal ISteamClient( bool IsGameServer )
+ {
+ SetupInterface( IsGameServer );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_CreateSteamPipe", CallingConvention = Platform.CC)]
+ private static extern HSteamPipe _CreateSteamPipe( IntPtr self );
+
+ #endregion
+ internal HSteamPipe CreateSteamPipe()
+ {
+ var returnValue = _CreateSteamPipe( Self );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_BReleaseSteamPipe", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _BReleaseSteamPipe( IntPtr self, HSteamPipe hSteamPipe );
+
+ #endregion
+ internal bool BReleaseSteamPipe( HSteamPipe hSteamPipe )
+ {
+ var returnValue = _BReleaseSteamPipe( Self, hSteamPipe );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_ConnectToGlobalUser", CallingConvention = Platform.CC)]
+ private static extern HSteamUser _ConnectToGlobalUser( IntPtr self, HSteamPipe hSteamPipe );
+
+ #endregion
+ internal HSteamUser ConnectToGlobalUser( HSteamPipe hSteamPipe )
+ {
+ var returnValue = _ConnectToGlobalUser( Self, hSteamPipe );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_CreateLocalUser", CallingConvention = Platform.CC)]
+ private static extern HSteamUser _CreateLocalUser( IntPtr self, ref HSteamPipe phSteamPipe, AccountType eAccountType );
+
+ #endregion
+ internal HSteamUser CreateLocalUser( ref HSteamPipe phSteamPipe, AccountType eAccountType )
+ {
+ var returnValue = _CreateLocalUser( Self, ref phSteamPipe, eAccountType );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_ReleaseUser", CallingConvention = Platform.CC)]
+ private static extern void _ReleaseUser( IntPtr self, HSteamPipe hSteamPipe, HSteamUser hUser );
+
+ #endregion
+ internal void ReleaseUser( HSteamPipe hSteamPipe, HSteamUser hUser )
+ {
+ _ReleaseUser( Self, hSteamPipe, hUser );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamUser", CallingConvention = Platform.CC)]
+ private static extern IntPtr _GetISteamUser( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
+
+ #endregion
+ internal IntPtr GetISteamUser( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
+ {
+ var returnValue = _GetISteamUser( Self, hSteamUser, hSteamPipe, pchVersion );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamGameServer", CallingConvention = Platform.CC)]
+ private static extern IntPtr _GetISteamGameServer( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
+
+ #endregion
+ internal IntPtr GetISteamGameServer( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
+ {
+ var returnValue = _GetISteamGameServer( Self, hSteamUser, hSteamPipe, pchVersion );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_SetLocalIPBinding", CallingConvention = Platform.CC)]
+ private static extern void _SetLocalIPBinding( IntPtr self, ref SteamIPAddress unIP, ushort usPort );
+
+ #endregion
+ internal void SetLocalIPBinding( ref SteamIPAddress unIP, ushort usPort )
+ {
+ _SetLocalIPBinding( Self, ref unIP, usPort );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamFriends", CallingConvention = Platform.CC)]
+ private static extern IntPtr _GetISteamFriends( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
+
+ #endregion
+ internal IntPtr GetISteamFriends( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
+ {
+ var returnValue = _GetISteamFriends( Self, hSteamUser, hSteamPipe, pchVersion );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamUtils", CallingConvention = Platform.CC)]
+ private static extern IntPtr _GetISteamUtils( IntPtr self, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
+
+ #endregion
+ internal IntPtr GetISteamUtils( HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
+ {
+ var returnValue = _GetISteamUtils( Self, hSteamPipe, pchVersion );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamMatchmaking", CallingConvention = Platform.CC)]
+ private static extern IntPtr _GetISteamMatchmaking( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
+
+ #endregion
+ internal IntPtr GetISteamMatchmaking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
+ {
+ var returnValue = _GetISteamMatchmaking( Self, hSteamUser, hSteamPipe, pchVersion );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamMatchmakingServers", CallingConvention = Platform.CC)]
+ private static extern IntPtr _GetISteamMatchmakingServers( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
+
+ #endregion
+ internal IntPtr GetISteamMatchmakingServers( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
+ {
+ var returnValue = _GetISteamMatchmakingServers( Self, hSteamUser, hSteamPipe, pchVersion );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamGenericInterface", CallingConvention = Platform.CC)]
+ private static extern IntPtr _GetISteamGenericInterface( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
+
+ #endregion
+ internal IntPtr GetISteamGenericInterface( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
+ {
+ var returnValue = _GetISteamGenericInterface( Self, hSteamUser, hSteamPipe, pchVersion );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamUserStats", CallingConvention = Platform.CC)]
+ private static extern IntPtr _GetISteamUserStats( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
+
+ #endregion
+ internal IntPtr GetISteamUserStats( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
+ {
+ var returnValue = _GetISteamUserStats( Self, hSteamUser, hSteamPipe, pchVersion );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamGameServerStats", CallingConvention = Platform.CC)]
+ private static extern IntPtr _GetISteamGameServerStats( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
+
+ #endregion
+ internal IntPtr GetISteamGameServerStats( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
+ {
+ var returnValue = _GetISteamGameServerStats( Self, hSteamuser, hSteamPipe, pchVersion );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamApps", CallingConvention = Platform.CC)]
+ private static extern IntPtr _GetISteamApps( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
+
+ #endregion
+ internal IntPtr GetISteamApps( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
+ {
+ var returnValue = _GetISteamApps( Self, hSteamUser, hSteamPipe, pchVersion );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamNetworking", CallingConvention = Platform.CC)]
+ private static extern IntPtr _GetISteamNetworking( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
+
+ #endregion
+ internal IntPtr GetISteamNetworking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
+ {
+ var returnValue = _GetISteamNetworking( Self, hSteamUser, hSteamPipe, pchVersion );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamRemoteStorage", CallingConvention = Platform.CC)]
+ private static extern IntPtr _GetISteamRemoteStorage( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
+
+ #endregion
+ internal IntPtr GetISteamRemoteStorage( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
+ {
+ var returnValue = _GetISteamRemoteStorage( Self, hSteamuser, hSteamPipe, pchVersion );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamScreenshots", CallingConvention = Platform.CC)]
+ private static extern IntPtr _GetISteamScreenshots( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
+
+ #endregion
+ internal IntPtr GetISteamScreenshots( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
+ {
+ var returnValue = _GetISteamScreenshots( Self, hSteamuser, hSteamPipe, pchVersion );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamGameSearch", CallingConvention = Platform.CC)]
+ private static extern IntPtr _GetISteamGameSearch( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
+
+ #endregion
+ internal IntPtr GetISteamGameSearch( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
+ {
+ var returnValue = _GetISteamGameSearch( Self, hSteamuser, hSteamPipe, pchVersion );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetIPCCallCount", CallingConvention = Platform.CC)]
+ private static extern uint _GetIPCCallCount( IntPtr self );
+
+ #endregion
+ internal uint GetIPCCallCount()
+ {
+ var returnValue = _GetIPCCallCount( Self );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_SetWarningMessageHook", CallingConvention = Platform.CC)]
+ private static extern void _SetWarningMessageHook( IntPtr self, IntPtr pFunction );
+
+ #endregion
+ internal void SetWarningMessageHook( IntPtr pFunction )
+ {
+ _SetWarningMessageHook( Self, pFunction );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_BShutdownIfAllPipesClosed", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _BShutdownIfAllPipesClosed( IntPtr self );
+
+ #endregion
+ internal bool BShutdownIfAllPipesClosed()
+ {
+ var returnValue = _BShutdownIfAllPipesClosed( Self );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamHTTP", CallingConvention = Platform.CC)]
+ private static extern IntPtr _GetISteamHTTP( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
+
+ #endregion
+ internal IntPtr GetISteamHTTP( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
+ {
+ var returnValue = _GetISteamHTTP( Self, hSteamuser, hSteamPipe, pchVersion );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamController", CallingConvention = Platform.CC)]
+ private static extern IntPtr _GetISteamController( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
+
+ #endregion
+ internal IntPtr GetISteamController( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
+ {
+ var returnValue = _GetISteamController( Self, hSteamUser, hSteamPipe, pchVersion );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamUGC", CallingConvention = Platform.CC)]
+ private static extern IntPtr _GetISteamUGC( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
+
+ #endregion
+ internal IntPtr GetISteamUGC( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
+ {
+ var returnValue = _GetISteamUGC( Self, hSteamUser, hSteamPipe, pchVersion );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamAppList", CallingConvention = Platform.CC)]
+ private static extern IntPtr _GetISteamAppList( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
+
+ #endregion
+ internal IntPtr GetISteamAppList( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
+ {
+ var returnValue = _GetISteamAppList( Self, hSteamUser, hSteamPipe, pchVersion );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamMusic", CallingConvention = Platform.CC)]
+ private static extern IntPtr _GetISteamMusic( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
+
+ #endregion
+ internal IntPtr GetISteamMusic( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
+ {
+ var returnValue = _GetISteamMusic( Self, hSteamuser, hSteamPipe, pchVersion );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamMusicRemote", CallingConvention = Platform.CC)]
+ private static extern IntPtr _GetISteamMusicRemote( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
+
+ #endregion
+ internal IntPtr GetISteamMusicRemote( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
+ {
+ var returnValue = _GetISteamMusicRemote( Self, hSteamuser, hSteamPipe, pchVersion );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamHTMLSurface", CallingConvention = Platform.CC)]
+ private static extern IntPtr _GetISteamHTMLSurface( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
+
+ #endregion
+ internal IntPtr GetISteamHTMLSurface( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
+ {
+ var returnValue = _GetISteamHTMLSurface( Self, hSteamuser, hSteamPipe, pchVersion );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamInventory", CallingConvention = Platform.CC)]
+ private static extern IntPtr _GetISteamInventory( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
+
+ #endregion
+ internal IntPtr GetISteamInventory( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
+ {
+ var returnValue = _GetISteamInventory( Self, hSteamuser, hSteamPipe, pchVersion );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamVideo", CallingConvention = Platform.CC)]
+ private static extern IntPtr _GetISteamVideo( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
+
+ #endregion
+ internal IntPtr GetISteamVideo( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
+ {
+ var returnValue = _GetISteamVideo( Self, hSteamuser, hSteamPipe, pchVersion );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamParentalSettings", CallingConvention = Platform.CC)]
+ private static extern IntPtr _GetISteamParentalSettings( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
+
+ #endregion
+ internal IntPtr GetISteamParentalSettings( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
+ {
+ var returnValue = _GetISteamParentalSettings( Self, hSteamuser, hSteamPipe, pchVersion );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamInput", CallingConvention = Platform.CC)]
+ private static extern IntPtr _GetISteamInput( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
+
+ #endregion
+ internal IntPtr GetISteamInput( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
+ {
+ var returnValue = _GetISteamInput( Self, hSteamUser, hSteamPipe, pchVersion );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamParties", CallingConvention = Platform.CC)]
+ private static extern IntPtr _GetISteamParties( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
+
+ #endregion
+ internal IntPtr GetISteamParties( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
+ {
+ var returnValue = _GetISteamParties( Self, hSteamUser, hSteamPipe, pchVersion );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamRemotePlay", CallingConvention = Platform.CC)]
+ private static extern IntPtr _GetISteamRemotePlay( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
+
+ #endregion
+ internal IntPtr GetISteamRemotePlay( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
+ {
+ var returnValue = _GetISteamRemotePlay( Self, hSteamUser, hSteamPipe, pchVersion );
+ return returnValue;
+ }
+
+ }
+}
diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamController.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamController.cs
new file mode 100644
index 0000000..d93dccf
--- /dev/null
+++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamController.cs
@@ -0,0 +1,392 @@
+using System;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Threading.Tasks;
+using Steamworks.Data;
+
+
+namespace Steamworks
+{
+ internal unsafe class ISteamController : SteamInterface
+ {
+
+ internal ISteamController( bool IsGameServer )
+ {
+ SetupInterface( IsGameServer );
+ }
+
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamController_v008", CallingConvention = Platform.CC)]
+ internal static extern IntPtr SteamAPI_SteamController_v008();
+ public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamController_v008();
+
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_Init", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _Init( IntPtr self );
+
+ #endregion
+ internal bool Init()
+ {
+ var returnValue = _Init( Self );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_Shutdown", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _Shutdown( IntPtr self );
+
+ #endregion
+ internal bool Shutdown()
+ {
+ var returnValue = _Shutdown( Self );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_RunFrame", CallingConvention = Platform.CC)]
+ private static extern void _RunFrame( IntPtr self );
+
+ #endregion
+ internal void RunFrame()
+ {
+ _RunFrame( Self );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetConnectedControllers", CallingConvention = Platform.CC)]
+ private static extern int _GetConnectedControllers( IntPtr self, [In,Out] ControllerHandle_t[] handlesOut );
+
+ #endregion
+ internal int GetConnectedControllers( [In,Out] ControllerHandle_t[] handlesOut )
+ {
+ var returnValue = _GetConnectedControllers( Self, handlesOut );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetActionSetHandle", CallingConvention = Platform.CC)]
+ private static extern ControllerActionSetHandle_t _GetActionSetHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionSetName );
+
+ #endregion
+ internal ControllerActionSetHandle_t GetActionSetHandle( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionSetName )
+ {
+ var returnValue = _GetActionSetHandle( Self, pszActionSetName );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_ActivateActionSet", CallingConvention = Platform.CC)]
+ private static extern void _ActivateActionSet( IntPtr self, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle );
+
+ #endregion
+ internal void ActivateActionSet( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle )
+ {
+ _ActivateActionSet( Self, controllerHandle, actionSetHandle );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetCurrentActionSet", CallingConvention = Platform.CC)]
+ private static extern ControllerActionSetHandle_t _GetCurrentActionSet( IntPtr self, ControllerHandle_t controllerHandle );
+
+ #endregion
+ internal ControllerActionSetHandle_t GetCurrentActionSet( ControllerHandle_t controllerHandle )
+ {
+ var returnValue = _GetCurrentActionSet( Self, controllerHandle );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_ActivateActionSetLayer", CallingConvention = Platform.CC)]
+ private static extern void _ActivateActionSetLayer( IntPtr self, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle );
+
+ #endregion
+ internal void ActivateActionSetLayer( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle )
+ {
+ _ActivateActionSetLayer( Self, controllerHandle, actionSetLayerHandle );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_DeactivateActionSetLayer", CallingConvention = Platform.CC)]
+ private static extern void _DeactivateActionSetLayer( IntPtr self, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle );
+
+ #endregion
+ internal void DeactivateActionSetLayer( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle )
+ {
+ _DeactivateActionSetLayer( Self, controllerHandle, actionSetLayerHandle );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_DeactivateAllActionSetLayers", CallingConvention = Platform.CC)]
+ private static extern void _DeactivateAllActionSetLayers( IntPtr self, ControllerHandle_t controllerHandle );
+
+ #endregion
+ internal void DeactivateAllActionSetLayers( ControllerHandle_t controllerHandle )
+ {
+ _DeactivateAllActionSetLayers( Self, controllerHandle );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetActiveActionSetLayers", CallingConvention = Platform.CC)]
+ private static extern int _GetActiveActionSetLayers( IntPtr self, ControllerHandle_t controllerHandle, [In,Out] ControllerActionSetHandle_t[] handlesOut );
+
+ #endregion
+ internal int GetActiveActionSetLayers( ControllerHandle_t controllerHandle, [In,Out] ControllerActionSetHandle_t[] handlesOut )
+ {
+ var returnValue = _GetActiveActionSetLayers( Self, controllerHandle, handlesOut );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetDigitalActionHandle", CallingConvention = Platform.CC)]
+ private static extern ControllerDigitalActionHandle_t _GetDigitalActionHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName );
+
+ #endregion
+ internal ControllerDigitalActionHandle_t GetDigitalActionHandle( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName )
+ {
+ var returnValue = _GetDigitalActionHandle( Self, pszActionName );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetDigitalActionData", CallingConvention = Platform.CC)]
+ private static extern DigitalState _GetDigitalActionData( IntPtr self, ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle );
+
+ #endregion
+ internal DigitalState GetDigitalActionData( ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle )
+ {
+ var returnValue = _GetDigitalActionData( Self, controllerHandle, digitalActionHandle );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetDigitalActionOrigins", CallingConvention = Platform.CC)]
+ private static extern int _GetDigitalActionOrigins( IntPtr self, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerDigitalActionHandle_t digitalActionHandle, ref ControllerActionOrigin originsOut );
+
+ #endregion
+ internal int GetDigitalActionOrigins( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerDigitalActionHandle_t digitalActionHandle, ref ControllerActionOrigin originsOut )
+ {
+ var returnValue = _GetDigitalActionOrigins( Self, controllerHandle, actionSetHandle, digitalActionHandle, ref originsOut );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetAnalogActionHandle", CallingConvention = Platform.CC)]
+ private static extern ControllerAnalogActionHandle_t _GetAnalogActionHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName );
+
+ #endregion
+ internal ControllerAnalogActionHandle_t GetAnalogActionHandle( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName )
+ {
+ var returnValue = _GetAnalogActionHandle( Self, pszActionName );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetAnalogActionData", CallingConvention = Platform.CC)]
+ private static extern AnalogState _GetAnalogActionData( IntPtr self, ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle );
+
+ #endregion
+ internal AnalogState GetAnalogActionData( ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle )
+ {
+ var returnValue = _GetAnalogActionData( Self, controllerHandle, analogActionHandle );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetAnalogActionOrigins", CallingConvention = Platform.CC)]
+ private static extern int _GetAnalogActionOrigins( IntPtr self, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerAnalogActionHandle_t analogActionHandle, ref ControllerActionOrigin originsOut );
+
+ #endregion
+ internal int GetAnalogActionOrigins( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerAnalogActionHandle_t analogActionHandle, ref ControllerActionOrigin originsOut )
+ {
+ var returnValue = _GetAnalogActionOrigins( Self, controllerHandle, actionSetHandle, analogActionHandle, ref originsOut );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetGlyphForActionOrigin", CallingConvention = Platform.CC)]
+ private static extern Utf8StringPointer _GetGlyphForActionOrigin( IntPtr self, ControllerActionOrigin eOrigin );
+
+ #endregion
+ internal string GetGlyphForActionOrigin( ControllerActionOrigin eOrigin )
+ {
+ var returnValue = _GetGlyphForActionOrigin( Self, eOrigin );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetStringForActionOrigin", CallingConvention = Platform.CC)]
+ private static extern Utf8StringPointer _GetStringForActionOrigin( IntPtr self, ControllerActionOrigin eOrigin );
+
+ #endregion
+ internal string GetStringForActionOrigin( ControllerActionOrigin eOrigin )
+ {
+ var returnValue = _GetStringForActionOrigin( Self, eOrigin );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_StopAnalogActionMomentum", CallingConvention = Platform.CC)]
+ private static extern void _StopAnalogActionMomentum( IntPtr self, ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t eAction );
+
+ #endregion
+ internal void StopAnalogActionMomentum( ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t eAction )
+ {
+ _StopAnalogActionMomentum( Self, controllerHandle, eAction );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetMotionData", CallingConvention = Platform.CC)]
+ private static extern MotionState _GetMotionData( IntPtr self, ControllerHandle_t controllerHandle );
+
+ #endregion
+ internal MotionState GetMotionData( ControllerHandle_t controllerHandle )
+ {
+ var returnValue = _GetMotionData( Self, controllerHandle );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_TriggerHapticPulse", CallingConvention = Platform.CC)]
+ private static extern void _TriggerHapticPulse( IntPtr self, ControllerHandle_t controllerHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec );
+
+ #endregion
+ internal void TriggerHapticPulse( ControllerHandle_t controllerHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec )
+ {
+ _TriggerHapticPulse( Self, controllerHandle, eTargetPad, usDurationMicroSec );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_TriggerRepeatedHapticPulse", CallingConvention = Platform.CC)]
+ private static extern void _TriggerRepeatedHapticPulse( IntPtr self, ControllerHandle_t controllerHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec, ushort usOffMicroSec, ushort unRepeat, uint nFlags );
+
+ #endregion
+ internal void TriggerRepeatedHapticPulse( ControllerHandle_t controllerHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec, ushort usOffMicroSec, ushort unRepeat, uint nFlags )
+ {
+ _TriggerRepeatedHapticPulse( Self, controllerHandle, eTargetPad, usDurationMicroSec, usOffMicroSec, unRepeat, nFlags );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_TriggerVibration", CallingConvention = Platform.CC)]
+ private static extern void _TriggerVibration( IntPtr self, ControllerHandle_t controllerHandle, ushort usLeftSpeed, ushort usRightSpeed );
+
+ #endregion
+ internal void TriggerVibration( ControllerHandle_t controllerHandle, ushort usLeftSpeed, ushort usRightSpeed )
+ {
+ _TriggerVibration( Self, controllerHandle, usLeftSpeed, usRightSpeed );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_SetLEDColor", CallingConvention = Platform.CC)]
+ private static extern void _SetLEDColor( IntPtr self, ControllerHandle_t controllerHandle, byte nColorR, byte nColorG, byte nColorB, uint nFlags );
+
+ #endregion
+ internal void SetLEDColor( ControllerHandle_t controllerHandle, byte nColorR, byte nColorG, byte nColorB, uint nFlags )
+ {
+ _SetLEDColor( Self, controllerHandle, nColorR, nColorG, nColorB, nFlags );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_ShowBindingPanel", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _ShowBindingPanel( IntPtr self, ControllerHandle_t controllerHandle );
+
+ #endregion
+ internal bool ShowBindingPanel( ControllerHandle_t controllerHandle )
+ {
+ var returnValue = _ShowBindingPanel( Self, controllerHandle );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetInputTypeForHandle", CallingConvention = Platform.CC)]
+ private static extern InputType _GetInputTypeForHandle( IntPtr self, ControllerHandle_t controllerHandle );
+
+ #endregion
+ internal InputType GetInputTypeForHandle( ControllerHandle_t controllerHandle )
+ {
+ var returnValue = _GetInputTypeForHandle( Self, controllerHandle );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetControllerForGamepadIndex", CallingConvention = Platform.CC)]
+ private static extern ControllerHandle_t _GetControllerForGamepadIndex( IntPtr self, int nIndex );
+
+ #endregion
+ internal ControllerHandle_t GetControllerForGamepadIndex( int nIndex )
+ {
+ var returnValue = _GetControllerForGamepadIndex( Self, nIndex );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetGamepadIndexForController", CallingConvention = Platform.CC)]
+ private static extern int _GetGamepadIndexForController( IntPtr self, ControllerHandle_t ulControllerHandle );
+
+ #endregion
+ internal int GetGamepadIndexForController( ControllerHandle_t ulControllerHandle )
+ {
+ var returnValue = _GetGamepadIndexForController( Self, ulControllerHandle );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetStringForXboxOrigin", CallingConvention = Platform.CC)]
+ private static extern Utf8StringPointer _GetStringForXboxOrigin( IntPtr self, XboxOrigin eOrigin );
+
+ #endregion
+ internal string GetStringForXboxOrigin( XboxOrigin eOrigin )
+ {
+ var returnValue = _GetStringForXboxOrigin( Self, eOrigin );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetGlyphForXboxOrigin", CallingConvention = Platform.CC)]
+ private static extern Utf8StringPointer _GetGlyphForXboxOrigin( IntPtr self, XboxOrigin eOrigin );
+
+ #endregion
+ internal string GetGlyphForXboxOrigin( XboxOrigin eOrigin )
+ {
+ var returnValue = _GetGlyphForXboxOrigin( Self, eOrigin );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetActionOriginFromXboxOrigin", CallingConvention = Platform.CC)]
+ private static extern ControllerActionOrigin _GetActionOriginFromXboxOrigin( IntPtr self, ControllerHandle_t controllerHandle, XboxOrigin eOrigin );
+
+ #endregion
+ internal ControllerActionOrigin GetActionOriginFromXboxOrigin( ControllerHandle_t controllerHandle, XboxOrigin eOrigin )
+ {
+ var returnValue = _GetActionOriginFromXboxOrigin( Self, controllerHandle, eOrigin );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_TranslateActionOrigin", CallingConvention = Platform.CC)]
+ private static extern ControllerActionOrigin _TranslateActionOrigin( IntPtr self, InputType eDestinationInputType, ControllerActionOrigin eSourceOrigin );
+
+ #endregion
+ internal ControllerActionOrigin TranslateActionOrigin( InputType eDestinationInputType, ControllerActionOrigin eSourceOrigin )
+ {
+ var returnValue = _TranslateActionOrigin( Self, eDestinationInputType, eSourceOrigin );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetControllerBindingRevision", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _GetControllerBindingRevision( IntPtr self, ControllerHandle_t controllerHandle, ref int pMajor, ref int pMinor );
+
+ #endregion
+ internal bool GetControllerBindingRevision( ControllerHandle_t controllerHandle, ref int pMajor, ref int pMinor )
+ {
+ var returnValue = _GetControllerBindingRevision( Self, controllerHandle, ref pMajor, ref pMinor );
+ return returnValue;
+ }
+
+ }
+}
diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamFriends.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamFriends.cs
index d0cf691..b8e5cd4 100644
--- a/Facepunch.Steamworks/Generated/Interfaces/ISteamFriends.cs
+++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamFriends.cs
@@ -7,169 +7,22 @@ using Steamworks.Data;
namespace Steamworks
{
- internal class ISteamFriends : SteamInterface
+ internal unsafe class ISteamFriends : SteamInterface
{
- public override string InterfaceName => "SteamFriends017";
- public override void InitInternals()
+ internal ISteamFriends( bool IsGameServer )
{
- _GetPersonaName = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
- _SetPersonaName = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
- _GetPersonaState = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
- _GetFriendCount = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
- _GetFriendByIndex = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
- _GetFriendRelationship = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
- _GetFriendPersonaState = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
- _GetFriendPersonaName = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
- _GetFriendGamePlayed = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) );
- _GetFriendPersonaNameHistory = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) );
- _GetFriendSteamLevel = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) );
- _GetPlayerNickname = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) );
- _GetFriendsGroupCount = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) );
- _GetFriendsGroupIDByIndex = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) );
- _GetFriendsGroupName = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) );
- _GetFriendsGroupMembersCount = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) );
- _GetFriendsGroupMembersList = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) );
- _HasFriend = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) );
- _GetClanCount = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) );
- _GetClanByIndex = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) );
- _GetClanName = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) );
- _GetClanTag = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 168 ) ) );
- _GetClanActivityCounts = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 176 ) ) );
- _DownloadClanActivityCounts = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 184 ) ) );
- _GetFriendCountFromSource = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 192 ) ) );
- _GetFriendFromSourceByIndex = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 200 ) ) );
- _IsUserInSource = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 208 ) ) );
- _SetInGameVoiceSpeaking = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 216 ) ) );
- _ActivateGameOverlay = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 224 ) ) );
- _ActivateGameOverlayToUser = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 232 ) ) );
- _ActivateGameOverlayToWebPage = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 240 ) ) );
- _ActivateGameOverlayToStore = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 248 ) ) );
- _SetPlayedWith = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 256 ) ) );
- _ActivateGameOverlayInviteDialog = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 264 ) ) );
- _GetSmallFriendAvatar = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 272 ) ) );
- _GetMediumFriendAvatar = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 280 ) ) );
- _GetLargeFriendAvatar = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 288 ) ) );
- _RequestUserInformation = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 296 ) ) );
- _RequestClanOfficerList = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 304 ) ) );
- _GetClanOwner = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 312 ) ) );
- _GetClanOfficerCount = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 320 ) ) );
- _GetClanOfficerByIndex = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 328 ) ) );
- _GetUserRestrictions = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 336 ) ) );
- _SetRichPresence = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 344 ) ) );
- _ClearRichPresence = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 352 ) ) );
- _GetFriendRichPresence = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 360 ) ) );
- _GetFriendRichPresenceKeyCount = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 368 ) ) );
- _GetFriendRichPresenceKeyByIndex = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 376 ) ) );
- _RequestFriendRichPresence = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 384 ) ) );
- _InviteUserToGame = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 392 ) ) );
- _GetCoplayFriendCount = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 400 ) ) );
- _GetCoplayFriend = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 408 ) ) );
- _GetFriendCoplayTime = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 416 ) ) );
- _GetFriendCoplayGame = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 424 ) ) );
- _JoinClanChatRoom = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 432 ) ) );
- _LeaveClanChatRoom = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 440 ) ) );
- _GetClanChatMemberCount = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 448 ) ) );
- _GetChatMemberByIndex = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 456 ) ) );
- _SendClanChatMessage = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 464 ) ) );
- _GetClanChatMessage = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 472 ) ) );
- _IsClanChatAdmin = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 480 ) ) );
- _IsClanChatWindowOpenInSteam = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 488 ) ) );
- _OpenClanChatWindowInSteam = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 496 ) ) );
- _CloseClanChatWindowInSteam = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 504 ) ) );
- _SetListenForFriendsMessages = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 512 ) ) );
- _ReplyToFriendMessage = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 520 ) ) );
- _GetFriendMessage = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 528 ) ) );
- _GetFollowerCount = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 536 ) ) );
- _IsFollowing = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 544 ) ) );
- _EnumerateFollowingList = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 552 ) ) );
- _IsClanPublic = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 560 ) ) );
- _IsClanOfficialGameGroup = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 568 ) ) );
- _GetNumChatsWithUnreadPriorityMessages = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 576 ) ) );
- }
- internal override void Shutdown()
- {
- base.Shutdown();
-
- _GetPersonaName = null;
- _SetPersonaName = null;
- _GetPersonaState = null;
- _GetFriendCount = null;
- _GetFriendByIndex = null;
- _GetFriendRelationship = null;
- _GetFriendPersonaState = null;
- _GetFriendPersonaName = null;
- _GetFriendGamePlayed = null;
- _GetFriendPersonaNameHistory = null;
- _GetFriendSteamLevel = null;
- _GetPlayerNickname = null;
- _GetFriendsGroupCount = null;
- _GetFriendsGroupIDByIndex = null;
- _GetFriendsGroupName = null;
- _GetFriendsGroupMembersCount = null;
- _GetFriendsGroupMembersList = null;
- _HasFriend = null;
- _GetClanCount = null;
- _GetClanByIndex = null;
- _GetClanName = null;
- _GetClanTag = null;
- _GetClanActivityCounts = null;
- _DownloadClanActivityCounts = null;
- _GetFriendCountFromSource = null;
- _GetFriendFromSourceByIndex = null;
- _IsUserInSource = null;
- _SetInGameVoiceSpeaking = null;
- _ActivateGameOverlay = null;
- _ActivateGameOverlayToUser = null;
- _ActivateGameOverlayToWebPage = null;
- _ActivateGameOverlayToStore = null;
- _SetPlayedWith = null;
- _ActivateGameOverlayInviteDialog = null;
- _GetSmallFriendAvatar = null;
- _GetMediumFriendAvatar = null;
- _GetLargeFriendAvatar = null;
- _RequestUserInformation = null;
- _RequestClanOfficerList = null;
- _GetClanOwner = null;
- _GetClanOfficerCount = null;
- _GetClanOfficerByIndex = null;
- _GetUserRestrictions = null;
- _SetRichPresence = null;
- _ClearRichPresence = null;
- _GetFriendRichPresence = null;
- _GetFriendRichPresenceKeyCount = null;
- _GetFriendRichPresenceKeyByIndex = null;
- _RequestFriendRichPresence = null;
- _InviteUserToGame = null;
- _GetCoplayFriendCount = null;
- _GetCoplayFriend = null;
- _GetFriendCoplayTime = null;
- _GetFriendCoplayGame = null;
- _JoinClanChatRoom = null;
- _LeaveClanChatRoom = null;
- _GetClanChatMemberCount = null;
- _GetChatMemberByIndex = null;
- _SendClanChatMessage = null;
- _GetClanChatMessage = null;
- _IsClanChatAdmin = null;
- _IsClanChatWindowOpenInSteam = null;
- _OpenClanChatWindowInSteam = null;
- _CloseClanChatWindowInSteam = null;
- _SetListenForFriendsMessages = null;
- _ReplyToFriendMessage = null;
- _GetFriendMessage = null;
- _GetFollowerCount = null;
- _IsFollowing = null;
- _EnumerateFollowingList = null;
- _IsClanPublic = null;
- _IsClanOfficialGameGroup = null;
- _GetNumChatsWithUnreadPriorityMessages = null;
+ SetupInterface( IsGameServer );
}
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamFriends_v017", CallingConvention = Platform.CC)]
+ internal static extern IntPtr SteamAPI_SteamFriends_v017();
+ public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamFriends_v017();
+
+
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate Utf8StringPointer FGetPersonaName( IntPtr self );
- private FGetPersonaName _GetPersonaName;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetPersonaName", CallingConvention = Platform.CC)]
+ private static extern Utf8StringPointer _GetPersonaName( IntPtr self );
#endregion
internal string GetPersonaName()
@@ -179,21 +32,19 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate SteamAPICall_t FSetPersonaName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPersonaName );
- private FSetPersonaName _SetPersonaName;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_SetPersonaName", CallingConvention = Platform.CC)]
+ private static extern SteamAPICall_t _SetPersonaName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPersonaName );
#endregion
- internal async Task SetPersonaName( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPersonaName )
+ internal CallResult SetPersonaName( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPersonaName )
{
var returnValue = _SetPersonaName( Self, pchPersonaName );
- return await SetPersonaNameResponse_t.GetResultAsync( returnValue );
+ return new CallResult( returnValue, IsServer );
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate FriendState FGetPersonaState( IntPtr self );
- private FGetPersonaState _GetPersonaState;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetPersonaState", CallingConvention = Platform.CC)]
+ private static extern FriendState _GetPersonaState( IntPtr self );
#endregion
internal FriendState GetPersonaState()
@@ -203,9 +54,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate int FGetFriendCount( IntPtr self, int iFriendFlags );
- private FGetFriendCount _GetFriendCount;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendCount", CallingConvention = Platform.CC)]
+ private static extern int _GetFriendCount( IntPtr self, int iFriendFlags );
#endregion
internal int GetFriendCount( int iFriendFlags )
@@ -215,31 +65,19 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- #if PLATFORM_WIN
- private delegate void FGetFriendByIndex( IntPtr self, ref SteamId retVal, int iFriend, int iFriendFlags );
- #else
- private delegate SteamId FGetFriendByIndex( IntPtr self, int iFriend, int iFriendFlags );
- #endif
- private FGetFriendByIndex _GetFriendByIndex;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendByIndex", CallingConvention = Platform.CC)]
+ private static extern SteamId _GetFriendByIndex( IntPtr self, int iFriend, int iFriendFlags );
#endregion
internal SteamId GetFriendByIndex( int iFriend, int iFriendFlags )
{
- #if PLATFORM_WIN
- var retVal = default( SteamId );
- _GetFriendByIndex( Self, ref retVal, iFriend, iFriendFlags );
- return retVal;
- #else
var returnValue = _GetFriendByIndex( Self, iFriend, iFriendFlags );
return returnValue;
- #endif
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate Relationship FGetFriendRelationship( IntPtr self, SteamId steamIDFriend );
- private FGetFriendRelationship _GetFriendRelationship;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendRelationship", CallingConvention = Platform.CC)]
+ private static extern Relationship _GetFriendRelationship( IntPtr self, SteamId steamIDFriend );
#endregion
internal Relationship GetFriendRelationship( SteamId steamIDFriend )
@@ -249,9 +87,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate FriendState FGetFriendPersonaState( IntPtr self, SteamId steamIDFriend );
- private FGetFriendPersonaState _GetFriendPersonaState;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendPersonaState", CallingConvention = Platform.CC)]
+ private static extern FriendState _GetFriendPersonaState( IntPtr self, SteamId steamIDFriend );
#endregion
internal FriendState GetFriendPersonaState( SteamId steamIDFriend )
@@ -261,9 +98,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate Utf8StringPointer FGetFriendPersonaName( IntPtr self, SteamId steamIDFriend );
- private FGetFriendPersonaName _GetFriendPersonaName;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendPersonaName", CallingConvention = Platform.CC)]
+ private static extern Utf8StringPointer _GetFriendPersonaName( IntPtr self, SteamId steamIDFriend );
#endregion
internal string GetFriendPersonaName( SteamId steamIDFriend )
@@ -273,10 +109,9 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendGamePlayed", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FGetFriendGamePlayed( IntPtr self, SteamId steamIDFriend, ref FriendGameInfo_t pFriendGameInfo );
- private FGetFriendGamePlayed _GetFriendGamePlayed;
+ private static extern bool _GetFriendGamePlayed( IntPtr self, SteamId steamIDFriend, ref FriendGameInfo_t pFriendGameInfo );
#endregion
internal bool GetFriendGamePlayed( SteamId steamIDFriend, ref FriendGameInfo_t pFriendGameInfo )
@@ -286,9 +121,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate Utf8StringPointer FGetFriendPersonaNameHistory( IntPtr self, SteamId steamIDFriend, int iPersonaName );
- private FGetFriendPersonaNameHistory _GetFriendPersonaNameHistory;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendPersonaNameHistory", CallingConvention = Platform.CC)]
+ private static extern Utf8StringPointer _GetFriendPersonaNameHistory( IntPtr self, SteamId steamIDFriend, int iPersonaName );
#endregion
internal string GetFriendPersonaNameHistory( SteamId steamIDFriend, int iPersonaName )
@@ -298,9 +132,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate int FGetFriendSteamLevel( IntPtr self, SteamId steamIDFriend );
- private FGetFriendSteamLevel _GetFriendSteamLevel;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendSteamLevel", CallingConvention = Platform.CC)]
+ private static extern int _GetFriendSteamLevel( IntPtr self, SteamId steamIDFriend );
#endregion
internal int GetFriendSteamLevel( SteamId steamIDFriend )
@@ -310,9 +143,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate Utf8StringPointer FGetPlayerNickname( IntPtr self, SteamId steamIDPlayer );
- private FGetPlayerNickname _GetPlayerNickname;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetPlayerNickname", CallingConvention = Platform.CC)]
+ private static extern Utf8StringPointer _GetPlayerNickname( IntPtr self, SteamId steamIDPlayer );
#endregion
internal string GetPlayerNickname( SteamId steamIDPlayer )
@@ -322,9 +154,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate int FGetFriendsGroupCount( IntPtr self );
- private FGetFriendsGroupCount _GetFriendsGroupCount;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendsGroupCount", CallingConvention = Platform.CC)]
+ private static extern int _GetFriendsGroupCount( IntPtr self );
#endregion
internal int GetFriendsGroupCount()
@@ -334,9 +165,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate FriendsGroupID_t FGetFriendsGroupIDByIndex( IntPtr self, int iFG );
- private FGetFriendsGroupIDByIndex _GetFriendsGroupIDByIndex;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendsGroupIDByIndex", CallingConvention = Platform.CC)]
+ private static extern FriendsGroupID_t _GetFriendsGroupIDByIndex( IntPtr self, int iFG );
#endregion
internal FriendsGroupID_t GetFriendsGroupIDByIndex( int iFG )
@@ -346,9 +176,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate Utf8StringPointer FGetFriendsGroupName( IntPtr self, FriendsGroupID_t friendsGroupID );
- private FGetFriendsGroupName _GetFriendsGroupName;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendsGroupName", CallingConvention = Platform.CC)]
+ private static extern Utf8StringPointer _GetFriendsGroupName( IntPtr self, FriendsGroupID_t friendsGroupID );
#endregion
internal string GetFriendsGroupName( FriendsGroupID_t friendsGroupID )
@@ -358,9 +187,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate int FGetFriendsGroupMembersCount( IntPtr self, FriendsGroupID_t friendsGroupID );
- private FGetFriendsGroupMembersCount _GetFriendsGroupMembersCount;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendsGroupMembersCount", CallingConvention = Platform.CC)]
+ private static extern int _GetFriendsGroupMembersCount( IntPtr self, FriendsGroupID_t friendsGroupID );
#endregion
internal int GetFriendsGroupMembersCount( FriendsGroupID_t friendsGroupID )
@@ -370,9 +198,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FGetFriendsGroupMembersList( IntPtr self, FriendsGroupID_t friendsGroupID, [In,Out] SteamId[] pOutSteamIDMembers, int nMembersCount );
- private FGetFriendsGroupMembersList _GetFriendsGroupMembersList;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendsGroupMembersList", CallingConvention = Platform.CC)]
+ private static extern void _GetFriendsGroupMembersList( IntPtr self, FriendsGroupID_t friendsGroupID, [In,Out] SteamId[] pOutSteamIDMembers, int nMembersCount );
#endregion
internal void GetFriendsGroupMembersList( FriendsGroupID_t friendsGroupID, [In,Out] SteamId[] pOutSteamIDMembers, int nMembersCount )
@@ -381,10 +208,9 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_HasFriend", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FHasFriend( IntPtr self, SteamId steamIDFriend, int iFriendFlags );
- private FHasFriend _HasFriend;
+ private static extern bool _HasFriend( IntPtr self, SteamId steamIDFriend, int iFriendFlags );
#endregion
internal bool HasFriend( SteamId steamIDFriend, int iFriendFlags )
@@ -394,9 +220,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate int FGetClanCount( IntPtr self );
- private FGetClanCount _GetClanCount;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanCount", CallingConvention = Platform.CC)]
+ private static extern int _GetClanCount( IntPtr self );
#endregion
internal int GetClanCount()
@@ -406,31 +231,19 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- #if PLATFORM_WIN
- private delegate void FGetClanByIndex( IntPtr self, ref SteamId retVal, int iClan );
- #else
- private delegate SteamId FGetClanByIndex( IntPtr self, int iClan );
- #endif
- private FGetClanByIndex _GetClanByIndex;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanByIndex", CallingConvention = Platform.CC)]
+ private static extern SteamId _GetClanByIndex( IntPtr self, int iClan );
#endregion
internal SteamId GetClanByIndex( int iClan )
{
- #if PLATFORM_WIN
- var retVal = default( SteamId );
- _GetClanByIndex( Self, ref retVal, iClan );
- return retVal;
- #else
var returnValue = _GetClanByIndex( Self, iClan );
return returnValue;
- #endif
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate Utf8StringPointer FGetClanName( IntPtr self, SteamId steamIDClan );
- private FGetClanName _GetClanName;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanName", CallingConvention = Platform.CC)]
+ private static extern Utf8StringPointer _GetClanName( IntPtr self, SteamId steamIDClan );
#endregion
internal string GetClanName( SteamId steamIDClan )
@@ -440,9 +253,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate Utf8StringPointer FGetClanTag( IntPtr self, SteamId steamIDClan );
- private FGetClanTag _GetClanTag;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanTag", CallingConvention = Platform.CC)]
+ private static extern Utf8StringPointer _GetClanTag( IntPtr self, SteamId steamIDClan );
#endregion
internal string GetClanTag( SteamId steamIDClan )
@@ -452,10 +264,9 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanActivityCounts", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FGetClanActivityCounts( IntPtr self, SteamId steamIDClan, ref int pnOnline, ref int pnInGame, ref int pnChatting );
- private FGetClanActivityCounts _GetClanActivityCounts;
+ private static extern bool _GetClanActivityCounts( IntPtr self, SteamId steamIDClan, ref int pnOnline, ref int pnInGame, ref int pnChatting );
#endregion
internal bool GetClanActivityCounts( SteamId steamIDClan, ref int pnOnline, ref int pnInGame, ref int pnChatting )
@@ -465,21 +276,19 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate SteamAPICall_t FDownloadClanActivityCounts( IntPtr self, [In,Out] SteamId[] psteamIDClans, int cClansToRequest );
- private FDownloadClanActivityCounts _DownloadClanActivityCounts;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_DownloadClanActivityCounts", CallingConvention = Platform.CC)]
+ private static extern SteamAPICall_t _DownloadClanActivityCounts( IntPtr self, [In,Out] SteamId[] psteamIDClans, int cClansToRequest );
#endregion
- internal async Task DownloadClanActivityCounts( [In,Out] SteamId[] psteamIDClans, int cClansToRequest )
+ internal CallResult DownloadClanActivityCounts( [In,Out] SteamId[] psteamIDClans, int cClansToRequest )
{
var returnValue = _DownloadClanActivityCounts( Self, psteamIDClans, cClansToRequest );
- return await DownloadClanActivityCountsResult_t.GetResultAsync( returnValue );
+ return new CallResult( returnValue, IsServer );
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate int FGetFriendCountFromSource( IntPtr self, SteamId steamIDSource );
- private FGetFriendCountFromSource _GetFriendCountFromSource;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendCountFromSource", CallingConvention = Platform.CC)]
+ private static extern int _GetFriendCountFromSource( IntPtr self, SteamId steamIDSource );
#endregion
internal int GetFriendCountFromSource( SteamId steamIDSource )
@@ -489,32 +298,20 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- #if PLATFORM_WIN
- private delegate void FGetFriendFromSourceByIndex( IntPtr self, ref SteamId retVal, SteamId steamIDSource, int iFriend );
- #else
- private delegate SteamId FGetFriendFromSourceByIndex( IntPtr self, SteamId steamIDSource, int iFriend );
- #endif
- private FGetFriendFromSourceByIndex _GetFriendFromSourceByIndex;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendFromSourceByIndex", CallingConvention = Platform.CC)]
+ private static extern SteamId _GetFriendFromSourceByIndex( IntPtr self, SteamId steamIDSource, int iFriend );
#endregion
internal SteamId GetFriendFromSourceByIndex( SteamId steamIDSource, int iFriend )
{
- #if PLATFORM_WIN
- var retVal = default( SteamId );
- _GetFriendFromSourceByIndex( Self, ref retVal, steamIDSource, iFriend );
- return retVal;
- #else
var returnValue = _GetFriendFromSourceByIndex( Self, steamIDSource, iFriend );
return returnValue;
- #endif
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_IsUserInSource", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FIsUserInSource( IntPtr self, SteamId steamIDUser, SteamId steamIDSource );
- private FIsUserInSource _IsUserInSource;
+ private static extern bool _IsUserInSource( IntPtr self, SteamId steamIDUser, SteamId steamIDSource );
#endregion
internal bool IsUserInSource( SteamId steamIDUser, SteamId steamIDSource )
@@ -524,9 +321,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FSetInGameVoiceSpeaking( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.U1 )] bool bSpeaking );
- private FSetInGameVoiceSpeaking _SetInGameVoiceSpeaking;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_SetInGameVoiceSpeaking", CallingConvention = Platform.CC)]
+ private static extern void _SetInGameVoiceSpeaking( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.U1 )] bool bSpeaking );
#endregion
internal void SetInGameVoiceSpeaking( SteamId steamIDUser, [MarshalAs( UnmanagedType.U1 )] bool bSpeaking )
@@ -535,9 +331,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FActivateGameOverlay( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDialog );
- private FActivateGameOverlay _ActivateGameOverlay;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_ActivateGameOverlay", CallingConvention = Platform.CC)]
+ private static extern void _ActivateGameOverlay( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDialog );
#endregion
internal void ActivateGameOverlay( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDialog )
@@ -546,9 +341,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FActivateGameOverlayToUser( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDialog, SteamId steamID );
- private FActivateGameOverlayToUser _ActivateGameOverlayToUser;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_ActivateGameOverlayToUser", CallingConvention = Platform.CC)]
+ private static extern void _ActivateGameOverlayToUser( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDialog, SteamId steamID );
#endregion
internal void ActivateGameOverlayToUser( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDialog, SteamId steamID )
@@ -557,9 +351,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FActivateGameOverlayToWebPage( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchURL, ActivateGameOverlayToWebPageMode eMode );
- private FActivateGameOverlayToWebPage _ActivateGameOverlayToWebPage;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage", CallingConvention = Platform.CC)]
+ private static extern void _ActivateGameOverlayToWebPage( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchURL, ActivateGameOverlayToWebPageMode eMode );
#endregion
internal void ActivateGameOverlayToWebPage( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchURL, ActivateGameOverlayToWebPageMode eMode )
@@ -568,9 +361,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FActivateGameOverlayToStore( IntPtr self, AppId nAppID, OverlayToStoreFlag eFlag );
- private FActivateGameOverlayToStore _ActivateGameOverlayToStore;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_ActivateGameOverlayToStore", CallingConvention = Platform.CC)]
+ private static extern void _ActivateGameOverlayToStore( IntPtr self, AppId nAppID, OverlayToStoreFlag eFlag );
#endregion
internal void ActivateGameOverlayToStore( AppId nAppID, OverlayToStoreFlag eFlag )
@@ -579,9 +371,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FSetPlayedWith( IntPtr self, SteamId steamIDUserPlayedWith );
- private FSetPlayedWith _SetPlayedWith;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_SetPlayedWith", CallingConvention = Platform.CC)]
+ private static extern void _SetPlayedWith( IntPtr self, SteamId steamIDUserPlayedWith );
#endregion
internal void SetPlayedWith( SteamId steamIDUserPlayedWith )
@@ -590,9 +381,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FActivateGameOverlayInviteDialog( IntPtr self, SteamId steamIDLobby );
- private FActivateGameOverlayInviteDialog _ActivateGameOverlayInviteDialog;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_ActivateGameOverlayInviteDialog", CallingConvention = Platform.CC)]
+ private static extern void _ActivateGameOverlayInviteDialog( IntPtr self, SteamId steamIDLobby );
#endregion
internal void ActivateGameOverlayInviteDialog( SteamId steamIDLobby )
@@ -601,9 +391,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate int FGetSmallFriendAvatar( IntPtr self, SteamId steamIDFriend );
- private FGetSmallFriendAvatar _GetSmallFriendAvatar;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetSmallFriendAvatar", CallingConvention = Platform.CC)]
+ private static extern int _GetSmallFriendAvatar( IntPtr self, SteamId steamIDFriend );
#endregion
internal int GetSmallFriendAvatar( SteamId steamIDFriend )
@@ -613,9 +402,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate int FGetMediumFriendAvatar( IntPtr self, SteamId steamIDFriend );
- private FGetMediumFriendAvatar _GetMediumFriendAvatar;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetMediumFriendAvatar", CallingConvention = Platform.CC)]
+ private static extern int _GetMediumFriendAvatar( IntPtr self, SteamId steamIDFriend );
#endregion
internal int GetMediumFriendAvatar( SteamId steamIDFriend )
@@ -625,9 +413,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate int FGetLargeFriendAvatar( IntPtr self, SteamId steamIDFriend );
- private FGetLargeFriendAvatar _GetLargeFriendAvatar;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetLargeFriendAvatar", CallingConvention = Platform.CC)]
+ private static extern int _GetLargeFriendAvatar( IntPtr self, SteamId steamIDFriend );
#endregion
internal int GetLargeFriendAvatar( SteamId steamIDFriend )
@@ -637,10 +424,9 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_RequestUserInformation", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FRequestUserInformation( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.U1 )] bool bRequireNameOnly );
- private FRequestUserInformation _RequestUserInformation;
+ private static extern bool _RequestUserInformation( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.U1 )] bool bRequireNameOnly );
#endregion
internal bool RequestUserInformation( SteamId steamIDUser, [MarshalAs( UnmanagedType.U1 )] bool bRequireNameOnly )
@@ -650,43 +436,30 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate SteamAPICall_t FRequestClanOfficerList( IntPtr self, SteamId steamIDClan );
- private FRequestClanOfficerList _RequestClanOfficerList;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_RequestClanOfficerList", CallingConvention = Platform.CC)]
+ private static extern SteamAPICall_t _RequestClanOfficerList( IntPtr self, SteamId steamIDClan );
#endregion
- internal async Task RequestClanOfficerList( SteamId steamIDClan )
+ internal CallResult RequestClanOfficerList( SteamId steamIDClan )
{
var returnValue = _RequestClanOfficerList( Self, steamIDClan );
- return await ClanOfficerListResponse_t.GetResultAsync( returnValue );
+ return new CallResult( returnValue, IsServer );
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- #if PLATFORM_WIN
- private delegate void FGetClanOwner( IntPtr self, ref SteamId retVal, SteamId steamIDClan );
- #else
- private delegate SteamId FGetClanOwner( IntPtr self, SteamId steamIDClan );
- #endif
- private FGetClanOwner _GetClanOwner;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanOwner", CallingConvention = Platform.CC)]
+ private static extern SteamId _GetClanOwner( IntPtr self, SteamId steamIDClan );
#endregion
internal SteamId GetClanOwner( SteamId steamIDClan )
{
- #if PLATFORM_WIN
- var retVal = default( SteamId );
- _GetClanOwner( Self, ref retVal, steamIDClan );
- return retVal;
- #else
var returnValue = _GetClanOwner( Self, steamIDClan );
return returnValue;
- #endif
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate int FGetClanOfficerCount( IntPtr self, SteamId steamIDClan );
- private FGetClanOfficerCount _GetClanOfficerCount;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanOfficerCount", CallingConvention = Platform.CC)]
+ private static extern int _GetClanOfficerCount( IntPtr self, SteamId steamIDClan );
#endregion
internal int GetClanOfficerCount( SteamId steamIDClan )
@@ -696,31 +469,19 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- #if PLATFORM_WIN
- private delegate void FGetClanOfficerByIndex( IntPtr self, ref SteamId retVal, SteamId steamIDClan, int iOfficer );
- #else
- private delegate SteamId FGetClanOfficerByIndex( IntPtr self, SteamId steamIDClan, int iOfficer );
- #endif
- private FGetClanOfficerByIndex _GetClanOfficerByIndex;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanOfficerByIndex", CallingConvention = Platform.CC)]
+ private static extern SteamId _GetClanOfficerByIndex( IntPtr self, SteamId steamIDClan, int iOfficer );
#endregion
internal SteamId GetClanOfficerByIndex( SteamId steamIDClan, int iOfficer )
{
- #if PLATFORM_WIN
- var retVal = default( SteamId );
- _GetClanOfficerByIndex( Self, ref retVal, steamIDClan, iOfficer );
- return retVal;
- #else
var returnValue = _GetClanOfficerByIndex( Self, steamIDClan, iOfficer );
return returnValue;
- #endif
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate uint FGetUserRestrictions( IntPtr self );
- private FGetUserRestrictions _GetUserRestrictions;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetUserRestrictions", CallingConvention = Platform.CC)]
+ private static extern uint _GetUserRestrictions( IntPtr self );
#endregion
internal uint GetUserRestrictions()
@@ -730,10 +491,9 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_SetRichPresence", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FSetRichPresence( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue );
- private FSetRichPresence _SetRichPresence;
+ private static extern bool _SetRichPresence( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue );
#endregion
internal bool SetRichPresence( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue )
@@ -743,9 +503,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FClearRichPresence( IntPtr self );
- private FClearRichPresence _ClearRichPresence;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_ClearRichPresence", CallingConvention = Platform.CC)]
+ private static extern void _ClearRichPresence( IntPtr self );
#endregion
internal void ClearRichPresence()
@@ -754,9 +513,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate Utf8StringPointer FGetFriendRichPresence( IntPtr self, SteamId steamIDFriend, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey );
- private FGetFriendRichPresence _GetFriendRichPresence;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendRichPresence", CallingConvention = Platform.CC)]
+ private static extern Utf8StringPointer _GetFriendRichPresence( IntPtr self, SteamId steamIDFriend, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey );
#endregion
internal string GetFriendRichPresence( SteamId steamIDFriend, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey )
@@ -766,9 +524,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate int FGetFriendRichPresenceKeyCount( IntPtr self, SteamId steamIDFriend );
- private FGetFriendRichPresenceKeyCount _GetFriendRichPresenceKeyCount;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendRichPresenceKeyCount", CallingConvention = Platform.CC)]
+ private static extern int _GetFriendRichPresenceKeyCount( IntPtr self, SteamId steamIDFriend );
#endregion
internal int GetFriendRichPresenceKeyCount( SteamId steamIDFriend )
@@ -778,9 +535,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate Utf8StringPointer FGetFriendRichPresenceKeyByIndex( IntPtr self, SteamId steamIDFriend, int iKey );
- private FGetFriendRichPresenceKeyByIndex _GetFriendRichPresenceKeyByIndex;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendRichPresenceKeyByIndex", CallingConvention = Platform.CC)]
+ private static extern Utf8StringPointer _GetFriendRichPresenceKeyByIndex( IntPtr self, SteamId steamIDFriend, int iKey );
#endregion
internal string GetFriendRichPresenceKeyByIndex( SteamId steamIDFriend, int iKey )
@@ -790,9 +546,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FRequestFriendRichPresence( IntPtr self, SteamId steamIDFriend );
- private FRequestFriendRichPresence _RequestFriendRichPresence;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_RequestFriendRichPresence", CallingConvention = Platform.CC)]
+ private static extern void _RequestFriendRichPresence( IntPtr self, SteamId steamIDFriend );
#endregion
internal void RequestFriendRichPresence( SteamId steamIDFriend )
@@ -801,10 +556,9 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_InviteUserToGame", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FInviteUserToGame( IntPtr self, SteamId steamIDFriend, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchConnectString );
- private FInviteUserToGame _InviteUserToGame;
+ private static extern bool _InviteUserToGame( IntPtr self, SteamId steamIDFriend, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchConnectString );
#endregion
internal bool InviteUserToGame( SteamId steamIDFriend, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchConnectString )
@@ -814,9 +568,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate int FGetCoplayFriendCount( IntPtr self );
- private FGetCoplayFriendCount _GetCoplayFriendCount;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetCoplayFriendCount", CallingConvention = Platform.CC)]
+ private static extern int _GetCoplayFriendCount( IntPtr self );
#endregion
internal int GetCoplayFriendCount()
@@ -826,31 +579,19 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- #if PLATFORM_WIN
- private delegate void FGetCoplayFriend( IntPtr self, ref SteamId retVal, int iCoplayFriend );
- #else
- private delegate SteamId FGetCoplayFriend( IntPtr self, int iCoplayFriend );
- #endif
- private FGetCoplayFriend _GetCoplayFriend;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetCoplayFriend", CallingConvention = Platform.CC)]
+ private static extern SteamId _GetCoplayFriend( IntPtr self, int iCoplayFriend );
#endregion
internal SteamId GetCoplayFriend( int iCoplayFriend )
{
- #if PLATFORM_WIN
- var retVal = default( SteamId );
- _GetCoplayFriend( Self, ref retVal, iCoplayFriend );
- return retVal;
- #else
var returnValue = _GetCoplayFriend( Self, iCoplayFriend );
return returnValue;
- #endif
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate int FGetFriendCoplayTime( IntPtr self, SteamId steamIDFriend );
- private FGetFriendCoplayTime _GetFriendCoplayTime;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendCoplayTime", CallingConvention = Platform.CC)]
+ private static extern int _GetFriendCoplayTime( IntPtr self, SteamId steamIDFriend );
#endregion
internal int GetFriendCoplayTime( SteamId steamIDFriend )
@@ -860,9 +601,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate AppId FGetFriendCoplayGame( IntPtr self, SteamId steamIDFriend );
- private FGetFriendCoplayGame _GetFriendCoplayGame;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendCoplayGame", CallingConvention = Platform.CC)]
+ private static extern AppId _GetFriendCoplayGame( IntPtr self, SteamId steamIDFriend );
#endregion
internal AppId GetFriendCoplayGame( SteamId steamIDFriend )
@@ -872,22 +612,20 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate SteamAPICall_t FJoinClanChatRoom( IntPtr self, SteamId steamIDClan );
- private FJoinClanChatRoom _JoinClanChatRoom;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_JoinClanChatRoom", CallingConvention = Platform.CC)]
+ private static extern SteamAPICall_t _JoinClanChatRoom( IntPtr self, SteamId steamIDClan );
#endregion
- internal async Task JoinClanChatRoom( SteamId steamIDClan )
+ internal CallResult JoinClanChatRoom( SteamId steamIDClan )
{
var returnValue = _JoinClanChatRoom( Self, steamIDClan );
- return await JoinClanChatRoomCompletionResult_t.GetResultAsync( returnValue );
+ return new CallResult( returnValue, IsServer );
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_LeaveClanChatRoom", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FLeaveClanChatRoom( IntPtr self, SteamId steamIDClan );
- private FLeaveClanChatRoom _LeaveClanChatRoom;
+ private static extern bool _LeaveClanChatRoom( IntPtr self, SteamId steamIDClan );
#endregion
internal bool LeaveClanChatRoom( SteamId steamIDClan )
@@ -897,9 +635,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate int FGetClanChatMemberCount( IntPtr self, SteamId steamIDClan );
- private FGetClanChatMemberCount _GetClanChatMemberCount;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanChatMemberCount", CallingConvention = Platform.CC)]
+ private static extern int _GetClanChatMemberCount( IntPtr self, SteamId steamIDClan );
#endregion
internal int GetClanChatMemberCount( SteamId steamIDClan )
@@ -909,32 +646,20 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- #if PLATFORM_WIN
- private delegate void FGetChatMemberByIndex( IntPtr self, ref SteamId retVal, SteamId steamIDClan, int iUser );
- #else
- private delegate SteamId FGetChatMemberByIndex( IntPtr self, SteamId steamIDClan, int iUser );
- #endif
- private FGetChatMemberByIndex _GetChatMemberByIndex;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetChatMemberByIndex", CallingConvention = Platform.CC)]
+ private static extern SteamId _GetChatMemberByIndex( IntPtr self, SteamId steamIDClan, int iUser );
#endregion
internal SteamId GetChatMemberByIndex( SteamId steamIDClan, int iUser )
{
- #if PLATFORM_WIN
- var retVal = default( SteamId );
- _GetChatMemberByIndex( Self, ref retVal, steamIDClan, iUser );
- return retVal;
- #else
var returnValue = _GetChatMemberByIndex( Self, steamIDClan, iUser );
return returnValue;
- #endif
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_SendClanChatMessage", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FSendClanChatMessage( IntPtr self, SteamId steamIDClanChat, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchText );
- private FSendClanChatMessage _SendClanChatMessage;
+ private static extern bool _SendClanChatMessage( IntPtr self, SteamId steamIDClanChat, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchText );
#endregion
internal bool SendClanChatMessage( SteamId steamIDClanChat, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchText )
@@ -944,9 +669,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate int FGetClanChatMessage( IntPtr self, SteamId steamIDClanChat, int iMessage, IntPtr prgchText, int cchTextMax, ref ChatEntryType peChatEntryType, ref SteamId psteamidChatter );
- private FGetClanChatMessage _GetClanChatMessage;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanChatMessage", CallingConvention = Platform.CC)]
+ private static extern int _GetClanChatMessage( IntPtr self, SteamId steamIDClanChat, int iMessage, IntPtr prgchText, int cchTextMax, ref ChatEntryType peChatEntryType, ref SteamId psteamidChatter );
#endregion
internal int GetClanChatMessage( SteamId steamIDClanChat, int iMessage, IntPtr prgchText, int cchTextMax, ref ChatEntryType peChatEntryType, ref SteamId psteamidChatter )
@@ -956,10 +680,9 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_IsClanChatAdmin", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FIsClanChatAdmin( IntPtr self, SteamId steamIDClanChat, SteamId steamIDUser );
- private FIsClanChatAdmin _IsClanChatAdmin;
+ private static extern bool _IsClanChatAdmin( IntPtr self, SteamId steamIDClanChat, SteamId steamIDUser );
#endregion
internal bool IsClanChatAdmin( SteamId steamIDClanChat, SteamId steamIDUser )
@@ -969,10 +692,9 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_IsClanChatWindowOpenInSteam", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FIsClanChatWindowOpenInSteam( IntPtr self, SteamId steamIDClanChat );
- private FIsClanChatWindowOpenInSteam _IsClanChatWindowOpenInSteam;
+ private static extern bool _IsClanChatWindowOpenInSteam( IntPtr self, SteamId steamIDClanChat );
#endregion
internal bool IsClanChatWindowOpenInSteam( SteamId steamIDClanChat )
@@ -982,10 +704,9 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_OpenClanChatWindowInSteam", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FOpenClanChatWindowInSteam( IntPtr self, SteamId steamIDClanChat );
- private FOpenClanChatWindowInSteam _OpenClanChatWindowInSteam;
+ private static extern bool _OpenClanChatWindowInSteam( IntPtr self, SteamId steamIDClanChat );
#endregion
internal bool OpenClanChatWindowInSteam( SteamId steamIDClanChat )
@@ -995,10 +716,9 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_CloseClanChatWindowInSteam", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FCloseClanChatWindowInSteam( IntPtr self, SteamId steamIDClanChat );
- private FCloseClanChatWindowInSteam _CloseClanChatWindowInSteam;
+ private static extern bool _CloseClanChatWindowInSteam( IntPtr self, SteamId steamIDClanChat );
#endregion
internal bool CloseClanChatWindowInSteam( SteamId steamIDClanChat )
@@ -1008,10 +728,9 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_SetListenForFriendsMessages", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FSetListenForFriendsMessages( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bInterceptEnabled );
- private FSetListenForFriendsMessages _SetListenForFriendsMessages;
+ private static extern bool _SetListenForFriendsMessages( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bInterceptEnabled );
#endregion
internal bool SetListenForFriendsMessages( [MarshalAs( UnmanagedType.U1 )] bool bInterceptEnabled )
@@ -1021,10 +740,9 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_ReplyToFriendMessage", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FReplyToFriendMessage( IntPtr self, SteamId steamIDFriend, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchMsgToSend );
- private FReplyToFriendMessage _ReplyToFriendMessage;
+ private static extern bool _ReplyToFriendMessage( IntPtr self, SteamId steamIDFriend, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchMsgToSend );
#endregion
internal bool ReplyToFriendMessage( SteamId steamIDFriend, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchMsgToSend )
@@ -1034,9 +752,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate int FGetFriendMessage( IntPtr self, SteamId steamIDFriend, int iMessageID, IntPtr pvData, int cubData, ref ChatEntryType peChatEntryType );
- private FGetFriendMessage _GetFriendMessage;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendMessage", CallingConvention = Platform.CC)]
+ private static extern int _GetFriendMessage( IntPtr self, SteamId steamIDFriend, int iMessageID, IntPtr pvData, int cubData, ref ChatEntryType peChatEntryType );
#endregion
internal int GetFriendMessage( SteamId steamIDFriend, int iMessageID, IntPtr pvData, int cubData, ref ChatEntryType peChatEntryType )
@@ -1046,46 +763,42 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate SteamAPICall_t FGetFollowerCount( IntPtr self, SteamId steamID );
- private FGetFollowerCount _GetFollowerCount;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFollowerCount", CallingConvention = Platform.CC)]
+ private static extern SteamAPICall_t _GetFollowerCount( IntPtr self, SteamId steamID );
#endregion
- internal async Task GetFollowerCount( SteamId steamID )
+ internal CallResult GetFollowerCount( SteamId steamID )
{
var returnValue = _GetFollowerCount( Self, steamID );
- return await FriendsGetFollowerCount_t.GetResultAsync( returnValue );
+ return new CallResult( returnValue, IsServer );
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate SteamAPICall_t FIsFollowing( IntPtr self, SteamId steamID );
- private FIsFollowing _IsFollowing;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_IsFollowing", CallingConvention = Platform.CC)]
+ private static extern SteamAPICall_t _IsFollowing( IntPtr self, SteamId steamID );
#endregion
- internal async Task IsFollowing( SteamId steamID )
+ internal CallResult IsFollowing( SteamId steamID )
{
var returnValue = _IsFollowing( Self, steamID );
- return await FriendsIsFollowing_t.GetResultAsync( returnValue );
+ return new CallResult( returnValue, IsServer );
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate SteamAPICall_t FEnumerateFollowingList( IntPtr self, uint unStartIndex );
- private FEnumerateFollowingList _EnumerateFollowingList;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_EnumerateFollowingList", CallingConvention = Platform.CC)]
+ private static extern SteamAPICall_t _EnumerateFollowingList( IntPtr self, uint unStartIndex );
#endregion
- internal async Task EnumerateFollowingList( uint unStartIndex )
+ internal CallResult EnumerateFollowingList( uint unStartIndex )
{
var returnValue = _EnumerateFollowingList( Self, unStartIndex );
- return await FriendsEnumerateFollowingList_t.GetResultAsync( returnValue );
+ return new CallResult( returnValue, IsServer );
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_IsClanPublic", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FIsClanPublic( IntPtr self, SteamId steamIDClan );
- private FIsClanPublic _IsClanPublic;
+ private static extern bool _IsClanPublic( IntPtr self, SteamId steamIDClan );
#endregion
internal bool IsClanPublic( SteamId steamIDClan )
@@ -1095,10 +808,9 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_IsClanOfficialGameGroup", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FIsClanOfficialGameGroup( IntPtr self, SteamId steamIDClan );
- private FIsClanOfficialGameGroup _IsClanOfficialGameGroup;
+ private static extern bool _IsClanOfficialGameGroup( IntPtr self, SteamId steamIDClan );
#endregion
internal bool IsClanOfficialGameGroup( SteamId steamIDClan )
@@ -1108,9 +820,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate int FGetNumChatsWithUnreadPriorityMessages( IntPtr self );
- private FGetNumChatsWithUnreadPriorityMessages _GetNumChatsWithUnreadPriorityMessages;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetNumChatsWithUnreadPriorityMessages", CallingConvention = Platform.CC)]
+ private static extern int _GetNumChatsWithUnreadPriorityMessages( IntPtr self );
#endregion
internal int GetNumChatsWithUnreadPriorityMessages()
@@ -1119,5 +830,82 @@ namespace Steamworks
return returnValue;
}
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_ActivateGameOverlayRemotePlayTogetherInviteDialog", CallingConvention = Platform.CC)]
+ private static extern void _ActivateGameOverlayRemotePlayTogetherInviteDialog( IntPtr self, SteamId steamIDLobby );
+
+ #endregion
+ internal void ActivateGameOverlayRemotePlayTogetherInviteDialog( SteamId steamIDLobby )
+ {
+ _ActivateGameOverlayRemotePlayTogetherInviteDialog( Self, steamIDLobby );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_RegisterProtocolInOverlayBrowser", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _RegisterProtocolInOverlayBrowser( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchProtocol );
+
+ #endregion
+ internal bool RegisterProtocolInOverlayBrowser( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchProtocol )
+ {
+ var returnValue = _RegisterProtocolInOverlayBrowser( Self, pchProtocol );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_ActivateGameOverlayInviteDialogConnectString", CallingConvention = Platform.CC)]
+ private static extern void _ActivateGameOverlayInviteDialogConnectString( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchConnectString );
+
+ #endregion
+ internal void ActivateGameOverlayInviteDialogConnectString( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchConnectString )
+ {
+ _ActivateGameOverlayInviteDialogConnectString( Self, pchConnectString );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_RequestEquippedProfileItems", CallingConvention = Platform.CC)]
+ private static extern SteamAPICall_t _RequestEquippedProfileItems( IntPtr self, SteamId steamID );
+
+ #endregion
+ internal CallResult RequestEquippedProfileItems( SteamId steamID )
+ {
+ var returnValue = _RequestEquippedProfileItems( Self, steamID );
+ return new CallResult( returnValue, IsServer );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_BHasEquippedProfileItem", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _BHasEquippedProfileItem( IntPtr self, SteamId steamID, CommunityProfileItemType itemType );
+
+ #endregion
+ internal bool BHasEquippedProfileItem( SteamId steamID, CommunityProfileItemType itemType )
+ {
+ var returnValue = _BHasEquippedProfileItem( Self, steamID, itemType );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetProfileItemPropertyString", CallingConvention = Platform.CC)]
+ private static extern Utf8StringPointer _GetProfileItemPropertyString( IntPtr self, SteamId steamID, CommunityProfileItemType itemType, CommunityProfileItemProperty prop );
+
+ #endregion
+ internal string GetProfileItemPropertyString( SteamId steamID, CommunityProfileItemType itemType, CommunityProfileItemProperty prop )
+ {
+ var returnValue = _GetProfileItemPropertyString( Self, steamID, itemType, prop );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetProfileItemPropertyUint", CallingConvention = Platform.CC)]
+ private static extern uint _GetProfileItemPropertyUint( IntPtr self, SteamId steamID, CommunityProfileItemType itemType, CommunityProfileItemProperty prop );
+
+ #endregion
+ internal uint GetProfileItemPropertyUint( SteamId steamID, CommunityProfileItemType itemType, CommunityProfileItemProperty prop )
+ {
+ var returnValue = _GetProfileItemPropertyUint( Self, steamID, itemType, prop );
+ return returnValue;
+ }
+
}
}
diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamGameSearch.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamGameSearch.cs
new file mode 100644
index 0000000..3c70b84
--- /dev/null
+++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamGameSearch.cs
@@ -0,0 +1,180 @@
+using System;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Threading.Tasks;
+using Steamworks.Data;
+
+
+namespace Steamworks
+{
+ internal unsafe class ISteamGameSearch : SteamInterface
+ {
+
+ internal ISteamGameSearch( bool IsGameServer )
+ {
+ SetupInterface( IsGameServer );
+ }
+
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameSearch_v001", CallingConvention = Platform.CC)]
+ internal static extern IntPtr SteamAPI_SteamGameSearch_v001();
+ public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamGameSearch_v001();
+
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_AddGameSearchParams", CallingConvention = Platform.CC)]
+ private static extern GameSearchErrorCode_t _AddGameSearchParams( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToFind, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValuesToFind );
+
+ #endregion
+ internal GameSearchErrorCode_t AddGameSearchParams( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToFind, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValuesToFind )
+ {
+ var returnValue = _AddGameSearchParams( Self, pchKeyToFind, pchValuesToFind );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_SearchForGameWithLobby", CallingConvention = Platform.CC)]
+ private static extern GameSearchErrorCode_t _SearchForGameWithLobby( IntPtr self, SteamId steamIDLobby, int nPlayerMin, int nPlayerMax );
+
+ #endregion
+ internal GameSearchErrorCode_t SearchForGameWithLobby( SteamId steamIDLobby, int nPlayerMin, int nPlayerMax )
+ {
+ var returnValue = _SearchForGameWithLobby( Self, steamIDLobby, nPlayerMin, nPlayerMax );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_SearchForGameSolo", CallingConvention = Platform.CC)]
+ private static extern GameSearchErrorCode_t _SearchForGameSolo( IntPtr self, int nPlayerMin, int nPlayerMax );
+
+ #endregion
+ internal GameSearchErrorCode_t SearchForGameSolo( int nPlayerMin, int nPlayerMax )
+ {
+ var returnValue = _SearchForGameSolo( Self, nPlayerMin, nPlayerMax );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_AcceptGame", CallingConvention = Platform.CC)]
+ private static extern GameSearchErrorCode_t _AcceptGame( IntPtr self );
+
+ #endregion
+ internal GameSearchErrorCode_t AcceptGame()
+ {
+ var returnValue = _AcceptGame( Self );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_DeclineGame", CallingConvention = Platform.CC)]
+ private static extern GameSearchErrorCode_t _DeclineGame( IntPtr self );
+
+ #endregion
+ internal GameSearchErrorCode_t DeclineGame()
+ {
+ var returnValue = _DeclineGame( Self );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_RetrieveConnectionDetails", CallingConvention = Platform.CC)]
+ private static extern GameSearchErrorCode_t _RetrieveConnectionDetails( IntPtr self, SteamId steamIDHost, IntPtr pchConnectionDetails, int cubConnectionDetails );
+
+ #endregion
+ internal GameSearchErrorCode_t RetrieveConnectionDetails( SteamId steamIDHost, out string pchConnectionDetails )
+ {
+ using var mempchConnectionDetails = Helpers.TakeMemory();
+ var returnValue = _RetrieveConnectionDetails( Self, steamIDHost, mempchConnectionDetails, (1024 * 32) );
+ pchConnectionDetails = Helpers.MemoryToString( mempchConnectionDetails );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_EndGameSearch", CallingConvention = Platform.CC)]
+ private static extern GameSearchErrorCode_t _EndGameSearch( IntPtr self );
+
+ #endregion
+ internal GameSearchErrorCode_t EndGameSearch()
+ {
+ var returnValue = _EndGameSearch( Self );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_SetGameHostParams", CallingConvention = Platform.CC)]
+ private static extern GameSearchErrorCode_t _SetGameHostParams( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue );
+
+ #endregion
+ internal GameSearchErrorCode_t SetGameHostParams( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue )
+ {
+ var returnValue = _SetGameHostParams( Self, pchKey, pchValue );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_SetConnectionDetails", CallingConvention = Platform.CC)]
+ private static extern GameSearchErrorCode_t _SetConnectionDetails( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchConnectionDetails, int cubConnectionDetails );
+
+ #endregion
+ internal GameSearchErrorCode_t SetConnectionDetails( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchConnectionDetails, int cubConnectionDetails )
+ {
+ var returnValue = _SetConnectionDetails( Self, pchConnectionDetails, cubConnectionDetails );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_RequestPlayersForGame", CallingConvention = Platform.CC)]
+ private static extern GameSearchErrorCode_t _RequestPlayersForGame( IntPtr self, int nPlayerMin, int nPlayerMax, int nMaxTeamSize );
+
+ #endregion
+ internal GameSearchErrorCode_t RequestPlayersForGame( int nPlayerMin, int nPlayerMax, int nMaxTeamSize )
+ {
+ var returnValue = _RequestPlayersForGame( Self, nPlayerMin, nPlayerMax, nMaxTeamSize );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_HostConfirmGameStart", CallingConvention = Platform.CC)]
+ private static extern GameSearchErrorCode_t _HostConfirmGameStart( IntPtr self, ulong ullUniqueGameID );
+
+ #endregion
+ internal GameSearchErrorCode_t HostConfirmGameStart( ulong ullUniqueGameID )
+ {
+ var returnValue = _HostConfirmGameStart( Self, ullUniqueGameID );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_CancelRequestPlayersForGame", CallingConvention = Platform.CC)]
+ private static extern GameSearchErrorCode_t _CancelRequestPlayersForGame( IntPtr self );
+
+ #endregion
+ internal GameSearchErrorCode_t CancelRequestPlayersForGame()
+ {
+ var returnValue = _CancelRequestPlayersForGame( Self );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_SubmitPlayerResult", CallingConvention = Platform.CC)]
+ private static extern GameSearchErrorCode_t _SubmitPlayerResult( IntPtr self, ulong ullUniqueGameID, SteamId steamIDPlayer, PlayerResult_t EPlayerResult );
+
+ #endregion
+ internal GameSearchErrorCode_t SubmitPlayerResult( ulong ullUniqueGameID, SteamId steamIDPlayer, PlayerResult_t EPlayerResult )
+ {
+ var returnValue = _SubmitPlayerResult( Self, ullUniqueGameID, steamIDPlayer, EPlayerResult );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_EndGame", CallingConvention = Platform.CC)]
+ private static extern GameSearchErrorCode_t _EndGame( IntPtr self, ulong ullUniqueGameID );
+
+ #endregion
+ internal GameSearchErrorCode_t EndGame( ulong ullUniqueGameID )
+ {
+ var returnValue = _EndGame( Self, ullUniqueGameID );
+ return returnValue;
+ }
+
+ }
+}
diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamGameServer.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamGameServer.cs
index 50bb040..3d23f31 100644
--- a/Facepunch.Steamworks/Generated/Interfaces/ISteamGameServer.cs
+++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamGameServer.cs
@@ -7,124 +7,22 @@ using Steamworks.Data;
namespace Steamworks
{
- internal class ISteamGameServer : SteamInterface
+ internal unsafe class ISteamGameServer : SteamInterface
{
- public override string InterfaceName => "SteamGameServer012";
- public override void InitInternals()
+ internal ISteamGameServer( bool IsGameServer )
{
- _InitGameServer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
- _SetProduct = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
- _SetGameDescription = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
- _SetModDir = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
- _SetDedicatedServer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
- _LogOn = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
- _LogOnAnonymous = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
- _LogOff = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
- _BLoggedOn = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) );
- _BSecure = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) );
- _GetSteamID = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) );
- _WasRestartRequested = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) );
- _SetMaxPlayerCount = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) );
- _SetBotPlayerCount = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) );
- _SetServerName = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) );
- _SetMapName = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) );
- _SetPasswordProtected = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) );
- _SetSpectatorPort = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) );
- _SetSpectatorServerName = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) );
- _ClearAllKeyValues = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) );
- _SetKeyValue = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) );
- _SetGameTags = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 168 ) ) );
- _SetGameData = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 176 ) ) );
- _SetRegion = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 184 ) ) );
- _SendUserConnectAndAuthenticate = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 192 ) ) );
- _CreateUnauthenticatedUserConnection = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 200 ) ) );
- _SendUserDisconnect = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 208 ) ) );
- _BUpdateUserData = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 216 ) ) );
- _GetAuthSessionTicket = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 224 ) ) );
- _BeginAuthSession = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 232 ) ) );
- _EndAuthSession = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 240 ) ) );
- _CancelAuthTicket = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 248 ) ) );
- _UserHasLicenseForApp = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 256 ) ) );
- _RequestUserGroupStatus = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 264 ) ) );
- _GetGameplayStats = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 272 ) ) );
- _GetServerReputation = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 280 ) ) );
- _GetPublicIP = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 288 ) ) );
- _HandleIncomingPacket = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 296 ) ) );
- _GetNextOutgoingPacket = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 304 ) ) );
- _EnableHeartbeats = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 312 ) ) );
- _SetHeartbeatInterval = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 320 ) ) );
- _ForceHeartbeat = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 328 ) ) );
- _AssociateWithClan = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 336 ) ) );
- _ComputeNewPlayerCompatibility = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 344 ) ) );
- }
- internal override void Shutdown()
- {
- base.Shutdown();
-
- _InitGameServer = null;
- _SetProduct = null;
- _SetGameDescription = null;
- _SetModDir = null;
- _SetDedicatedServer = null;
- _LogOn = null;
- _LogOnAnonymous = null;
- _LogOff = null;
- _BLoggedOn = null;
- _BSecure = null;
- _GetSteamID = null;
- _WasRestartRequested = null;
- _SetMaxPlayerCount = null;
- _SetBotPlayerCount = null;
- _SetServerName = null;
- _SetMapName = null;
- _SetPasswordProtected = null;
- _SetSpectatorPort = null;
- _SetSpectatorServerName = null;
- _ClearAllKeyValues = null;
- _SetKeyValue = null;
- _SetGameTags = null;
- _SetGameData = null;
- _SetRegion = null;
- _SendUserConnectAndAuthenticate = null;
- _CreateUnauthenticatedUserConnection = null;
- _SendUserDisconnect = null;
- _BUpdateUserData = null;
- _GetAuthSessionTicket = null;
- _BeginAuthSession = null;
- _EndAuthSession = null;
- _CancelAuthTicket = null;
- _UserHasLicenseForApp = null;
- _RequestUserGroupStatus = null;
- _GetGameplayStats = null;
- _GetServerReputation = null;
- _GetPublicIP = null;
- _HandleIncomingPacket = null;
- _GetNextOutgoingPacket = null;
- _EnableHeartbeats = null;
- _SetHeartbeatInterval = null;
- _ForceHeartbeat = null;
- _AssociateWithClan = null;
- _ComputeNewPlayerCompatibility = null;
+ SetupInterface( IsGameServer );
}
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameServer_v014", CallingConvention = Platform.CC)]
+ internal static extern IntPtr SteamAPI_SteamGameServer_v014();
+ public override IntPtr GetServerInterfacePointer() => SteamAPI_SteamGameServer_v014();
+
+
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- [return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FInitGameServer( IntPtr self, uint unIP, ushort usGamePort, ushort usQueryPort, uint unFlags, AppId nGameAppId, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersionString );
- private FInitGameServer _InitGameServer;
-
- #endregion
- internal bool InitGameServer( uint unIP, ushort usGamePort, ushort usQueryPort, uint unFlags, AppId nGameAppId, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersionString )
- {
- var returnValue = _InitGameServer( Self, unIP, usGamePort, usQueryPort, unFlags, nGameAppId, pchVersionString );
- return returnValue;
- }
-
- #region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FSetProduct( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszProduct );
- private FSetProduct _SetProduct;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetProduct", CallingConvention = Platform.CC)]
+ private static extern void _SetProduct( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszProduct );
#endregion
internal void SetProduct( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszProduct )
@@ -133,9 +31,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FSetGameDescription( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszGameDescription );
- private FSetGameDescription _SetGameDescription;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetGameDescription", CallingConvention = Platform.CC)]
+ private static extern void _SetGameDescription( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszGameDescription );
#endregion
internal void SetGameDescription( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszGameDescription )
@@ -144,9 +41,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FSetModDir( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszModDir );
- private FSetModDir _SetModDir;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetModDir", CallingConvention = Platform.CC)]
+ private static extern void _SetModDir( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszModDir );
#endregion
internal void SetModDir( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszModDir )
@@ -155,9 +51,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FSetDedicatedServer( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bDedicated );
- private FSetDedicatedServer _SetDedicatedServer;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetDedicatedServer", CallingConvention = Platform.CC)]
+ private static extern void _SetDedicatedServer( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bDedicated );
#endregion
internal void SetDedicatedServer( [MarshalAs( UnmanagedType.U1 )] bool bDedicated )
@@ -166,9 +61,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FLogOn( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszToken );
- private FLogOn _LogOn;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_LogOn", CallingConvention = Platform.CC)]
+ private static extern void _LogOn( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszToken );
#endregion
internal void LogOn( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszToken )
@@ -177,9 +71,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FLogOnAnonymous( IntPtr self );
- private FLogOnAnonymous _LogOnAnonymous;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_LogOnAnonymous", CallingConvention = Platform.CC)]
+ private static extern void _LogOnAnonymous( IntPtr self );
#endregion
internal void LogOnAnonymous()
@@ -188,9 +81,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FLogOff( IntPtr self );
- private FLogOff _LogOff;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_LogOff", CallingConvention = Platform.CC)]
+ private static extern void _LogOff( IntPtr self );
#endregion
internal void LogOff()
@@ -199,10 +91,9 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_BLoggedOn", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FBLoggedOn( IntPtr self );
- private FBLoggedOn _BLoggedOn;
+ private static extern bool _BLoggedOn( IntPtr self );
#endregion
internal bool BLoggedOn()
@@ -212,10 +103,9 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_BSecure", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FBSecure( IntPtr self );
- private FBSecure _BSecure;
+ private static extern bool _BSecure( IntPtr self );
#endregion
internal bool BSecure()
@@ -225,32 +115,20 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- #if PLATFORM_WIN
- private delegate void FGetSteamID( IntPtr self, ref SteamId retVal );
- #else
- private delegate SteamId FGetSteamID( IntPtr self );
- #endif
- private FGetSteamID _GetSteamID;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_GetSteamID", CallingConvention = Platform.CC)]
+ private static extern SteamId _GetSteamID( IntPtr self );
#endregion
internal SteamId GetSteamID()
{
- #if PLATFORM_WIN
- var retVal = default( SteamId );
- _GetSteamID( Self, ref retVal );
- return retVal;
- #else
var returnValue = _GetSteamID( Self );
return returnValue;
- #endif
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_WasRestartRequested", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FWasRestartRequested( IntPtr self );
- private FWasRestartRequested _WasRestartRequested;
+ private static extern bool _WasRestartRequested( IntPtr self );
#endregion
internal bool WasRestartRequested()
@@ -260,9 +138,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FSetMaxPlayerCount( IntPtr self, int cPlayersMax );
- private FSetMaxPlayerCount _SetMaxPlayerCount;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetMaxPlayerCount", CallingConvention = Platform.CC)]
+ private static extern void _SetMaxPlayerCount( IntPtr self, int cPlayersMax );
#endregion
internal void SetMaxPlayerCount( int cPlayersMax )
@@ -271,9 +148,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FSetBotPlayerCount( IntPtr self, int cBotplayers );
- private FSetBotPlayerCount _SetBotPlayerCount;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetBotPlayerCount", CallingConvention = Platform.CC)]
+ private static extern void _SetBotPlayerCount( IntPtr self, int cBotplayers );
#endregion
internal void SetBotPlayerCount( int cBotplayers )
@@ -282,9 +158,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FSetServerName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszServerName );
- private FSetServerName _SetServerName;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetServerName", CallingConvention = Platform.CC)]
+ private static extern void _SetServerName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszServerName );
#endregion
internal void SetServerName( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszServerName )
@@ -293,9 +168,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FSetMapName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszMapName );
- private FSetMapName _SetMapName;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetMapName", CallingConvention = Platform.CC)]
+ private static extern void _SetMapName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszMapName );
#endregion
internal void SetMapName( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszMapName )
@@ -304,9 +178,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FSetPasswordProtected( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bPasswordProtected );
- private FSetPasswordProtected _SetPasswordProtected;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetPasswordProtected", CallingConvention = Platform.CC)]
+ private static extern void _SetPasswordProtected( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bPasswordProtected );
#endregion
internal void SetPasswordProtected( [MarshalAs( UnmanagedType.U1 )] bool bPasswordProtected )
@@ -315,9 +188,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FSetSpectatorPort( IntPtr self, ushort unSpectatorPort );
- private FSetSpectatorPort _SetSpectatorPort;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetSpectatorPort", CallingConvention = Platform.CC)]
+ private static extern void _SetSpectatorPort( IntPtr self, ushort unSpectatorPort );
#endregion
internal void SetSpectatorPort( ushort unSpectatorPort )
@@ -326,9 +198,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FSetSpectatorServerName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszSpectatorServerName );
- private FSetSpectatorServerName _SetSpectatorServerName;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetSpectatorServerName", CallingConvention = Platform.CC)]
+ private static extern void _SetSpectatorServerName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszSpectatorServerName );
#endregion
internal void SetSpectatorServerName( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszSpectatorServerName )
@@ -337,9 +208,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FClearAllKeyValues( IntPtr self );
- private FClearAllKeyValues _ClearAllKeyValues;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_ClearAllKeyValues", CallingConvention = Platform.CC)]
+ private static extern void _ClearAllKeyValues( IntPtr self );
#endregion
internal void ClearAllKeyValues()
@@ -348,9 +218,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FSetKeyValue( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pValue );
- private FSetKeyValue _SetKeyValue;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetKeyValue", CallingConvention = Platform.CC)]
+ private static extern void _SetKeyValue( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pValue );
#endregion
internal void SetKeyValue( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pValue )
@@ -359,9 +228,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FSetGameTags( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameTags );
- private FSetGameTags _SetGameTags;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetGameTags", CallingConvention = Platform.CC)]
+ private static extern void _SetGameTags( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameTags );
#endregion
internal void SetGameTags( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameTags )
@@ -370,9 +238,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FSetGameData( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameData );
- private FSetGameData _SetGameData;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetGameData", CallingConvention = Platform.CC)]
+ private static extern void _SetGameData( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameData );
#endregion
internal void SetGameData( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameData )
@@ -381,9 +248,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FSetRegion( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszRegion );
- private FSetRegion _SetRegion;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetRegion", CallingConvention = Platform.CC)]
+ private static extern void _SetRegion( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszRegion );
#endregion
internal void SetRegion( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszRegion )
@@ -392,68 +258,18 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- [return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FSendUserConnectAndAuthenticate( IntPtr self, uint unIPClient, IntPtr pvAuthBlob, uint cubAuthBlobSize, ref SteamId pSteamIDUser );
- private FSendUserConnectAndAuthenticate _SendUserConnectAndAuthenticate;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetAdvertiseServerActive", CallingConvention = Platform.CC)]
+ private static extern void _SetAdvertiseServerActive( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bActive );
#endregion
- internal bool SendUserConnectAndAuthenticate( uint unIPClient, IntPtr pvAuthBlob, uint cubAuthBlobSize, ref SteamId pSteamIDUser )
+ internal void SetAdvertiseServerActive( [MarshalAs( UnmanagedType.U1 )] bool bActive )
{
- var returnValue = _SendUserConnectAndAuthenticate( Self, unIPClient, pvAuthBlob, cubAuthBlobSize, ref pSteamIDUser );
- return returnValue;
+ _SetAdvertiseServerActive( Self, bActive );
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- #if PLATFORM_WIN
- private delegate void FCreateUnauthenticatedUserConnection( IntPtr self, ref SteamId retVal );
- #else
- private delegate SteamId FCreateUnauthenticatedUserConnection( IntPtr self );
- #endif
- private FCreateUnauthenticatedUserConnection _CreateUnauthenticatedUserConnection;
-
- #endregion
- internal SteamId CreateUnauthenticatedUserConnection()
- {
- #if PLATFORM_WIN
- var retVal = default( SteamId );
- _CreateUnauthenticatedUserConnection( Self, ref retVal );
- return retVal;
- #else
- var returnValue = _CreateUnauthenticatedUserConnection( Self );
- return returnValue;
- #endif
- }
-
- #region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FSendUserDisconnect( IntPtr self, SteamId steamIDUser );
- private FSendUserDisconnect _SendUserDisconnect;
-
- #endregion
- internal void SendUserDisconnect( SteamId steamIDUser )
- {
- _SendUserDisconnect( Self, steamIDUser );
- }
-
- #region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- [return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FBUpdateUserData( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPlayerName, uint uScore );
- private FBUpdateUserData _BUpdateUserData;
-
- #endregion
- internal bool BUpdateUserData( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPlayerName, uint uScore )
- {
- var returnValue = _BUpdateUserData( Self, steamIDUser, pchPlayerName, uScore );
- return returnValue;
- }
-
- #region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate HAuthTicket FGetAuthSessionTicket( IntPtr self, IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket );
- private FGetAuthSessionTicket _GetAuthSessionTicket;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_GetAuthSessionTicket", CallingConvention = Platform.CC)]
+ private static extern HAuthTicket _GetAuthSessionTicket( IntPtr self, IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket );
#endregion
internal HAuthTicket GetAuthSessionTicket( IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket )
@@ -463,9 +279,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate BeginAuthResult FBeginAuthSession( IntPtr self, IntPtr pAuthTicket, int cbAuthTicket, SteamId steamID );
- private FBeginAuthSession _BeginAuthSession;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_BeginAuthSession", CallingConvention = Platform.CC)]
+ private static extern BeginAuthResult _BeginAuthSession( IntPtr self, IntPtr pAuthTicket, int cbAuthTicket, SteamId steamID );
#endregion
internal BeginAuthResult BeginAuthSession( IntPtr pAuthTicket, int cbAuthTicket, SteamId steamID )
@@ -475,9 +290,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FEndAuthSession( IntPtr self, SteamId steamID );
- private FEndAuthSession _EndAuthSession;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_EndAuthSession", CallingConvention = Platform.CC)]
+ private static extern void _EndAuthSession( IntPtr self, SteamId steamID );
#endregion
internal void EndAuthSession( SteamId steamID )
@@ -486,9 +300,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FCancelAuthTicket( IntPtr self, HAuthTicket hAuthTicket );
- private FCancelAuthTicket _CancelAuthTicket;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_CancelAuthTicket", CallingConvention = Platform.CC)]
+ private static extern void _CancelAuthTicket( IntPtr self, HAuthTicket hAuthTicket );
#endregion
internal void CancelAuthTicket( HAuthTicket hAuthTicket )
@@ -497,9 +310,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate UserHasLicenseForAppResult FUserHasLicenseForApp( IntPtr self, SteamId steamID, AppId appID );
- private FUserHasLicenseForApp _UserHasLicenseForApp;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_UserHasLicenseForApp", CallingConvention = Platform.CC)]
+ private static extern UserHasLicenseForAppResult _UserHasLicenseForApp( IntPtr self, SteamId steamID, AppId appID );
#endregion
internal UserHasLicenseForAppResult UserHasLicenseForApp( SteamId steamID, AppId appID )
@@ -509,10 +321,9 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_RequestUserGroupStatus", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FRequestUserGroupStatus( IntPtr self, SteamId steamIDUser, SteamId steamIDGroup );
- private FRequestUserGroupStatus _RequestUserGroupStatus;
+ private static extern bool _RequestUserGroupStatus( IntPtr self, SteamId steamIDUser, SteamId steamIDGroup );
#endregion
internal bool RequestUserGroupStatus( SteamId steamIDUser, SteamId steamIDGroup )
@@ -522,9 +333,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FGetGameplayStats( IntPtr self );
- private FGetGameplayStats _GetGameplayStats;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_GetGameplayStats", CallingConvention = Platform.CC)]
+ private static extern void _GetGameplayStats( IntPtr self );
#endregion
internal void GetGameplayStats()
@@ -533,34 +343,31 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate SteamAPICall_t FGetServerReputation( IntPtr self );
- private FGetServerReputation _GetServerReputation;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_GetServerReputation", CallingConvention = Platform.CC)]
+ private static extern SteamAPICall_t _GetServerReputation( IntPtr self );
#endregion
- internal async Task GetServerReputation()
+ internal CallResult GetServerReputation()
{
var returnValue = _GetServerReputation( Self );
- return await GSReputation_t.GetResultAsync( returnValue );
+ return new CallResult( returnValue, IsServer );
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate uint FGetPublicIP( IntPtr self );
- private FGetPublicIP _GetPublicIP;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_GetPublicIP", CallingConvention = Platform.CC)]
+ private static extern SteamIPAddress _GetPublicIP( IntPtr self );
#endregion
- internal uint GetPublicIP()
+ internal SteamIPAddress GetPublicIP()
{
var returnValue = _GetPublicIP( Self );
return returnValue;
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_HandleIncomingPacket", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FHandleIncomingPacket( IntPtr self, IntPtr pData, int cbData, uint srcIP, ushort srcPort );
- private FHandleIncomingPacket _HandleIncomingPacket;
+ private static extern bool _HandleIncomingPacket( IntPtr self, IntPtr pData, int cbData, uint srcIP, ushort srcPort );
#endregion
internal bool HandleIncomingPacket( IntPtr pData, int cbData, uint srcIP, ushort srcPort )
@@ -570,9 +377,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate int FGetNextOutgoingPacket( IntPtr self, IntPtr pOut, int cbMaxOut, ref uint pNetAdr, ref ushort pPort );
- private FGetNextOutgoingPacket _GetNextOutgoingPacket;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_GetNextOutgoingPacket", CallingConvention = Platform.CC)]
+ private static extern int _GetNextOutgoingPacket( IntPtr self, IntPtr pOut, int cbMaxOut, ref uint pNetAdr, ref ushort pPort );
#endregion
internal int GetNextOutgoingPacket( IntPtr pOut, int cbMaxOut, ref uint pNetAdr, ref ushort pPort )
@@ -582,60 +388,70 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FEnableHeartbeats( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bActive );
- private FEnableHeartbeats _EnableHeartbeats;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_AssociateWithClan", CallingConvention = Platform.CC)]
+ private static extern SteamAPICall_t _AssociateWithClan( IntPtr self, SteamId steamIDClan );
#endregion
- internal void EnableHeartbeats( [MarshalAs( UnmanagedType.U1 )] bool bActive )
- {
- _EnableHeartbeats( Self, bActive );
- }
-
- #region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FSetHeartbeatInterval( IntPtr self, int iHeartbeatInterval );
- private FSetHeartbeatInterval _SetHeartbeatInterval;
-
- #endregion
- internal void SetHeartbeatInterval( int iHeartbeatInterval )
- {
- _SetHeartbeatInterval( Self, iHeartbeatInterval );
- }
-
- #region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FForceHeartbeat( IntPtr self );
- private FForceHeartbeat _ForceHeartbeat;
-
- #endregion
- internal void ForceHeartbeat()
- {
- _ForceHeartbeat( Self );
- }
-
- #region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate SteamAPICall_t FAssociateWithClan( IntPtr self, SteamId steamIDClan );
- private FAssociateWithClan _AssociateWithClan;
-
- #endregion
- internal async Task AssociateWithClan( SteamId steamIDClan )
+ internal CallResult AssociateWithClan( SteamId steamIDClan )
{
var returnValue = _AssociateWithClan( Self, steamIDClan );
- return await AssociateWithClanResult_t.GetResultAsync( returnValue );
+ return new CallResult( returnValue, IsServer );
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate SteamAPICall_t FComputeNewPlayerCompatibility( IntPtr self, SteamId steamIDNewPlayer );
- private FComputeNewPlayerCompatibility _ComputeNewPlayerCompatibility;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_ComputeNewPlayerCompatibility", CallingConvention = Platform.CC)]
+ private static extern SteamAPICall_t _ComputeNewPlayerCompatibility( IntPtr self, SteamId steamIDNewPlayer );
#endregion
- internal async Task ComputeNewPlayerCompatibility( SteamId steamIDNewPlayer )
+ internal CallResult ComputeNewPlayerCompatibility( SteamId steamIDNewPlayer )
{
var returnValue = _ComputeNewPlayerCompatibility( Self, steamIDNewPlayer );
- return await ComputeNewPlayerCompatibilityResult_t.GetResultAsync( returnValue );
+ return new CallResult( returnValue, IsServer );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SendUserConnectAndAuthenticate_DEPRECATED", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _SendUserConnectAndAuthenticate_DEPRECATED( IntPtr self, uint unIPClient, IntPtr pvAuthBlob, uint cubAuthBlobSize, ref SteamId pSteamIDUser );
+
+ #endregion
+ internal bool SendUserConnectAndAuthenticate_DEPRECATED( uint unIPClient, IntPtr pvAuthBlob, uint cubAuthBlobSize, ref SteamId pSteamIDUser )
+ {
+ var returnValue = _SendUserConnectAndAuthenticate_DEPRECATED( Self, unIPClient, pvAuthBlob, cubAuthBlobSize, ref pSteamIDUser );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_CreateUnauthenticatedUserConnection", CallingConvention = Platform.CC)]
+ private static extern SteamId _CreateUnauthenticatedUserConnection( IntPtr self );
+
+ #endregion
+ internal SteamId CreateUnauthenticatedUserConnection()
+ {
+ var returnValue = _CreateUnauthenticatedUserConnection( Self );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SendUserDisconnect_DEPRECATED", CallingConvention = Platform.CC)]
+ private static extern void _SendUserDisconnect_DEPRECATED( IntPtr self, SteamId steamIDUser );
+
+ #endregion
+ internal void SendUserDisconnect_DEPRECATED( SteamId steamIDUser )
+ {
+ _SendUserDisconnect_DEPRECATED( Self, steamIDUser );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_BUpdateUserData", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _BUpdateUserData( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPlayerName, uint uScore );
+
+ #endregion
+ internal bool BUpdateUserData( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPlayerName, uint uScore )
+ {
+ var returnValue = _BUpdateUserData( Self, steamIDUser, pchPlayerName, uScore );
+ return returnValue;
}
}
diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamGameServerStats.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamGameServerStats.cs
index 108b728..de293cb 100644
--- a/Facepunch.Steamworks/Generated/Interfaces/ISteamGameServerStats.cs
+++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamGameServerStats.cs
@@ -7,90 +7,58 @@ using Steamworks.Data;
namespace Steamworks
{
- internal class ISteamGameServerStats : SteamInterface
+ internal unsafe class ISteamGameServerStats : SteamInterface
{
- public override string InterfaceName => "SteamGameServerStats001";
- public override void InitInternals()
+ internal ISteamGameServerStats( bool IsGameServer )
{
- _RequestUserStats = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
- _GetUserAchievement = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
- _UpdateUserAvgRateStat = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
- _SetUserAchievement = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
- _ClearUserAchievement = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) );
- _StoreUserStats = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) );
-
- #if PLATFORM_WIN
- _GetUserStat1 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
- _GetUserStat2 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
- _SetUserStat1 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
- _SetUserStat2 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
- #else
- _GetUserStat1 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
- _GetUserStat2 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
- _SetUserStat1 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
- _SetUserStat2 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
- #endif
- }
- internal override void Shutdown()
- {
- base.Shutdown();
-
- _RequestUserStats = null;
- _GetUserStat1 = null;
- _GetUserStat2 = null;
- _GetUserAchievement = null;
- _SetUserStat1 = null;
- _SetUserStat2 = null;
- _UpdateUserAvgRateStat = null;
- _SetUserAchievement = null;
- _ClearUserAchievement = null;
- _StoreUserStats = null;
+ SetupInterface( IsGameServer );
}
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameServerStats_v001", CallingConvention = Platform.CC)]
+ internal static extern IntPtr SteamAPI_SteamGameServerStats_v001();
+ public override IntPtr GetServerInterfacePointer() => SteamAPI_SteamGameServerStats_v001();
+
+
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate SteamAPICall_t FRequestUserStats( IntPtr self, SteamId steamIDUser );
- private FRequestUserStats _RequestUserStats;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_RequestUserStats", CallingConvention = Platform.CC)]
+ private static extern SteamAPICall_t _RequestUserStats( IntPtr self, SteamId steamIDUser );
#endregion
- internal async Task RequestUserStats( SteamId steamIDUser )
+ internal CallResult RequestUserStats( SteamId steamIDUser )
{
var returnValue = _RequestUserStats( Self, steamIDUser );
- return await GSStatsReceived_t.GetResultAsync( returnValue );
+ return new CallResult( returnValue, IsServer );
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_GetUserStatInt32", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FGetUserStat1( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData );
- private FGetUserStat1 _GetUserStat1;
+ private static extern bool _GetUserStat( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData );
#endregion
- internal bool GetUserStat1( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData )
+ internal bool GetUserStat( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData )
{
- var returnValue = _GetUserStat1( Self, steamIDUser, pchName, ref pData );
+ var returnValue = _GetUserStat( Self, steamIDUser, pchName, ref pData );
return returnValue;
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_GetUserStatFloat", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FGetUserStat2( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData );
- private FGetUserStat2 _GetUserStat2;
+ private static extern bool _GetUserStat( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData );
#endregion
- internal bool GetUserStat2( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData )
+ internal bool GetUserStat( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData )
{
- var returnValue = _GetUserStat2( Self, steamIDUser, pchName, ref pData );
+ var returnValue = _GetUserStat( Self, steamIDUser, pchName, ref pData );
return returnValue;
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_GetUserAchievement", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FGetUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved );
- private FGetUserAchievement _GetUserAchievement;
+ private static extern bool _GetUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved );
#endregion
internal bool GetUserAchievement( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved )
@@ -100,36 +68,33 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_SetUserStatInt32", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FSetUserStat1( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData );
- private FSetUserStat1 _SetUserStat1;
+ private static extern bool _SetUserStat( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData );
#endregion
- internal bool SetUserStat1( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData )
+ internal bool SetUserStat( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData )
{
- var returnValue = _SetUserStat1( Self, steamIDUser, pchName, nData );
+ var returnValue = _SetUserStat( Self, steamIDUser, pchName, nData );
return returnValue;
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_SetUserStatFloat", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FSetUserStat2( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData );
- private FSetUserStat2 _SetUserStat2;
+ private static extern bool _SetUserStat( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData );
#endregion
- internal bool SetUserStat2( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData )
+ internal bool SetUserStat( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData )
{
- var returnValue = _SetUserStat2( Self, steamIDUser, pchName, fData );
+ var returnValue = _SetUserStat( Self, steamIDUser, pchName, fData );
return returnValue;
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_UpdateUserAvgRateStat", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FUpdateUserAvgRateStat( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float flCountThisSession, double dSessionLength );
- private FUpdateUserAvgRateStat _UpdateUserAvgRateStat;
+ private static extern bool _UpdateUserAvgRateStat( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float flCountThisSession, double dSessionLength );
#endregion
internal bool UpdateUserAvgRateStat( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float flCountThisSession, double dSessionLength )
@@ -139,10 +104,9 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_SetUserAchievement", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FSetUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
- private FSetUserAchievement _SetUserAchievement;
+ private static extern bool _SetUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
#endregion
internal bool SetUserAchievement( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName )
@@ -152,10 +116,9 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_ClearUserAchievement", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FClearUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
- private FClearUserAchievement _ClearUserAchievement;
+ private static extern bool _ClearUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
#endregion
internal bool ClearUserAchievement( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName )
@@ -165,15 +128,14 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate SteamAPICall_t FStoreUserStats( IntPtr self, SteamId steamIDUser );
- private FStoreUserStats _StoreUserStats;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_StoreUserStats", CallingConvention = Platform.CC)]
+ private static extern SteamAPICall_t _StoreUserStats( IntPtr self, SteamId steamIDUser );
#endregion
- internal async Task StoreUserStats( SteamId steamIDUser )
+ internal CallResult StoreUserStats( SteamId steamIDUser )
{
var returnValue = _StoreUserStats( Self, steamIDUser );
- return await GSStatsStored_t.GetResultAsync( returnValue );
+ return new CallResult( returnValue, IsServer );
}
}
diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamHTMLSurface.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamHTMLSurface.cs
new file mode 100644
index 0000000..38c6b46
--- /dev/null
+++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamHTMLSurface.cs
@@ -0,0 +1,399 @@
+using System;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Threading.Tasks;
+using Steamworks.Data;
+
+
+namespace Steamworks
+{
+ internal unsafe class ISteamHTMLSurface : SteamInterface
+ {
+
+ internal ISteamHTMLSurface( bool IsGameServer )
+ {
+ SetupInterface( IsGameServer );
+ }
+
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamHTMLSurface_v005", CallingConvention = Platform.CC)]
+ internal static extern IntPtr SteamAPI_SteamHTMLSurface_v005();
+ public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamHTMLSurface_v005();
+
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_Init", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _Init( IntPtr self );
+
+ #endregion
+ internal bool Init()
+ {
+ var returnValue = _Init( Self );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_Shutdown", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _Shutdown( IntPtr self );
+
+ #endregion
+ internal bool Shutdown()
+ {
+ var returnValue = _Shutdown( Self );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_CreateBrowser", CallingConvention = Platform.CC)]
+ private static extern SteamAPICall_t _CreateBrowser( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchUserAgent, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchUserCSS );
+
+ #endregion
+ internal CallResult CreateBrowser( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchUserAgent, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchUserCSS )
+ {
+ var returnValue = _CreateBrowser( Self, pchUserAgent, pchUserCSS );
+ return new CallResult( returnValue, IsServer );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_RemoveBrowser", CallingConvention = Platform.CC)]
+ private static extern void _RemoveBrowser( IntPtr self, HHTMLBrowser unBrowserHandle );
+
+ #endregion
+ internal void RemoveBrowser( HHTMLBrowser unBrowserHandle )
+ {
+ _RemoveBrowser( Self, unBrowserHandle );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_LoadURL", CallingConvention = Platform.CC)]
+ private static extern void _LoadURL( IntPtr self, HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchURL, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPostData );
+
+ #endregion
+ internal void LoadURL( HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchURL, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPostData )
+ {
+ _LoadURL( Self, unBrowserHandle, pchURL, pchPostData );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_SetSize", CallingConvention = Platform.CC)]
+ private static extern void _SetSize( IntPtr self, HHTMLBrowser unBrowserHandle, uint unWidth, uint unHeight );
+
+ #endregion
+ internal void SetSize( HHTMLBrowser unBrowserHandle, uint unWidth, uint unHeight )
+ {
+ _SetSize( Self, unBrowserHandle, unWidth, unHeight );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_StopLoad", CallingConvention = Platform.CC)]
+ private static extern void _StopLoad( IntPtr self, HHTMLBrowser unBrowserHandle );
+
+ #endregion
+ internal void StopLoad( HHTMLBrowser unBrowserHandle )
+ {
+ _StopLoad( Self, unBrowserHandle );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_Reload", CallingConvention = Platform.CC)]
+ private static extern void _Reload( IntPtr self, HHTMLBrowser unBrowserHandle );
+
+ #endregion
+ internal void Reload( HHTMLBrowser unBrowserHandle )
+ {
+ _Reload( Self, unBrowserHandle );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_GoBack", CallingConvention = Platform.CC)]
+ private static extern void _GoBack( IntPtr self, HHTMLBrowser unBrowserHandle );
+
+ #endregion
+ internal void GoBack( HHTMLBrowser unBrowserHandle )
+ {
+ _GoBack( Self, unBrowserHandle );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_GoForward", CallingConvention = Platform.CC)]
+ private static extern void _GoForward( IntPtr self, HHTMLBrowser unBrowserHandle );
+
+ #endregion
+ internal void GoForward( HHTMLBrowser unBrowserHandle )
+ {
+ _GoForward( Self, unBrowserHandle );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_AddHeader", CallingConvention = Platform.CC)]
+ private static extern void _AddHeader( IntPtr self, HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue );
+
+ #endregion
+ internal void AddHeader( HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue )
+ {
+ _AddHeader( Self, unBrowserHandle, pchKey, pchValue );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_ExecuteJavascript", CallingConvention = Platform.CC)]
+ private static extern void _ExecuteJavascript( IntPtr self, HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchScript );
+
+ #endregion
+ internal void ExecuteJavascript( HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchScript )
+ {
+ _ExecuteJavascript( Self, unBrowserHandle, pchScript );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_MouseUp", CallingConvention = Platform.CC)]
+ private static extern void _MouseUp( IntPtr self, HHTMLBrowser unBrowserHandle, IntPtr eMouseButton );
+
+ #endregion
+ internal void MouseUp( HHTMLBrowser unBrowserHandle, IntPtr eMouseButton )
+ {
+ _MouseUp( Self, unBrowserHandle, eMouseButton );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_MouseDown", CallingConvention = Platform.CC)]
+ private static extern void _MouseDown( IntPtr self, HHTMLBrowser unBrowserHandle, IntPtr eMouseButton );
+
+ #endregion
+ internal void MouseDown( HHTMLBrowser unBrowserHandle, IntPtr eMouseButton )
+ {
+ _MouseDown( Self, unBrowserHandle, eMouseButton );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_MouseDoubleClick", CallingConvention = Platform.CC)]
+ private static extern void _MouseDoubleClick( IntPtr self, HHTMLBrowser unBrowserHandle, IntPtr eMouseButton );
+
+ #endregion
+ internal void MouseDoubleClick( HHTMLBrowser unBrowserHandle, IntPtr eMouseButton )
+ {
+ _MouseDoubleClick( Self, unBrowserHandle, eMouseButton );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_MouseMove", CallingConvention = Platform.CC)]
+ private static extern void _MouseMove( IntPtr self, HHTMLBrowser unBrowserHandle, int x, int y );
+
+ #endregion
+ internal void MouseMove( HHTMLBrowser unBrowserHandle, int x, int y )
+ {
+ _MouseMove( Self, unBrowserHandle, x, y );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_MouseWheel", CallingConvention = Platform.CC)]
+ private static extern void _MouseWheel( IntPtr self, HHTMLBrowser unBrowserHandle, int nDelta );
+
+ #endregion
+ internal void MouseWheel( HHTMLBrowser unBrowserHandle, int nDelta )
+ {
+ _MouseWheel( Self, unBrowserHandle, nDelta );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_KeyDown", CallingConvention = Platform.CC)]
+ private static extern void _KeyDown( IntPtr self, HHTMLBrowser unBrowserHandle, uint nNativeKeyCode, IntPtr eHTMLKeyModifiers, [MarshalAs( UnmanagedType.U1 )] bool bIsSystemKey );
+
+ #endregion
+ internal void KeyDown( HHTMLBrowser unBrowserHandle, uint nNativeKeyCode, IntPtr eHTMLKeyModifiers, [MarshalAs( UnmanagedType.U1 )] bool bIsSystemKey )
+ {
+ _KeyDown( Self, unBrowserHandle, nNativeKeyCode, eHTMLKeyModifiers, bIsSystemKey );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_KeyUp", CallingConvention = Platform.CC)]
+ private static extern void _KeyUp( IntPtr self, HHTMLBrowser unBrowserHandle, uint nNativeKeyCode, IntPtr eHTMLKeyModifiers );
+
+ #endregion
+ internal void KeyUp( HHTMLBrowser unBrowserHandle, uint nNativeKeyCode, IntPtr eHTMLKeyModifiers )
+ {
+ _KeyUp( Self, unBrowserHandle, nNativeKeyCode, eHTMLKeyModifiers );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_KeyChar", CallingConvention = Platform.CC)]
+ private static extern void _KeyChar( IntPtr self, HHTMLBrowser unBrowserHandle, uint cUnicodeChar, IntPtr eHTMLKeyModifiers );
+
+ #endregion
+ internal void KeyChar( HHTMLBrowser unBrowserHandle, uint cUnicodeChar, IntPtr eHTMLKeyModifiers )
+ {
+ _KeyChar( Self, unBrowserHandle, cUnicodeChar, eHTMLKeyModifiers );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_SetHorizontalScroll", CallingConvention = Platform.CC)]
+ private static extern void _SetHorizontalScroll( IntPtr self, HHTMLBrowser unBrowserHandle, uint nAbsolutePixelScroll );
+
+ #endregion
+ internal void SetHorizontalScroll( HHTMLBrowser unBrowserHandle, uint nAbsolutePixelScroll )
+ {
+ _SetHorizontalScroll( Self, unBrowserHandle, nAbsolutePixelScroll );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_SetVerticalScroll", CallingConvention = Platform.CC)]
+ private static extern void _SetVerticalScroll( IntPtr self, HHTMLBrowser unBrowserHandle, uint nAbsolutePixelScroll );
+
+ #endregion
+ internal void SetVerticalScroll( HHTMLBrowser unBrowserHandle, uint nAbsolutePixelScroll )
+ {
+ _SetVerticalScroll( Self, unBrowserHandle, nAbsolutePixelScroll );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_SetKeyFocus", CallingConvention = Platform.CC)]
+ private static extern void _SetKeyFocus( IntPtr self, HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.U1 )] bool bHasKeyFocus );
+
+ #endregion
+ internal void SetKeyFocus( HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.U1 )] bool bHasKeyFocus )
+ {
+ _SetKeyFocus( Self, unBrowserHandle, bHasKeyFocus );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_ViewSource", CallingConvention = Platform.CC)]
+ private static extern void _ViewSource( IntPtr self, HHTMLBrowser unBrowserHandle );
+
+ #endregion
+ internal void ViewSource( HHTMLBrowser unBrowserHandle )
+ {
+ _ViewSource( Self, unBrowserHandle );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_CopyToClipboard", CallingConvention = Platform.CC)]
+ private static extern void _CopyToClipboard( IntPtr self, HHTMLBrowser unBrowserHandle );
+
+ #endregion
+ internal void CopyToClipboard( HHTMLBrowser unBrowserHandle )
+ {
+ _CopyToClipboard( Self, unBrowserHandle );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_PasteFromClipboard", CallingConvention = Platform.CC)]
+ private static extern void _PasteFromClipboard( IntPtr self, HHTMLBrowser unBrowserHandle );
+
+ #endregion
+ internal void PasteFromClipboard( HHTMLBrowser unBrowserHandle )
+ {
+ _PasteFromClipboard( Self, unBrowserHandle );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_Find", CallingConvention = Platform.CC)]
+ private static extern void _Find( IntPtr self, HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchSearchStr, [MarshalAs( UnmanagedType.U1 )] bool bCurrentlyInFind, [MarshalAs( UnmanagedType.U1 )] bool bReverse );
+
+ #endregion
+ internal void Find( HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchSearchStr, [MarshalAs( UnmanagedType.U1 )] bool bCurrentlyInFind, [MarshalAs( UnmanagedType.U1 )] bool bReverse )
+ {
+ _Find( Self, unBrowserHandle, pchSearchStr, bCurrentlyInFind, bReverse );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_StopFind", CallingConvention = Platform.CC)]
+ private static extern void _StopFind( IntPtr self, HHTMLBrowser unBrowserHandle );
+
+ #endregion
+ internal void StopFind( HHTMLBrowser unBrowserHandle )
+ {
+ _StopFind( Self, unBrowserHandle );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_GetLinkAtPosition", CallingConvention = Platform.CC)]
+ private static extern void _GetLinkAtPosition( IntPtr self, HHTMLBrowser unBrowserHandle, int x, int y );
+
+ #endregion
+ internal void GetLinkAtPosition( HHTMLBrowser unBrowserHandle, int x, int y )
+ {
+ _GetLinkAtPosition( Self, unBrowserHandle, x, y );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_SetCookie", CallingConvention = Platform.CC)]
+ private static extern void _SetCookie( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHostname, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPath, RTime32 nExpires, [MarshalAs( UnmanagedType.U1 )] bool bSecure, [MarshalAs( UnmanagedType.U1 )] bool bHTTPOnly );
+
+ #endregion
+ internal void SetCookie( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHostname, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPath, RTime32 nExpires, [MarshalAs( UnmanagedType.U1 )] bool bSecure, [MarshalAs( UnmanagedType.U1 )] bool bHTTPOnly )
+ {
+ _SetCookie( Self, pchHostname, pchKey, pchValue, pchPath, nExpires, bSecure, bHTTPOnly );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_SetPageScaleFactor", CallingConvention = Platform.CC)]
+ private static extern void _SetPageScaleFactor( IntPtr self, HHTMLBrowser unBrowserHandle, float flZoom, int nPointX, int nPointY );
+
+ #endregion
+ internal void SetPageScaleFactor( HHTMLBrowser unBrowserHandle, float flZoom, int nPointX, int nPointY )
+ {
+ _SetPageScaleFactor( Self, unBrowserHandle, flZoom, nPointX, nPointY );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_SetBackgroundMode", CallingConvention = Platform.CC)]
+ private static extern void _SetBackgroundMode( IntPtr self, HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.U1 )] bool bBackgroundMode );
+
+ #endregion
+ internal void SetBackgroundMode( HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.U1 )] bool bBackgroundMode )
+ {
+ _SetBackgroundMode( Self, unBrowserHandle, bBackgroundMode );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_SetDPIScalingFactor", CallingConvention = Platform.CC)]
+ private static extern void _SetDPIScalingFactor( IntPtr self, HHTMLBrowser unBrowserHandle, float flDPIScaling );
+
+ #endregion
+ internal void SetDPIScalingFactor( HHTMLBrowser unBrowserHandle, float flDPIScaling )
+ {
+ _SetDPIScalingFactor( Self, unBrowserHandle, flDPIScaling );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_OpenDeveloperTools", CallingConvention = Platform.CC)]
+ private static extern void _OpenDeveloperTools( IntPtr self, HHTMLBrowser unBrowserHandle );
+
+ #endregion
+ internal void OpenDeveloperTools( HHTMLBrowser unBrowserHandle )
+ {
+ _OpenDeveloperTools( Self, unBrowserHandle );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_AllowStartRequest", CallingConvention = Platform.CC)]
+ private static extern void _AllowStartRequest( IntPtr self, HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.U1 )] bool bAllowed );
+
+ #endregion
+ internal void AllowStartRequest( HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.U1 )] bool bAllowed )
+ {
+ _AllowStartRequest( Self, unBrowserHandle, bAllowed );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_JSDialogResponse", CallingConvention = Platform.CC)]
+ private static extern void _JSDialogResponse( IntPtr self, HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.U1 )] bool bResult );
+
+ #endregion
+ internal void JSDialogResponse( HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.U1 )] bool bResult )
+ {
+ _JSDialogResponse( Self, unBrowserHandle, bResult );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_FileLoadDialogResponse", CallingConvention = Platform.CC)]
+ private static extern void _FileLoadDialogResponse( IntPtr self, HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchSelectedFiles );
+
+ #endregion
+ internal void FileLoadDialogResponse( HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchSelectedFiles )
+ {
+ _FileLoadDialogResponse( Self, unBrowserHandle, pchSelectedFiles );
+ }
+
+ }
+}
diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamHTTP.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamHTTP.cs
new file mode 100644
index 0000000..599054b
--- /dev/null
+++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamHTTP.cs
@@ -0,0 +1,325 @@
+using System;
+using System.Runtime.InteropServices;
+using System.Text;
+using System.Threading.Tasks;
+using Steamworks.Data;
+
+
+namespace Steamworks
+{
+ internal unsafe class ISteamHTTP : SteamInterface
+ {
+
+ internal ISteamHTTP( bool IsGameServer )
+ {
+ SetupInterface( IsGameServer );
+ }
+
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamHTTP_v003", CallingConvention = Platform.CC)]
+ internal static extern IntPtr SteamAPI_SteamHTTP_v003();
+ public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamHTTP_v003();
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameServerHTTP_v003", CallingConvention = Platform.CC)]
+ internal static extern IntPtr SteamAPI_SteamGameServerHTTP_v003();
+ public override IntPtr GetServerInterfacePointer() => SteamAPI_SteamGameServerHTTP_v003();
+
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_CreateHTTPRequest", CallingConvention = Platform.CC)]
+ private static extern HTTPRequestHandle _CreateHTTPRequest( IntPtr self, HTTPMethod eHTTPRequestMethod, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchAbsoluteURL );
+
+ #endregion
+ internal HTTPRequestHandle CreateHTTPRequest( HTTPMethod eHTTPRequestMethod, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchAbsoluteURL )
+ {
+ var returnValue = _CreateHTTPRequest( Self, eHTTPRequestMethod, pchAbsoluteURL );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestContextValue", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _SetHTTPRequestContextValue( IntPtr self, HTTPRequestHandle hRequest, ulong ulContextValue );
+
+ #endregion
+ internal bool SetHTTPRequestContextValue( HTTPRequestHandle hRequest, ulong ulContextValue )
+ {
+ var returnValue = _SetHTTPRequestContextValue( Self, hRequest, ulContextValue );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestNetworkActivityTimeout", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _SetHTTPRequestNetworkActivityTimeout( IntPtr self, HTTPRequestHandle hRequest, uint unTimeoutSeconds );
+
+ #endregion
+ internal bool SetHTTPRequestNetworkActivityTimeout( HTTPRequestHandle hRequest, uint unTimeoutSeconds )
+ {
+ var returnValue = _SetHTTPRequestNetworkActivityTimeout( Self, hRequest, unTimeoutSeconds );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestHeaderValue", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _SetHTTPRequestHeaderValue( IntPtr self, HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHeaderName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHeaderValue );
+
+ #endregion
+ internal bool SetHTTPRequestHeaderValue( HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHeaderName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHeaderValue )
+ {
+ var returnValue = _SetHTTPRequestHeaderValue( Self, hRequest, pchHeaderName, pchHeaderValue );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestGetOrPostParameter", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _SetHTTPRequestGetOrPostParameter( IntPtr self, HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchParamName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchParamValue );
+
+ #endregion
+ internal bool SetHTTPRequestGetOrPostParameter( HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchParamName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchParamValue )
+ {
+ var returnValue = _SetHTTPRequestGetOrPostParameter( Self, hRequest, pchParamName, pchParamValue );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SendHTTPRequest", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _SendHTTPRequest( IntPtr self, HTTPRequestHandle hRequest, ref SteamAPICall_t pCallHandle );
+
+ #endregion
+ internal bool SendHTTPRequest( HTTPRequestHandle hRequest, ref SteamAPICall_t pCallHandle )
+ {
+ var returnValue = _SendHTTPRequest( Self, hRequest, ref pCallHandle );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SendHTTPRequestAndStreamResponse", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _SendHTTPRequestAndStreamResponse( IntPtr self, HTTPRequestHandle hRequest, ref SteamAPICall_t pCallHandle );
+
+ #endregion
+ internal bool SendHTTPRequestAndStreamResponse( HTTPRequestHandle hRequest, ref SteamAPICall_t pCallHandle )
+ {
+ var returnValue = _SendHTTPRequestAndStreamResponse( Self, hRequest, ref pCallHandle );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_DeferHTTPRequest", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _DeferHTTPRequest( IntPtr self, HTTPRequestHandle hRequest );
+
+ #endregion
+ internal bool DeferHTTPRequest( HTTPRequestHandle hRequest )
+ {
+ var returnValue = _DeferHTTPRequest( Self, hRequest );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_PrioritizeHTTPRequest", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _PrioritizeHTTPRequest( IntPtr self, HTTPRequestHandle hRequest );
+
+ #endregion
+ internal bool PrioritizeHTTPRequest( HTTPRequestHandle hRequest )
+ {
+ var returnValue = _PrioritizeHTTPRequest( Self, hRequest );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_GetHTTPResponseHeaderSize", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _GetHTTPResponseHeaderSize( IntPtr self, HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHeaderName, ref uint unResponseHeaderSize );
+
+ #endregion
+ internal bool GetHTTPResponseHeaderSize( HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHeaderName, ref uint unResponseHeaderSize )
+ {
+ var returnValue = _GetHTTPResponseHeaderSize( Self, hRequest, pchHeaderName, ref unResponseHeaderSize );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_GetHTTPResponseHeaderValue", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _GetHTTPResponseHeaderValue( IntPtr self, HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHeaderName, ref byte pHeaderValueBuffer, uint unBufferSize );
+
+ #endregion
+ internal bool GetHTTPResponseHeaderValue( HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHeaderName, ref byte pHeaderValueBuffer, uint unBufferSize )
+ {
+ var returnValue = _GetHTTPResponseHeaderValue( Self, hRequest, pchHeaderName, ref pHeaderValueBuffer, unBufferSize );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_GetHTTPResponseBodySize", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _GetHTTPResponseBodySize( IntPtr self, HTTPRequestHandle hRequest, ref uint unBodySize );
+
+ #endregion
+ internal bool GetHTTPResponseBodySize( HTTPRequestHandle hRequest, ref uint unBodySize )
+ {
+ var returnValue = _GetHTTPResponseBodySize( Self, hRequest, ref unBodySize );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_GetHTTPResponseBodyData", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _GetHTTPResponseBodyData( IntPtr self, HTTPRequestHandle hRequest, ref byte pBodyDataBuffer, uint unBufferSize );
+
+ #endregion
+ internal bool GetHTTPResponseBodyData( HTTPRequestHandle hRequest, ref byte pBodyDataBuffer, uint unBufferSize )
+ {
+ var returnValue = _GetHTTPResponseBodyData( Self, hRequest, ref pBodyDataBuffer, unBufferSize );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_GetHTTPStreamingResponseBodyData", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _GetHTTPStreamingResponseBodyData( IntPtr self, HTTPRequestHandle hRequest, uint cOffset, ref byte pBodyDataBuffer, uint unBufferSize );
+
+ #endregion
+ internal bool GetHTTPStreamingResponseBodyData( HTTPRequestHandle hRequest, uint cOffset, ref byte pBodyDataBuffer, uint unBufferSize )
+ {
+ var returnValue = _GetHTTPStreamingResponseBodyData( Self, hRequest, cOffset, ref pBodyDataBuffer, unBufferSize );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_ReleaseHTTPRequest", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _ReleaseHTTPRequest( IntPtr self, HTTPRequestHandle hRequest );
+
+ #endregion
+ internal bool ReleaseHTTPRequest( HTTPRequestHandle hRequest )
+ {
+ var returnValue = _ReleaseHTTPRequest( Self, hRequest );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_GetHTTPDownloadProgressPct", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _GetHTTPDownloadProgressPct( IntPtr self, HTTPRequestHandle hRequest, ref float pflPercentOut );
+
+ #endregion
+ internal bool GetHTTPDownloadProgressPct( HTTPRequestHandle hRequest, ref float pflPercentOut )
+ {
+ var returnValue = _GetHTTPDownloadProgressPct( Self, hRequest, ref pflPercentOut );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestRawPostBody", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _SetHTTPRequestRawPostBody( IntPtr self, HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchContentType, [In,Out] byte[] pubBody, uint unBodyLen );
+
+ #endregion
+ internal bool SetHTTPRequestRawPostBody( HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchContentType, [In,Out] byte[] pubBody, uint unBodyLen )
+ {
+ var returnValue = _SetHTTPRequestRawPostBody( Self, hRequest, pchContentType, pubBody, unBodyLen );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_CreateCookieContainer", CallingConvention = Platform.CC)]
+ private static extern HTTPCookieContainerHandle _CreateCookieContainer( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bAllowResponsesToModify );
+
+ #endregion
+ internal HTTPCookieContainerHandle CreateCookieContainer( [MarshalAs( UnmanagedType.U1 )] bool bAllowResponsesToModify )
+ {
+ var returnValue = _CreateCookieContainer( Self, bAllowResponsesToModify );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_ReleaseCookieContainer", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _ReleaseCookieContainer( IntPtr self, HTTPCookieContainerHandle hCookieContainer );
+
+ #endregion
+ internal bool ReleaseCookieContainer( HTTPCookieContainerHandle hCookieContainer )
+ {
+ var returnValue = _ReleaseCookieContainer( Self, hCookieContainer );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetCookie", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _SetCookie( IntPtr self, HTTPCookieContainerHandle hCookieContainer, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHost, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchUrl, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchCookie );
+
+ #endregion
+ internal bool SetCookie( HTTPCookieContainerHandle hCookieContainer, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHost, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchUrl, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchCookie )
+ {
+ var returnValue = _SetCookie( Self, hCookieContainer, pchHost, pchUrl, pchCookie );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestCookieContainer", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _SetHTTPRequestCookieContainer( IntPtr self, HTTPRequestHandle hRequest, HTTPCookieContainerHandle hCookieContainer );
+
+ #endregion
+ internal bool SetHTTPRequestCookieContainer( HTTPRequestHandle hRequest, HTTPCookieContainerHandle hCookieContainer )
+ {
+ var returnValue = _SetHTTPRequestCookieContainer( Self, hRequest, hCookieContainer );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestUserAgentInfo", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _SetHTTPRequestUserAgentInfo( IntPtr self, HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchUserAgentInfo );
+
+ #endregion
+ internal bool SetHTTPRequestUserAgentInfo( HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchUserAgentInfo )
+ {
+ var returnValue = _SetHTTPRequestUserAgentInfo( Self, hRequest, pchUserAgentInfo );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestRequiresVerifiedCertificate", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _SetHTTPRequestRequiresVerifiedCertificate( IntPtr self, HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.U1 )] bool bRequireVerifiedCertificate );
+
+ #endregion
+ internal bool SetHTTPRequestRequiresVerifiedCertificate( HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.U1 )] bool bRequireVerifiedCertificate )
+ {
+ var returnValue = _SetHTTPRequestRequiresVerifiedCertificate( Self, hRequest, bRequireVerifiedCertificate );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestAbsoluteTimeoutMS", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _SetHTTPRequestAbsoluteTimeoutMS( IntPtr self, HTTPRequestHandle hRequest, uint unMilliseconds );
+
+ #endregion
+ internal bool SetHTTPRequestAbsoluteTimeoutMS( HTTPRequestHandle hRequest, uint unMilliseconds )
+ {
+ var returnValue = _SetHTTPRequestAbsoluteTimeoutMS( Self, hRequest, unMilliseconds );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_GetHTTPRequestWasTimedOut", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _GetHTTPRequestWasTimedOut( IntPtr self, HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.U1 )] ref bool pbWasTimedOut );
+
+ #endregion
+ internal bool GetHTTPRequestWasTimedOut( HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.U1 )] ref bool pbWasTimedOut )
+ {
+ var returnValue = _GetHTTPRequestWasTimedOut( Self, hRequest, ref pbWasTimedOut );
+ return returnValue;
+ }
+
+ }
+}
diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamInput.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamInput.cs
index 3f68640..3d1ab52 100644
--- a/Facepunch.Steamworks/Generated/Interfaces/ISteamInput.cs
+++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamInput.cs
@@ -7,126 +7,92 @@ using Steamworks.Data;
namespace Steamworks
{
- internal class ISteamInput : SteamInterface
+ internal unsafe class ISteamInput : SteamInterface
{
- public override string InterfaceName => "SteamInput001";
- public override void InitInternals()
+ internal ISteamInput( bool IsGameServer )
{
- _DoInit = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
- _DoShutdown = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
- _RunFrame = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
- _GetConnectedControllers = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
- _GetActionSetHandle = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
- _ActivateActionSet = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
- _GetCurrentActionSet = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
- _ActivateActionSetLayer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
- _DeactivateActionSetLayer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) );
- _DeactivateAllActionSetLayers = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) );
- _GetActiveActionSetLayers = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) );
- _GetDigitalActionHandle = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) );
- _GetDigitalActionData = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) );
- _GetDigitalActionOrigins = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) );
- _GetAnalogActionHandle = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) );
- _GetAnalogActionData = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) );
- _GetAnalogActionOrigins = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) );
- _GetGlyphForActionOrigin = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) );
- _GetStringForActionOrigin = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) );
- _StopAnalogActionMomentum = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) );
- _GetMotionData = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) );
- _TriggerVibration = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 168 ) ) );
- _SetLEDColor = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 176 ) ) );
- _TriggerHapticPulse = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 184 ) ) );
- _TriggerRepeatedHapticPulse = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 192 ) ) );
- _ShowBindingPanel = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 200 ) ) );
- _GetInputTypeForHandle = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 208 ) ) );
- _GetControllerForGamepadIndex = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 216 ) ) );
- _GetGamepadIndexForController = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 224 ) ) );
- _GetStringForXboxOrigin = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 232 ) ) );
- _GetGlyphForXboxOrigin = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 240 ) ) );
- _GetActionOriginFromXboxOrigin = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 248 ) ) );
- _TranslateActionOrigin = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 256 ) ) );
- }
- internal override void Shutdown()
- {
- base.Shutdown();
-
- _DoInit = null;
- _DoShutdown = null;
- _RunFrame = null;
- _GetConnectedControllers = null;
- _GetActionSetHandle = null;
- _ActivateActionSet = null;
- _GetCurrentActionSet = null;
- _ActivateActionSetLayer = null;
- _DeactivateActionSetLayer = null;
- _DeactivateAllActionSetLayers = null;
- _GetActiveActionSetLayers = null;
- _GetDigitalActionHandle = null;
- _GetDigitalActionData = null;
- _GetDigitalActionOrigins = null;
- _GetAnalogActionHandle = null;
- _GetAnalogActionData = null;
- _GetAnalogActionOrigins = null;
- _GetGlyphForActionOrigin = null;
- _GetStringForActionOrigin = null;
- _StopAnalogActionMomentum = null;
- _GetMotionData = null;
- _TriggerVibration = null;
- _SetLEDColor = null;
- _TriggerHapticPulse = null;
- _TriggerRepeatedHapticPulse = null;
- _ShowBindingPanel = null;
- _GetInputTypeForHandle = null;
- _GetControllerForGamepadIndex = null;
- _GetGamepadIndexForController = null;
- _GetStringForXboxOrigin = null;
- _GetGlyphForXboxOrigin = null;
- _GetActionOriginFromXboxOrigin = null;
- _TranslateActionOrigin = null;
+ SetupInterface( IsGameServer );
}
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamInput_v006", CallingConvention = Platform.CC)]
+ internal static extern IntPtr SteamAPI_SteamInput_v006();
+ public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamInput_v006();
+
+
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_Init", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FDoInit( IntPtr self );
- private FDoInit _DoInit;
+ private static extern bool _Init( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bExplicitlyCallRunFrame );
#endregion
- internal bool DoInit()
+ internal bool Init( [MarshalAs( UnmanagedType.U1 )] bool bExplicitlyCallRunFrame )
{
- var returnValue = _DoInit( Self );
+ var returnValue = _Init( Self, bExplicitlyCallRunFrame );
return returnValue;
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_Shutdown", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FDoShutdown( IntPtr self );
- private FDoShutdown _DoShutdown;
+ private static extern bool _Shutdown( IntPtr self );
#endregion
- internal bool DoShutdown()
+ internal bool Shutdown()
{
- var returnValue = _DoShutdown( Self );
+ var returnValue = _Shutdown( Self );
return returnValue;
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FRunFrame( IntPtr self );
- private FRunFrame _RunFrame;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_SetInputActionManifestFilePath", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _SetInputActionManifestFilePath( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchInputActionManifestAbsolutePath );
#endregion
- internal void RunFrame()
+ internal bool SetInputActionManifestFilePath( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchInputActionManifestAbsolutePath )
{
- _RunFrame( Self );
+ var returnValue = _SetInputActionManifestFilePath( Self, pchInputActionManifestAbsolutePath );
+ return returnValue;
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate int FGetConnectedControllers( IntPtr self, [In,Out] InputHandle_t[] handlesOut );
- private FGetConnectedControllers _GetConnectedControllers;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_RunFrame", CallingConvention = Platform.CC)]
+ private static extern void _RunFrame( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bReservedValue );
+
+ #endregion
+ internal void RunFrame( [MarshalAs( UnmanagedType.U1 )] bool bReservedValue )
+ {
+ _RunFrame( Self, bReservedValue );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_BWaitForData", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _BWaitForData( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bWaitForever, uint unTimeout );
+
+ #endregion
+ internal bool BWaitForData( [MarshalAs( UnmanagedType.U1 )] bool bWaitForever, uint unTimeout )
+ {
+ var returnValue = _BWaitForData( Self, bWaitForever, unTimeout );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_BNewDataAvailable", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _BNewDataAvailable( IntPtr self );
+
+ #endregion
+ internal bool BNewDataAvailable()
+ {
+ var returnValue = _BNewDataAvailable( Self );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetConnectedControllers", CallingConvention = Platform.CC)]
+ private static extern int _GetConnectedControllers( IntPtr self, [In,Out] InputHandle_t[] handlesOut );
#endregion
internal int GetConnectedControllers( [In,Out] InputHandle_t[] handlesOut )
@@ -136,9 +102,18 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate InputActionSetHandle_t FGetActionSetHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionSetName );
- private FGetActionSetHandle _GetActionSetHandle;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_EnableDeviceCallbacks", CallingConvention = Platform.CC)]
+ private static extern void _EnableDeviceCallbacks( IntPtr self );
+
+ #endregion
+ internal void EnableDeviceCallbacks()
+ {
+ _EnableDeviceCallbacks( Self );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetActionSetHandle", CallingConvention = Platform.CC)]
+ private static extern InputActionSetHandle_t _GetActionSetHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionSetName );
#endregion
internal InputActionSetHandle_t GetActionSetHandle( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionSetName )
@@ -148,9 +123,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FActivateActionSet( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle );
- private FActivateActionSet _ActivateActionSet;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_ActivateActionSet", CallingConvention = Platform.CC)]
+ private static extern void _ActivateActionSet( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle );
#endregion
internal void ActivateActionSet( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle )
@@ -159,9 +133,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate InputActionSetHandle_t FGetCurrentActionSet( IntPtr self, InputHandle_t inputHandle );
- private FGetCurrentActionSet _GetCurrentActionSet;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetCurrentActionSet", CallingConvention = Platform.CC)]
+ private static extern InputActionSetHandle_t _GetCurrentActionSet( IntPtr self, InputHandle_t inputHandle );
#endregion
internal InputActionSetHandle_t GetCurrentActionSet( InputHandle_t inputHandle )
@@ -171,9 +144,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FActivateActionSetLayer( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle );
- private FActivateActionSetLayer _ActivateActionSetLayer;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_ActivateActionSetLayer", CallingConvention = Platform.CC)]
+ private static extern void _ActivateActionSetLayer( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle );
#endregion
internal void ActivateActionSetLayer( InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle )
@@ -182,9 +154,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FDeactivateActionSetLayer( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle );
- private FDeactivateActionSetLayer _DeactivateActionSetLayer;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_DeactivateActionSetLayer", CallingConvention = Platform.CC)]
+ private static extern void _DeactivateActionSetLayer( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle );
#endregion
internal void DeactivateActionSetLayer( InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle )
@@ -193,9 +164,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FDeactivateAllActionSetLayers( IntPtr self, InputHandle_t inputHandle );
- private FDeactivateAllActionSetLayers _DeactivateAllActionSetLayers;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_DeactivateAllActionSetLayers", CallingConvention = Platform.CC)]
+ private static extern void _DeactivateAllActionSetLayers( IntPtr self, InputHandle_t inputHandle );
#endregion
internal void DeactivateAllActionSetLayers( InputHandle_t inputHandle )
@@ -204,9 +174,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate int FGetActiveActionSetLayers( IntPtr self, InputHandle_t inputHandle, [In,Out] InputActionSetHandle_t[] handlesOut );
- private FGetActiveActionSetLayers _GetActiveActionSetLayers;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetActiveActionSetLayers", CallingConvention = Platform.CC)]
+ private static extern int _GetActiveActionSetLayers( IntPtr self, InputHandle_t inputHandle, [In,Out] InputActionSetHandle_t[] handlesOut );
#endregion
internal int GetActiveActionSetLayers( InputHandle_t inputHandle, [In,Out] InputActionSetHandle_t[] handlesOut )
@@ -216,9 +185,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate InputDigitalActionHandle_t FGetDigitalActionHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName );
- private FGetDigitalActionHandle _GetDigitalActionHandle;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetDigitalActionHandle", CallingConvention = Platform.CC)]
+ private static extern InputDigitalActionHandle_t _GetDigitalActionHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName );
#endregion
internal InputDigitalActionHandle_t GetDigitalActionHandle( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName )
@@ -228,31 +196,19 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- #if PLATFORM_WIN
- private delegate void FGetDigitalActionData( IntPtr self, ref DigitalState retVal, InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle );
- #else
- private delegate DigitalState FGetDigitalActionData( IntPtr self, InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle );
- #endif
- private FGetDigitalActionData _GetDigitalActionData;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetDigitalActionData", CallingConvention = Platform.CC)]
+ private static extern DigitalState _GetDigitalActionData( IntPtr self, InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle );
#endregion
internal DigitalState GetDigitalActionData( InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle )
{
- #if PLATFORM_WIN
- var retVal = default( DigitalState );
- _GetDigitalActionData( Self, ref retVal, inputHandle, digitalActionHandle );
- return retVal;
- #else
var returnValue = _GetDigitalActionData( Self, inputHandle, digitalActionHandle );
return returnValue;
- #endif
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate int FGetDigitalActionOrigins( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputDigitalActionHandle_t digitalActionHandle, ref InputActionOrigin originsOut );
- private FGetDigitalActionOrigins _GetDigitalActionOrigins;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetDigitalActionOrigins", CallingConvention = Platform.CC)]
+ private static extern int _GetDigitalActionOrigins( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputDigitalActionHandle_t digitalActionHandle, ref InputActionOrigin originsOut );
#endregion
internal int GetDigitalActionOrigins( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputDigitalActionHandle_t digitalActionHandle, ref InputActionOrigin originsOut )
@@ -262,9 +218,19 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate InputAnalogActionHandle_t FGetAnalogActionHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName );
- private FGetAnalogActionHandle _GetAnalogActionHandle;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetStringForDigitalActionName", CallingConvention = Platform.CC)]
+ private static extern Utf8StringPointer _GetStringForDigitalActionName( IntPtr self, InputDigitalActionHandle_t eActionHandle );
+
+ #endregion
+ internal string GetStringForDigitalActionName( InputDigitalActionHandle_t eActionHandle )
+ {
+ var returnValue = _GetStringForDigitalActionName( Self, eActionHandle );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetAnalogActionHandle", CallingConvention = Platform.CC)]
+ private static extern InputAnalogActionHandle_t _GetAnalogActionHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName );
#endregion
internal InputAnalogActionHandle_t GetAnalogActionHandle( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName )
@@ -274,31 +240,19 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- #if PLATFORM_WIN
- private delegate void FGetAnalogActionData( IntPtr self, ref AnalogState retVal, InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle );
- #else
- private delegate AnalogState FGetAnalogActionData( IntPtr self, InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle );
- #endif
- private FGetAnalogActionData _GetAnalogActionData;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetAnalogActionData", CallingConvention = Platform.CC)]
+ private static extern AnalogState _GetAnalogActionData( IntPtr self, InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle );
#endregion
internal AnalogState GetAnalogActionData( InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle )
{
- #if PLATFORM_WIN
- var retVal = default( AnalogState );
- _GetAnalogActionData( Self, ref retVal, inputHandle, analogActionHandle );
- return retVal;
- #else
var returnValue = _GetAnalogActionData( Self, inputHandle, analogActionHandle );
return returnValue;
- #endif
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate int FGetAnalogActionOrigins( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputAnalogActionHandle_t analogActionHandle, ref InputActionOrigin originsOut );
- private FGetAnalogActionOrigins _GetAnalogActionOrigins;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetAnalogActionOrigins", CallingConvention = Platform.CC)]
+ private static extern int _GetAnalogActionOrigins( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputAnalogActionHandle_t analogActionHandle, ref InputActionOrigin originsOut );
#endregion
internal int GetAnalogActionOrigins( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputAnalogActionHandle_t analogActionHandle, ref InputActionOrigin originsOut )
@@ -308,21 +262,41 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate Utf8StringPointer FGetGlyphForActionOrigin( IntPtr self, InputActionOrigin eOrigin );
- private FGetGlyphForActionOrigin _GetGlyphForActionOrigin;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetGlyphPNGForActionOrigin", CallingConvention = Platform.CC)]
+ private static extern Utf8StringPointer _GetGlyphPNGForActionOrigin( IntPtr self, InputActionOrigin eOrigin, GlyphSize eSize, uint unFlags );
#endregion
- internal string GetGlyphForActionOrigin( InputActionOrigin eOrigin )
+ internal string GetGlyphPNGForActionOrigin( InputActionOrigin eOrigin, GlyphSize eSize, uint unFlags )
{
- var returnValue = _GetGlyphForActionOrigin( Self, eOrigin );
+ var returnValue = _GetGlyphPNGForActionOrigin( Self, eOrigin, eSize, unFlags );
return returnValue;
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate Utf8StringPointer FGetStringForActionOrigin( IntPtr self, InputActionOrigin eOrigin );
- private FGetStringForActionOrigin _GetStringForActionOrigin;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetGlyphSVGForActionOrigin", CallingConvention = Platform.CC)]
+ private static extern Utf8StringPointer _GetGlyphSVGForActionOrigin( IntPtr self, InputActionOrigin eOrigin, uint unFlags );
+
+ #endregion
+ internal string GetGlyphSVGForActionOrigin( InputActionOrigin eOrigin, uint unFlags )
+ {
+ var returnValue = _GetGlyphSVGForActionOrigin( Self, eOrigin, unFlags );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetGlyphForActionOrigin_Legacy", CallingConvention = Platform.CC)]
+ private static extern Utf8StringPointer _GetGlyphForActionOrigin_Legacy( IntPtr self, InputActionOrigin eOrigin );
+
+ #endregion
+ internal string GetGlyphForActionOrigin_Legacy( InputActionOrigin eOrigin )
+ {
+ var returnValue = _GetGlyphForActionOrigin_Legacy( Self, eOrigin );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetStringForActionOrigin", CallingConvention = Platform.CC)]
+ private static extern Utf8StringPointer _GetStringForActionOrigin( IntPtr self, InputActionOrigin eOrigin );
#endregion
internal string GetStringForActionOrigin( InputActionOrigin eOrigin )
@@ -332,9 +306,19 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FStopAnalogActionMomentum( IntPtr self, InputHandle_t inputHandle, InputAnalogActionHandle_t eAction );
- private FStopAnalogActionMomentum _StopAnalogActionMomentum;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetStringForAnalogActionName", CallingConvention = Platform.CC)]
+ private static extern Utf8StringPointer _GetStringForAnalogActionName( IntPtr self, InputAnalogActionHandle_t eActionHandle );
+
+ #endregion
+ internal string GetStringForAnalogActionName( InputAnalogActionHandle_t eActionHandle )
+ {
+ var returnValue = _GetStringForAnalogActionName( Self, eActionHandle );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_StopAnalogActionMomentum", CallingConvention = Platform.CC)]
+ private static extern void _StopAnalogActionMomentum( IntPtr self, InputHandle_t inputHandle, InputAnalogActionHandle_t eAction );
#endregion
internal void StopAnalogActionMomentum( InputHandle_t inputHandle, InputAnalogActionHandle_t eAction )
@@ -343,31 +327,19 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- #if PLATFORM_WIN
- private delegate void FGetMotionData( IntPtr self, ref MotionState retVal, InputHandle_t inputHandle );
- #else
- private delegate MotionState FGetMotionData( IntPtr self, InputHandle_t inputHandle );
- #endif
- private FGetMotionData _GetMotionData;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetMotionData", CallingConvention = Platform.CC)]
+ private static extern MotionState _GetMotionData( IntPtr self, InputHandle_t inputHandle );
#endregion
internal MotionState GetMotionData( InputHandle_t inputHandle )
{
- #if PLATFORM_WIN
- var retVal = default( MotionState );
- _GetMotionData( Self, ref retVal, inputHandle );
- return retVal;
- #else
var returnValue = _GetMotionData( Self, inputHandle );
return returnValue;
- #endif
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FTriggerVibration( IntPtr self, InputHandle_t inputHandle, ushort usLeftSpeed, ushort usRightSpeed );
- private FTriggerVibration _TriggerVibration;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_TriggerVibration", CallingConvention = Platform.CC)]
+ private static extern void _TriggerVibration( IntPtr self, InputHandle_t inputHandle, ushort usLeftSpeed, ushort usRightSpeed );
#endregion
internal void TriggerVibration( InputHandle_t inputHandle, ushort usLeftSpeed, ushort usRightSpeed )
@@ -376,9 +348,28 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FSetLEDColor( IntPtr self, InputHandle_t inputHandle, byte nColorR, byte nColorG, byte nColorB, uint nFlags );
- private FSetLEDColor _SetLEDColor;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_TriggerVibrationExtended", CallingConvention = Platform.CC)]
+ private static extern void _TriggerVibrationExtended( IntPtr self, InputHandle_t inputHandle, ushort usLeftSpeed, ushort usRightSpeed, ushort usLeftTriggerSpeed, ushort usRightTriggerSpeed );
+
+ #endregion
+ internal void TriggerVibrationExtended( InputHandle_t inputHandle, ushort usLeftSpeed, ushort usRightSpeed, ushort usLeftTriggerSpeed, ushort usRightTriggerSpeed )
+ {
+ _TriggerVibrationExtended( Self, inputHandle, usLeftSpeed, usRightSpeed, usLeftTriggerSpeed, usRightTriggerSpeed );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_TriggerSimpleHapticEvent", CallingConvention = Platform.CC)]
+ private static extern void _TriggerSimpleHapticEvent( IntPtr self, InputHandle_t inputHandle, ControllerHapticLocation eHapticLocation, byte nIntensity, char nGainDB, byte nOtherIntensity, char nOtherGainDB );
+
+ #endregion
+ internal void TriggerSimpleHapticEvent( InputHandle_t inputHandle, ControllerHapticLocation eHapticLocation, byte nIntensity, char nGainDB, byte nOtherIntensity, char nOtherGainDB )
+ {
+ _TriggerSimpleHapticEvent( Self, inputHandle, eHapticLocation, nIntensity, nGainDB, nOtherIntensity, nOtherGainDB );
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_SetLEDColor", CallingConvention = Platform.CC)]
+ private static extern void _SetLEDColor( IntPtr self, InputHandle_t inputHandle, byte nColorR, byte nColorG, byte nColorB, uint nFlags );
#endregion
internal void SetLEDColor( InputHandle_t inputHandle, byte nColorR, byte nColorG, byte nColorB, uint nFlags )
@@ -387,32 +378,29 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FTriggerHapticPulse( IntPtr self, InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec );
- private FTriggerHapticPulse _TriggerHapticPulse;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_Legacy_TriggerHapticPulse", CallingConvention = Platform.CC)]
+ private static extern void _Legacy_TriggerHapticPulse( IntPtr self, InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec );
#endregion
- internal void TriggerHapticPulse( InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec )
+ internal void Legacy_TriggerHapticPulse( InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec )
{
- _TriggerHapticPulse( Self, inputHandle, eTargetPad, usDurationMicroSec );
+ _Legacy_TriggerHapticPulse( Self, inputHandle, eTargetPad, usDurationMicroSec );
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate void FTriggerRepeatedHapticPulse( IntPtr self, InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec, ushort usOffMicroSec, ushort unRepeat, uint nFlags );
- private FTriggerRepeatedHapticPulse _TriggerRepeatedHapticPulse;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_Legacy_TriggerRepeatedHapticPulse", CallingConvention = Platform.CC)]
+ private static extern void _Legacy_TriggerRepeatedHapticPulse( IntPtr self, InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec, ushort usOffMicroSec, ushort unRepeat, uint nFlags );
#endregion
- internal void TriggerRepeatedHapticPulse( InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec, ushort usOffMicroSec, ushort unRepeat, uint nFlags )
+ internal void Legacy_TriggerRepeatedHapticPulse( InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec, ushort usOffMicroSec, ushort unRepeat, uint nFlags )
{
- _TriggerRepeatedHapticPulse( Self, inputHandle, eTargetPad, usDurationMicroSec, usOffMicroSec, unRepeat, nFlags );
+ _Legacy_TriggerRepeatedHapticPulse( Self, inputHandle, eTargetPad, usDurationMicroSec, usOffMicroSec, unRepeat, nFlags );
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_ShowBindingPanel", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
- private delegate bool FShowBindingPanel( IntPtr self, InputHandle_t inputHandle );
- private FShowBindingPanel _ShowBindingPanel;
+ private static extern bool _ShowBindingPanel( IntPtr self, InputHandle_t inputHandle );
#endregion
internal bool ShowBindingPanel( InputHandle_t inputHandle )
@@ -422,9 +410,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate InputType FGetInputTypeForHandle( IntPtr self, InputHandle_t inputHandle );
- private FGetInputTypeForHandle _GetInputTypeForHandle;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetInputTypeForHandle", CallingConvention = Platform.CC)]
+ private static extern InputType _GetInputTypeForHandle( IntPtr self, InputHandle_t inputHandle );
#endregion
internal InputType GetInputTypeForHandle( InputHandle_t inputHandle )
@@ -434,9 +421,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate InputHandle_t FGetControllerForGamepadIndex( IntPtr self, int nIndex );
- private FGetControllerForGamepadIndex _GetControllerForGamepadIndex;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetControllerForGamepadIndex", CallingConvention = Platform.CC)]
+ private static extern InputHandle_t _GetControllerForGamepadIndex( IntPtr self, int nIndex );
#endregion
internal InputHandle_t GetControllerForGamepadIndex( int nIndex )
@@ -446,9 +432,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate int FGetGamepadIndexForController( IntPtr self, InputHandle_t ulinputHandle );
- private FGetGamepadIndexForController _GetGamepadIndexForController;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetGamepadIndexForController", CallingConvention = Platform.CC)]
+ private static extern int _GetGamepadIndexForController( IntPtr self, InputHandle_t ulinputHandle );
#endregion
internal int GetGamepadIndexForController( InputHandle_t ulinputHandle )
@@ -458,9 +443,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate Utf8StringPointer FGetStringForXboxOrigin( IntPtr self, XboxOrigin eOrigin );
- private FGetStringForXboxOrigin _GetStringForXboxOrigin;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetStringForXboxOrigin", CallingConvention = Platform.CC)]
+ private static extern Utf8StringPointer _GetStringForXboxOrigin( IntPtr self, XboxOrigin eOrigin );
#endregion
internal string GetStringForXboxOrigin( XboxOrigin eOrigin )
@@ -470,9 +454,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate Utf8StringPointer FGetGlyphForXboxOrigin( IntPtr self, XboxOrigin eOrigin );
- private FGetGlyphForXboxOrigin _GetGlyphForXboxOrigin;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetGlyphForXboxOrigin", CallingConvention = Platform.CC)]
+ private static extern Utf8StringPointer _GetGlyphForXboxOrigin( IntPtr self, XboxOrigin eOrigin );
#endregion
internal string GetGlyphForXboxOrigin( XboxOrigin eOrigin )
@@ -482,9 +465,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate InputActionOrigin FGetActionOriginFromXboxOrigin( IntPtr self, InputHandle_t inputHandle, XboxOrigin eOrigin );
- private FGetActionOriginFromXboxOrigin _GetActionOriginFromXboxOrigin;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetActionOriginFromXboxOrigin", CallingConvention = Platform.CC)]
+ private static extern InputActionOrigin _GetActionOriginFromXboxOrigin( IntPtr self, InputHandle_t inputHandle, XboxOrigin eOrigin );
#endregion
internal InputActionOrigin GetActionOriginFromXboxOrigin( InputHandle_t inputHandle, XboxOrigin eOrigin )
@@ -494,9 +476,8 @@ namespace Steamworks
}
#region FunctionMeta
- [UnmanagedFunctionPointer( Platform.MemberConvention )]
- private delegate InputActionOrigin FTranslateActionOrigin( IntPtr self, InputType eDestinationInputType, InputActionOrigin eSourceOrigin );
- private FTranslateActionOrigin _TranslateActionOrigin;
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_TranslateActionOrigin", CallingConvention = Platform.CC)]
+ private static extern InputActionOrigin _TranslateActionOrigin( IntPtr self, InputType eDestinationInputType, InputActionOrigin eSourceOrigin );
#endregion
internal InputActionOrigin TranslateActionOrigin( InputType eDestinationInputType, InputActionOrigin eSourceOrigin )
@@ -505,5 +486,39 @@ namespace Steamworks
return returnValue;
}
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetDeviceBindingRevision", CallingConvention = Platform.CC)]
+ [return: MarshalAs( UnmanagedType.I1 )]
+ private static extern bool _GetDeviceBindingRevision( IntPtr self, InputHandle_t inputHandle, ref int pMajor, ref int pMinor );
+
+ #endregion
+ internal bool GetDeviceBindingRevision( InputHandle_t inputHandle, ref int pMajor, ref int pMinor )
+ {
+ var returnValue = _GetDeviceBindingRevision( Self, inputHandle, ref pMajor, ref pMinor );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetRemotePlaySessionID", CallingConvention = Platform.CC)]
+ private static extern uint _GetRemotePlaySessionID( IntPtr self, InputHandle_t inputHandle );
+
+ #endregion
+ internal uint GetRemotePlaySessionID( InputHandle_t inputHandle )
+ {
+ var returnValue = _GetRemotePlaySessionID( Self, inputHandle );
+ return returnValue;
+ }
+
+ #region FunctionMeta
+ [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetSessionInputConfigurationSettings", CallingConvention = Platform.CC)]
+ private static extern ushort _GetSessionInputConfigurationSettings( IntPtr self );
+
+ #endregion
+ internal ushort GetSessionInputConfigurationSettings()
+ {
+ var returnValue = _GetSessionInputConfigurationSettings( Self );
+ return returnValue;
+ }
+
}
}
diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamInventory.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamInventory.cs
index e1a4d34..c5ea02c 100644
--- a/Facepunch.Steamworks/Generated/Interfaces/ISteamInventory.cs
+++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamInventory.cs
@@ -7,97 +7,25 @@ using Steamworks.Data;
namespace Steamworks
{
- internal class ISteamInventory : SteamInterface
+ internal unsafe class ISteamInventory : SteamInterface
{
- public override string InterfaceName => "STEAMINVENTORY_INTERFACE_V003";
- public override void InitInternals()
+ internal ISteamInventory( bool IsGameServer )
{
- _GetResultStatus = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
- _GetResultItems = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
- _GetResultItemProperty = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
- _GetResultTimestamp = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
- _CheckResultSteamID = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
- _DestroyResult = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
- _GetAllItems = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
- _GetItemsByID = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
- _SerializeResult = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) );
- _DeserializeResult = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) );
- _GenerateItems = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) );
- _GrantPromoItems = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) );
- _AddPromoItem = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) );
- _AddPromoItems = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) );
- _ConsumeItem = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) );
- _ExchangeItems = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) );
- _TransferItemQuantity = Marshal.GetDelegateForFunctionPointer