Compare commits

...

625 Commits

Author SHA1 Message Date
Rohan Singh
aa87fe557f Get rid of ICustomMarshaler (strings to native, possible IL2CPP bug workaround) and remaining Encoding.UTF8 usages 2025-03-20 17:44:19 -04:00
Rohan Singh
0595c9c796 Explicitly turn off BOM when marshaling strings to/from Steamworks, just to be safe 2025-02-03 22:13:32 -05:00
André Straubmeier
b4d3a65f86 PackageVersion / FileVersion 2.4.1 2025-01-16 09:39:49 +01:00
André Straubmeier
a0aac6a82a Update README.md (build badge fix) 2025-01-16 09:38:39 +01:00
Rohan Singh
6d1b9b9602 Merge branch 'steamworks161' 2025-01-15 11:28:57 -05:00
Rohan Singh
e4455258ac Add SteamTimeline 2024-12-16 11:49:31 -05:00
Rohan Singh
5783d89634 Manually marshal server list filters to fix crashing 2024-12-13 19:44:08 -05:00
Rohan Singh
3b58a3dc92 Upgrade to Steamworks 1.61
WIP due to server list crashing for some reason
2024-12-13 18:15:39 -05:00
Rohan Singh
de10d5ced4
Update actions 2024-12-12 13:00:34 -05:00
Rohan Singh
520ac1ca51 Add Friend.Nickname to get Steam nicknames for players
Expose FriendGameInfo.GameID so you can see what appID friends are playing
2024-12-10 15:03:47 -05:00
Rohan Singh
ee6572a380
Merge pull request #742 from height229/master
Fixed typo in SteamClient.cs
2024-12-09 16:21:18 -05:00
Rohan Singh
963729bf64
Merge pull request #709 from Zyhlon/master
Fixes #553 OnNewLaunchParameters never getting called
2024-12-09 16:20:37 -05:00
Jake Rich
eec3c05ecd Merge from fix_serverlist_query_allocations -> master 2024-08-14 12:46:27 -04:00
Jake Rich
62a1ae78e5 Merge from temp_browser_fix -> master
- make IPList disposable
- list Unresponsive vs Unqueried servers seperately)
2024-08-14 12:45:57 -04:00
Jake Rich
7f747b0468 Automatically get the field offset of gameserveritem_t.HasSuccessfulResponse instead of hardcoding it 2024-08-12 21:44:23 -04:00
Jake Rich
a80e8590d5 Add ISteamMatchmakingServers.HasServerResponded() to partial class instead 2024-08-12 21:30:28 -04:00
Jake Rich
09db39d9e3 Codegen 2024-08-12 21:30:05 -04:00
Jake Rich
6dd32eb5c4 Change codegen to make interface classes partial 2024-08-12 21:29:49 -04:00
Jake Rich
d18086a1b8 Fix serverlist query allocating a large amount of memory when a large amount of servers are pending 2024-08-12 20:46:16 -04:00
Rohan Singh
93223cb30a Fix IpList queries not cancelling when disposed 2024-07-16 22:07:37 -04:00
August
6deb4b64d2
Fixed typo in SteamClient.cs 2023-11-07 14:53:36 +01:00
Jake_Rich
f8960c8971 Put all servers that failed to respond to the query into a "Unqueried" list intead of "Unresponsive" 2023-09-06 21:46:41 -04:00
André Straubmeier
4463739be5
Update dotnetcore.yml 2023-06-09 09:49:07 +02:00
André Straubmeier
5475972ae7 InventoryTest.GetExchanges fix 2023-06-09 09:23:26 +02:00
André Straubmeier
a3419df3b9 GameServerTest.BeginAuthSession fix 2023-06-09 09:16:01 +02:00
André Straubmeier
c18a018c3f Forgot to update a few steam_api.dll and steam_api64.dll 2023-06-09 09:00:43 +02:00
André Straubmeier
e21c42e8a2 Add GetAuthTicketForWebApiAsync 2023-06-09 08:45:14 +02:00
André Straubmeier
8a5f229a2f Steamworks SDK 1.57 2023-05-15 14:37:19 +02:00
Frida Külper
10f3323318 Fix OnNewLaunchParameters never getting called 2023-03-17 16:32:18 +01:00
André Straubmeier
4e7e0ef8c4 Revert "Update packages, drop net46 support"
This reverts commit e81d1ac682cee74f84f4a4c967887dce35d18ecd.
2022-11-29 18:17:43 +01:00
André Straubmeier
9160882a9b Merge branch 'master' of https://github.com/Facepunch/Facepunch.Steamworks 2022-11-29 18:15:22 +01:00
André Straubmeier
4b12fa14dc Add SendRateMin, SendRateMax and NagleTime to SteamNetworkingUtils 2022-11-29 18:15:20 +01:00
dependabot[bot]
e81d1ac682
Update packages, drop net46 support 2022-10-12 06:57:41 +01:00
Rubat
814488652b
Handle Steam not running better (#566)
* Handle Steam not running better

* Make Steamworks.SteamClient.IsValid is correct without Steam

Make sure Steamworks.SteamClient.IsValid is correct without Steam running
2022-10-12 06:37:19 +01:00
Max Halldén
aab6d0d081
Check return value from FileRead (#663)
Co-authored-by: Max Halldén <me@maxhallden.com>
2022-10-12 06:34:22 +01:00
Michal Cichra
0fda7e39fe
update to steam sdk 1.55 (#675)
includes native apple M1 support
2022-10-12 06:33:34 +01:00
André Straubmeier
04b921b33d More detailed debug levels in SteamNetworkingUtils 2022-02-16 11:55:24 +01:00
Wesley Baartman
5cb1496e80
Fix strings in readme (#621) 2021-12-13 09:14:29 +00:00
André Straubmeier
2675b3201b Add net46 target framework back for Unity support 2021-11-25 18:36:49 +01:00
André Straubmeier
df99a3e1ac
Merge pull request #612 from Facepunch/steamworks152
Steamworks 1.53 with multi lane and fake IP support
2021-11-25 18:34:12 +01:00
André Straubmeier
a16c92d9c6 Update test case steamclient.dll et al 2021-11-24 15:37:40 +01:00
André Straubmeier
9ff422533f Do test case fake IP initialization before login 2021-11-24 10:19:55 +01:00
André Straubmeier
5d944374b2 RequestFakeIP / GetFakeIP comment fixes 2021-11-24 10:19:26 +01:00
André Straubmeier
36e3f3a58f Add NetAddress.IsFakeIPv4 2021-11-24 10:11:37 +01:00
André Straubmeier
86aa1439aa Generated 1.53 2021-11-24 10:01:12 +01:00
André Straubmeier
6a204680da Redist for 1.53 2021-11-24 09:56:55 +01:00
André Straubmeier
ed1c690d7b Headers for 1.53 2021-11-24 09:55:25 +01:00
André Straubmeier
30ff3a3d85 Add fake IP test cases 2021-11-23 15:46:07 +01:00
André Straubmeier
0455e7fc72 Add fake IP support to SteamNetworkingSockets 2021-11-23 15:44:22 +01:00
André Straubmeier
045a3963b0 Generated fake IP API 2021-11-23 15:39:18 +01:00
André Straubmeier
45df99416e Add missing fake IP API to steam_api.json 2021-11-23 15:38:14 +01:00
André Straubmeier
cf9744913c Redist update for test cases 2021-11-23 15:33:15 +01:00
André Straubmeier
214096e376 All SendMessage overloads have optional laneIndex 2021-11-22 17:53:48 +01:00
André Straubmeier
f3ee5bec4e Connection lanes implementation 2021-11-22 17:51:40 +01:00
André Straubmeier
2088f14c05 Generator comments out SteamInputActionEvent_t.AnalogAction_t types since the type declaration is missing from steam_api.json 2021-11-22 13:41:46 +01:00
André Straubmeier
26eb429654 Generated 1.52 2021-11-22 13:23:29 +01:00
André Straubmeier
70b2a301ca Generator changes to support 1.52 2021-11-22 13:23:07 +01:00
André Straubmeier
2f8c19a1d1 Headers for 1.52 2021-11-22 13:22:54 +01:00
André Straubmeier
59db8fac8a Redist for 1.52 2021-11-22 13:21:59 +01:00
Garry Newman
12663f0d81 Update redistributables 2021-10-24 09:11:09 +01:00
Thunder
c106d01fcb
Documentation Rework (#599) 2021-10-21 08:40:56 +01:00
BOTLANNER
132b1a579b
Fix for GetFloat on struct Steamworks.Data.Stat always returning 0 (#598)
Co-authored-by: B0TLANNER <b0tlanner.games@gmail.com>
2021-10-18 10:52:55 +01:00
Garry Newman
141dbfdaa1 These should be static 2021-09-24 15:47:41 +01:00
Garry Newman
f005600957 SteamPort isn't used anymore here 2021-09-24 14:46:37 +01:00
Garry Newman
480137a490 Added SteamUtils.SetGameLauncherMode 2021-09-24 14:36:48 +01:00
Garry Newman
3b0fa8106c Added SteamUtils.IsRunningOnSteamDeck 2021-09-24 14:29:58 +01:00
Garry Newman
38c2ffd796 Added SteamUGC.GetWorkshopEulaStatus() 2021-09-24 14:28:13 +01:00
Garry Newman
30f35c3aae Added SteamUGC.ShowWorkshopEula() 2021-09-24 14:26:15 +01:00
Garry Newman
1c98852d7c Update fixes 2021-09-24 14:24:00 +01:00
Garry Newman
40bcf2e95a Update to Steamworks 152 2021-09-24 14:06:32 +01:00
Garry Newman
bfa94d89fa Fix TextFilteringContext not getting exposed 2021-09-24 14:00:16 +01:00
Garry Newman
821975435c Merge branch 'master' of https://github.com/Facepunch/Facepunch.Steamworks 2021-09-24 13:55:08 +01:00
Garry Newman
959249d04a
Merge pull request #588 from rtsonneveld/master
Adjusted uploading progress bar so it doesn't jump back
2021-09-24 13:53:31 +01:00
Garry Newman
454c686368
Merge pull request #520 from PhyxionNL/master
Fix NuGet package generation
2021-09-24 13:52:47 +01:00
Garry Newman
b47e1e6f55
Merge pull request #514 from Noek1993/master
Added support for FilterText
2021-09-24 13:51:39 +01:00
Garry Newman
fa34bc76f9
Merge pull request #558 from bobbahbrown/we-hate-gc
Fix GC race condition in sending packets causing crash from steamworks
2021-09-24 13:50:24 +01:00
Garry Newman
ca77bd07bc
Merge pull request #560 from dozd/master
RemoteStoragePublishedFileSubscribed_t and RemoteStoragePublishedFile…
2021-09-24 13:45:53 +01:00
Garry Newman
997baf0a07
Merge pull request #592 from juanjp600/helpers-takememory-fix
Fixed race condition caused by too many tasks using Helpers.TakeMemory simultaneously
2021-09-24 13:44:29 +01:00
Garry Newman
b5dc75d062
Merge pull request #595 from Crytilis/master
Migrated .NET Framework and upgraded projects in anticipation of NET6
2021-09-24 13:40:58 +01:00
Garry Newman
a51ccbb69d Remove unused 2021-09-24 13:40:27 +01:00
Garry Newman
1c21400d3e Create .editorconfig 2021-09-24 13:36:22 +01:00
Jason Thompson
21fb722e3f
Update dotnetcore.yml 2021-09-09 19:48:00 -05:00
Jason Thompson
e96d97c5b5
Update dotnetcore.yml 2021-09-09 19:45:31 -05:00
Jason Thompson
dd613232d3
Update dotnetcore.yml 2021-09-09 19:42:30 -05:00
Jason Thompson
42c7755a58
Update dotnetcore.yml 2021-09-09 19:38:52 -05:00
Jason Thompson
1a1d023356
Update README.md 2021-09-09 19:31:21 -05:00
Jason Thompson
3eb302ac54 Migrated .Net Framework projects to .NET, retargeted projects for netstandard2.1 and/or net6.0 where appropriate, upgraded language level to latest for use with .NET 6 2021-09-09 18:59:58 -05:00
Juan Pablo Arce
9dd286eed4 Updated Generator to use disposable TakeMemory correctly 2021-08-30 22:13:31 -03:00
Juan Pablo Arce
ba0f4d3e10 Fixed native memory buffers allocated by Helpers.TakeMemory being overshared when more than 4 simultaneous tasks call it 2021-08-30 21:25:01 -03:00
Robin Sonneveld
8efc0414c4 Adjusted uploading progress bar so it doesn't jump back after finishing uploading content. 2021-08-06 17:32:45 +02:00
Garry Newman
2be5012647
Merge pull request #554 from chk1/patch-1
Fix typo in function documentation
2021-07-07 18:56:31 +01:00
Angel
b01e98e60c RemoteStoragePublishedFileSubscribed_t, RemoteStoragePublishedFileUnsubscribed_t, ItemInstalled_t callbacks 2021-05-05 13:41:00 +02:00
bobbahbrown
285e88b332 we HATE the garbage collector 2021-04-27 23:11:42 -03:00
Christoph Kisfeld
3eacc55b1e
Fix typo in function documentation 2021-04-22 19:43:40 +02:00
Garry Newman
1bae585602
Merge pull request #524 from HouraiTeahouse/public-lobby-chat
Implement #523: Make Lobby.SendChatBytes public.
2021-04-08 16:14:02 +01:00
Garry Newman
da34905e07
Merge pull request #527 from mlajtos/patch-1
ReadFile -> FileRead
2021-04-08 16:13:22 +01:00
Garry Newman
57d0e40ebb
Merge pull request #541 from morga4/master
Override connection's GetHashCode()
2021-04-08 16:13:04 +01:00
Garry Newman
f18fcb6aa8
Merge pull request #546 from sicklydove/master
Fixes typo in README Achievements code example
2021-04-08 16:12:51 +01:00
Garry Newman
d5b49fdeab
Merge pull request #548 from sschoener/patch-1
Expose message size in IsP2PPacketAvailable
2021-04-08 16:12:34 +01:00
Sebastian Schöner
1fe8f51915
Expose message size in IsP2PPacketAvailable 2021-04-06 22:47:04 +02:00
Laurie
55514d42ac Fixes typo in README Achievements code example 2021-04-02 16:58:09 +01:00
morga4
d2fbf89f99 Override connection's GetHashCode() 2021-03-13 18:48:47 +03:00
Rohan Singh
cca1b0305e Rename 2021-01-26 00:10:06 -05:00
Milan Lajtoš
f567313ea0
ReadFile -> FileRead 2021-01-25 00:00:43 +01:00
Rohan Singh
c7ec49abe0 Steamworks SDK 1.51 2021-01-20 10:25:43 -05:00
Rohan Singh
5c11508f41 Make SendMessage call SendMessages instead of SendMessageToConnection 2021-01-20 09:57:07 -05:00
Rohan Singh
28effd140b Pass results back, optionally 2021-01-19 17:04:48 -05:00
Rohan Singh
616571a3a9 Add ConnectionManager.Broadcast for sending the same message to
multiple clients
2021-01-19 14:23:49 -05:00
james7132
27a0048c0e Fix #523: Make Lobby.SendChatBytes public.
Also add a unsafe variant that would require zero copies to a managed
array.
2021-01-16 20:08:11 -08:00
Rohan Singh
47b9aca324 Crash fix in ConnectionManager.Receive due to bad pointer 2021-01-14 12:58:59 -05:00
PhyxionNL
e6df29654f
Update Facepunch.Steamworks.Win32.csproj 2021-01-14 11:41:38 +01:00
PhyxionNL
fa57c676e2
Update Facepunch.Steamworks.Win64.csproj 2021-01-14 11:41:32 +01:00
Rohan Singh
8057413ea3 Remove Marshal usage in ConnectionManager (removes allocations) 2021-01-13 10:03:41 -05:00
Koen Mulder
4a06c64ded Remove uint from InitFilterText call
FilterText now returns the filtered string instead of the number of filtered characters
2021-01-09 14:05:56 +01:00
Garry Newman
c5c31280c1
Merge pull request #494 from kamyker/k9-on-ws-item-created
UgcEditor.SubmitAsync, on item created callback
2021-01-09 11:46:32 +00:00
Garry Newman
8f579f6e55
Merge pull request #509 from ambid17/feature/game-managed-ugc
Add game managed UGC Items
2021-01-09 11:45:31 +00:00
Koen Mulder
bc6600736c Updated Generator to be in line with expected generated code 2021-01-09 12:13:30 +01:00
Koen Mulder
81c5ca7761 Added support for FilterText 2021-01-05 18:28:45 +01:00
Sabien
5be8940c83 Fix Typo 2020-12-09 23:01:41 -06:00
Sabien
f2ac10deb3 Updated comment 2020-12-09 22:38:21 -06:00
Sabien
088ba90f65 Add game managed UGC Items 2020-12-09 22:36:20 -06:00
Garry Newman
31ffaa3e6e
Merge pull request #504 from DeKon0650/add-suspend-downloads
SuspendDownloads added to public API
2020-11-27 07:35:41 +00:00
DeKon0650
110c0f2bad SuspendDownloads added to public API 2020-11-27 00:03:16 +03:00
André Straubmeier
5c30b6039a Merge branch 'master' of https://github.com/Facepunch/Facepunch.Steamworks 2020-11-23 12:47:51 +01:00
Garry Newman
68977092f3
Merge pull request #502 from benbristow/fix-violence-typo
Fix 'IsLowVoilence' Typo
2020-11-20 07:32:33 +00:00
Ben Bristow
aa6a780185 Fix 'IsLowVoilence' Typo 2020-11-19 21:05:32 +00:00
André Straubmeier
a10a5b40cd Added SteamNetworkingUtils.Unencrypted 2020-11-19 13:57:43 +01:00
André Straubmeier
ea3743bd73 Added optional receiveToEnd toggle to ConnectionManager.Receive and SocketManager.Receive (default true = old behaviour) 2020-11-19 13:44:51 +01:00
kamyker
8be43b4dde Ugc Editor, on item created callback 2020-10-29 17:26:32 +01:00
André Straubmeier
b4de0927f3 Fixed libsteam_api extension in UnityPlugin folder 2020-09-16 12:15:41 +02:00
Garry Newman
9fecd91bed StartPurchaseAsync: Should now be able to pass in multiple of the same item to purchase multiples 2020-09-04 10:42:25 +01:00
Garry Newman
ae70292e7b
Merge pull request #476 from stang-tgs/master
Allow caller to specify OverlayToStoreFlags when opening Store Overlay
2020-09-04 10:37:03 +01:00
Garry Newman
ad1cfca69f Expose OverlayToStoreFlag 2020-09-04 10:35:22 +01:00
Garry Newman
cb792b0f04 Expose ItemPreviewType 2020-09-04 10:34:33 +01:00
Garry Newman
b71c83ad13
Merge pull request #475 from kamyker/k7-addit-prevs
Added ugc addtional previews
2020-09-04 10:34:35 +01:00
Garry Newman
cf3e252d2e
Merge pull request #474 from kamyker/k6-clan-chat
Added clan chat
2020-09-04 10:33:03 +01:00
Garry Newman
8d25edf498
Merge pull request #472 from MadrMan/master
Fix race condition with async callresults
2020-09-04 10:22:50 +01:00
Garry Newman
fd6f7c8586
Merge pull request #466 from kamyker/k5-lobbymsg
Lobby.SendChatString() and OnChatMessage fix
2020-09-04 10:16:54 +01:00
Garry Newman
bd6693146c Re-adding BroadcastUploadStart_t and BroadcastUploadStop_t - because while they're no longer in the sdk, they are documented on the site 2020-09-04 10:05:37 +01:00
Garry Newman
fdbb97748b Removing Removed 2020-09-04 10:04:57 +01:00
Garry Newman
d8b6cf7c83 Make NetKeyValue partial to support the added functions 2020-09-04 10:01:39 +01:00
Garry Newman
6291c8f117 Replace int64_t with long, int32_t with int 2020-09-04 09:55:06 +01:00
Garry Newman
73b5c9ceb6 Manually create SteamNet delegates 2020-09-04 09:53:07 +01:00
Garry Newman
699b7c0850 Don't generate types starting with "FnSteam" 2020-09-04 09:46:12 +01:00
Garry Newman
e4a35ff64d Generated 1.50 2020-09-04 09:43:19 +01:00
Garry Newman
a627bf76c8 Headers 1.50 2020-09-04 09:42:26 +01:00
Garry Newman
7609e61a14 Redist for 1.50 2020-09-04 09:41:24 +01:00
André Straubmeier
5645a91e7f Added SteamNetworkingSockets.ConnectRelay overload that takes an IConnectionManager 2020-09-01 10:31:17 +02:00
André Straubmeier
74207eeaf3 Added SteamNetworkingSockets.Identity 2020-09-01 10:30:42 +02:00
Simon Tang
44af74e892 Allow caller to specify OverlayToStoreFlags when opening Store Overlay - fix 2020-08-31 18:03:45 -07:00
Simon Tang
d373077c9a Allow caller to specify OverlayToStoreFlags when opening Store Overlay 2020-08-31 17:58:12 -07:00
André Straubmeier
f739f9b588 Added SteamNetworkingUtils.AllowWithoutAuth 2020-08-31 18:19:16 +02:00
kamyker
0d9db585f5 Added ugc addtional previews 2020-08-28 13:10:57 +02:00
kamyker
11bc35f254 Merge branch 'k3-item-dependency' into k7-addit-prevs 2020-08-28 13:09:55 +02:00
kamyker
0eb3672674 Added clan chat 2020-08-28 13:07:27 +02:00
André Straubmeier
f887d8a9ba Connection.QuickStatus implementation 2020-08-20 15:46:08 +02:00
André Straubmeier
c4ffb5eac7 CompileFix.bat includes unit test projects 2020-08-20 11:02:07 +02:00
André Straubmeier
f84872b38c Fix for duplicate OnDisconnected callbacks when ConnectionState.ClosedByPeer or ConnectionState.ProblemDetectedLocally were followed by ConnectionState.None 2020-08-19 18:27:09 +02:00
André Straubmeier
4a2eb22ec7 Reverting ConnectionState.None handling to previous behaviour (for the callbacks) 2020-08-18 14:34:37 +02:00
André Straubmeier
ea1408392b TestSocketInterface fix 2020-08-18 13:50:16 +02:00
Garry Newman
5fd6de76d7 UnitTest DLL fixes 2020-08-18 11:47:24 +01:00
Garry Newman
91d03c957f Added SteamFriends.RegisterProtocolInOverlayBrowser 2020-08-18 11:36:57 +01:00
Garry Newman
6d0cfa1ec8 Added SteamFriends.OnOverlayBrowserProtocol 2020-08-18 11:36:50 +01:00
Garry Newman
88c742d415 Added SteamApps.IsTimedTrial 2020-08-18 11:33:31 +01:00
Garry Newman
68a1886283 Generate for new SDK 2020-08-18 11:30:47 +01:00
Garry Newman
ce3c395b49 Add missing BroadcastUploadStart_t and BroadcastUploadStop_t callbacks 2020-08-18 11:29:00 +01:00
Garry Newman
24431ca9db Delete ISteamTV (seems to be removed from the SDK now) 2020-08-18 11:28:45 +01:00
Garry Newman
a8794e6321 Steam SDK 1.49 libraries 2020-08-18 11:16:51 +01:00
Garry Newman
49f25b3936 Steam SDK 1.49 .h 2020-08-18 11:13:59 +01:00
André Straubmeier
6e67204ddc Don't try to remove the connection poll group in OnDisconnected (causes assert spam) 2020-08-18 12:06:27 +02:00
André Straubmeier
401f53b30d Removed SocketManager.Connecting and SocketManager.Connected lists (can be tracked in ISocketManager if needed) 2020-08-18 11:52:31 +02:00
André Straubmeier
943c4f9a30 Handle ConnectionState.None similar to the examples 2020-08-18 11:27:06 +02:00
André Straubmeier
498c1b9a32 ISocketManager.OnDisconnected is in charge of calling Connection.Close so custom parameters can be used 2020-08-17 13:49:22 +02:00
André Straubmeier
5fdffff5c4 ConnectionManager.Close takes the same optional parameters as Connection.Close 2020-08-17 13:31:15 +02:00
MadrMan
384cbf6b4c Fix race condition with async callresults 2020-08-16 11:55:43 +02:00
kamyker
c7ac4997ed Lobby.SendChatString() and OnChatMessage fix 2020-08-05 01:17:59 +02:00
Garry Newman
950b256c27
Merge pull request #449 from rhys-vdw/patch-1
Document SteamClient.IsValid
2020-07-05 10:58:27 +01:00
kamyker
75dc868064 getting dependencies/children 2020-06-19 10:02:36 +02:00
Rhys van der Waerden
c0c32e500a
Document SteamClient.IsValid
Copied wording from https://wiki.facepunch.com/steamworks/Setting_Up#using
2020-06-12 11:21:58 +10:00
Garry Newman
ec3012484a
Merge pull request #445 from kamyker/k1-summmary-typo
Summary typo
2020-06-09 07:15:37 +01:00
Garry Newman
8a1722053e
Merge pull request #446 from kamyker/k2-collection-item
Collection ws item editor
2020-06-09 07:15:19 +01:00
kamyker
6e2ab8b735 Add/Remove ws item dependency 2020-06-09 00:22:54 +02:00
kamyker
198b5555a2 collection item editor 2020-06-09 00:17:03 +02:00
kamyker
30d52cd541 typo 2020-06-09 00:15:33 +02:00
Garry Newman
de69dd228f
Merge pull request #441 from maxha651/master
Support return UGC metadata in query
2020-06-07 10:55:30 +01:00
Max Halldén
b0a64798cf
Add hint about WithMetadata 2020-06-04 21:02:23 +02:00
Max Halldén
af36007f5d Support return UGC metadata in query 2020-05-31 00:24:25 +02:00
Garry Newman
ed45805029
Merge pull request #437 from naomiEve/clans
Steam Clans support
2020-05-25 16:06:30 +01:00
unknown
53fc721ea9 Added a Clan struct. Implemented most primitive clan functions 2020-05-25 16:51:01 +02:00
Garry Newman
d4356b75dd
Merge pull request #434 from kamyker/leaderboards-users-ids
Added GetScoresForUsersAsync (DownloadLeaderboardEntriesForUsers)
2020-05-21 09:53:17 +01:00
Garry Newman
5c95620ee6
Merge pull request #435 from kamyker/getasync-disposed
Item.GetAsync ResultPage disposed
2020-05-21 09:53:00 +01:00
kamyker
a3bd199b11 fix for count == 0 2020-05-20 22:32:51 +02:00
kamyker
7e4f1400c3 brace fix 2020-05-20 22:26:25 +02:00
kamyker
f568958a39 Fixed Item.GetAsync() not disposed 2020-05-20 17:31:44 +02:00
kamyker
b8df8aff4a Added GetScoresForUsersAsync (DownloadLeaderboardEntriesForUsers) 2020-05-19 23:22:26 +02:00
Garry Newman
d080548c20
Merge pull request #431 from kamyker/leaderboards-count
DownloadLeaderboardEntries count more precise
2020-05-18 11:18:50 +01:00
Garry Newman
c25bc70d53
Merge pull request #432 from kamyker/faster-ugc-query
Ability to disable default stats loading to speed up ugc query
2020-05-18 11:18:12 +01:00
kamyker
a9391b72d5 Ability to disable default stats loading to speed up ugc query 2020-05-18 02:18:43 +02:00
kamyker
b522f5affa Last parameter for DownloadLeaderboardEntries is index inclusive 2020-05-18 02:11:15 +02:00
Garry Newman
9101b82450
Merge pull request #423 from kamyker/key-value-tags
Ugc item key value tags
2020-05-15 07:31:24 +01:00
Garry Newman
8ea013d69e
Merge pull request #418 from brian9206/master
Interface approach for CreateRelaySocket
2020-05-15 07:25:33 +01:00
Garry Newman
025cc9b3f0
Merge pull request #419 from Dimma/patch-1
Update README.md
2020-05-15 07:25:12 +01:00
kamyker
d58d95fe38 Removing/replacing ugc KeyValueTags 2020-05-14 20:11:59 +02:00
kamyker
9d8a9a1e9a comma 2020-05-08 01:41:47 +02:00
kamyker
392b57e18d Ugc item key value tags
(cherry picked from commit a5386b358fec87911d2c4cd221d53b90f470bcf4)
2020-05-08 01:40:39 +02:00
Garry Newman
9b487aae0e Added IntPtr version of DecompressVoice 2020-05-07 11:54:27 +01:00
Garry Newman
b813ee7a17 Don't use ThreadStatic in Helpers 2020-05-07 11:47:46 +01:00
Garry Newman
04d1c86954 Update OnGameWebCallback docs 2020-05-07 11:35:36 +01:00
Garry Newman
c10167bb91 Throw exception if ContentFolder doesn't exist or is empty 2020-05-07 11:05:37 +01:00
Dimma
1f5b5bea5f
Update README.md
Wrong properties in "Get Avatars"
2020-05-04 17:37:15 +03:00
Brian Choi
aa1751071d Add interface method for CreateRelayServer 2020-05-02 22:18:46 +08:00
Garry Newman
0beaeb2e9d ISteamUGC.RequestUGCDetails is deprecated 2020-03-31 08:34:51 +01:00
Garry Newman
abb4b7f6b6 Compile fix 2020-03-31 08:28:35 +01:00
Garry Newman
a0974e9ba3 Use Helper.TakeMemory instead of TakeBuffer where safe 2020-03-31 08:24:12 +01:00
Garry Newman
ecdf217d08 Make Helper calls threadsafe 2020-03-31 08:10:43 +01:00
Garry Newman
4c353264cb
Merge pull request #391 from KingofBeast/master
Add OnSteamNetAuthenticationStatus and SteamServer.SteamId
2020-03-13 18:39:13 +00:00
KingofBeast
6d4639376d Install OnSteamNetAuthenticationStatus listener, expose SteamServer.SteamId 2020-03-13 13:05:21 -05:00
Garry Newman
2f8acff629 Making SteamMatchmakingServers internal since it's not used 2020-03-04 12:40:31 +00:00
Garry Newman
cf1260983c FileVersion 2020-03-04 12:40:19 +00:00
Garry Newman
ead77b6567 Update Facepunch.Steamworks.targets 2020-03-03 09:09:47 +00:00
Garry Newman
f9b6448469 Version update 2020-03-02 10:04:13 +00:00
Garry Newman
36e5e50d85 Fixed ConnectionInfo.Identity returning wrong thing 2020-03-02 10:03:38 +00:00
Garry Newman
1797505960 Update FriendsTest.cs 2020-03-02 09:49:02 +00:00
Garry Newman
2287e5527b Added Friends.OpenWebOverlay test 2020-03-02 09:30:10 +00:00
Garry Newman
e48a0db798 Version Update 2020-03-01 11:38:29 +00:00
Garry Newman
d06054875a Add MonoPInvokeCallback to OnDebugMessage 2020-02-28 19:21:23 +00:00
Garry Newman
23129f3a83 Added SteamNetworkingUtils.SendBufferSize 2020-02-28 15:34:41 +00:00
Garry Newman
3a11b6f8b3 Update Facepunch.Steamworks.Win64.csproj 2020-02-28 14:28:04 +00:00
Garry Newman
d9bf9abeac Update Facepunch.Steamworks.Win64.csproj 2020-02-28 14:13:49 +00:00
Garry Newman
1a1809ba40 Fixed calling StreamServer.Shutdown clearing client interfaces too 2020-02-28 14:13:47 +00:00
Garry Newman
08a4136a3e Seems like struct packing only changes with CSteamId if it's not the first field 2020-02-28 13:53:22 +00:00
Garry Newman
53d86e7e3f Call OnDebugCallback on CallResults too 2020-02-28 13:31:08 +00:00
Garry Newman
e9978ec55b Fixed GlobalStatsReceived not added to debug list 2020-02-28 13:26:06 +00:00
Garry Newman
773ea24aa4 Update Facepunch.Steamworks.Win64.csproj 2020-02-28 12:20:20 +00:00
Garry Newman
b265084d18 Added Dispatch.OnException 2020-02-28 12:10:53 +00:00
Garry Newman
c24b247094 Removed SteamClient.OnCallbackException, SteamServer.OnCallbackException 2020-02-28 11:41:11 +00:00
Garry Newman
e6c0167c48 Some collection modified safety in Dispatch (seeing a few exceptions on Rust staging) 2020-02-28 11:05:27 +00:00
Garry Newman
5aeeaa0cd7
Update README.md 2020-02-27 20:03:23 +00:00
Garry Newman
e5b467ae35 SendMessage comments 2020-02-27 20:00:38 +00:00
Garry Newman
08d36b7ea1 Only try to copy to Rust folder if you're using my computer 2020-02-27 14:33:19 +00:00
Garry Newman
ebf77a8fde Added interface versions of Connection/SocketManagers 2020-02-27 14:01:27 +00:00
Garry Newman
66b221984f Fixed Sockets created using CreateRelaySocket not recieving messages 2020-02-27 13:45:42 +00:00
Garry Newman
09256aa4a3 Rename SocketInterface to SocketManager, ConnectionInterface to ConnectionManager 2020-02-27 12:54:23 +00:00
Garry Newman
2acbf964de Build a .win32 version for nuget too 2020-02-27 12:53:49 +00:00
Garry Newman
631969360c use Defines.k_SteamInventoryResultInvalid instead of default 2020-02-27 10:02:03 +00:00
Garry Newman
9db103cb2f Add Steamworks.Dispatch.OnDebugCallback 2020-02-27 10:01:43 +00:00
Garry Newman
8db2b46729 Hide structs starting with "PS3" 2020-02-27 09:49:58 +00:00
Garry Newman
93e21a5f79 Generate a dictionary of CallbackType's and the actual typeof the callback struct 2020-02-27 09:21:38 +00:00
Garry Newman
600c7dbcc4 Debug output for SocketInterface test 2020-02-26 15:29:12 +00:00
Garry Newman
f7d9acd05a Added NetAddressTest 2020-02-26 15:28:52 +00:00
Garry Newman
61b09add87 ConnectionInfo exposes NetAddress, NetIdentity 2020-02-26 15:28:40 +00:00
Garry Newman
57775e5d10 Added a bunch more functions to NetAddress 2020-02-26 15:28:25 +00:00
Garry Newman
d900b6e217 Added a bunch of functions/properties to NetIdentity 2020-02-26 15:28:16 +00:00
Garry Newman
13feee328d Renamed var ConnectionInfo from data to info 2020-02-26 14:55:13 +00:00
Garry Newman
49b55c74b8 Using shorter NetAddress.From 2020-02-26 13:49:46 +00:00
Garry Newman
8b2a888feb Cleaned up SteamClientClass/SteamServerClass 2020-02-26 13:49:31 +00:00
Garry Newman
b0d23eff22 Fixed dispatch double callbacks when server initialized 2020-02-26 12:42:20 +00:00
Garry Newman
bf60680d87 Renamed SteamNetworkingUtils.GetConfigInt to SetConfigInt 2020-02-26 12:41:45 +00:00
Garry Newman
a8f1ac3799 Added SteamNetworkingUtils.Timeout 2020-02-26 12:41:29 +00:00
Garry Newman
122c2b0a57 Added SteamNetworkingUtils.ConnectionTimeout 2020-02-26 12:41:20 +00:00
Garry Newman
a60281dc41 Fixed SteamServer events being hooked twice 2020-02-25 19:04:28 +00:00
Garry Newman
5d9e4b5c0b Fixed SteamFriends events not being hooked 2020-02-25 19:03:56 +00:00
Garry Newman
4d98ea3d51 Output data as proper hex 2020-02-25 16:26:18 +00:00
Garry Newman
263fb219a8 Nuget - include steam_api64.dll 2020-02-25 14:37:29 +00:00
Garry Newman
998c18764a Chnaged RequestEncryptedAppTicketAsync tests to keep in mind that it can only be called once every 60 seconds 2020-02-25 13:29:15 +00:00
Garry Newman
59eabc1302 Throw exception if trying to initialize multiple times 2020-02-25 12:42:09 +00:00
Garry Newman
b45ac59a21 Update SteamNetworkingTest.cs 2020-02-25 12:33:16 +00:00
Garry Newman
f191ee5e42 Shutdown dispatch on server/client close 2020-02-25 12:32:12 +00:00
Garry Newman
895e11e801 Nuget shit 2020-02-24 18:58:53 +00:00
Garry Newman
61a103919b Delete Jenkinsfile 2020-02-24 17:14:22 +00:00
Garry Newman
a043019f0a Update dotnetcore.yml 2020-02-24 17:08:37 +00:00
Garry Newman
546066d4cc Update dotnetcore.yml 2020-02-24 17:03:06 +00:00
Garry Newman
d526fa5e9f Update dotnetcore.yml 2020-02-24 17:02:01 +00:00
Garry Newman
bffa403e39 actions/checkout@v2 2020-02-24 16:59:19 +00:00
Garry Newman
a075810468
Update dotnetcore.yml 2020-02-24 16:57:07 +00:00
Garry Newman
f1e8664d28
Create dotnetcore.yml 2020-02-24 16:42:51 +00:00
Garry Newman
c9053b0a91 In ISteamNetworking everything is deprecated apart from the p2p stuff 2020-02-24 16:26:23 +00:00
Garry Newman
403488dfcb Fixed NetworkUtils.DebugOut on 32bit 2020-02-24 14:46:29 +00:00
Garry Newman
d990b537a3 Some code quality stuff 2020-02-24 14:11:27 +00:00
Garry Newman
b52a63bc8b Delete Facepunch.Steamworks.Posix64.csproj 2020-02-24 13:34:32 +00:00
Garry Newman
23b3304332 RequestUserStats to RequestUserStatsAsync 2020-02-24 13:28:27 +00:00
Garry Newman
52ecc0b594 Added SteamUgc.DownloadAsync 2020-02-24 13:24:18 +00:00
Garry Newman
2843749918 Hide FriendFlags 2020-02-24 13:07:50 +00:00
Garry Newman
faee6f6cf2 Rename RequestGlobalStats to RequestGlobalStatsAsync 2020-02-24 12:58:46 +00:00
Garry Newman
29f426baf0 Added Friend.GetAchievementUnlockTime 2020-02-24 12:00:57 +00:00
Garry Newman
ae900f84bc Added Friend.GetAchievement 2020-02-24 12:00:42 +00:00
Garry Newman
2928939c9f Added Friend.GetStatInt 2020-02-24 12:00:34 +00:00
Garry Newman
7c20b57957 Added Friend.GetStatFloat 2020-02-24 12:00:26 +00:00
Garry Newman
18fbabaf2c Added Friend.RequestUserStats() 2020-02-24 12:00:13 +00:00
Garry Newman
86a8f80584 Fixed SocketInterface duplicate connections, callbacks 2020-02-24 11:33:52 +00:00
Garry Newman
44196682c8 Added SteamNetworkUtils.OnDebugOutput, DebugLevel 2020-02-24 11:33:29 +00:00
Garry Newman
41c1d0da08 Ignore enums with "Force32Bit" in their names 2020-02-24 10:33:11 +00:00
Garry Newman
3c8a2f6cd1 NetMsg uses the flat function to release 2020-02-24 10:14:59 +00:00
Garry Newman
afd314627d Added StructFunctions 2020-02-24 10:14:31 +00:00
Garry Newman
e7a6a00675 Networking Cleanup 2020-02-24 08:58:09 +00:00
Garry Newman
4871c634fb Added IsSteamChinaLauncher 2020-02-23 19:14:27 +00:00
Garry Newman
fc74049123 Added Duration Control 2020-02-23 19:09:31 +00:00
Garry Newman
f495d18ece Added SteamRemotePlay 2020-02-23 18:58:50 +00:00
Garry Newman
8b2599be98 Try to define whether interfaces are shared/client/server only a bit better 2020-02-23 18:34:56 +00:00
Garry Newman
c80421e9a9 Update NetworkingSocketsTest.TestConnectionInterface.cs 2020-02-23 11:48:31 +00:00
Garry Newman
428c2425a0 CallResult takes an IsServer parameter 2020-02-23 11:44:14 +00:00
Garry Newman
aab047717b Merge branch 'master' of https://github.com/Facepunch/Facepunch.Steamworks 2020-02-23 11:26:02 +00:00
Garry Newman
bc9801c36a Prefer use client interface if both exist (this might need a big change at some point) 2020-02-23 11:25:56 +00:00
Garry Newman
f517587edc
Update README.md 2020-02-23 09:43:06 +00:00
Garry Newman
49252f49f5
Update README.md 2020-02-23 09:41:57 +00:00
Garry Newman
23a5964171
Wiki link 2020-02-23 09:41:45 +00:00
Garry Newman
dfa98564f7 Update issue templates 2020-02-23 09:22:54 +00:00
Garry Newman
4d2d15f3af Update issue templates 2020-02-23 09:22:27 +00:00
Garry Newman
16d4b4f6f8 Update issue templates 2020-02-23 09:21:07 +00:00
Garry Newman
8f36f0c939 Comment Fix 2020-02-23 09:14:16 +00:00
Garry Newman
ffa48fb03c Fixed server interfaces 2020-02-23 08:57:25 +00:00
Garry Newman
011c596cb1 Meta Files 2020-02-22 21:52:00 +00:00
Garry Newman
4108895749 Build server fix 2020-02-22 21:47:30 +00:00
Garry Newman
e3ac585144 No need for posix32/64 now - combined to just posix 2020-02-22 21:45:26 +00:00
Garry Newman
c2a980227d Wrong named meta file 2020-02-22 21:28:22 +00:00
Garry Newman
4b10d72d12 Callback fix 2020-02-22 21:13:47 +00:00
Garry Newman
abb749078b Removed debug Console.WriteLine 2020-02-22 21:11:14 +00:00
Garry Newman
c8cb180b78 Added SteamUserStats.RequestGlobalStats 2020-02-22 21:03:29 +00:00
Garry Newman
d58dfdf4d2
Merge pull request #326 from kamyker/kamyker-patch-2
Fix for InvetoryDef Properties
2020-02-22 20:54:30 +00:00
Garry Newman
a934498263
Merge pull request #368 from mkracik/master
Added bool parameter Active to event OnGameOverlayActivated
2020-02-22 20:49:56 +00:00
Garry Newman
1d3585fa6a
Merge branch 'master' into master 2020-02-22 20:49:47 +00:00
Garry Newman
b6c24ce04c
Merge pull request #373 from matt-bcs/master
Added EntryCount to Leaderboard
2020-02-22 20:48:13 +00:00
Garry Newman
ceb66b731e
32bit now supported again 2020-02-22 20:47:48 +00:00
Garry Newman
8ecd08fa50
Update README.md 2020-02-22 20:47:24 +00:00
Garry Newman
3a0e68c6e1 Unity dll updates 2020-02-22 20:46:24 +00:00
Garry Newman
a7954f9e21 Updated tests 2020-02-22 20:29:37 +00:00
Garry Newman
d8e5a48f65 Updated Implementation to use flat api 2020-02-22 20:23:19 +00:00
Garry Newman
92b45c7596 Latest Generated 2020-02-22 20:18:07 +00:00
Garry Newman
ed96cafbe4 Updated generator to use flat files 2020-02-22 20:16:04 +00:00
Garry Newman
85339a079a Steamworks 1.48 2020-02-22 20:14:01 +00:00
Matt Davis
6c84df0ef8 fixed indent for EntryCount 2020-02-16 12:15:27 -05:00
Matt Davis
2872bb92f7 added EntryCount to Leaderboard 2020-02-15 21:23:03 -05:00
Michal Kracik
841d665046 Updated OnGameOverlayActivated.
Updated to OnGameOverlayActivated?.Invoke( x.Active != 0 ) )
2020-02-10 14:49:55 -05:00
Michal Kracik
f60b54df33 Added bool parameter Active to event OnGameOverlayActivated to pass it from GameOverlayActivated_t. 2020-02-09 09:25:43 -05:00
Garry Newman
cfa77bc9e2
Merge pull request #366 from trdwll/connectionid
Make Id public only a getter
2020-02-05 10:17:33 +00:00
Garry Newman
2db3bb9bb3
Merge pull request #364 from trdwll/Lobby-ctor-public
Make Lobby ctor public
2020-02-05 10:17:17 +00:00
Russ Treadwell
427524abc9
Make Id public only a getter 2020-02-04 18:03:06 -05:00
Russ Treadwell
06d0059d87
Make Lobby ctor public 2020-02-04 13:47:57 -05:00
Garry Newman
f3443935b2
Merge pull request #356 from trdwll/ISteamFriends-add-methods
Expose IsFollowing, GetFollowerCount, and EnumerateFollowingList
2020-01-23 08:21:27 +00:00
Russ Treadwell
e4e3b0dbce
Fix EnumerateFollowingList and rename to GetFollowingList 2020-01-22 22:52:03 -05:00
Russ Treadwell
1a263c09cf
Expose IsFollowing, GetFollowerCount, and EnumerateFollowingList in SteamFriends 2020-01-21 17:35:04 -05:00
Garry Newman
6fbc1e80f3
Merge pull request #354 from trdwll/typo-fix
typo on AvailableLanguages
2020-01-21 22:30:39 +00:00
Garry Newman
7c82a9fc60
Merge pull request #355 from trdwll/shutdown-fix
shutdown server stats
2020-01-21 22:30:25 +00:00
Garry Newman
8dc011964f
Merge pull request #353 from kamyker/ugc-dl-validation
Fixed ugc validation/redownload
2020-01-21 22:30:09 +00:00
Garry Newman
6e896c2085
Merge pull request #350 from kurozael/ft/steam-input-glyph
Added a method to retrieve the glyph location for a provided controller and action
2020-01-21 22:26:35 +00:00
Russ Treadwell
1fd8ea89a9
shutdown server stats 2020-01-21 14:41:38 -05:00
Russ Treadwell
773605c841
typo on AvailableLanguages 2020-01-21 14:29:54 -05:00
kamyker
d42996142f Fixed ugc validation/redownload 2020-01-20 19:57:36 +01:00
kamyker
22e963250e Merge remote-tracking branch 'origin23/master' into masterFP 2020-01-20 19:54:13 +01:00
kurozael
d919a1e635 Added a method to retrieve the glyph location for a provided controller and action 2020-01-18 22:38:34 +00:00
Garry Newman
4e98ae5027
Merge pull request #338 from alexcodejammer/master
Exposed ConnectionInfo.EndReason
2019-12-16 10:24:55 +00:00
Alex Mein
19e64429c4 Merge remote-tracking branch 'upstream/master' 2019-12-16 09:49:24 +00:00
Rohan Singh
710c6a0ce7 Limit SourceServerQuery to one concurrent request per endpoint 2019-12-07 08:41:06 -05:00
Garry Newman
2e6db5fe37 fixed SourceServerQuery shared buffer errors 2019-12-06 14:27:38 +00:00
Garry Newman
127de84c8c
Merge pull request #335 from kamyker/subdl-fix
Fixed sometimes false returned from SubscribeDownloadAsync
2019-12-06 08:47:30 +00:00
kamyker
e9d130572a Fixed sometimes false returned from SubscribeDownloadAsync 2019-12-06 01:43:27 +01:00
Alex Mein
2fc5206b38 Exposed ConnectionInfo.EndReason 2019-12-05 16:49:52 +00:00
Garry Newman
04ad04f95d Added SteamServer.UserHasLicenseForApp 2019-12-04 11:15:58 +00:00
Garry Newman
32fbf63644
Merge pull request #333 from kamyker/ws-download-progress
SubscribeDownloadAsync for workshop item
2019-12-03 10:58:10 +00:00
kamyker
61f3809b4e SubscribeDownloadAsync has flag state fix 2019-12-03 01:13:27 +01:00
kamyker
c5f1033aeb Added SubscribeDownloadAsync for workshop item 2019-12-03 01:07:39 +01:00
Kamil Szurant
6587db5a9d
Fix for InvetoryDef Properties
Otherwise we get error in `_properties[name] = vl;` as name is null. GetProperty(null) is called to get list of keys as string. I guess separate method would be cleaner but I'm keeping this example to minimum (or im too lazy).
2019-11-19 20:50:41 +01:00
Garry Newman
f1fdf29124
Merge pull request #319 from LukasKastern/master
Added SteamFriends.GetFriendsWithFlag
2019-11-11 08:56:06 +00:00
Garry Newman
8ceecd7350
Merge pull request #321 from alexcodejammer/master
Added missing workshop features
2019-11-11 08:55:36 +00:00
Garry Newman
5832c3ea82
Merge pull request #323 from HouraiTeahouse/master
Add unsafe overloads for SteamNetworking P2P send and recieve functions
2019-11-11 08:54:50 +00:00
james7132
84063b674c Fix indentation 2019-11-10 17:03:21 -08:00
james7132
3e95d41692 Add unsafe overloads for SteamNetworking 2019-11-10 16:57:39 -08:00
Alex Mein
2f63117c32 Exposed the full result of the Vote method 2019-10-28 15:40:30 +00:00
Alex Mein
8b231bf4d6 Made SteamUGCDetails_t.Result available via a public method in UgcItem 2019-10-23 11:07:56 +01:00
Alex Mein
f549a69bc0 Added proper implementation of the various 'setreturn...' methods which previously did nothing 2019-10-18 10:07:18 +01:00
Alex Mein
4997a74d15 Added public methods for playtime tracking 2019-10-16 16:02:01 +01:00
Alex Mein
e3ce99bc12 Added missing newline 2019-10-16 14:47:23 +01:00
Alex Mein
455a9f8956 Added missing public methods for various functions in ISteamUGC. Fixed UGC Submit process reporting invalid progress value. 2019-10-16 14:41:57 +01:00
Lukas Kastern
83aa37ce4f Added SteamFriends.GetFriendsWithFlag
Added SteamFriends.GetFriendsWithFlag.
Reworked SteamFriends.GetFriends and SteamFriends.GetBlocked to work upon it.
I also had to expose the FriendFlags.
2019-10-11 16:44:27 +02:00
Garry Newman
06169693d0
Merge pull request #310 from laurirasanen/master
Add SteamFriends.GetFromSource
2019-09-19 14:41:12 +01:00
laurirasanen
796976cd47 Add SteamFriends.GetFromSource 2019-09-19 16:25:43 +03:00
Garry Newman
39952fe50e
Merge pull request #308 from TheCubicNoobik/SteamFriends-fix
Fix SteamFriends.GetRichPresence(key, value)
2019-09-16 10:02:20 +01:00
Andrii Vitiv
9ad3a57ad9
Fix SteamFriends.GetRichPresence(key, value)
Adds key/value to the dictionary only if the rich presence was set successfully. Also fixes #307
2019-09-15 00:48:49 +03:00
Garry Newman
5666bb432e Update package version 2019-08-29 15:58:56 +01:00
Garry Newman
3c2eeb7f2f Throw exceptions if trying to use client interfaces with no client 2019-08-17 11:52:56 +01:00
Garry Newman
a7666d7d51 Can disable automatic RunCallback calling by setting asyncCallbacks to false in Init 2019-08-17 11:40:52 +01:00
Garry Newman
71b977ef7e Don't catch and send exceptions to OnCallbackException in RunCallbacks (but do in RunCallbacksAsync) 2019-08-17 11:40:26 +01:00
aylaylay
a02d1e87a7 Revert "Revert "Fixed server not being listed on master server""
This reverts commit ac8983ee949501dec4a241e3494a57fa7cc61de3.
2019-08-17 08:08:10 +01:00
aylaylay
ac8983ee94 Revert "Fixed server not being listed on master server"
This reverts commit c69b817d62fe90e17e748e190d055b7ee511ff20.
2019-08-17 08:07:25 +01:00
Garry Newman
5c36a5c338 Removed usages of StringBuffer
Il2CPP fucks over StringBuffer by changing its Capacity
We can properly UTF8 convert these strings now
2019-08-14 14:39:04 +01:00
Garry Newman
58eae03ae4 Added UGCItem download stats 2019-08-14 12:01:39 +01:00
Garry Newman
4f6e8bf8d1 Trying PreserveAttribute instead 2019-08-08 11:00:34 +01:00
Garry Newman
1a02a9c363 Prevent Utf8StringToNative.GetInstance getting optimized out 2019-08-07 19:43:44 +01:00
Garry Newman
1e5dc7b2ea Added CompileFix.bat whcih calls dotnet restore on every project (wtf) 2019-08-07 19:15:51 +01:00
Garry Newman
4fafe33a93
Merge pull request #286 from LukasKastern/master
Fixed GetFriends returning blocked friends
2019-07-04 09:18:08 +01:00
Lukas Kastern
717ec3942f
Add files via upload 2019-07-03 20:59:03 +02:00
Garry Newman
c6c73a36e9 Handle steam shutdown nicer 2019-07-02 14:12:55 +01:00
Garry Newman
38b1ed5f88 Il2Cpp didn't like CustomMarshaler on returns, so string returns are Utf8StringPointer instead, which implicit converts to string 2019-07-02 13:52:04 +01:00
Garry Newman
2fb1426479 win64 doesn't care about calling convention - but apprently il2cpp does, so we use CallingConvention.Cdecl on everthing 2019-07-02 13:37:34 +01:00
Garry Newman
7a4f0c029a Fix MatchMakingKeyValuePair issues 2019-07-02 12:08:02 +01:00
Garry Newman
968e658913
Merge pull request #281 from thesupersoup/master
Lobby game server methods, OnLobbyCreated and OnLobbyGameCreated, Achievement progress
2019-07-01 10:08:54 +01:00
Garry Newman
1273b5985f
Merge pull request #283 from Agoxandr/fixtypo
Fix typo SteamNetworkingUtils.LocalTimestamp
2019-07-01 10:07:55 +01:00
thesupersoup
d2e4417ef2 Added OnLobbyCreated
Added OnLobbyCreated action and handler for associated LobbyCreated_t event
2019-06-30 03:23:08 -07:00
Alexander Filippov
fc42dca5bf Fix LocalTimestamp 2019-06-29 14:17:49 +02:00
thesupersoup
17434b2910 Updated summary for SetGameServer, IndicateAchProg exception 2019-06-26 20:36:17 -07:00
thesupersoup
7c1a218553 Lobby game server methods, OnLobbyGameCreated event, Achievement progress notification
Added SetGameServer and GetGameServer for lobby, added OnLobbyGameCreated event in SteamMatchmaking, added SteamId.IsValid check against default ulong value, added SteamUserStats.IndicateAchievementProgress for progress notification.
2019-06-26 20:31:54 -07:00
Garry Newman
6f5bde4f79
Merge pull request #278 from thesupersoup/master
LobbyQuery Numerical and NearVal Filters, SteamClient and Friend OwnsLobby
2019-06-26 10:04:25 +01:00
Garry Newman
3b4d4bf3d8 Cleanup proper 2019-06-25 15:03:21 +01:00
Garry Newman
689ada6eca Clean workspace up 2019-06-25 13:39:18 +01:00
Garry Newman
b60fa061ed Only copy dlls to debug locations if we're compiling on my PC 2019-06-25 13:26:18 +01:00
Garry Newman
e7deae2ae3 Update Jenkinsfile 2019-06-25 13:12:17 +01:00
Garry Newman
caea5ccb9b Fixed pointer size in ConnectionInterface 2019-06-25 13:01:41 +01:00
Garry Newman
39bc7b5c1b StructPlatformPackSize is 8 on win32 2019-06-25 12:58:25 +01:00
Garry Newman
11cc473a6e PLATFORM_32/64 defines 2019-06-25 12:47:31 +01:00
Garry Newman
7f4e0567a6 Swap overloaded function address on both win32 and win64 2019-06-25 12:47:22 +01:00
Garry Newman
7fbc333547 Handle struct returns differently on 32bit windows too 2019-06-25 12:42:17 +01:00
Garry Newman
a24ae4bac5 Translate memory offsets for 32bit 2019-06-25 12:40:23 +01:00
Garry Newman
a53a0f537c Allow 32bit processes 2019-06-25 12:36:57 +01:00
Garry Newman
71af8c0e9b Copy steam_api in tests 2019-06-25 12:36:46 +01:00
Garry Newman
74ec75b708 32bit test projects 2019-06-25 12:36:27 +01:00
Garry Newman
617275db3f 32bit test libs 2019-06-25 12:36:16 +01:00
Garry Newman
69e2e9bd39 POSIX32 2019-06-25 12:21:29 +01:00
Garry Newman
016b86ce8e Config no longer needed 2019-06-25 12:14:15 +01:00
Garry Newman
4cef345d95 Callback vtable uses #ifdef 2019-06-25 12:13:30 +01:00
Garry Newman
f53e1aaba0 Global function cleanup 2019-06-25 12:13:04 +01:00
Garry Newman
d5abb32aeb Neater generated vtable code 2019-06-25 12:04:43 +01:00
Garry Newman
810cb3623f Code formatting 2019-06-25 12:01:00 +01:00
Garry Newman
1df586305d No need to use Config.Os for vtable address swapping 2019-06-25 12:00:04 +01:00
Garry Newman
690db722eb No need for _Windows function alternatives 2019-06-25 11:39:17 +01:00
Garry Newman
6dbed6a91d StructPlatformPackSize instead of runtime Pack8 shit 2019-06-25 11:20:39 +01:00
thesupersoup
f42fa5942f Update NumericalFilter.cs
Removed unnecessary using statements
2019-06-25 03:09:40 -07:00
thesupersoup
12c26384e7 Update LobbyQuery.cs 2019-06-25 03:04:35 -07:00
Garry Newman
02e9063db8 New projects in solution 2019-06-25 11:01:49 +01:00
thesupersoup
9442689b02 NumericalFilter struct and suggested changes
Added NumericalFilter struct, changed the dictionary for numerical filters into a list of the struct, removed IsOwner from Friend and SteamClient and added IsOwnedBy( SteamId ) to Lobby
2019-06-25 03:01:13 -07:00
Garry Newman
040291ed22 Platform specific dlls 2019-06-25 10:03:38 +01:00
thesupersoup
db41c0f407 Update LobbyQuery.cs 2019-06-24 21:47:19 -07:00
thesupersoup
4b8e1e33af LobbyQuery Numerical Filters, NearValFilter, SteamClient and Friend OwnsLobby methods
Added LobbyQuery numerical filters for WithLower, WithHigher, WithEqual, and WithNotEqual; added OrderByNear for near value filters. Added OwnsLobby method to SteamClient and Friend to test for ownership.
2019-06-24 20:13:48 -07:00
Garry Newman
0300b46ed3 Sting Filter fixes 2019-06-24 15:09:29 +01:00
Garry Newman
57f3b334b5
Merge pull request #277 from thesupersoup/master
LobbyQuery FilterStringKeyValue method
2019-06-24 13:35:59 +01:00
thesupersoup
efd2fa2291 Changed exception check in FilterStringKeyValue
To check for invalid argument conditions
2019-06-24 01:45:10 -07:00
thesupersoup
fdc5b49587 Exceptions and expression body definition
Added exception throwing for FilterStringKeyValue, changed MaxLobbyKeyLength to internal and expression body definition
2019-06-24 01:35:33 -07:00
thesupersoup
645e7bd91e Removed second FilterStringKeyValue method and improved first
Second method was non-functional due to access modifier inconsistency, added IsNullOrEmpty and MaxLobbyKeyLength check to first method, added MaxLobbyKeyLength (and backing field) to SteamMAtchmaking, taken from https://partner.steamgames.com/doc/api/ISteamMatchmaking#constants
2019-06-23 22:12:21 -07:00
Mitch
6a0a46f495 Method summary for FilterStringKeyValue( MatchMakingKeyValuePair_t kv )
Added summary to method
2019-06-23 18:32:27 -07:00
Mitch
caf52e4c4b Update LobbyQuery.cs 2019-06-23 14:54:12 -07:00
Mitch
78761d9fd7 LobbyQuery FilterStringKeyValue diff param
Added MatchMakingKeyValuePair_t veriant of FilterStringKeyValue
2019-06-23 14:52:36 -07:00
thesupersoup
56efc9f48b LobbyQuery String Filter
Added LobbyList FilterStringKeyValue method, fixed spacing on SteamMatchmaking.LobbyEnter_t.Install() parameter
2019-06-23 14:19:16 -07:00
Garry Newman
08405459bd
Merge pull request #276 from JannikNickel/master
Added missing functionality to UgcQuery and UgcItem
2019-06-23 19:27:46 +01:00
Jannik Nickel
97b85172e2 Update UgcItem.cs 2019-06-23 20:22:37 +02:00
Jannik Nickel
c4eff7f61a Added missing methods to UgcItem and UgcQuery
Added Steamworks.Ugc.Query.WhereSearchText
Added Steamworks.Ugc.Item.VotesUp
Added Steamworks.Ugc.Item.VotesDown
Added Steamworks.Ugc.Item.Subscribe
Added Steamworks.Ugc.Item.Unsubscribe
2019-06-23 20:22:28 +02:00
Garry Newman
fd50e3ba71 Added SteamClient.RestartAppIfNecessary 2019-06-21 11:59:11 +01:00
Garry Newman
15dc2782cc Nicer return string marshalling 2019-06-20 13:26:11 +01:00
Garry Newman
1d242fbc98 Added CreateChineseFile test 2019-06-20 13:10:38 +01:00
Garry Newman
a0478a6040 Store struct strings as byte and encode as utf8 on demand 2019-06-20 13:10:28 +01:00
Garry Newman
615645a30e Utf8String marshaller 2019-06-20 12:19:21 +01:00
Garry Newman
552d5251f8 Merge branch 'master' of https://github.com/Facepunch/Facepunch.Steamworks 2019-06-20 11:39:17 +01:00
Garry Newman
bddac0ccc9 Cleanup, crash fixes 2019-06-20 11:39:13 +01:00
Garry Newman
fa48a1ce33 Controller progress 2019-06-20 10:41:57 +01:00
Garry Newman
bce40a3c3a
Merge pull request #274 from thesupersoup/master
Pull req - OnLobbyEntered Action and JoinLobbyAsync
2019-06-20 09:23:50 +01:00
thesupersoup
ade772d195 Pull req - OnLobbyEntered Action and JoinLobbyAsync
Added an OnLobbyEntered action with associated LobbyEnter_t event install, and added a JoinLobbyAsync method which returns the joined lobby if successful
2019-06-19 21:17:53 -07:00
thesupersoup
cb06574820 Pull req - OnLobbyEntered Action and JoinLobbyAsync
Added an OnLobbyEntered action with associated LobbyEnter_t event install, and added a JoinLobbyAsync method which returns the joined lobby if successful
2019-06-19 21:14:35 -07:00
Garry Newman
1c5cdd2d39 Controller tests 2019-06-19 16:18:12 +01:00
Garry Newman
ae1f648fa6 SteamInput, Controller boilerplate 2019-06-19 13:08:49 +01:00
Garry Newman
1ac22e1407 ISteamInput.GetConnectedControllers is an array 2019-06-19 13:05:09 +01:00
Garry Newman
77f3e09e98 Convert steam struct bools to bytes (to make them marshallable) 2019-06-19 13:04:18 +01:00
Garry Newman
985aefc2de SteamInput Base 2019-06-19 11:35:35 +01:00
Garry Newman
41a0b31644 ISteamInput generation 2019-06-19 11:33:16 +01:00
Garry Newman
ef071d3d71 OnP2PConnectionFailed passes error enum 2019-06-19 11:25:16 +01:00
Garry Newman
7c50db6997 Merge branch 'master' of https://github.com/Facepunch/Facepunch.Steamworks 2019-06-03 11:10:00 +01:00
Garry Newman
5b32943aa8 Increase max string length 2019-06-03 11:09:57 +01:00
Garry Newman
d64ef909c6
Merge pull request #269 from laurirasanen/master
Install SteamNetworkingSockets events when initializing SteamServer
2019-06-02 17:05:17 +01:00
laurirasanen
52381d4af8 Install SteamNetworkingSockets events when initializing SteamServer 2019-06-02 13:44:04 +03:00
Garry Newman
33703be387 nuget version 2019-05-30 15:11:13 +01:00
Garry Newman
adf39138a4 Add IntPtr version of HandleIncomingPacket 2019-05-30 08:15:01 +01:00
Garry Newman
253c206f71 Added OnSteamServerConnectFailure 2019-05-27 15:24:43 +01:00
Garry Newman
33830e274e Added SteamServer.ClearKeys() 2019-05-27 15:24:28 +01:00
Garry Newman
c93fe0ca11 Added SteamServer.LogOff() 2019-05-27 15:24:19 +01:00
Garry Newman
c69b817d62 Fixed server not being listed on master server 2019-05-27 15:23:56 +01:00
Garry Newman
2ad31e1375 Append Async to some async method names 2019-05-27 10:54:30 +01:00
Garry Newman
c60612b8b0 Some currency fix ups 2019-05-26 21:33:18 +01:00
Garry Newman
e4c9e9d034 Added SteamInventory.StartPurchaseAsync 2019-05-25 14:34:59 +01:00
Garry Newman
cad7edcec0 Added SteamMatchmaking.GetHistoryServers() 2019-05-24 15:19:04 +01:00
Garry Newman
5c973b0092 Fixed history servers being returned in favourites 2019-05-24 15:18:55 +01:00
Garry Newman
ffb0c7a830 Changed FriendGameInfo GamePort to ConnectionPort to match ServerInfo 2019-05-23 15:10:07 +01:00
Garry Newman
91e9e162f3 Added SteamMatchmaking.GetFavoriteServers() 2019-05-23 14:59:42 +01:00
Garry Newman
711bc7cb3d ServerInfo (AddTo|RemoveFrom)(History|Favorites) works 2019-05-23 14:46:26 +01:00
Garry Newman
761ff33663 Added GetAuthSessionTicketAsync, which waits on GetAuthSessionTicketResponse_t before returning 2019-05-21 20:39:56 +01:00
Garry Newman
2c4fc82ae2 Filled out FriendGameInfo 2019-05-20 14:52:31 +01:00
Garry Newman
6b9b7da34b Fixed SteamInventory not getting events on server 2019-05-18 12:04:43 +01:00
Garry Newman
7c53fc580d
Merge pull request #255 from FromZeus/master
Add ServersConnected and ServerConnectFailure callbacks to SteamServer
2019-05-17 09:10:02 +01:00
Daniil Trishkin
5f7bd08320 Add SteamServersConnected_t and SteamServerConnectFailure_t callbacks to SteamServer 2019-05-17 01:08:35 +02:00
Garry Newman
f06b4b431b InventoryItem.Flags uses SteamItemFlags 2019-05-16 15:02:16 +01:00
Garry Newman
a5bd78a597 SteamItemDetails_t should read flags properly on windows 2019-05-16 15:02:00 +01:00
Garry Newman
778b1081cb Windows specific on overloaded functions in ISteamGameServerStats 2019-05-15 13:25:50 +01:00
Garry Newman
a1599e3226 Added InventoryResult.BelongsTo( <steamid> ) 2019-05-15 13:11:00 +01:00
Garry Newman
cf2bc51c54 InventoryDef and Recpie IEquatable 2019-05-14 20:17:15 +01:00
Garry Newman
208af219d2 Added Acquired and Origin properties to InventoryItem 2019-05-14 20:17:01 +01:00
Garry Newman
17d7263973 Added InventoryDef.GetRecipesContainingThis() 2019-05-14 16:05:28 +01:00
Garry Newman
fed6ccdefa Should fix inventory definitions updating on server 2019-05-14 15:47:25 +01:00
Garry Newman
98915f0950 Fallback to FindOrCreateUserInterface if CreateInterface returns null 2019-05-14 13:29:09 +01:00
Garry Newman
a2942bd098 Use CreateInterface instead of FindOrCreateUserInterface 2019-05-14 10:23:43 +01:00
Garry Newman
d671c1ddc8 Test warning fixes 2019-05-14 10:23:21 +01:00
Garry Newman
fff2fc6098 Cleaning up inventory deserialize 2019-05-13 20:05:10 +01:00
Garry Newman
f629b1c663 Fixed NRE in OnAchievementIconFetched 2019-05-13 19:51:20 +01:00
Garry Newman
7a30b76a26 Don't release inventoryg result in InventoryUpdated callback 2019-05-13 15:51:55 +01:00
Garry Newman
69ec868227 Added Async to some async calls 2019-05-13 15:50:31 +01:00
Garry Newman
6981eb4a73 FindDefinition return null if _defMap is null 2019-05-13 14:50:47 +01:00
Garry Newman
fdee0bfc1e Cancel async waits if steam becomes invalid during wait 2019-05-13 13:13:12 +01:00
Garry Newman
b6cecf0082 If SteamInternal.GameServer_Init returns false, print the parameters in the error 2019-05-13 10:37:36 +01:00
Garry Newman
6a2db11c5d AppId.ToString 2019-05-13 10:37:07 +01:00
Garry Newman
326d27e98e Fixed UGC User Queries 2019-05-13 09:21:20 +01:00
Garry Newman
44dfa45337 Fixed server not setting appid properly 2019-05-13 09:13:19 +01:00
Garry Newman
99dcc83ab0 Comment fix 2019-05-13 09:01:21 +01:00
Garry Newman
f014681cc4 Clear interfaces and dangling pointers on steam shutdown 2019-05-10 14:08:17 +01:00
Garry Newman
69773bb033 Squeeze all the UGC Queries into one struct 2019-05-10 13:38:04 +01:00
Garry Newman
8a6bbb9a91 SteamTypes implement IComparable 2019-05-10 12:22:28 +01:00
Garry Newman
d290c26db1 Shutdown ISteamMatchmakingServers properly 2019-05-10 12:13:30 +01:00
Garry Newman
43f09dc2ed Update InventoryTest.cs 2019-05-10 10:50:47 +01:00
Garry Newman
586f4ee6f2 Added Ugc.Item.Edit() 2019-05-10 10:43:03 +01:00
Garry Newman
1980a2106a Update Base.cs 2019-05-10 10:10:20 +01:00
Garry Newman
d0b4ce0451 Fixed OnActiveBeaconsUpdated not getting called 2019-05-10 10:10:03 +01:00
Garry Newman
075e5460a4 InventoryItem IEquatable 2019-05-10 10:09:52 +01:00
Garry Newman
eae18553da Types now impl,ement IEquatable 2019-05-10 10:08:47 +01:00
Garry Newman
10c099d910 Added Steamworks.ServerList.IpList for querying an array of Ips 2019-05-10 09:33:58 +01:00
Garry Newman
b85fe5ffd8 nGameLobbyJoinRequested now passes a lobby object 2019-05-09 16:18:34 +01:00
Garry Newman
000358aae8 SteamServerStats 2019-05-09 11:29:50 +01:00
Garry Newman
8c986113de ISteamGameServerStats 2019-05-09 11:17:19 +01:00
Garry Newman
360645962f Equality compare InventoryItem (probably need to do this to every struct) 2019-05-08 21:15:20 +01:00
Garry Newman
f65cfecc64 Changed TransferItemQuantity to Add 2019-05-08 21:14:58 +01:00
Garry Newman
85c55a5bb1 SteamServer.Update becomes RunCallbacks, has OnCallbackException 2019-05-08 20:49:33 +01:00
Garry Newman
9339477c89 SteamInventory.AddPromoItemAsync 2019-05-08 14:52:47 +01:00
Garry Newman
8ea4231778 SteamInventory.TriggerItemDropAsync 2019-05-08 14:52:39 +01:00
Garry Newman
39c1e8da1e SteamInventory.GrantPromoItemsAsync 2019-05-08 14:52:32 +01:00
Garry Newman
60377c9c5b SteamUser.DecompressVoice with byte 2019-05-08 14:52:16 +01:00
Garry Newman
0342f8a712 SteamUserStats.ResetAll 2019-05-08 14:52:05 +01:00
Garry Newman
3212f39be5 SteamUserStats - direct Get/Setters 2019-05-08 14:51:58 +01:00
Garry Newman
05e12c32e1 OnInventoryUpdated passes the InventoryResult 2019-05-08 13:01:28 +01:00
Garry Newman
49bb3644bd Added Stat.Add 2019-05-08 12:38:09 +01:00
Garry Newman
f8798f2f4e Added Server.Tags 2019-05-08 12:28:47 +01:00
Garry Newman
cf458a515a OnAchievementProgress returns a Achievement instead of a string 2019-05-08 12:07:57 +01:00
Garry Newman
6c0e3df84c FetchItem to QueryFileAsync 2019-05-08 11:18:56 +01:00
Garry Newman
c6ac47c0c3 Use pack8 structs for windows where appropriate 2019-05-08 11:13:23 +01:00
Garry Newman
1dd679c391 Test fixes 2019-05-08 11:12:39 +01:00
Garry Newman
ad21e90e90 Added IsPack4OnWindows to codegen struct 2019-05-08 09:49:32 +01:00
Garry Newman
c625bbaef9 Added QuerySpecificFile test 2019-05-08 09:40:42 +01:00
Garry Newman
966ad90630 Added SteamUGC.FetchItem 2019-05-08 09:40:28 +01:00
Garry Newman
eceeb2cb8f Added Steamworks.Ugc.FileQuery 2019-05-08 09:40:19 +01:00
Garry Newman
18f81573f5 Added CraftItemAsync with Amounts 2019-05-07 21:25:41 +01:00
Garry Newman
d40efa8612 InventoryDef properties cache 2019-05-07 21:11:55 +01:00
Garry Newman
b6fa05afa2 InventoryDef.IsGenerator 2019-05-07 21:11:45 +01:00
Garry Newman
060af634d7 SteamInventory.Items (because it's nice and noob friendly) 2019-05-07 21:01:42 +01:00
Garry Newman
a020474856 Added RequestEncryptedAppTicketAsync 2019-05-07 20:21:06 +01:00
Garry Newman
503d8964ea NormalEndtoEnd test, fixed lockups 2019-05-07 17:42:03 +01:00
Garry Newman
d811afc741 Added "Connecting" bool to ConnectionInterface 2019-05-07 17:41:53 +01:00
Garry Newman
45471330d4 Regions in SteamNetworkingSockets 2019-05-07 17:41:36 +01:00
Garry Newman
82fe950bbf Can define Ip in NetAddress 2019-05-07 17:41:24 +01:00
Garry Newman
89e93d6c2a Added Async to some async method names 2019-05-07 16:59:52 +01:00
Garry Newman
6ecc68e5d7 Fixed some SteamInventory methods not being public 2019-05-07 16:52:39 +01:00
Garry Newman
1dc804c7ac Added UgcEditor.WithChangeLog 2019-05-07 16:44:01 +01:00
Garry Newman
8560d94a18 Ugc.Editor visibility 2019-05-07 16:41:18 +01:00
Garry Newman
43c3aa35f5 Ugc.Editor.WithTag 2019-05-07 16:38:54 +01:00
Garry Newman
a82a56bd4c SteamParamStringArray 2019-05-07 16:38:36 +01:00
Garry Newman
3516422c3f UgcEditor.WithPreviewFile 2019-05-07 16:28:48 +01:00
Garry Newman
fd320e2848 Steamworks.Ugc.Item.GetAsync 2019-05-07 16:28:35 +01:00
Garry Newman
f42fdfd09a Rename Ugc.Item.PreviewImageUrl 2019-05-07 15:50:37 +01:00
Garry Newman
a4a1b32bc7 Made SteamInventory.FindDefinition public 2019-05-07 15:49:35 +01:00
Garry Newman
2a74b309dd Added ServerInfo.QueryRulesAsync 2019-05-07 15:33:44 +01:00
Garry Newman
78c69b15a8 InventoryRecipe 2019-05-07 14:27:11 +01:00
Garry Newman
0ae14db7f8 Fixes 2019-05-06 21:41:48 +01:00
Garry Newman
63b3cae096 Cleaning up 2019-05-06 21:19:00 +01:00
Garry Newman
ea97de9c02 Tons of extra UGCItem fields 2019-05-06 20:46:11 +01:00
Garry Newman
dda27d2c61 Delete SteamServerInventory.cs 2019-05-06 15:45:43 +01:00
Garry Newman
2a55d7a8e8 Added Ugc.Item.Directory 2019-05-06 15:45:25 +01:00
Garry Newman
a0d9fdeab1 Added Steamworks.Realm 2019-05-06 15:45:01 +01:00
Garry Newman
d1cc0da526 Adding SteamFriends.RequestUserInformation 2019-05-06 15:44:51 +01:00
Garry Newman
533b6ad28d Network Enum cleanup 2019-05-06 13:38:37 +01:00
Garry Newman
9bb5b5178e Struct name consistency 2019-05-06 13:34:41 +01:00
Garry Newman
b171e22861 SteamNetworkingMicroseconds => long 2019-05-06 13:26:37 +01:00
Garry Newman
16851f1228 Added NetConnection.DetailedStatus 2019-05-06 13:02:39 +01:00
Garry Newman
cdeccc5afe Message send/recv tests 2019-05-06 12:33:29 +01:00
Garry Newman
f77332a41f ConnectionInterface MessageReading 2019-05-06 12:02:36 +01:00
Garry Newman
14d947c7ba NetMsg with Release 2019-05-06 12:02:09 +01:00
Garry Newman
12ab3f1248 NetworkIdentity ToString 2019-05-06 12:00:37 +01:00
Garry Newman
71d8226e28 Force ppOutMessages to IntPtr 2019-05-06 12:00:24 +01:00
Garry Newman
ebfecfe25c Added ReadVoiceDataBytes 2019-05-06 10:31:28 +01:00
Garry Newman
3b2c7a5a16 Adding Receive (it's crashing because it needs to be an array of intptr) 2019-05-03 16:47:29 +01:00
Garry Newman
91083d5d16 Updated Socket Tests 2019-05-03 15:08:48 +01:00
Garry Newman
9d363de6b8 Creating a Socket/Connection means you need to create an interface 2019-05-03 15:07:48 +01:00
Garry Newman
91f8f3ed29 Added SendType 2019-05-03 15:07:10 +01:00
Garry Newman
ab23781a5d SocketInterface/ConnectionInterface 2019-05-03 15:07:01 +01:00
Garry Newman
00bdc717c6 added ConnectionState.cs 2019-05-03 15:06:50 +01:00
Garry Newman
14c5bace46 ConnectionInfo.SteamId 2019-05-03 15:06:18 +01:00
Garry Newman
0265eda9f0 Connection SendMessage 2019-05-03 15:05:55 +01:00
Garry Newman
5fdbf02b29 Added SteamClient.OnCallbackException 2019-05-03 14:11:05 +01:00
Garry Newman
4ed8a4250b SteamNetworkingConnectionState => ConnectionState 2019-05-03 10:44:48 +01:00
Garry Newman
ea0f19ff8e Network struct packing fixes 2019-05-03 10:16:52 +01:00
Garry Newman
6be5826f31 ConnectionInfo 2019-05-02 21:40:39 +01:00
Garry Newman
ce3525bf1d Struct cleanups and testing 2019-05-02 20:41:45 +01:00
Garry Newman
270b3f0300 SteamNetConnectionStatusChangedCallback_t callback 2019-05-02 19:43:01 +01:00
Garry Newman
6c41ef2e51 Connection basics 2019-05-02 17:45:10 +01:00
Garry Newman
1c5eeedf40 SteamNetworking boilerplate 2019-05-02 16:58:44 +01:00
Garry Newman
9b2ad8e49a ISteamNetworkingSockets generating 2019-05-02 16:55:50 +01:00
Garry Newman
3eae3314b6 SteamNetworkUtil global config basics 2019-05-02 15:57:57 +01:00
Garry Newman
16ce5f4d63 NetworkingUtils (Ping stuff) 2019-05-02 15:23:47 +01:00
Garry Newman
1c1925bae9 Update how interfaces are initialized so we can initialize userless 2019-05-02 13:27:46 +01:00
Garry Newman
87ff387ca6 SteamNetworking enum/structs 2019-05-02 13:05:56 +01:00
Garry Newman
239273a715 ISteamNetworkingUtils 2019-05-02 13:05:38 +01:00
Garry Newman
068beddc04 95% bound SteamParties, even though I am doubting its usefulness 2019-05-01 22:29:42 +01:00
Garry Newman
93c4de7eda Added missing structs 2019-05-01 21:46:05 +01:00
Garry Newman
c5ec70447b ISteamParties 2019-05-01 21:33:10 +01:00
Garry Newman
5f9ad75741 OnLobbyMemberLeft becomes OnLobbyMemberLeave 2019-05-01 16:40:46 +01:00
Garry Newman
362ba26729 Chat test 2019-05-01 16:34:46 +01:00
Garry Newman
fbad8b8d6e Lobby Events 2019-05-01 16:30:28 +01:00
Garry Newman
e3840a9a3a LobbyQuery, Lobby Joining, Lobby Creating 2019-05-01 15:55:22 +01:00
Garry Newman
5a68e15676 ISteamMatchmaking 2019-05-01 14:28:42 +01:00
Garry Newman
994cdee49e Round off some edges with ItemDefinitions 2019-05-01 14:03:37 +01:00
Garry Newman
157d0d676e Compile fix 2019-05-01 13:24:05 +01:00
Garry Newman
96eeea1662 GetPlayedWith test RequestInfo on each user first 2019-05-01 13:23:13 +01:00
Garry Newman
cf0e3417de Fixed GetPlayedWith 2019-05-01 13:22:50 +01:00
Garry Newman
8d5f140e09 GetImage returns null on -1 2019-05-01 13:22:06 +01:00
Garry Newman
fb97dbee2e Added Friend.RequestInfoAsync 2019-05-01 13:21:52 +01:00
Garry Newman
ab535d367d Added Achivement.GetIconAsync() (waits for load if not loaded) 2019-05-01 11:47:50 +01:00
Garry Newman
38a29c6059 Safeguards and tests regarding #248 in GetScoresAroundUserAsync 2019-05-01 08:45:11 +01:00
Garry Newman
51ab76893a SteamNetworkingTest 2019-04-30 22:51:01 +01:00
Garry Newman
5938bf59d4 SteamNetworking 2019-04-30 22:45:37 +01:00
Garry Newman
6eae474e6e Parse/Generate ISteamNetworking 2019-04-30 22:01:02 +01:00
Garry Newman
b2cfbe23c5 Fixed not parsing function names containing numbers 2019-04-30 21:58:19 +01:00
Garry Newman
a80ee82e53
Update README.md 2019-04-30 21:19:13 +01:00
Garry Newman
26b79db7e4 Merge branch 'steamworks144' 2019-04-30 17:27:25 +01:00
Garry Newman
4237204f45
Merge pull request #229 from igniuss/patch-1
Fixed Lobby.Joinable
2019-04-30 16:39:02 +01:00
Sean L
07f9f00cb4
Fixed Lobby.Joinable
GetData("joinable") returns "True" or "False", (note upercase), so the Joinable would always return false.

Fixed by setting to LowerInvariant, since I'm not sure if it returns it uppercase on other platforms as well, or if this ever gets changed.
2019-01-11 14:19:34 +01:00
324 changed files with 46347 additions and 44844 deletions

100
.editorconfig Normal file
View File

@ -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

34
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@ -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.

View File

@ -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.

View File

@ -0,0 +1,10 @@
---
name: Something Else
about: Describe this issue template's purpose here.
title: ''
labels: ''
assignees: ''
---

42
.github/workflows/dotnetcore.yml vendored Normal file
View File

@ -0,0 +1,42 @@
name: Build All
on: [push]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4.2.2
- name: Setup dotnet 6.0.x
uses: actions/setup-dotnet@v4.1.0
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
- name: Build Win64 Release
run: dotnet build Facepunch.Steamworks\Facepunch.Steamworks.Win64.csproj --configuration Release
- name: Build Win32 Release
run: dotnet build Facepunch.Steamworks\Facepunch.Steamworks.Win32.csproj --configuration Release
- name: Build Posix Release
run: dotnet build Facepunch.Steamworks\Facepunch.Steamworks.Posix.csproj --configuration Release
- uses: actions/upload-artifact@v4.4.3
with:
name: Compiled Files
path: Facepunch.Steamworks/bin

1
.gitignore vendored
View File

@ -74,3 +74,4 @@ packages
Generator/bin
*.XML
.vs
Facepunch.Steamworks.Test/bin/**

5
CompileFix.bat Normal file
View File

@ -0,0 +1,5 @@
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

View File

@ -9,11 +9,26 @@ namespace Steamworks
{
[TestClass]
[DeploymentItem( "steam_api64.dll" )]
[DeploymentItem( "steam_api.dll" )]
public class AppTest
{
[AssemblyInitialize]
public static void AssemblyInit( TestContext context )
{
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 );
Assert.Fail( e.Message );
};
//
// Init Client
//
@ -31,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()
{
@ -87,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}" );

View File

@ -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);
}
}
}

View File

@ -1,135 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\MSTest.TestAdapter.2.0.0-beta4\build\net45\MSTest.TestAdapter.props" Condition="Exists('..\packages\MSTest.TestAdapter.2.0.0-beta4\build\net45\MSTest.TestAdapter.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{3F6183AD-D966-44F2-A6EB-42E61E591B49}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Facepunch.Steamworks.Test</RootNamespace>
<AssemblyName>Facepunch.Steamworks.Test</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
<IsCodedUITest>False</IsCodedUITest>
<TestProjectType>UnitTest</TestProjectType>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\MSTest.TestFramework.2.0.0-beta4\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\MSTest.TestFramework.2.0.0-beta4\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.9.0.2-beta1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
</ItemGroup>
<ItemGroup>
<Compile Include="FriendsTest.cs" />
<Compile Include="RemoteStorageTest.cs" />
<Compile Include="InventoryTest.cs" />
<Compile Include="UgcTest.cs" />
<Compile Include="UgcEditor.cs" />
<Compile Include="UserTest.cs" />
<Compile Include="UserStatsTest.cs" />
<Compile Include="UgcQuery.cs" />
<Compile Include="UtilsTest.cs" />
<Compile Include="AppTest.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="GameServerTest.cs" />
<Compile Include="Client\Server\StatsTest.cs" />
</ItemGroup>
<ItemGroup>
<Compile Include="ServerlistTest.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Facepunch.Steamworks\Facepunch.Steamworks.csproj">
<Project>{91962664-eb42-472a-94c8-c4ffeb44cc4b}</Project>
<Name>Facepunch.Steamworks</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>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}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.2.0.0-beta4\build\net45\MSTest.TestAdapter.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.2.0.0-beta4\build\net45\MSTest.TestAdapter.props'))" />
<Error Condition="!Exists('..\packages\MSTest.TestAdapter.2.0.0-beta4\build\net45\MSTest.TestAdapter.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\MSTest.TestAdapter.2.0.0-beta4\build\net45\MSTest.TestAdapter.targets'))" />
</Target>
<Import Project="..\packages\MSTest.TestAdapter.2.0.0-beta4\build\net45\MSTest.TestAdapter.targets" Condition="Exists('..\packages\MSTest.TestAdapter.2.0.0-beta4\build\net45\MSTest.TestAdapter.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -0,0 +1,55 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DefineConstants>TRACE;DEBUG;TEST_WIN32</DefineConstants>
<PlatformTarget>x86</PlatformTarget>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DefineConstants>TRACE;TEST_WIN32</DefineConstants>
<PlatformTarget>x64</PlatformTarget>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<OutputPath>bin\x64\Debug\</OutputPath>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<OutputPath>bin\x86\Debug\</OutputPath>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Facepunch.Steamworks\Facepunch.Steamworks.Win32.csproj" />
</ItemGroup>
<ItemGroup>
<Content Include="steam_api.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.*" />
<PackageReference Include="MSTest.TestAdapter" Version="2.0.0-beta4" />
<PackageReference Include="MSTest.TestFramework" Version="2.0.0-beta4" />
<PackageReference Include="Newtonsoft.Json" Version="9.0.2-beta1" />
</ItemGroup>
<ItemGroup>
<Compile Remove="ClanTest.cs" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,54 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DefineConstants>TRACE;DEBUG;TEST_WIN64</DefineConstants>
<PlatformTarget>x64</PlatformTarget>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>x64</PlatformTarget>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<OutputPath>bin\x64\Debug\</OutputPath>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<OutputPath>bin\x86\Debug\</OutputPath>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Facepunch.Steamworks\Facepunch.Steamworks.Win64.csproj" />
</ItemGroup>
<ItemGroup>
<Content Include="steam_api64.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.*" />
<PackageReference Include="MSTest.TestAdapter" Version="2.0.0-beta4" />
<PackageReference Include="MSTest.TestFramework" Version="2.0.0-beta4" />
<PackageReference Include="Newtonsoft.Json" Version="9.0.2-beta1" />
</ItemGroup>
<ItemGroup>
<Compile Remove="ClanTest.cs" />
</ItemGroup>
</Project>

View File

@ -7,6 +7,7 @@ using Steamworks.Data;
namespace Steamworks
{
[DeploymentItem( "steam_api64.dll" )]
[DeploymentItem( "steam_api.dll" )]
[TestClass]
public class FriendsTest
{
@ -35,10 +36,12 @@ namespace Steamworks
}
[TestMethod]
public void GetPlayedWith()
public async Task GetPlayedWith()
{
foreach ( var friend in SteamFriends.GetPlayedWith() )
{
await friend.RequestInfoAsync();
Console.WriteLine( $"{friend.Id.Value}: {friend.Name} (Friend:{friend.IsFriend}) (Blocked:{friend.IsBlocked})" );
Console.WriteLine( $" {string.Join( ", ", friend.NameHistory )}" );
@ -110,43 +113,20 @@ namespace Steamworks
}
}
/*
[TestMethod]
public void FriendListWithoutRefresh()
public async Task OpenWebOverlay()
{
using ( var client = new Facepunch.Steamworks.Client( 252490 ) )
{
Assert.IsTrue( client.IsValid );
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 = " -:+#";

View File

@ -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 );
}
}
}

View File

@ -1,13 +1,12 @@
using System;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Steamworks.Data;
namespace Steamworks
{
[DeploymentItem( "steam_api64.dll" )]
[DeploymentItem( "tier0_s64.dll" )]
[DeploymentItem( "vstdlib_s64.dll" )]
[DeploymentItem( "steamclient64.dll" )]
[DeploymentItem( "steam_api.dll" )]
[TestClass]
public partial class GameServerTest
{
@ -48,7 +47,7 @@ namespace Steamworks
//
// Clientside calls this function, gets ticket
//
var clientTicket = SteamUser.GetAuthSessionTicket();
var clientTicket = SteamUser.GetAuthSessionTicket( NetIdentity.LocalHost );
//
// The client sends this data to the server along with their steamid

View File

@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
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" )]
[DeploymentItem( "controller_config/game_actions_252490.vdf" )]
public class InputTest
{
[TestMethod]
public void ControllerList()
{
foreach ( var controller in SteamInput.Controllers )
{
Console.Write( $"Controller: {controller}" );
var dstate = controller.GetDigitalState( "fire" );
var astate = controller.GetAnalogState( "Move" );
}
}
}
}

View File

@ -10,6 +10,7 @@ namespace Steamworks
{
[TestClass]
[DeploymentItem( "steam_api64.dll" )]
[DeploymentItem( "steam_api.dll" )]
public class InventoryTest
{
[TestMethod]
@ -51,17 +52,20 @@ namespace Steamworks
{
await SteamInventory.WaitForDefinitions();
var result = await SteamInventory.GetItems();
var result = await SteamInventory.GetAllItemsAsync();
Assert.IsTrue( result.HasValue );
Assert.IsTrue( result.Value.ItemCount > 0 );
using ( result )
{
var items = result?.GetItems( true );
var items = result.Value.GetItems( true );
Assert.IsNotNull( items );
foreach ( var item in items )
{
Console.WriteLine( $"{item.Id} / {item.DefId} / {item.Quantity} / {item.Def.Name} " );
Console.WriteLine( $"{item.Id} / {item.DefId} / {item.Quantity} / {item.Def?.Name} /[{item.IsNoTrade}|{item.IsRemoved}|{item.IsConsumed}] " );
foreach ( var prop in item.Properties )
{
@ -70,6 +74,150 @@ namespace Steamworks
}
}
}
[TestMethod]
public async Task GetItemSpecialProperties()
{
await SteamInventory.WaitForDefinitions();
var result = await SteamInventory.GetAllItemsAsync();
Assert.IsTrue( result.HasValue );
Assert.IsTrue( result.Value.ItemCount > 0 );
using ( result )
{
var items = result.Value.GetItems( true );
Assert.IsNotNull( items );
foreach ( var item in items )
{
Console.WriteLine( $"{item.Id} / {item.DefId} / {item.Quantity} / {item.Def?.Name} " );
Console.WriteLine( $" Acquired: {item.Acquired}" );
Console.WriteLine( $" Origin: {item.Origin}" );
}
}
}
[TestMethod]
public async Task GetAllItemsMultipleTimes()
{
await SteamInventory.WaitForDefinitions();
var fresult = await SteamInventory.GetAllItemsAsync();
Assert.IsTrue( fresult.HasValue );
Assert.IsTrue( fresult.Value.ItemCount > 0 );
await Task.Delay( 1000 );
var result = await SteamInventory.GetAllItemsAsync();
Assert.IsTrue( result.HasValue );
Assert.IsTrue( result.Value.GetItems().Length == fresult.Value.ItemCount );
await Task.Delay( 1000 );
result = await SteamInventory.GetAllItemsAsync();
Assert.IsTrue( result.HasValue );
Assert.IsTrue( result.Value.ItemCount == fresult.Value.ItemCount );
}
[TestMethod]
public async Task Items()
{
SteamInventory.GetAllItems();
await SteamInventory.WaitForDefinitions();
while ( SteamInventory.Items == null )
{
await Task.Delay( 10 );
}
Assert.IsNotNull( SteamInventory.Items );
foreach ( var item in SteamInventory.Items )
{
Console.WriteLine( $"{item.Id} / {item.DefId} / {item.Quantity} / {item.Def.Name}" );
}
}
[TestMethod]
public async Task GetExchanges()
{
var result = await SteamInventory.WaitForDefinitions( 5 );
Assert.IsTrue( result );
foreach ( var def in SteamInventory.Definitions )
{
var exchangelist = def.GetRecipes();
if ( exchangelist == null ) continue;
foreach ( var exchange in exchangelist )
{
Assert.AreEqual( exchange.Result, def );
Console.WriteLine( $"{def.Name}:" );
foreach ( var item in exchange.Ingredients )
{
Console.WriteLine( $" {item.Count} x {item.Definition?.Name ?? item.DefinitionId.ToString()}" );
}
Console.WriteLine( $"" );
}
}
}
[TestMethod]
public async Task Serialize()
{
await SteamInventory.WaitForDefinitions();
var result = await SteamInventory.GetAllItemsAsync();
Assert.IsTrue( result.HasValue );
var data = result.Value.Serialize();
Assert.IsNotNull( data );
Console.WriteLine( string.Join( "", data.Select( x => x.ToString( "x" ) ) ) );
}
[TestMethod]
public async Task Deserialize()
{
await SteamInventory.WaitForDefinitions();
byte[] data;
int itemCount;
// Serialize
{
var result = await SteamInventory.GetAllItemsAsync();
Assert.IsTrue( result.HasValue );
itemCount = result.Value.ItemCount;
data = result.Value.Serialize();
Assert.IsNotNull( data );
result.Value.Dispose();
}
await Task.Delay( 2000 );
// Deserialize
{
var result = await SteamInventory.DeserializeAsync( data );
Assert.IsTrue( result.HasValue );
Assert.AreEqual( itemCount, result.Value.ItemCount );
result.Value.Dispose();
}
}
}
}

View File

@ -0,0 +1,163 @@
using System;
using System.Collections.Generic;
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 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<TestSocketInterface>();
Console.WriteLine( $"Created Socket: {si}" );
// Give it a second for something to happen
await Task.Delay( 1000 );
si.Close();
}
[TestMethod]
public async Task CreateNormalServer()
{
SteamNetworkingUtils.DebugLevel = NetDebugOutput.Everything;
SteamNetworkingUtils.OnDebugOutput += DebugOutput;
var si = SteamNetworkingSockets.CreateNormalSocket<TestSocketInterface>( Data.NetAddress.AnyIp( 21893 ) );
Console.WriteLine( $"Created Socket: {si}" );
// Give it a second for something to happen
await Task.Delay( 1000 );
si.Close();
}
[TestMethod]
public async Task CreateRelayServerFakeIP()
{
SteamNetworkingUtils.DebugLevel = NetDebugOutput.Everything;
SteamNetworkingUtils.OnDebugOutput += DebugOutput;
var si = SteamNetworkingSockets.CreateRelaySocketFakeIP<TestSocketInterface>();
Console.WriteLine( $"Created Socket: {si}" );
// Give it a second for something to happen
await Task.Delay( 1000 );
si.Close();
}
[TestMethod]
public async Task RelayEndtoEnd()
{
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<TestSocketInterface>( 6 );
var server = socket.RunAsync();
await Task.Delay( 1000 );
Console.WriteLine( $"----- Connecting To Socket via SteamId ({SteamClient.SteamId})" );
var connection = SteamNetworkingSockets.ConnectRelay<TestConnectionInterface>( SteamClient.SteamId, 6 );
var client = connection.RunAsync();
await Task.WhenAll( server, client );
}
[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<TestSocketInterface>( NetAddress.AnyIp( 12445 ) );
var server = socket.RunAsync();
//
// Start the client
//
Console.WriteLine( "ConnectNormal" );
var connection = SteamNetworkingSockets.ConnectNormal<TestConnectionInterface>( NetAddress.From( "127.0.0.1", 12445 ) );
var client = connection.RunAsync();
await Task.WhenAll( server, client );
}
[TestMethod]
public async Task RelayEndtoEndFakeIP()
{
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.CreateRelaySocketFakeIP<TestSocketInterface>();
var server = socket.RunAsync();
await Task.Delay( 1000 );
Console.WriteLine( $"----- Retrieving Fake IP.." );
SteamNetworkingSockets.GetFakeIP( 0, out NetAddress address );
Console.WriteLine( $"----- Connecting To Socket via Fake IP ({address})" );
var connection = SteamNetworkingSockets.ConnectNormal<TestConnectionInterface>( address );
var client = connection.RunAsync();
await Task.WhenAll( server, client );
}
[TestMethod]
public void NetAddressTest()
{
{
var n = NetAddress.From( "127.0.0.1", 12445 );
Assert.AreEqual( n.ToString(), "127.0.0.1:12445" );
}
{
var n = NetAddress.AnyIp( 5543 );
Assert.AreEqual( n.ToString(), "[::]:5543" );
}
}
}
}

View File

@ -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 );
}
/// <summary>
/// Client is connected. They move from connecting to Connections
/// </summary>
public override void OnConnected( ConnectionInfo data )
{
Console.WriteLine( $" - OnConnected" );
base.OnConnected( data );
}
/// <summary>
/// The connection has been closed remotely or disconnected locally. Check data.State for details.
/// </summary>
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 = Utility.Utf8NoBom.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();
}
}
}
}
}

View File

@ -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 );
}
/// <summary>
/// Client is connected. They move from connecting to Connections
/// </summary>
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 );
}
/// <summary>
/// The connection has been closed remotely or disconnected locally. Check data.State for details.
/// </summary>
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 = Utility.Utf8NoBom.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" );
}
}
}
}
}

View File

@ -0,0 +1,63 @@
using System;
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 NetworkUtilsTest
{
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()
{
await SteamNetworkingUtils.WaitForPingDataAsync();
for ( int i = 0; i < 10; i++ )
{
var pl = SteamNetworkingUtils.LocalPingLocation;
if ( !pl.HasValue )
{
await Task.Delay( 1000 );
continue;
}
Console.WriteLine( $"{i} Seconds Until Result: {pl}" );
return;
}
Assert.Fail();
}
[TestMethod]
public void PingLocationParse()
{
var pl = Data.NetPingLocation.TryParseFromString( GarrysLocation );
Assert.IsTrue( pl.HasValue );
Console.WriteLine( $"Parsed OKAY! {pl}" );
}
[TestMethod]
public async Task GetEstimatedPing()
{
await SteamNetworkingUtils.WaitForPingDataAsync();
var garrysping = Data.NetPingLocation.TryParseFromString( GarrysLocation );
Assert.IsTrue( garrysping.HasValue );
var ping = SteamNetworkingUtils.EstimatePingTo( garrysping.Value );
Assert.IsTrue( ping > 0 );
Console.WriteLine( $"Ping returned: {ping}" );
}
}
}

View File

@ -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 );
}
}
}

View File

@ -10,10 +10,11 @@ namespace Steamworks
{
[TestClass]
[DeploymentItem( "steam_api64.dll" )]
[DeploymentItem( "steam_api.dll" )]
public class RemoteStorageTest
{
[TestMethod]
public async Task Quotas()
public void Quotas()
{
Console.WriteLine( $"SteamRemoteStorage.QuotaBytes: {SteamRemoteStorage.QuotaBytes}" );
Console.WriteLine( $"SteamRemoteStorage.QuotaRemainingBytes: {SteamRemoteStorage.QuotaRemainingBytes}" );
@ -21,7 +22,7 @@ namespace Steamworks
}
[TestMethod]
public async Task IsCloudEnabled()
public void IsCloudEnabled()
{
Console.WriteLine( $"SteamRemoteStorage.IsCloudEnabled: {SteamRemoteStorage.IsCloudEnabled}" );
Console.WriteLine( $"SteamRemoteStorage.IsCloudEnabledForAccount: {SteamRemoteStorage.IsCloudEnabledForAccount}" );

View File

@ -11,6 +11,7 @@ namespace Steamworks
{
[TestClass]
[DeploymentItem( "steam_api64.dll" )]
[DeploymentItem( "steam_api.dll" )]
public partial class ServerListTest
{
[TestMethod]
@ -68,6 +69,51 @@ namespace Steamworks
}
}
// Used to reproduce steam serverlist stopping querying after ~10s around august 2023
[TestMethod]
public async Task RustServerListTest()
{
using ( var list = new ServerList.Internet() )
{
list.AddFilter( "secure", "1" );
list.AddFilter( "and", "1" );
list.AddFilter( "gametype", "v2405" );
list.AddFilter( "appid", "252490" );
list.AddFilter( "gamedir", "rust" );
list.AddFilter( "empty", "1" );
var success = await list.RunQueryAsync( 90 );
Console.WriteLine( $"success {success}" );
Console.WriteLine( $"Found {list.Responsive.Count} Responsive Servers" );
Console.WriteLine( $"Found {list.Unresponsive.Count} Unresponsive Servers" );
}
}
[TestMethod]
public async Task SourceQuery()
{
using ( var list = new ServerList.Internet() )
{
var task = list.RunQueryAsync();
await Task.Delay( 1000 );
list.Cancel();
foreach ( var s in list.Responsive.Take( 10 ).ToArray() )
{
Console.WriteLine( $"{s.Name} [{s.Address}]" );
var rules = await s.QueryRulesAsync();
Assert.IsNotNull( rules );
foreach ( var rule in rules )
{
Console.WriteLine( $" {rule.Key} = {rule.Value}" );
}
}
}
}
[TestMethod]
public async Task ServerListLan()
{
@ -141,5 +187,65 @@ namespace Steamworks
}
}
}
[TestMethod]
public async Task ServerListIps()
{
var ips = new string[]
{
"31.186.251.76",
"31.186.251.76",
"31.186.251.76",
"31.186.251.76",
"31.186.251.76",
"74.91.119.142",
"74.91.119.142",
"74.91.119.142",
"74.91.119.142",
"74.91.119.142",
"74.91.119.142",
"74.91.119.142",
"74.91.119.142",
"74.91.119.142",
"74.91.119.142",
"74.91.119.142",
"74.91.119.142",
"139.99.144.70",
"139.99.144.70",
"139.99.144.70",
"139.99.144.70",
"139.99.144.70",
"74.91.119.142",
"74.91.119.142",
"74.91.119.142",
"74.91.119.142",
"95.172.92.176",
"95.172.92.176",
"95.172.92.176",
"95.172.92.176",
"95.172.92.176",
"164.132.205.154",
"164.132.205.154",
"164.132.205.154",
"164.132.205.154",
"164.132.205.154",
};
using ( var list = new ServerList.IpList( ips ) )
{
var success = await list.RunQueryAsync();
Console.WriteLine( $"success {success}" );
Console.WriteLine( $"Found {list.Responsive.Count} Responsive Servers" );
Console.WriteLine( $"Found {list.Unresponsive.Count} Unresponsive Servers" );
Assert.AreNotEqual( list.Responsive.Count, 0 );
foreach ( var server in list.Responsive )
{
Console.WriteLine( $"[{server.Address}:{server.ConnectionPort}] - {server.Name}" );
}
}
}
}
}

View File

@ -0,0 +1,106 @@
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 SteamMatchmakingTest
{
[TestMethod]
public async Task LobbyList()
{
await CreateLobby();
var list = await SteamMatchmaking.LobbyList
.RequestAsync();
if ( list == null )
{
Console.WriteLine( "No Lobbies Found!" );
return;
}
foreach ( var lobby in list )
{
Console.WriteLine( $"[{lobby.Id}] owned by {lobby.Owner} ({lobby.MemberCount}/{lobby.MaxMembers})" );
}
}
[TestMethod]
public async Task LobbyListWithAtLeastOne()
{
await CreateLobby();
await LobbyList();
}
[TestMethod]
public async Task CreateLobby()
{
var lobbyr = await SteamMatchmaking.CreateLobbyAsync( 32 );
if ( !lobbyr.HasValue )
{
Assert.Fail();
}
var lobby = lobbyr.Value;
lobby.SetPublic();
lobby.SetData( "gametype", "sausage" );
lobby.SetData( "dicks", "unlicked" );
Console.WriteLine( $"lobby: {lobby.Id}" );
foreach ( var entry in lobby.Data )
{
Console.WriteLine( $" - {entry.Key} {entry.Value}" );
}
Console.WriteLine( $"members: {lobby.MemberCount}/{lobby.MaxMembers}" );
Console.WriteLine( $"Owner: {lobby.Owner}" );
Console.WriteLine( $"Owner Is Local Player: {lobby.Owner.IsMe}" );
lobby.SendChatString( "Hello I Love Lobbies" );
}
[TestMethod]
public async Task LobbyChat()
{
SteamMatchmaking.OnChatMessage += ( lbby, member, message ) =>
{
Console.WriteLine( $"[{lbby}] {member}: {message}" );
};
var lobbyr = await SteamMatchmaking.CreateLobbyAsync( 10 );
if ( !lobbyr.HasValue )
Assert.Fail();
var lobby = lobbyr.Value;
lobby.SetPublic();
lobby.SetData( "name", "Dave's Chat Room" );
Console.WriteLine( $"lobby: {lobby.Id}" );
lobby.SendChatString( "Hello Friends, It's me - your big fat daddy" );
await Task.Delay( 50 );
lobby.SendChatString( "What? No love for daddy?" );
await Task.Delay( 500 );
lobby.SendChatString( "Okay I will LEAVE" );
lobby.SendChatString( "BYE FOREVER" );
await Task.Delay( 1000 );
lobby.Leave();
}
}
}

View File

@ -0,0 +1,37 @@
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 SteamNetworkingTest
{
[TestMethod]
public async Task SendP2PPacket()
{
var sent = SteamNetworking.SendP2PPacket( SteamClient.SteamId, new byte[] { 1, 2, 3 } );
Assert.IsTrue( sent );
while ( !SteamNetworking.IsP2PPacketAvailable() )
{
await Task.Delay( 10 );
}
var packet = SteamNetworking.ReadP2PPacket();
Assert.IsTrue( packet.HasValue );
Assert.AreEqual( packet.Value.SteamId, SteamClient.SteamId );
Assert.AreEqual( packet.Value.Data[1], 2 );
Assert.AreEqual( packet.Value.Data.Length, 3 );
}
}
}

View File

@ -10,6 +10,7 @@ namespace Steamworks
{
[TestClass]
[DeploymentItem( "steam_api64.dll" )]
[DeploymentItem( "steam_api.dll" )]
public class UgcEditor
{
[TestMethod]
@ -20,6 +21,9 @@ namespace Steamworks
.WithDescription( "This item was created by Facepunch Steamworks unit tests.\n\n" +
"It should have technically been deleted so you should never get to " +
"read this unless something terrible has happened." )
.WithTag( "Arsehole" )
.WithTag( "Spiteful" )
.WithTag( "Fat-Head" )
.SubmitAsync();
Assert.IsTrue( result.Success );
@ -30,6 +34,40 @@ namespace Steamworks
}
[TestMethod]
public async Task CreateChineseFile()
{
string fileName = "这是我的项目";
string description = "此项目由Facepunch Steamworks单元测试创建";
var result = await Ugc.Editor.NewCommunityFile
.WithTitle( fileName )
.WithDescription( description )
.WithTag( "Arsehole" )
.WithTag( "Spiteful" )
.WithTag( "Fat-Head" )
.SubmitAsync();
Console.WriteLine( $"Title: {fileName}" );
Console.WriteLine( $"Description: {description}" );
Assert.IsTrue( result.Success );
Assert.AreNotEqual( result.FileId.Value, 0 );
var file = await Steamworks.SteamUGC.QueryFileAsync( result.FileId );
Console.WriteLine( $"FileId: {result.FileId}" );
Console.WriteLine( $"Title: {file.Value.Title}" );
Console.WriteLine( $"Description: {file.Value.Description}" );
Assert.AreEqual( file.Value.Title, fileName );
Assert.AreEqual( file.Value.Description, description );
var deleted = await SteamUGC.DeleteFileAsync( result.FileId );
Assert.IsTrue( deleted );
}
class ProgressBar : IProgress<float>
{
float Value = 0;
@ -45,7 +83,7 @@ namespace Steamworks
}
[TestMethod]
public async Task UploadBigFile()
public async Task UploadBigishFile()
{
var created = Ugc.Editor.NewCommunityFile
.WithTitle( "Unit Test Upload Item" )
@ -65,7 +103,7 @@ namespace Steamworks
// Upload a file of random bytes
var rand = new Random();
var testFile = new byte[1024 * 1024 * 256];
var testFile = new byte[1024 * 1024 * 32];
rand.NextBytes( testFile );
System.IO.File.WriteAllBytes( testFolder.FullName + "/testfile1.bin", testFile );
@ -87,6 +125,59 @@ namespace Steamworks
}
}
[TestMethod]
public async Task CreateAndThenEditFile()
{
PublishedFileId fileid;
//
// Make a file
//
{
var result = await Ugc.Editor.NewCommunityFile
.WithTitle( "Unedited File" )
.SubmitAsync();
Assert.IsTrue( result.Success );
Assert.AreNotEqual( result.FileId.Value, 0 );
fileid = result.FileId;
}
await Task.Delay( 1000 );
//
// Edit it
//
{
var editor = new Ugc.Editor( fileid );
editor = editor.WithTitle( "An Edited File" );
var result = await editor.SubmitAsync();
Assert.IsTrue( result.Success );
Assert.AreEqual( result.FileId, fileid );
}
await Task.Delay( 1000 );
//
// Make sure the edited file matches
//
{
var details = await SteamUGC.QueryFileAsync( fileid ) ?? throw new Exception( "Somethign went wrong" );
Assert.AreEqual( details.Id, fileid );
Assert.AreEqual( details.Title, "An Edited File" );
}
//
// Clean up
//
var deleted = await SteamUGC.DeleteFileAsync( fileid );
Assert.IsTrue( deleted );
}
}
}

View File

@ -10,6 +10,7 @@ namespace Steamworks
{
[TestClass]
[DeploymentItem( "steam_api64.dll" )]
[DeploymentItem( "steam_api.dll" )]
public class UgcQueryTests
{
[TestMethod]
@ -28,20 +29,21 @@ namespace Steamworks
public async Task QueryWithTags()
{
var q = Ugc.Query.All
.WithTag( "Fun" )
.WithTag( "Movie" )
.WithTag( "Version3" )
.WithTag( "Hunting Bow" )
.MatchAllTags();
var result = await q.GetPageAsync( 1 );
Assert.IsNotNull( result );
Assert.IsTrue( result?.ResultCount > 0 );
Console.WriteLine( $"ResultCount: {result?.ResultCount}" );
Console.WriteLine( $"TotalCount: {result?.TotalCount}" );
foreach ( var entry in result.Value.Entries )
{
Assert.IsTrue( entry.HasTag( "Fun" ) );
Assert.IsTrue( entry.HasTag( "Movie" ) );
Assert.IsTrue( entry.HasTag( "Version3" ), "Has Tag Version3" );
Assert.IsTrue( entry.HasTag( "Hunting Bow" ), "Has Tag HuntingBow" );
}
}
@ -67,8 +69,8 @@ namespace Steamworks
[TestMethod]
public async Task QueryUserOwn()
{
var q = Ugc.UserQuery.All
.FromSelf();
var q = Ugc.Query.All
.WhereUserPublished();
var result = await q.GetPageAsync( 1 );
Assert.IsNotNull( result );
@ -83,13 +85,14 @@ namespace Steamworks
}
[TestMethod]
public async Task QueryFoohy()
public async Task QueryGarry()
{
var q = Ugc.UserQuery.All
.FromUser( 76561197997689747 );
var q = Ugc.Query.All
.WhereUserPublished( 76561197960279927 );
var result = await q.GetPageAsync( 1 );
Assert.IsNotNull( result );
Assert.IsTrue( result?.ResultCount > 0 );
Console.WriteLine( $"ResultCount: {result?.ResultCount}" );
Console.WriteLine( $"TotalCount: {result?.TotalCount}" );
@ -99,6 +102,30 @@ namespace Steamworks
Console.WriteLine( $" {entry.Title}" );
}
}
[TestMethod]
public async Task QuerySpecificFile()
{
var item = await SteamUGC.QueryFileAsync( 1734427277 );
Assert.IsTrue( item.HasValue );
Assert.IsNotNull( item.Value.Title );
Console.WriteLine( $"Title: {item?.Title}" );
Console.WriteLine( $"Desc: {item?.Description}" );
Console.WriteLine( $"Tags: {string.Join( ",", item?.Tags )}" );
Console.WriteLine( $"Author: {item?.Owner.Name} [{item?.Owner.Id}]" );
Console.WriteLine( $"PreviewImageUrl: {item?.PreviewImageUrl}" );
Console.WriteLine( $"NumComments: {item?.NumComments}" );
Console.WriteLine( $"Url: {item?.Url}" );
Console.WriteLine( $"Directory: {item?.Directory}" );
Console.WriteLine( $"IsInstalled: {item?.IsInstalled}" );
Console.WriteLine( $"IsAcceptedForUse: {item?.IsAcceptedForUse}" );
Console.WriteLine( $"IsPublic: {item?.IsPublic}" );
Console.WriteLine( $"Created: {item?.Created}" );
Console.WriteLine( $"Updated: {item?.Updated}" );
Console.WriteLine( $"Score: {item?.Score}" );
}
}
}

View File

@ -10,10 +10,11 @@ namespace Steamworks
{
[TestClass]
[DeploymentItem( "steam_api64.dll" )]
[DeploymentItem( "steam_api.dll" )]
public class UgcTest
{
[TestMethod]
public async Task Download()
public void Download()
{
SteamUGC.Download( 1717844711 );
}
@ -21,7 +22,7 @@ namespace Steamworks
[TestMethod]
public async Task GetInformation()
{
var itemInfo = await Ugc.Item.Get( 1720164672 );
var itemInfo = await Ugc.Item.GetAsync( 1720164672 );
Assert.IsTrue( itemInfo.HasValue );
@ -32,6 +33,9 @@ namespace Steamworks
Console.WriteLine( $"IsSubscribed: {itemInfo?.IsSubscribed}" );
Console.WriteLine( $"NeedsUpdate: {itemInfo?.NeedsUpdate}" );
Console.WriteLine( $"Description: {itemInfo?.Description}" );
Console.WriteLine( $"Owner: {itemInfo?.Owner}" );
Console.WriteLine( $"Score: {itemInfo?.Score}" );
Console.WriteLine( $"PreviewImageUrl: {itemInfo?.PreviewImageUrl}" );
}
}
}

View File

@ -10,10 +10,11 @@ namespace Steamworks
{
[TestClass]
[DeploymentItem( "steam_api64.dll" )]
[DeploymentItem( "steam_api.dll" )]
public class UserStatsTest
{
[TestMethod]
public void AchievementList()
public async Task AchievementList()
{
foreach ( var a in SteamUserStats.Achievements )
{
@ -24,7 +25,7 @@ namespace Steamworks
Console.WriteLine( $" a.Description: {a.Description}" );
Console.WriteLine( $" a.GlobalUnlocked: {a.GlobalUnlocked}" );
var icon = a.GetIcon();
var icon = await a.GetIconAsync();
Console.WriteLine( $" a.Icon: {icon}" );
}
@ -61,7 +62,7 @@ namespace Steamworks
[TestMethod]
public async Task CreateLeaderboard()
{
var leaderboard = await SteamUserStats.FindOrCreateLeaderboard( "Testleaderboard", Data.LeaderboardSort.Ascending, Data.LeaderboardDisplay.Numeric );
var leaderboard = await SteamUserStats.FindOrCreateLeaderboardAsync( "Testleaderboard", Data.LeaderboardSort.Ascending, Data.LeaderboardDisplay.Numeric );
Assert.IsTrue( leaderboard.HasValue );
}
@ -69,17 +70,17 @@ namespace Steamworks
[TestMethod]
public async Task FindLeaderboard()
{
var leaderboard = await SteamUserStats.FindLeaderboard( "Testleaderboard" );
var leaderboard = await SteamUserStats.FindLeaderboardAsync( "Testleaderboard" );
Assert.IsTrue( leaderboard.HasValue );
}
[TestMethod]
public async Task SubmitScore()
{
var leaderboard = await SteamUserStats.FindLeaderboard( "Testleaderboard" );
var leaderboard = await SteamUserStats.FindLeaderboardAsync( "Testleaderboard" );
Assert.IsTrue( leaderboard.HasValue );
var result = await leaderboard.Value.SubmitScore( 576 );
var result = await leaderboard.Value.SubmitScoreAsync( 576 );
Assert.IsTrue( result.HasValue );
Console.WriteLine( $"result.Changed: {result?.Changed}" );
@ -92,7 +93,7 @@ namespace Steamworks
[TestMethod]
public async Task ReplaceScore()
{
var leaderboard = await SteamUserStats.FindLeaderboard( "Testleaderboard" );
var leaderboard = await SteamUserStats.FindLeaderboardAsync( "Testleaderboard" );
Assert.IsTrue( leaderboard.HasValue );
var result = await leaderboard.Value.ReplaceScore( 576 );
@ -108,15 +109,10 @@ namespace Steamworks
[TestMethod]
public async Task GetScoresFromFriends()
{
var leaderboard = await SteamUserStats.FindLeaderboard( "Testleaderboard" );
Assert.IsTrue( leaderboard.HasValue );
var leaderboard = await SteamUserStats.FindLeaderboardAsync( "Testleaderboard" );
// Get entries around user
var friendScores = await leaderboard.Value.GetScoresFromFriends();
Assert.IsNotNull( friendScores );
var friendScores = await leaderboard.Value.GetScoresFromFriendsAsync();
Console.WriteLine( $"" );
Console.WriteLine( $"Friend Scores:" );
foreach ( var e in friendScores )
{
Console.WriteLine( $"{e.GlobalRank}: {e.Score} {e.User}" );
@ -126,11 +122,13 @@ namespace Steamworks
[TestMethod]
public async Task GetScoresAroundUserAsync()
{
var leaderboard = await SteamUserStats.FindLeaderboard( "Testleaderboard" );
var leaderboard = await SteamUserStats.FindLeaderboardAsync( "Testleaderboard" );
Assert.IsTrue( leaderboard.HasValue );
for ( int i = 1; i < 10; i++ )
{
// Get entries around user
var relativeScores = await leaderboard.Value.GetScoresAroundUserAsync( -5, 5 );
var relativeScores = await leaderboard.Value.GetScoresAroundUserAsync( -i, i );
Assert.IsNotNull( relativeScores );
Console.WriteLine( $"" );
@ -140,11 +138,12 @@ namespace Steamworks
Console.WriteLine( $"{e.GlobalRank}: {e.Score} {e.User}" );
}
}
}
[TestMethod]
public async Task GetScoresAsync()
{
var leaderboard = await SteamUserStats.FindLeaderboard( "Testleaderboard" );
var leaderboard = await SteamUserStats.FindLeaderboardAsync( "Testleaderboard" );
Assert.IsTrue( leaderboard.HasValue );
// Get top 20 global scores
@ -169,11 +168,35 @@ 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()
{
var deaths = new Stat( "deaths" );
await deaths.GetGlobalIntDays( 5 );
await deaths.GetGlobalIntDaysAsync( 5 );
var totalStartups = deaths.GetGlobalInt();
Assert.AreNotEqual( 0, totalStartups );
@ -185,7 +208,7 @@ namespace Steamworks
{
var deaths = new Stat( "deaths" );
var history = await deaths.GetGlobalIntDays( 10 );
var history = await deaths.GetGlobalIntDaysAsync( 10 );
Assert.AreNotEqual( 0, history.Length );
for ( int i=0; i< history.Length; i++ )

View File

@ -11,6 +11,7 @@ namespace Steamworks
{
[TestClass]
[DeploymentItem( "steam_api64.dll" )]
[DeploymentItem( "steam_api.dll" )]
public class UserTest
{
[TestMethod]
@ -60,7 +61,7 @@ namespace Steamworks
[TestMethod]
public void AuthSession()
{
var ticket = SteamUser.GetAuthSessionTicket();
var ticket = SteamUser.GetAuthSessionTicket( SteamClient.SteamId );
Assert.AreNotEqual( 0, ticket.Handle );
Assert.AreNotEqual( 0, ticket.Data.Length );
@ -74,6 +75,27 @@ namespace Steamworks
SteamUser.EndAuthSession( SteamClient.SteamId );
}
[TestMethod]
public async Task AuthSessionAsync()
{
var ticket = await SteamUser.GetAuthSessionTicketAsync( SteamClient.SteamId, 5.0 );
Assert.AreNotEqual( 0, ticket.Handle );
Assert.AreNotEqual( 0, ticket.Data.Length );
Console.WriteLine( $"ticket.Handle: {ticket.Handle}" );
Console.WriteLine( $"ticket.Data: { string.Join( "", ticket.Data.Select( x => x.ToString( "x" ) ) ) }" );
}
[TestMethod]
public async Task AuthTicketForWebApiAsync()
{
var ticket = await SteamUser.GetAuthTicketForWebApiAsync( "Test" );
Assert.AreNotEqual( 0, ticket.Handle );
Assert.AreNotEqual( 0, ticket.Data.Length );
Console.WriteLine( $"ticket.Handle: {ticket.Handle}" );
Console.WriteLine( $"ticket.Data: { string.Join( "", ticket.Data.Select( x => x.ToString( "x" ) ) ) }" );
}
[TestMethod]
public void SteamLevel()
@ -82,6 +104,12 @@ namespace Steamworks
Console.WriteLine( $"User.SteamLevel: {SteamUser.SteamLevel}" );
}
[TestMethod]
public void Name()
{
Console.WriteLine( $"SteamClient.Name: {SteamClient.Name}" );
}
[TestMethod]
public async Task GetStoreAuthUrlAsync()
{
@ -114,6 +142,50 @@ namespace Steamworks
{
Console.WriteLine( $"User.IsPhoneRequiringVerification: {SteamUser.IsPhoneRequiringVerification}" );
}
[TestMethod]
public async Task RequestEncryptedAppTicketAsyncWithData()
{
for ( int i=0; i<10; i++ )
{
var data = await SteamUser.RequestEncryptedAppTicketAsync( new byte[] { 0, 1, 2, 3, 4, 5, 6, 7 } );
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()
{
for ( int i = 0; i < 6; i++ )
{
var data = await SteamUser.RequestEncryptedAppTicketAsync();
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();
}
}
}

View File

@ -9,6 +9,7 @@ namespace Steamworks
{
[TestClass]
[DeploymentItem( "steam_api64.dll" )]
[DeploymentItem( "steam_api.dll" )]
public class UtilsTest
{
[TestMethod]

View File

@ -0,0 +1,74 @@
"In Game Actions"
{
"actions"
{
"InGameControls"
{
"title" "#Set_Ingame"
"StickPadGyro"
{
"Move"
{
"title" "#Action_Move"
"input_mode" "joystick_move"
}
"Camera"
{
"title" "#Action_Camera"
"input_mode" "absolute_mouse"
}
}
"AnalogTrigger"
{
"Throttle" "#Action_Throttle"
}
"Button"
{
"fire" "#Action_Fire"
"Jump" "#Action_Jump"
"pause_menu" "#Action_Menu"
}
}
"MenuControls"
{
"title" "#Set_Menu"
"StickPadGyro"
{
}
"AnalogTrigger"
{
}
"Button"
{
"menu_up" "#Menu_Up"
"menu_down" "#Menu_Down"
"menu_left" "#Menu_Left"
"menu_right" "#Menu_Right"
"menu_select" "#Menu_Select"
"menu_cancel" "#Menu_Cancel"
"pause_menu" "#Action_ReturnToGame"
}
}
}
"localization"
{
"english"
{
"Set_Ingame" "In-Game Controls"
"Set_Menu" "Menu Controls"
"Action_Move" "Movement"
"Action_Camera" "Camera"
"Action_Throttle" "Throttle"
"Action_Fire" "Fire Weapon"
"Action_Jump" "Jump"
"Action_Menu" "Pause Menu"
"Action_ReturnToGame" "Return To Game"
"Menu_Up" "Up"
"Menu_Down" "Down"
"Menu_Left" "Left"
"Menu_Right" "Right"
"Menu_Select" "Select"
"Menu_Cancel" "Cancel"
}
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,74 @@
"In Game Actions"
{
"actions"
{
"InGameControls"
{
"title" "#Set_Ingame"
"StickPadGyro"
{
"Move"
{
"title" "#Action_Move"
"input_mode" "joystick_move"
}
"Camera"
{
"title" "#Action_Camera"
"input_mode" "absolute_mouse"
}
}
"AnalogTrigger"
{
"Throttle" "#Action_Throttle"
}
"Button"
{
"fire" "#Action_Fire"
"Jump" "#Action_Jump"
"pause_menu" "#Action_Menu"
}
}
"MenuControls"
{
"title" "#Set_Menu"
"StickPadGyro"
{
}
"AnalogTrigger"
{
}
"Button"
{
"menu_up" "#Menu_Up"
"menu_down" "#Menu_Down"
"menu_left" "#Menu_Left"
"menu_right" "#Menu_Right"
"menu_select" "#Menu_Select"
"menu_cancel" "#Menu_Cancel"
"pause_menu" "#Action_ReturnToGame"
}
}
}
"localization"
{
"english"
{
"Set_Ingame" "In-Game Controls"
"Set_Menu" "Menu Controls"
"Action_Move" "Movement"
"Action_Camera" "Camera"
"Action_Throttle" "Throttle"
"Action_Fire" "Fire Weapon"
"Action_Jump" "Jump"
"Action_Menu" "Pause Menu"
"Action_ReturnToGame" "Return To Game"
"Menu_Up" "Up"
"Menu_Down" "Down"
"Menu_Left" "Left"
"Menu_Right" "Right"
"Menu_Select" "Select"
"Menu_Cancel" "Cancel"
}
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,32 +1,102 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.12
# Visual Studio Version 16
VisualStudioVersion = 16.0.29009.5
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Facepunch.Steamworks", "Facepunch.Steamworks\Facepunch.Steamworks.csproj", "{91962664-EB42-472A-94C8-C4FFEB44CC4B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Facepunch.Steamworks.Test", "Facepunch.Steamworks.Test\Facepunch.Steamworks.Test.csproj", "{3F6183AD-D966-44F2-A6EB-42E61E591B49}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Generator", "Generator\Generator.csproj", "{B7225D11-2AAA-49D6-AE93-A73696EA35FE}"
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.Win32", "Facepunch.Steamworks\Facepunch.Steamworks.Win32.csproj", "{2D6247F6-8AB2-405F-A00E-3A364B808A55}"
EndProject
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
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Facepunch.Steamworks.TestWin64", "Facepunch.Steamworks.Test\Facepunch.Steamworks.TestWin64.csproj", "{165081E3-BD96-404B-B83E-A635F1AF7CDE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{91962664-EB42-472A-94C8-C4FFEB44CC4B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{91962664-EB42-472A-94C8-C4FFEB44CC4B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{91962664-EB42-472A-94C8-C4FFEB44CC4B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{91962664-EB42-472A-94C8-C4FFEB44CC4B}.Release|Any CPU.Build.0 = Release|Any CPU
{3F6183AD-D966-44F2-A6EB-42E61E591B49}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3F6183AD-D966-44F2-A6EB-42E61E591B49}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3F6183AD-D966-44F2-A6EB-42E61E591B49}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3F6183AD-D966-44F2-A6EB-42E61E591B49}.Release|Any CPU.Build.0 = Release|Any CPU
{B7225D11-2AAA-49D6-AE93-A73696EA35FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B7225D11-2AAA-49D6-AE93-A73696EA35FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B7225D11-2AAA-49D6-AE93-A73696EA35FE}.Debug|x64.ActiveCfg = Debug|Any CPU
{B7225D11-2AAA-49D6-AE93-A73696EA35FE}.Debug|x64.Build.0 = Debug|Any CPU
{B7225D11-2AAA-49D6-AE93-A73696EA35FE}.Debug|x86.ActiveCfg = Debug|Any CPU
{B7225D11-2AAA-49D6-AE93-A73696EA35FE}.Debug|x86.Build.0 = Debug|Any CPU
{B7225D11-2AAA-49D6-AE93-A73696EA35FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B7225D11-2AAA-49D6-AE93-A73696EA35FE}.Release|Any CPU.Build.0 = Release|Any CPU
{B7225D11-2AAA-49D6-AE93-A73696EA35FE}.Release|x64.ActiveCfg = Release|Any CPU
{B7225D11-2AAA-49D6-AE93-A73696EA35FE}.Release|x64.Build.0 = Release|Any CPU
{B7225D11-2AAA-49D6-AE93-A73696EA35FE}.Release|x86.ActiveCfg = Release|Any CPU
{B7225D11-2AAA-49D6-AE93-A73696EA35FE}.Release|x86.Build.0 = Release|Any CPU
{8C73DA93-73AD-4445-9A2C-15D4A44337D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8C73DA93-73AD-4445-9A2C-15D4A44337D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8C73DA93-73AD-4445-9A2C-15D4A44337D3}.Debug|x64.ActiveCfg = Debug|Any CPU
{8C73DA93-73AD-4445-9A2C-15D4A44337D3}.Debug|x64.Build.0 = Debug|Any CPU
{8C73DA93-73AD-4445-9A2C-15D4A44337D3}.Debug|x86.ActiveCfg = Debug|Any CPU
{8C73DA93-73AD-4445-9A2C-15D4A44337D3}.Debug|x86.Build.0 = Debug|Any CPU
{8C73DA93-73AD-4445-9A2C-15D4A44337D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8C73DA93-73AD-4445-9A2C-15D4A44337D3}.Release|Any CPU.Build.0 = Release|Any CPU
{8C73DA93-73AD-4445-9A2C-15D4A44337D3}.Release|x64.ActiveCfg = Release|Any CPU
{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
{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
{2D6247F6-8AB2-405F-A00E-3A364B808A55}.Debug|x64.Build.0 = Debug|Any CPU
{2D6247F6-8AB2-405F-A00E-3A364B808A55}.Debug|x86.ActiveCfg = Debug|Any CPU
{2D6247F6-8AB2-405F-A00E-3A364B808A55}.Debug|x86.Build.0 = Debug|Any CPU
{2D6247F6-8AB2-405F-A00E-3A364B808A55}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2D6247F6-8AB2-405F-A00E-3A364B808A55}.Release|Any CPU.Build.0 = Release|Any CPU
{2D6247F6-8AB2-405F-A00E-3A364B808A55}.Release|x64.ActiveCfg = Release|Any CPU
{2D6247F6-8AB2-405F-A00E-3A364B808A55}.Release|x64.Build.0 = Release|Any CPU
{2D6247F6-8AB2-405F-A00E-3A364B808A55}.Release|x86.ActiveCfg = Release|Any CPU
{2D6247F6-8AB2-405F-A00E-3A364B808A55}.Release|x86.Build.0 = Release|Any CPU
{C62FF421-BE44-4DB0-B99A-E13E007A30B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C62FF421-BE44-4DB0-B99A-E13E007A30B9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C62FF421-BE44-4DB0-B99A-E13E007A30B9}.Debug|x64.ActiveCfg = Debug|Any CPU
{C62FF421-BE44-4DB0-B99A-E13E007A30B9}.Debug|x64.Build.0 = Debug|Any CPU
{C62FF421-BE44-4DB0-B99A-E13E007A30B9}.Debug|x86.ActiveCfg = Debug|Any CPU
{C62FF421-BE44-4DB0-B99A-E13E007A30B9}.Debug|x86.Build.0 = Debug|Any CPU
{C62FF421-BE44-4DB0-B99A-E13E007A30B9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C62FF421-BE44-4DB0-B99A-E13E007A30B9}.Release|Any CPU.Build.0 = Release|Any CPU
{C62FF421-BE44-4DB0-B99A-E13E007A30B9}.Release|x64.ActiveCfg = Release|Any CPU
{C62FF421-BE44-4DB0-B99A-E13E007A30B9}.Release|x64.Build.0 = Release|Any CPU
{C62FF421-BE44-4DB0-B99A-E13E007A30B9}.Release|x86.ActiveCfg = Release|Any CPU
{C62FF421-BE44-4DB0-B99A-E13E007A30B9}.Release|x86.Build.0 = Release|Any CPU
{3F6183AD-D966-44F2-A6EB-42E61E591B49}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3F6183AD-D966-44F2-A6EB-42E61E591B49}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3F6183AD-D966-44F2-A6EB-42E61E591B49}.Debug|x64.ActiveCfg = Debug|x64
{3F6183AD-D966-44F2-A6EB-42E61E591B49}.Debug|x64.Build.0 = Debug|x64
{3F6183AD-D966-44F2-A6EB-42E61E591B49}.Debug|x86.ActiveCfg = Debug|x86
{3F6183AD-D966-44F2-A6EB-42E61E591B49}.Debug|x86.Build.0 = Debug|x86
{3F6183AD-D966-44F2-A6EB-42E61E591B49}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3F6183AD-D966-44F2-A6EB-42E61E591B49}.Release|Any CPU.Build.0 = Release|Any CPU
{3F6183AD-D966-44F2-A6EB-42E61E591B49}.Release|x64.ActiveCfg = Release|x64
{3F6183AD-D966-44F2-A6EB-42E61E591B49}.Release|x64.Build.0 = Release|x64
{3F6183AD-D966-44F2-A6EB-42E61E591B49}.Release|x86.ActiveCfg = Release|x86
{3F6183AD-D966-44F2-A6EB-42E61E591B49}.Release|x86.Build.0 = Release|x86
{165081E3-BD96-404B-B83E-A635F1AF7CDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{165081E3-BD96-404B-B83E-A635F1AF7CDE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{165081E3-BD96-404B-B83E-A635F1AF7CDE}.Debug|x64.ActiveCfg = Debug|x64
{165081E3-BD96-404B-B83E-A635F1AF7CDE}.Debug|x64.Build.0 = Debug|x64
{165081E3-BD96-404B-B83E-A635F1AF7CDE}.Debug|x86.ActiveCfg = Debug|x86
{165081E3-BD96-404B-B83E-A635F1AF7CDE}.Debug|x86.Build.0 = Debug|x86
{165081E3-BD96-404B-B83E-A635F1AF7CDE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{165081E3-BD96-404B-B83E-A635F1AF7CDE}.Release|Any CPU.Build.0 = Release|Any CPU
{165081E3-BD96-404B-B83E-A635F1AF7CDE}.Release|x64.ActiveCfg = Release|x64
{165081E3-BD96-404B-B83E-A635F1AF7CDE}.Release|x64.Build.0 = Release|x64
{165081E3-BD96-404B-B83E-A635F1AF7CDE}.Release|x86.ActiveCfg = Release|x86
{165081E3-BD96-404B-B83E-A635F1AF7CDE}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -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
{
/// <summary>
/// An awaitable version of a SteamAPICall_t
/// </summary>
internal struct CallResult<T> : 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;
}
/// <summary>
/// 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.
/// </summary>
public void OnCompleted( Action continuation )
{
if (IsCompleted)
continuation();
else
Dispatch.OnCallComplete<T>(call, continuation, server);
}
/// <summary>
/// Gets the result. This is called internally by the async shit.
/// </summary>
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 );
}
}
/// <summary>
/// Return true if complete or failed
/// </summary>
public bool IsCompleted
{
get
{
bool failed = false;
if ( utils.IsAPICallCompleted( call, ref failed ) || failed )
return true;
return false;
}
}
/// <summary>
/// This is what makes this struct awaitable
/// </summary>
internal CallResult<T> GetAwaiter()
{
return this;
}
}
}

View File

@ -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()]" );
};
}

View File

@ -1,137 +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<IDisposable> AllClient = new List<IDisposable>();
internal static List<IDisposable> AllServer = new List<IDisposable>();
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<GCHandle> 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<Callback.Run>( run );
var b = Marshal.GetFunctionPointerForDelegate<Callback.RunCall>( RunStub );
var c = Marshal.GetFunctionPointerForDelegate<Callback.GetCallbackSizeBytes>( SizeStub );
var vt = Marshal.AllocHGlobal( IntPtr.Size * 3 );
if ( Config.Os == OsType.Windows )
{
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 );
}
return vt;
}
bool IsAllocated;
List<GCHandle> Allocations = new List<GCHandle>();
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();
}
}
}

View File

@ -0,0 +1,17 @@
using Steamworks.Data;
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
namespace Steamworks
{
/// <summary>
/// Gives us a generic way to get the CallbackId of structs
/// </summary>
internal interface ICallbackData
{
CallbackType CallbackType { get; }
int DataSize { get; }
}
}

View File

@ -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
{
/// <summary>
/// Responsible for all callback/callresult handling
///
/// This manually pumps Steam's message queue and dispatches those
/// events to any waiting callbacks/callresults.
/// </summary>
public static class Dispatch
{
/// <summary>
/// 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]
///
/// </summary>
public static Action<CallbackType, string, bool> OnDebugCallback;
/// <summary>
/// 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.
/// </summary>
public static Action<Exception> 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; }
/// <summary>
/// This gets called from Client/Server Init
/// It's important to switch to the manual dispatcher
/// </summary>
internal static void Init()
{
SteamAPI_ManualDispatch_Init();
}
/// <summary>
/// Make sure we don't call Frame in a callback - because that'll cause some issues for everyone.
/// </summary>
static bool runningFrame = false;
/// <summary>
/// Calls RunFrame and processes events from this Steam Pipe
/// </summary>
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;
}
}
/// <summary>
/// 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.
/// </summary>
static List<Action<IntPtr>> actionsToCall = new List<Action<IntPtr>>();
/// <summary>
/// A callback is a general global message
/// </summary>
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();
}
}
/// <summary>
/// Given a callback, try to turn it into a string
/// </summary>
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' );
}
/// <summary>
/// A result is a reply to a specific command
/// </summary>
private static void ProcessResult( CallbackMsg_t msg )
{
var result = msg.Data.ToType<SteamAPICallCompleted_t>();
//
// 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();
}
/// <summary>
/// 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.
/// </summary>
internal static async void LoopClientAsync()
{
while ( ClientPipe != 0 )
{
Frame( ClientPipe );
await Task.Delay( 16 );
}
}
/// <summary>
/// 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.
/// </summary>
internal static async void LoopServerAsync()
{
while ( ServerPipe != 0 )
{
Frame( ServerPipe );
await Task.Delay( 32 );
}
}
struct ResultCallback
{
public Action continuation;
public bool server;
}
static Dictionary<ulong, ResultCallback> ResultCallbacks = new Dictionary<ulong, ResultCallback>();
/// <summary>
/// Watch for a steam api call
/// </summary>
internal static void OnCallComplete<T>( SteamAPICall_t call, Action continuation, bool server ) where T : struct, ICallbackData
{
ResultCallbacks[call.Value] = new ResultCallback
{
continuation = continuation,
server = server
};
}
struct Callback
{
public Action<IntPtr> action;
public bool server;
}
static Dictionary<CallbackType, List<Callback>> Callbacks = new Dictionary<CallbackType, List<Callback>>();
/// <summary>
/// Install a global callback. The passed function will get called if it's all good.
/// </summary>
internal static void Install<T>( Action<T> 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<Callback>();
Callbacks[type] = list;
}
list.Add( new Callback
{
action = x => p( x.ToType<T>() ),
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 );
}
}
}

View File

@ -0,0 +1,54 @@
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 = "SteamInternal_SteamAPI_Init", CallingConvention = CallingConvention.Cdecl )]
public static extern SteamAPIInitResult SteamInternal_SteamAPI_Init( IntPtr pszInternalCheckInterfaceVersions, IntPtr pOutErrMsg );
[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 SteamAPIInitResult Init( string pszInternalCheckInterfaceVersions, out string pOutErrMsg )
{
using var interfaceVersionsStr = new Utf8StringToNative( pszInternalCheckInterfaceVersions );
using var buffer = Helpers.Memory.Take();
var result = Native.SteamInternal_SteamAPI_Init( interfaceVersionsStr.Pointer, buffer.Ptr );
pOutErrMsg = Helpers.MemoryToString( buffer.Ptr );
return result;
}
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 );
}
}
}

View File

@ -0,0 +1,40 @@
using System;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using Steamworks.Data;
namespace Steamworks
{
internal static class SteamGameServer
{
internal static class Native
{
[DllImport( Platform.LibraryName, EntryPoint = "SteamGameServer_RunCallbacks", CallingConvention = CallingConvention.Cdecl )]
public static extern void SteamGameServer_RunCallbacks();
[DllImport( Platform.LibraryName, EntryPoint = "SteamGameServer_Shutdown", CallingConvention = CallingConvention.Cdecl )]
public static extern void SteamGameServer_Shutdown();
[DllImport( Platform.LibraryName, EntryPoint = "SteamGameServer_GetHSteamPipe", CallingConvention = CallingConvention.Cdecl )]
public static extern HSteamPipe SteamGameServer_GetHSteamPipe();
}
static internal void RunCallbacks()
{
Native.SteamGameServer_RunCallbacks();
}
static internal void Shutdown()
{
Native.SteamGameServer_Shutdown();
}
static internal HSteamPipe GetHSteamPipe()
{
return Native.SteamGameServer_GetHSteamPipe();
}
}
}

View File

@ -0,0 +1,28 @@
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_V2", CallingConvention = CallingConvention.Cdecl )]
public static extern SteamAPIInitResult SteamInternal_GameServer_Init_V2( uint unIP, ushort usGamePort, ushort usQueryPort, int eServerMode, IntPtr pchVersionString, IntPtr pszInternalCheckInterfaceVersions, IntPtr pOutErrMsg );
}
static internal SteamAPIInitResult GameServer_Init( uint unIP, ushort usGamePort, ushort usQueryPort, int eServerMode, string pchVersionString, string pszInternalCheckInterfaceVersions, out string pOutErrMsg )
{
using var versionStr = new Utf8StringToNative( pchVersionString );
using var interfaceVersionsStr = new Utf8StringToNative( pszInternalCheckInterfaceVersions );
using var buffer = Helpers.Memory.Take();
var result = Native.SteamInternal_GameServer_Init_V2( unIP, usGamePort, usQueryPort, eServerMode, versionStr.Pointer, interfaceVersionsStr.Pointer, buffer.Ptr );
pOutErrMsg = Helpers.MemoryToString( buffer.Ptr );
return result;
}
}
}

View File

@ -1,49 +0,0 @@
using System;
using System.IO;
namespace Steamworks
{
public static class Config
{
static OsType _os;
public static OsType Os
{
get
{
if ( _os == OsType.None )
{
string windir = Environment.GetEnvironmentVariable( "windir" );
if ( !string.IsNullOrEmpty( windir ) && windir.Contains( @"\" ) && Directory.Exists( windir ) )
{
_os = OsType.Windows;
}
else if ( File.Exists( @"/System/Library/CoreServices/SystemVersion.plist" ) )
{
_os = OsType.Posix;
}
else if ( File.Exists( @"/proc/sys/kernel/ostype" ) )
{
_os = OsType.Posix;
}
else
{
throw new System.Exception( "Couldn't determine operating system" );
}
}
return _os;
}
set => _os = value;
}
public static bool PackSmall => Os != OsType.Windows;
}
public enum OsType
{
None,
Windows,
Posix,
}
}

View File

@ -0,0 +1,42 @@
using System;
namespace Steamworks.Data
{
[Flags]
public enum SendType : int
{
/// <summary>
/// Send the message unreliably. Can be lost. Messages *can* be larger than a
/// single MTU (UDP packet), but there is no retransmission, so if any piece
/// of the message is lost, the entire message will be dropped.
///
/// The sending API does have some knowledge of the underlying connection, so
/// if there is no NAT-traversal accomplished or there is a recognized adjustment
/// happening on the connection, the packet will be batched until the connection
/// is open again.
/// </summary>
Unreliable = 0,
/// <summary>
/// Disable Nagle's algorithm.
/// By default, Nagle's algorithm is applied to all outbound messages. This means
/// that the message will NOT be sent immediately, in case further messages are
/// sent soon after you send this, which can be grouped together. Any time there
/// is enough buffered data to fill a packet, the packets will be pushed out immediately,
/// but partially-full packets not be sent until the Nagle timer expires.
/// </summary>
NoNagle = 1 << 0,
/// <summary>
/// If the message cannot be sent very soon (because the connection is still doing some initial
/// handshaking, route negotiations, etc), then just drop it. This is only applicable for unreliable
/// messages. Using this flag on reliable messages is invalid.
/// </summary>
NoDelay = 1 << 2,
/// Reliable message send. Can send up to 0.5mb in a single message.
/// Does fragmentation/re-assembly of messages under the hood, as well as a sliding window for
/// efficient sends of large chunks of data.
Reliable = 1 << 3
}
}

View File

@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>Facepunch.Steamworks.Posix</AssemblyName>
<DefineConstants>$(DefineConstants);PLATFORM_POSIX</DefineConstants>
<TargetFrameworks>netstandard2.1;net6.0;net46</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>10</LangVersion>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<RootNamespace>Steamworks</RootNamespace>
</PropertyGroup>
<Import Project="Facepunch.Steamworks.targets" />
</Project>

View File

@ -0,0 +1,42 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>Facepunch.Steamworks.Win32</AssemblyName>
<DefineConstants>$(DefineConstants);PLATFORM_WIN32;PLATFORM_WIN</DefineConstants>
<TargetFrameworks>netstandard2.1;net6.0;net46</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<RootNamespace>Steamworks</RootNamespace>
</PropertyGroup>
<PropertyGroup>
<FrameworkPathOverride Condition="'$(TargetFramework)' == 'net40'">C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client</FrameworkPathOverride>
<Authors>Garry Newman</Authors>
<PackageId>Facepunch.Steamworks.win32</PackageId>
<PackageDescription>Steamworks implementation with an emphasis on making things easy. For Windows x86.</PackageDescription>
<PackageProjectUrl>https://github.com/Facepunch/Facepunch.Steamworks</PackageProjectUrl>
<PackageIcon>Facepunch.Steamworks.jpg</PackageIcon>
<PackageTags>facepunch;steam;unity;steamworks;valve</PackageTags>
<LangVersion>10</LangVersion>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<RepositoryUrl>https://github.com/Facepunch/Facepunch.Steamworks.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>
<ItemGroup>
<None Include="Facepunch.Steamworks.jpg">
<Pack>true</Pack>
<PackagePath>/</PackagePath>
</None>
<None Include="steam_api.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<Pack>true</Pack>
<PackagePath>content</PackagePath>
</None>
</ItemGroup>
<Import Project="Facepunch.Steamworks.targets" />
</Project>

View File

@ -0,0 +1,55 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>Facepunch.Steamworks.Win64</AssemblyName>
<DefineConstants>$(DefineConstants);PLATFORM_WIN64;PLATFORM_WIN;PLATFORM_64</DefineConstants>
<TargetFrameworks>netstandard2.1;net6.0;net46</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<RootNamespace>Steamworks</RootNamespace>
</PropertyGroup>
<PropertyGroup>
<FrameworkPathOverride Condition="'$(TargetFramework)' == 'net40'">C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client</FrameworkPathOverride>
<Authors>Garry Newman</Authors>
<PackageId>Facepunch.Steamworks</PackageId>
<PackageDescription>Steamworks implementation with an emphasis on making things easy. For Windows x64.</PackageDescription>
<PackageProjectUrl>https://github.com/Facepunch/Facepunch.Steamworks</PackageProjectUrl>
<PackageIcon>Facepunch.Steamworks.jpg</PackageIcon>
<PackageTags>facepunch;steam;unity;steamworks;valve</PackageTags>
<LangVersion>10</LangVersion>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<RepositoryUrl>https://github.com/Facepunch/Facepunch.Steamworks.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>
<ItemGroup>
<None Include="Facepunch.Steamworks.jpg">
<Pack>true</Pack>
<PackagePath>/</PackagePath>
</None>
<None Include="steam_api64.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<Pack>true</Pack>
<PackagePath>content</PackagePath>
</None>
</ItemGroup>
<Import Project="Facepunch.Steamworks.targets" />
<Target Name="PostBuildHome" AfterTargets="PostBuildEvent" Condition="'$(Computername)'=='GarryBasementPc'">
<Exec Command="Copy $(TargetDir)\Facepunch.Steamworks.Win64.* C:\plastic\RustMain\Assets\Plugins\Facepunch.Steamworks\" />
<Exec Command="Copy $(TargetDir)\Facepunch.Steamworks.Posix.* C:\plastic\RustMain\Assets\Plugins\Facepunch.Steamworks\" />
</Target>
<Target Name="PostBuildOffice" AfterTargets="PostBuildEvent" Condition="'$(Computername)'=='GARRYSOFFICEPC'">
<Exec Command="Copy $(TargetDir)\Facepunch.Steamworks.Win64.* C:\Plastic\Rust\Assets\Plugins\Facepunch.Steamworks\" />
<Exec Command="Copy $(TargetDir)\Facepunch.Steamworks.Posix.* C:\Plastic\Rust\Assets\Plugins\Facepunch.Steamworks\" />
<Exec Command="Copy $(TargetDir)\Facepunch.Steamworks.Win64.* C:\Git\Facepunch.Steamworks.UnityTest\Assets\Steamworks" />
<Exec Command="Copy $(TargetDir)\Facepunch.Steamworks.Win32.* C:\Git\Facepunch.Steamworks.UnityTest\Assets\Steamworks" />
<Exec Command="Copy $(TargetDir)\Facepunch.Steamworks.Posix.* C:\Git\Facepunch.Steamworks.UnityTest\Assets\Steamworks" />
</Target>
</Project>

View File

@ -1,61 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net46</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AssemblyName>Facepunch.Steamworks</AssemblyName>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DefineConstants>TRACE;DEBUG</DefineConstants>
<NoWarn>1701;1702;1705;618;1591</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DefineConstants>TRACE;RELEASE</DefineConstants>
<NoWarn>1701;1702;1705;618;1591</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<DefineConstants>$(DefineConstants);NET_CORE</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Compile Remove="*AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Update="steam_api64.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<Folder Include="Generated\Interfaces\" />
</ItemGroup>
<PropertyGroup>
<FrameworkPathOverride Condition="'$(TargetFramework)' == 'net40'">C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client</FrameworkPathOverride>
<Authors>Garry Newman</Authors>
<PackageId>Facepunch.Steamworks</PackageId>
<PackageDescription>Another fucking c# Steamworks implementation</PackageDescription>
<PackageProjectUrl>https://github.com/Facepunch/Facepunch.Steamworks</PackageProjectUrl>
<PackageLicenseUrl>https://github.com/Facepunch/Facepunch.Steamworks/blob/master/LICENSE</PackageLicenseUrl>
<PackageIconUrl>https://avatars2.githubusercontent.com/u/3371040</PackageIconUrl>
<PackageTags>facepunch;steam;unity;steamworks;valve</PackageTags>
<PackageVersion>0.7.5</PackageVersion>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netstandard2.0|AnyCPU'">
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
</Project>

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View File

@ -0,0 +1,37 @@
<Project>
<PropertyGroup>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup>
<PackageVersion>2.4.1</PackageVersion>
<FileVersion>2.4.1</FileVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DefineConstants>$(DefineConstants);TRACE;DEBUG</DefineConstants>
<NoWarn>1701;1702;1705;618;1591</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DefineConstants>$(DefineConstants);TRACE;RELEASE</DefineConstants>
<NoWarn>1701;1702;1705;618;1591</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<DefineConstants>$(DefineConstants);NET_CORE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netstandard2.0|AnyCPU'">
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<ItemGroup>
<Compile Remove="*AssemblyInfo.cs" />
<Folder Include="Generated\Interfaces\" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,454 @@
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,
GetTicketForWebApiResponse = 168,
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,
FilterTextDictionaryChanged = 739,
DlcInstalled = 1005,
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,
SteamInputGamepadSlotChange = 2804,
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,
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,
BroadcastUploadStart = 4604,
BroadcastUploadStop = 4605,
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,
SteamRemotePlayTogetherGuestInvite = 5703,
SteamTimelineGamePhaseRecordingExists = 6001,
SteamTimelineEventRecordingExists = 6002,
}
internal static partial class CallbackTypeFactory
{
internal static System.Collections.Generic.Dictionary<CallbackType, System.Type> All = new System.Collections.Generic.Dictionary<CallbackType, System.Type>
{
{ 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.GetTicketForWebApiResponse, typeof( GetTicketForWebApiResponse_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.FilterTextDictionaryChanged, typeof( FilterTextDictionaryChanged_t )},
{ CallbackType.DlcInstalled, typeof( DlcInstalled_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.SteamInputGamepadSlotChange, typeof( SteamInputGamepadSlotChange_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.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.BroadcastUploadStart, typeof( BroadcastUploadStart_t )},
{ CallbackType.BroadcastUploadStop, typeof( BroadcastUploadStop_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 )},
{ CallbackType.SteamRemotePlayTogetherGuestInvite, typeof( SteamRemotePlayTogetherGuestInvite_t )},
{ CallbackType.SteamTimelineGamePhaseRecordingExists, typeof( SteamTimelineGamePhaseRecordingExists_t )},
{ CallbackType.SteamTimelineEventRecordingExists, typeof( SteamTimelineEventRecordingExists_t )},
};
}
}

View File

@ -0,0 +1,83 @@
using System;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using Steamworks.Data;
namespace Steamworks
{
internal unsafe partial 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;
}
}
}

View File

@ -7,191 +7,165 @@ using Steamworks.Data;
namespace Steamworks
{
internal class ISteamApps : SteamInterface
internal unsafe partial class ISteamApps : SteamInterface
{
public ISteamApps( bool server = false ) : base( server )
public const string Version = "STEAMAPPS_INTERFACE_VERSION008";
internal ISteamApps( bool IsGameServer )
{
SetupInterface( IsGameServer );
}
public override string InterfaceName => "STEAMAPPS_INTERFACE_VERSION008";
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamApps_v008", CallingConvention = Platform.CC)]
internal static extern IntPtr SteamAPI_SteamApps_v008();
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamApps_v008();
public override void InitInternals()
{
_BIsSubscribed = Marshal.GetDelegateForFunctionPointer<FBIsSubscribed>( Marshal.ReadIntPtr( VTable, 0) );
_BIsLowViolence = Marshal.GetDelegateForFunctionPointer<FBIsLowViolence>( Marshal.ReadIntPtr( VTable, 8) );
_BIsCybercafe = Marshal.GetDelegateForFunctionPointer<FBIsCybercafe>( Marshal.ReadIntPtr( VTable, 16) );
_BIsVACBanned = Marshal.GetDelegateForFunctionPointer<FBIsVACBanned>( Marshal.ReadIntPtr( VTable, 24) );
_GetCurrentGameLanguage = Marshal.GetDelegateForFunctionPointer<FGetCurrentGameLanguage>( Marshal.ReadIntPtr( VTable, 32) );
_GetAvailableGameLanguages = Marshal.GetDelegateForFunctionPointer<FGetAvailableGameLanguages>( Marshal.ReadIntPtr( VTable, 40) );
_BIsSubscribedApp = Marshal.GetDelegateForFunctionPointer<FBIsSubscribedApp>( Marshal.ReadIntPtr( VTable, 48) );
_BIsDlcInstalled = Marshal.GetDelegateForFunctionPointer<FBIsDlcInstalled>( Marshal.ReadIntPtr( VTable, 56) );
_GetEarliestPurchaseUnixTime = Marshal.GetDelegateForFunctionPointer<FGetEarliestPurchaseUnixTime>( Marshal.ReadIntPtr( VTable, 64) );
_BIsSubscribedFromFreeWeekend = Marshal.GetDelegateForFunctionPointer<FBIsSubscribedFromFreeWeekend>( Marshal.ReadIntPtr( VTable, 72) );
_GetDLCCount = Marshal.GetDelegateForFunctionPointer<FGetDLCCount>( Marshal.ReadIntPtr( VTable, 80) );
_BGetDLCDataByIndex = Marshal.GetDelegateForFunctionPointer<FBGetDLCDataByIndex>( Marshal.ReadIntPtr( VTable, 88) );
_InstallDLC = Marshal.GetDelegateForFunctionPointer<FInstallDLC>( Marshal.ReadIntPtr( VTable, 96) );
_UninstallDLC = Marshal.GetDelegateForFunctionPointer<FUninstallDLC>( Marshal.ReadIntPtr( VTable, 104) );
_RequestAppProofOfPurchaseKey = Marshal.GetDelegateForFunctionPointer<FRequestAppProofOfPurchaseKey>( Marshal.ReadIntPtr( VTable, 112) );
_GetCurrentBetaName = Marshal.GetDelegateForFunctionPointer<FGetCurrentBetaName>( Marshal.ReadIntPtr( VTable, 120) );
_MarkContentCorrupt = Marshal.GetDelegateForFunctionPointer<FMarkContentCorrupt>( Marshal.ReadIntPtr( VTable, 128) );
_GetInstalledDepots = Marshal.GetDelegateForFunctionPointer<FGetInstalledDepots>( Marshal.ReadIntPtr( VTable, 136) );
_GetAppInstallDir = Marshal.GetDelegateForFunctionPointer<FGetAppInstallDir>( Marshal.ReadIntPtr( VTable, 144) );
_BIsAppInstalled = Marshal.GetDelegateForFunctionPointer<FBIsAppInstalled>( Marshal.ReadIntPtr( VTable, 152) );
_GetAppOwner = Marshal.GetDelegateForFunctionPointer<FGetAppOwner>( Marshal.ReadIntPtr( VTable, 160) );
_GetAppOwner_Windows = Marshal.GetDelegateForFunctionPointer<FGetAppOwner_Windows>( Marshal.ReadIntPtr( VTable, 160) );
_GetLaunchQueryParam = Marshal.GetDelegateForFunctionPointer<FGetLaunchQueryParam>( Marshal.ReadIntPtr( VTable, 168) );
_GetDlcDownloadProgress = Marshal.GetDelegateForFunctionPointer<FGetDlcDownloadProgress>( Marshal.ReadIntPtr( VTable, 176) );
_GetAppBuildId = Marshal.GetDelegateForFunctionPointer<FGetAppBuildId>( Marshal.ReadIntPtr( VTable, 184) );
_RequestAllProofOfPurchaseKeys = Marshal.GetDelegateForFunctionPointer<FRequestAllProofOfPurchaseKeys>( Marshal.ReadIntPtr( VTable, 192) );
_GetFileDetails = Marshal.GetDelegateForFunctionPointer<FGetFileDetails>( Marshal.ReadIntPtr( VTable, 200) );
_GetLaunchCommandLine = Marshal.GetDelegateForFunctionPointer<FGetLaunchCommandLine>( Marshal.ReadIntPtr( VTable, 208) );
_BIsSubscribedFromFamilySharing = Marshal.GetDelegateForFunctionPointer<FBIsSubscribedFromFamilySharing>( Marshal.ReadIntPtr( VTable, 216) );
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[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()
{
return _BIsSubscribed( Self );
var returnValue = _BIsSubscribed( Self );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[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()
{
return _BIsLowViolence( Self );
var returnValue = _BIsLowViolence( Self );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[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()
{
return _BIsCybercafe( Self );
var returnValue = _BIsCybercafe( Self );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[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()
{
return _BIsVACBanned( Self );
var returnValue = _BIsVACBanned( Self );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate IntPtr 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()
{
return GetString( _GetCurrentGameLanguage( Self ) );
var returnValue = _GetCurrentGameLanguage( Self );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate IntPtr 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()
{
return GetString( _GetAvailableGameLanguages( Self ) );
var returnValue = _GetAvailableGameLanguages( Self );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[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 )
{
return _BIsSubscribedApp( Self, appID );
var returnValue = _BIsSubscribedApp( Self, appID );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[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 )
{
return _BIsDlcInstalled( Self, appID );
var returnValue = _BIsDlcInstalled( Self, appID );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
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 )
{
return _GetEarliestPurchaseUnixTime( Self, nAppID );
var returnValue = _GetEarliestPurchaseUnixTime( Self, nAppID );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[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()
{
return _BIsSubscribedFromFreeWeekend( Self );
var returnValue = _BIsSubscribedFromFreeWeekend( Self );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
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()
{
return _GetDLCCount( Self );
var returnValue = _GetDLCCount( Self );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[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, StringBuilder 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, StringBuilder pchName, int cchNameBufferSize )
internal bool BGetDLCDataByIndex( int iDLC, ref AppId pAppID, [MarshalAs( UnmanagedType.U1 )] ref bool pbAvailable, out string pchName )
{
return _BGetDLCDataByIndex( Self, iDLC, ref pAppID, ref pbAvailable, pchName, cchNameBufferSize );
using var mem__pchName = Helpers.TakeMemory();
var returnValue = _BGetDLCDataByIndex( Self, iDLC, ref pAppID, ref pbAvailable, mem__pchName, (1024 * 32) );
pchName = Helpers.MemoryToString( mem__pchName );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
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 )
@ -200,9 +174,8 @@ namespace Steamworks
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
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 )
@ -211,9 +184,8 @@ namespace Steamworks
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
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 )
@ -222,121 +194,116 @@ namespace Steamworks
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetCurrentBetaName", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetCurrentBetaName( IntPtr self, StringBuilder pchName, int cchNameBufferSize );
private FGetCurrentBetaName _GetCurrentBetaName;
private static extern bool _GetCurrentBetaName( IntPtr self, IntPtr pchName, int cchNameBufferSize );
#endregion
internal bool GetCurrentBetaName( StringBuilder pchName, int cchNameBufferSize )
internal bool GetCurrentBetaName( out string pchName )
{
return _GetCurrentBetaName( Self, pchName, cchNameBufferSize );
using var mem__pchName = Helpers.TakeMemory();
var returnValue = _GetCurrentBetaName( Self, mem__pchName, (1024 * 32) );
pchName = Helpers.MemoryToString( mem__pchName );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[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 )
{
return _MarkContentCorrupt( Self, bMissingFilesOnly );
var returnValue = _MarkContentCorrupt( Self, bMissingFilesOnly );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
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 )
{
return _GetInstalledDepots( Self, appID, pvecDepots, cMaxDepots );
var returnValue = _GetInstalledDepots( Self, appID, pvecDepots, cMaxDepots );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate uint FGetAppInstallDir( IntPtr self, AppId appID, StringBuilder 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, StringBuilder pchFolder, uint cchFolderBufferSize )
internal uint GetAppInstallDir( AppId appID, out string pchFolder )
{
return _GetAppInstallDir( Self, appID, pchFolder, cchFolderBufferSize );
using var mem__pchFolder = Helpers.TakeMemory();
var returnValue = _GetAppInstallDir( Self, appID, mem__pchFolder, (1024 * 32) );
pchFolder = Helpers.MemoryToString( mem__pchFolder );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[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 )
{
return _BIsAppInstalled( Self, appID );
var returnValue = _BIsAppInstalled( Self, appID );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate SteamId FGetAppOwner( IntPtr self );
private FGetAppOwner _GetAppOwner;
private delegate void FGetAppOwner_Windows( IntPtr self, ref SteamId retVal );
private FGetAppOwner_Windows _GetAppOwner_Windows;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetAppOwner", CallingConvention = Platform.CC)]
private static extern SteamId _GetAppOwner( IntPtr self );
#endregion
internal SteamId GetAppOwner()
{
if ( Config.Os == OsType.Windows )
{
var retVal = default( SteamId );
_GetAppOwner_Windows( Self, ref retVal );
return retVal;
}
return _GetAppOwner( Self );
var returnValue = _GetAppOwner( Self );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate IntPtr FGetLaunchQueryParam( IntPtr self, string pchKey );
private FGetLaunchQueryParam _GetLaunchQueryParam;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetLaunchQueryParam", CallingConvention = Platform.CC)]
private static extern Utf8StringPointer _GetLaunchQueryParam( IntPtr self, IntPtr pchKey );
#endregion
internal string GetLaunchQueryParam( string pchKey )
{
return GetString( _GetLaunchQueryParam( Self, pchKey ) );
using var str__pchKey = new Utf8StringToNative( pchKey );
var returnValue = _GetLaunchQueryParam( Self, str__pchKey.Pointer );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[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 )
{
return _GetDlcDownloadProgress( Self, nAppID, ref punBytesDownloaded, ref punBytesTotal );
var returnValue = _GetDlcDownloadProgress( Self, nAppID, ref punBytesDownloaded, ref punBytesTotal );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
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()
{
return _GetAppBuildId( Self );
var returnValue = _GetAppBuildId( Self );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
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()
@ -345,37 +312,104 @@ namespace Steamworks
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate SteamAPICall_t FGetFileDetails( IntPtr self, string pszFileName );
private FGetFileDetails _GetFileDetails;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetFileDetails", CallingConvention = Platform.CC)]
private static extern SteamAPICall_t _GetFileDetails( IntPtr self, IntPtr pszFileName );
#endregion
internal async Task<FileDetailsResult_t?> GetFileDetails( string pszFileName )
internal CallResult<FileDetailsResult_t> GetFileDetails( string pszFileName )
{
return await FileDetailsResult_t.GetResultAsync( _GetFileDetails( Self, pszFileName ) );
using var str__pszFileName = new Utf8StringToNative( pszFileName );
var returnValue = _GetFileDetails( Self, str__pszFileName.Pointer );
return new CallResult<FileDetailsResult_t>( returnValue, IsServer );
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate int FGetLaunchCommandLine( IntPtr self, StringBuilder 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( StringBuilder pszCommandLine, int cubCommandLine )
internal int GetLaunchCommandLine( out string pszCommandLine )
{
return _GetLaunchCommandLine( Self, pszCommandLine, cubCommandLine );
using var mem__pszCommandLine = Helpers.TakeMemory();
var returnValue = _GetLaunchCommandLine( Self, mem__pszCommandLine, (1024 * 32) );
pszCommandLine = Helpers.MemoryToString( mem__pszCommandLine );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[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()
{
return _BIsSubscribedFromFamilySharing( Self );
var returnValue = _BIsSubscribedFromFamilySharing( Self );
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;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetNumBetas", CallingConvention = Platform.CC)]
private static extern int _GetNumBetas( IntPtr self, ref int pnAvailable, ref int pnPrivate );
#endregion
internal int GetNumBetas( ref int pnAvailable, ref int pnPrivate )
{
var returnValue = _GetNumBetas( Self, ref pnAvailable, ref pnPrivate );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetBetaInfo", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private static extern bool _GetBetaInfo( IntPtr self, int iBetaIndex, ref uint punFlags, ref uint punBuildID, IntPtr pchBetaName, int cchBetaName, IntPtr pchDescription, int cchDescription );
#endregion
internal bool GetBetaInfo( int iBetaIndex, ref uint punFlags, ref uint punBuildID, out string pchBetaName, out string pchDescription )
{
using var mem__pchBetaName = Helpers.TakeMemory();
using var mem__pchDescription = Helpers.TakeMemory();
var returnValue = _GetBetaInfo( Self, iBetaIndex, ref punFlags, ref punBuildID, mem__pchBetaName, (1024 * 32), mem__pchDescription, (1024 * 32) );
pchBetaName = Helpers.MemoryToString( mem__pchBetaName );
pchDescription = Helpers.MemoryToString( mem__pchDescription );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_SetActiveBeta", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private static extern bool _SetActiveBeta( IntPtr self, IntPtr pchBetaName );
#endregion
internal bool SetActiveBeta( string pchBetaName )
{
using var str__pchBetaName = new Utf8StringToNative( pchBetaName );
var returnValue = _SetActiveBeta( Self, str__pchBetaName.Pointer );
return returnValue;
}
}

View File

@ -0,0 +1,428 @@
using System;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using Steamworks.Data;
namespace Steamworks
{
internal unsafe partial 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, IntPtr pchVersion );
#endregion
internal IntPtr GetISteamUser( HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion )
{
using var str__pchVersion = new Utf8StringToNative( pchVersion );
var returnValue = _GetISteamUser( Self, hSteamUser, hSteamPipe, str__pchVersion.Pointer );
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, IntPtr pchVersion );
#endregion
internal IntPtr GetISteamGameServer( HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion )
{
using var str__pchVersion = new Utf8StringToNative( pchVersion );
var returnValue = _GetISteamGameServer( Self, hSteamUser, hSteamPipe, str__pchVersion.Pointer );
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, IntPtr pchVersion );
#endregion
internal IntPtr GetISteamFriends( HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion )
{
using var str__pchVersion = new Utf8StringToNative( pchVersion );
var returnValue = _GetISteamFriends( Self, hSteamUser, hSteamPipe, str__pchVersion.Pointer );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamUtils", CallingConvention = Platform.CC)]
private static extern IntPtr _GetISteamUtils( IntPtr self, HSteamPipe hSteamPipe, IntPtr pchVersion );
#endregion
internal IntPtr GetISteamUtils( HSteamPipe hSteamPipe, string pchVersion )
{
using var str__pchVersion = new Utf8StringToNative( pchVersion );
var returnValue = _GetISteamUtils( Self, hSteamPipe, str__pchVersion.Pointer );
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, IntPtr pchVersion );
#endregion
internal IntPtr GetISteamMatchmaking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion )
{
using var str__pchVersion = new Utf8StringToNative( pchVersion );
var returnValue = _GetISteamMatchmaking( Self, hSteamUser, hSteamPipe, str__pchVersion.Pointer );
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, IntPtr pchVersion );
#endregion
internal IntPtr GetISteamMatchmakingServers( HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion )
{
using var str__pchVersion = new Utf8StringToNative( pchVersion );
var returnValue = _GetISteamMatchmakingServers( Self, hSteamUser, hSteamPipe, str__pchVersion.Pointer );
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, IntPtr pchVersion );
#endregion
internal IntPtr GetISteamGenericInterface( HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion )
{
using var str__pchVersion = new Utf8StringToNative( pchVersion );
var returnValue = _GetISteamGenericInterface( Self, hSteamUser, hSteamPipe, str__pchVersion.Pointer );
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, IntPtr pchVersion );
#endregion
internal IntPtr GetISteamUserStats( HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion )
{
using var str__pchVersion = new Utf8StringToNative( pchVersion );
var returnValue = _GetISteamUserStats( Self, hSteamUser, hSteamPipe, str__pchVersion.Pointer );
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, IntPtr pchVersion );
#endregion
internal IntPtr GetISteamGameServerStats( HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion )
{
using var str__pchVersion = new Utf8StringToNative( pchVersion );
var returnValue = _GetISteamGameServerStats( Self, hSteamuser, hSteamPipe, str__pchVersion.Pointer );
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, IntPtr pchVersion );
#endregion
internal IntPtr GetISteamApps( HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion )
{
using var str__pchVersion = new Utf8StringToNative( pchVersion );
var returnValue = _GetISteamApps( Self, hSteamUser, hSteamPipe, str__pchVersion.Pointer );
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, IntPtr pchVersion );
#endregion
internal IntPtr GetISteamNetworking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion )
{
using var str__pchVersion = new Utf8StringToNative( pchVersion );
var returnValue = _GetISteamNetworking( Self, hSteamUser, hSteamPipe, str__pchVersion.Pointer );
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, IntPtr pchVersion );
#endregion
internal IntPtr GetISteamRemoteStorage( HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion )
{
using var str__pchVersion = new Utf8StringToNative( pchVersion );
var returnValue = _GetISteamRemoteStorage( Self, hSteamuser, hSteamPipe, str__pchVersion.Pointer );
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, IntPtr pchVersion );
#endregion
internal IntPtr GetISteamScreenshots( HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion )
{
using var str__pchVersion = new Utf8StringToNative( pchVersion );
var returnValue = _GetISteamScreenshots( Self, hSteamuser, hSteamPipe, str__pchVersion.Pointer );
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, IntPtr pchVersion );
#endregion
internal IntPtr GetISteamGameSearch( HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion )
{
using var str__pchVersion = new Utf8StringToNative( pchVersion );
var returnValue = _GetISteamGameSearch( Self, hSteamuser, hSteamPipe, str__pchVersion.Pointer );
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, IntPtr pchVersion );
#endregion
internal IntPtr GetISteamHTTP( HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion )
{
using var str__pchVersion = new Utf8StringToNative( pchVersion );
var returnValue = _GetISteamHTTP( Self, hSteamuser, hSteamPipe, str__pchVersion.Pointer );
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, IntPtr pchVersion );
#endregion
internal IntPtr GetISteamController( HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion )
{
using var str__pchVersion = new Utf8StringToNative( pchVersion );
var returnValue = _GetISteamController( Self, hSteamUser, hSteamPipe, str__pchVersion.Pointer );
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, IntPtr pchVersion );
#endregion
internal IntPtr GetISteamUGC( HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion )
{
using var str__pchVersion = new Utf8StringToNative( pchVersion );
var returnValue = _GetISteamUGC( Self, hSteamUser, hSteamPipe, str__pchVersion.Pointer );
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, IntPtr pchVersion );
#endregion
internal IntPtr GetISteamMusic( HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion )
{
using var str__pchVersion = new Utf8StringToNative( pchVersion );
var returnValue = _GetISteamMusic( Self, hSteamuser, hSteamPipe, str__pchVersion.Pointer );
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, IntPtr pchVersion );
#endregion
internal IntPtr GetISteamMusicRemote( HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion )
{
using var str__pchVersion = new Utf8StringToNative( pchVersion );
var returnValue = _GetISteamMusicRemote( Self, hSteamuser, hSteamPipe, str__pchVersion.Pointer );
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, IntPtr pchVersion );
#endregion
internal IntPtr GetISteamHTMLSurface( HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion )
{
using var str__pchVersion = new Utf8StringToNative( pchVersion );
var returnValue = _GetISteamHTMLSurface( Self, hSteamuser, hSteamPipe, str__pchVersion.Pointer );
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, IntPtr pchVersion );
#endregion
internal IntPtr GetISteamInventory( HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion )
{
using var str__pchVersion = new Utf8StringToNative( pchVersion );
var returnValue = _GetISteamInventory( Self, hSteamuser, hSteamPipe, str__pchVersion.Pointer );
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, IntPtr pchVersion );
#endregion
internal IntPtr GetISteamVideo( HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion )
{
using var str__pchVersion = new Utf8StringToNative( pchVersion );
var returnValue = _GetISteamVideo( Self, hSteamuser, hSteamPipe, str__pchVersion.Pointer );
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, IntPtr pchVersion );
#endregion
internal IntPtr GetISteamParentalSettings( HSteamUser hSteamuser, HSteamPipe hSteamPipe, string pchVersion )
{
using var str__pchVersion = new Utf8StringToNative( pchVersion );
var returnValue = _GetISteamParentalSettings( Self, hSteamuser, hSteamPipe, str__pchVersion.Pointer );
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, IntPtr pchVersion );
#endregion
internal IntPtr GetISteamInput( HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion )
{
using var str__pchVersion = new Utf8StringToNative( pchVersion );
var returnValue = _GetISteamInput( Self, hSteamUser, hSteamPipe, str__pchVersion.Pointer );
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, IntPtr pchVersion );
#endregion
internal IntPtr GetISteamParties( HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion )
{
using var str__pchVersion = new Utf8StringToNative( pchVersion );
var returnValue = _GetISteamParties( Self, hSteamUser, hSteamPipe, str__pchVersion.Pointer );
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, IntPtr pchVersion );
#endregion
internal IntPtr GetISteamRemotePlay( HSteamUser hSteamUser, HSteamPipe hSteamPipe, string pchVersion )
{
using var str__pchVersion = new Utf8StringToNative( pchVersion );
var returnValue = _GetISteamRemotePlay( Self, hSteamUser, hSteamPipe, str__pchVersion.Pointer );
return returnValue;
}
}
}

View File

@ -0,0 +1,396 @@
using System;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using Steamworks.Data;
namespace Steamworks
{
internal unsafe partial class ISteamController : SteamInterface
{
public const string Version = "SteamController008";
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, IntPtr pszActionSetName );
#endregion
internal ControllerActionSetHandle_t GetActionSetHandle( string pszActionSetName )
{
using var str__pszActionSetName = new Utf8StringToNative( pszActionSetName );
var returnValue = _GetActionSetHandle( Self, str__pszActionSetName.Pointer );
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, IntPtr pszActionName );
#endregion
internal ControllerDigitalActionHandle_t GetDigitalActionHandle( string pszActionName )
{
using var str__pszActionName = new Utf8StringToNative( pszActionName );
var returnValue = _GetDigitalActionHandle( Self, str__pszActionName.Pointer );
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, IntPtr pszActionName );
#endregion
internal ControllerAnalogActionHandle_t GetAnalogActionHandle( string pszActionName )
{
using var str__pszActionName = new Utf8StringToNative( pszActionName );
var returnValue = _GetAnalogActionHandle( Self, str__pszActionName.Pointer );
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;
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,186 @@
using System;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using Steamworks.Data;
namespace Steamworks
{
internal unsafe partial class ISteamGameSearch : SteamInterface
{
public const string Version = "SteamMatchGameSearch001";
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, IntPtr pchKeyToFind, IntPtr pchValuesToFind );
#endregion
internal GameSearchErrorCode_t AddGameSearchParams( string pchKeyToFind, string pchValuesToFind )
{
using var str__pchKeyToFind = new Utf8StringToNative( pchKeyToFind );
using var str__pchValuesToFind = new Utf8StringToNative( pchValuesToFind );
var returnValue = _AddGameSearchParams( Self, str__pchKeyToFind.Pointer, str__pchValuesToFind.Pointer );
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 mem__pchConnectionDetails = Helpers.TakeMemory();
var returnValue = _RetrieveConnectionDetails( Self, steamIDHost, mem__pchConnectionDetails, (1024 * 32) );
pchConnectionDetails = Helpers.MemoryToString( mem__pchConnectionDetails );
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, IntPtr pchKey, IntPtr pchValue );
#endregion
internal GameSearchErrorCode_t SetGameHostParams( string pchKey, string pchValue )
{
using var str__pchKey = new Utf8StringToNative( pchKey );
using var str__pchValue = new Utf8StringToNative( pchValue );
var returnValue = _SetGameHostParams( Self, str__pchKey.Pointer, str__pchValue.Pointer );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_SetConnectionDetails", CallingConvention = Platform.CC)]
private static extern GameSearchErrorCode_t _SetConnectionDetails( IntPtr self, IntPtr pchConnectionDetails, int cubConnectionDetails );
#endregion
internal GameSearchErrorCode_t SetConnectionDetails( string pchConnectionDetails, int cubConnectionDetails )
{
using var str__pchConnectionDetails = new Utf8StringToNative( pchConnectionDetails );
var returnValue = _SetConnectionDetails( Self, str__pchConnectionDetails.Pointer, 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;
}
}
}

View File

@ -7,113 +7,56 @@ using Steamworks.Data;
namespace Steamworks
{
internal class ISteamGameServer : SteamInterface
internal unsafe partial class ISteamGameServer : SteamInterface
{
public ISteamGameServer( bool server = false ) : base( server )
public const string Version = "SteamGameServer015";
internal ISteamGameServer( bool IsGameServer )
{
SetupInterface( IsGameServer );
}
public override string InterfaceName => "SteamGameServer012";
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameServer_v015", CallingConvention = Platform.CC)]
internal static extern IntPtr SteamAPI_SteamGameServer_v015();
public override IntPtr GetServerInterfacePointer() => SteamAPI_SteamGameServer_v015();
public override void InitInternals()
{
_InitGameServer = Marshal.GetDelegateForFunctionPointer<FInitGameServer>( Marshal.ReadIntPtr( VTable, 0) );
_SetProduct = Marshal.GetDelegateForFunctionPointer<FSetProduct>( Marshal.ReadIntPtr( VTable, 8) );
_SetGameDescription = Marshal.GetDelegateForFunctionPointer<FSetGameDescription>( Marshal.ReadIntPtr( VTable, 16) );
_SetModDir = Marshal.GetDelegateForFunctionPointer<FSetModDir>( Marshal.ReadIntPtr( VTable, 24) );
_SetDedicatedServer = Marshal.GetDelegateForFunctionPointer<FSetDedicatedServer>( Marshal.ReadIntPtr( VTable, 32) );
_LogOn = Marshal.GetDelegateForFunctionPointer<FLogOn>( Marshal.ReadIntPtr( VTable, 40) );
_LogOnAnonymous = Marshal.GetDelegateForFunctionPointer<FLogOnAnonymous>( Marshal.ReadIntPtr( VTable, 48) );
_LogOff = Marshal.GetDelegateForFunctionPointer<FLogOff>( Marshal.ReadIntPtr( VTable, 56) );
_BLoggedOn = Marshal.GetDelegateForFunctionPointer<FBLoggedOn>( Marshal.ReadIntPtr( VTable, 64) );
_BSecure = Marshal.GetDelegateForFunctionPointer<FBSecure>( Marshal.ReadIntPtr( VTable, 72) );
_GetSteamID = Marshal.GetDelegateForFunctionPointer<FGetSteamID>( Marshal.ReadIntPtr( VTable, 80) );
_GetSteamID_Windows = Marshal.GetDelegateForFunctionPointer<FGetSteamID_Windows>( Marshal.ReadIntPtr( VTable, 80) );
_WasRestartRequested = Marshal.GetDelegateForFunctionPointer<FWasRestartRequested>( Marshal.ReadIntPtr( VTable, 88) );
_SetMaxPlayerCount = Marshal.GetDelegateForFunctionPointer<FSetMaxPlayerCount>( Marshal.ReadIntPtr( VTable, 96) );
_SetBotPlayerCount = Marshal.GetDelegateForFunctionPointer<FSetBotPlayerCount>( Marshal.ReadIntPtr( VTable, 104) );
_SetServerName = Marshal.GetDelegateForFunctionPointer<FSetServerName>( Marshal.ReadIntPtr( VTable, 112) );
_SetMapName = Marshal.GetDelegateForFunctionPointer<FSetMapName>( Marshal.ReadIntPtr( VTable, 120) );
_SetPasswordProtected = Marshal.GetDelegateForFunctionPointer<FSetPasswordProtected>( Marshal.ReadIntPtr( VTable, 128) );
_SetSpectatorPort = Marshal.GetDelegateForFunctionPointer<FSetSpectatorPort>( Marshal.ReadIntPtr( VTable, 136) );
_SetSpectatorServerName = Marshal.GetDelegateForFunctionPointer<FSetSpectatorServerName>( Marshal.ReadIntPtr( VTable, 144) );
_ClearAllKeyValues = Marshal.GetDelegateForFunctionPointer<FClearAllKeyValues>( Marshal.ReadIntPtr( VTable, 152) );
_SetKeyValue = Marshal.GetDelegateForFunctionPointer<FSetKeyValue>( Marshal.ReadIntPtr( VTable, 160) );
_SetGameTags = Marshal.GetDelegateForFunctionPointer<FSetGameTags>( Marshal.ReadIntPtr( VTable, 168) );
_SetGameData = Marshal.GetDelegateForFunctionPointer<FSetGameData>( Marshal.ReadIntPtr( VTable, 176) );
_SetRegion = Marshal.GetDelegateForFunctionPointer<FSetRegion>( Marshal.ReadIntPtr( VTable, 184) );
_SendUserConnectAndAuthenticate = Marshal.GetDelegateForFunctionPointer<FSendUserConnectAndAuthenticate>( Marshal.ReadIntPtr( VTable, 192) );
_CreateUnauthenticatedUserConnection = Marshal.GetDelegateForFunctionPointer<FCreateUnauthenticatedUserConnection>( Marshal.ReadIntPtr( VTable, 200) );
_CreateUnauthenticatedUserConnection_Windows = Marshal.GetDelegateForFunctionPointer<FCreateUnauthenticatedUserConnection_Windows>( Marshal.ReadIntPtr( VTable, 200) );
_SendUserDisconnect = Marshal.GetDelegateForFunctionPointer<FSendUserDisconnect>( Marshal.ReadIntPtr( VTable, 208) );
_BUpdateUserData = Marshal.GetDelegateForFunctionPointer<FBUpdateUserData>( Marshal.ReadIntPtr( VTable, 216) );
_GetAuthSessionTicket = Marshal.GetDelegateForFunctionPointer<FGetAuthSessionTicket>( Marshal.ReadIntPtr( VTable, 224) );
_BeginAuthSession = Marshal.GetDelegateForFunctionPointer<FBeginAuthSession>( Marshal.ReadIntPtr( VTable, 232) );
_EndAuthSession = Marshal.GetDelegateForFunctionPointer<FEndAuthSession>( Marshal.ReadIntPtr( VTable, 240) );
_CancelAuthTicket = Marshal.GetDelegateForFunctionPointer<FCancelAuthTicket>( Marshal.ReadIntPtr( VTable, 248) );
_UserHasLicenseForApp = Marshal.GetDelegateForFunctionPointer<FUserHasLicenseForApp>( Marshal.ReadIntPtr( VTable, 256) );
_RequestUserGroupStatus = Marshal.GetDelegateForFunctionPointer<FRequestUserGroupStatus>( Marshal.ReadIntPtr( VTable, 264) );
_GetGameplayStats = Marshal.GetDelegateForFunctionPointer<FGetGameplayStats>( Marshal.ReadIntPtr( VTable, 272) );
_GetServerReputation = Marshal.GetDelegateForFunctionPointer<FGetServerReputation>( Marshal.ReadIntPtr( VTable, 280) );
_GetPublicIP = Marshal.GetDelegateForFunctionPointer<FGetPublicIP>( Marshal.ReadIntPtr( VTable, 288) );
_HandleIncomingPacket = Marshal.GetDelegateForFunctionPointer<FHandleIncomingPacket>( Marshal.ReadIntPtr( VTable, 296) );
_GetNextOutgoingPacket = Marshal.GetDelegateForFunctionPointer<FGetNextOutgoingPacket>( Marshal.ReadIntPtr( VTable, 304) );
_EnableHeartbeats = Marshal.GetDelegateForFunctionPointer<FEnableHeartbeats>( Marshal.ReadIntPtr( VTable, 312) );
_SetHeartbeatInterval = Marshal.GetDelegateForFunctionPointer<FSetHeartbeatInterval>( Marshal.ReadIntPtr( VTable, 320) );
_ForceHeartbeat = Marshal.GetDelegateForFunctionPointer<FForceHeartbeat>( Marshal.ReadIntPtr( VTable, 328) );
_AssociateWithClan = Marshal.GetDelegateForFunctionPointer<FAssociateWithClan>( Marshal.ReadIntPtr( VTable, 336) );
_ComputeNewPlayerCompatibility = Marshal.GetDelegateForFunctionPointer<FComputeNewPlayerCompatibility>( Marshal.ReadIntPtr( VTable, 344) );
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FInitGameServer( IntPtr self, uint unIP, ushort usGamePort, ushort usQueryPort, uint unFlags, AppId nGameAppId, string pchVersionString );
private FInitGameServer _InitGameServer;
#endregion
internal bool InitGameServer( uint unIP, ushort usGamePort, ushort usQueryPort, uint unFlags, AppId nGameAppId, string pchVersionString )
{
return _InitGameServer( Self, unIP, usGamePort, usQueryPort, unFlags, nGameAppId, pchVersionString );
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate void FSetProduct( IntPtr self, string pszProduct );
private FSetProduct _SetProduct;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetProduct", CallingConvention = Platform.CC)]
private static extern void _SetProduct( IntPtr self, IntPtr pszProduct );
#endregion
internal void SetProduct( string pszProduct )
{
_SetProduct( Self, pszProduct );
using var str__pszProduct = new Utf8StringToNative( pszProduct );
_SetProduct( Self, str__pszProduct.Pointer );
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate void FSetGameDescription( IntPtr self, string pszGameDescription );
private FSetGameDescription _SetGameDescription;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetGameDescription", CallingConvention = Platform.CC)]
private static extern void _SetGameDescription( IntPtr self, IntPtr pszGameDescription );
#endregion
internal void SetGameDescription( string pszGameDescription )
{
_SetGameDescription( Self, pszGameDescription );
using var str__pszGameDescription = new Utf8StringToNative( pszGameDescription );
_SetGameDescription( Self, str__pszGameDescription.Pointer );
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate void FSetModDir( IntPtr self, string pszModDir );
private FSetModDir _SetModDir;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetModDir", CallingConvention = Platform.CC)]
private static extern void _SetModDir( IntPtr self, IntPtr pszModDir );
#endregion
internal void SetModDir( string pszModDir )
{
_SetModDir( Self, pszModDir );
using var str__pszModDir = new Utf8StringToNative( pszModDir );
_SetModDir( Self, str__pszModDir.Pointer );
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
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 )
@ -122,20 +65,19 @@ namespace Steamworks
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate void FLogOn( IntPtr self, string pszToken );
private FLogOn _LogOn;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_LogOn", CallingConvention = Platform.CC)]
private static extern void _LogOn( IntPtr self, IntPtr pszToken );
#endregion
internal void LogOn( string pszToken )
{
_LogOn( Self, pszToken );
using var str__pszToken = new Utf8StringToNative( pszToken );
_LogOn( Self, str__pszToken.Pointer );
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
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()
@ -144,9 +86,8 @@ namespace Steamworks
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
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()
@ -155,65 +96,55 @@ namespace Steamworks
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[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()
{
return _BLoggedOn( Self );
var returnValue = _BLoggedOn( Self );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[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()
{
return _BSecure( Self );
var returnValue = _BSecure( Self );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate SteamId FGetSteamID( IntPtr self );
private FGetSteamID _GetSteamID;
private delegate void FGetSteamID_Windows( IntPtr self, ref SteamId retVal );
private FGetSteamID_Windows _GetSteamID_Windows;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_GetSteamID", CallingConvention = Platform.CC)]
private static extern SteamId _GetSteamID( IntPtr self );
#endregion
internal SteamId GetSteamID()
{
if ( Config.Os == OsType.Windows )
{
var retVal = default( SteamId );
_GetSteamID_Windows( Self, ref retVal );
return retVal;
}
return _GetSteamID( Self );
var returnValue = _GetSteamID( Self );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[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()
{
return _WasRestartRequested( Self );
var returnValue = _WasRestartRequested( Self );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
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 )
@ -222,9 +153,8 @@ namespace Steamworks
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
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 )
@ -233,31 +163,30 @@ namespace Steamworks
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate void FSetServerName( IntPtr self, string pszServerName );
private FSetServerName _SetServerName;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetServerName", CallingConvention = Platform.CC)]
private static extern void _SetServerName( IntPtr self, IntPtr pszServerName );
#endregion
internal void SetServerName( string pszServerName )
{
_SetServerName( Self, pszServerName );
using var str__pszServerName = new Utf8StringToNative( pszServerName );
_SetServerName( Self, str__pszServerName.Pointer );
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate void FSetMapName( IntPtr self, string pszMapName );
private FSetMapName _SetMapName;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetMapName", CallingConvention = Platform.CC)]
private static extern void _SetMapName( IntPtr self, IntPtr pszMapName );
#endregion
internal void SetMapName( string pszMapName )
{
_SetMapName( Self, pszMapName );
using var str__pszMapName = new Utf8StringToNative( pszMapName );
_SetMapName( Self, str__pszMapName.Pointer );
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
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 )
@ -266,9 +195,8 @@ namespace Steamworks
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
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 )
@ -277,20 +205,19 @@ namespace Steamworks
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate void FSetSpectatorServerName( IntPtr self, string pszSpectatorServerName );
private FSetSpectatorServerName _SetSpectatorServerName;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetSpectatorServerName", CallingConvention = Platform.CC)]
private static extern void _SetSpectatorServerName( IntPtr self, IntPtr pszSpectatorServerName );
#endregion
internal void SetSpectatorServerName( string pszSpectatorServerName )
{
_SetSpectatorServerName( Self, pszSpectatorServerName );
using var str__pszSpectatorServerName = new Utf8StringToNative( pszSpectatorServerName );
_SetSpectatorServerName( Self, str__pszSpectatorServerName.Pointer );
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
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()
@ -299,130 +226,85 @@ namespace Steamworks
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate void FSetKeyValue( IntPtr self, string pKey, string pValue );
private FSetKeyValue _SetKeyValue;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetKeyValue", CallingConvention = Platform.CC)]
private static extern void _SetKeyValue( IntPtr self, IntPtr pKey, IntPtr pValue );
#endregion
internal void SetKeyValue( string pKey, string pValue )
{
_SetKeyValue( Self, pKey, pValue );
using var str__pKey = new Utf8StringToNative( pKey );
using var str__pValue = new Utf8StringToNative( pValue );
_SetKeyValue( Self, str__pKey.Pointer, str__pValue.Pointer );
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate void FSetGameTags( IntPtr self, string pchGameTags );
private FSetGameTags _SetGameTags;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetGameTags", CallingConvention = Platform.CC)]
private static extern void _SetGameTags( IntPtr self, IntPtr pchGameTags );
#endregion
internal void SetGameTags( string pchGameTags )
{
_SetGameTags( Self, pchGameTags );
using var str__pchGameTags = new Utf8StringToNative( pchGameTags );
_SetGameTags( Self, str__pchGameTags.Pointer );
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate void FSetGameData( IntPtr self, string pchGameData );
private FSetGameData _SetGameData;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetGameData", CallingConvention = Platform.CC)]
private static extern void _SetGameData( IntPtr self, IntPtr pchGameData );
#endregion
internal void SetGameData( string pchGameData )
{
_SetGameData( Self, pchGameData );
using var str__pchGameData = new Utf8StringToNative( pchGameData );
_SetGameData( Self, str__pchGameData.Pointer );
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate void FSetRegion( IntPtr self, string pszRegion );
private FSetRegion _SetRegion;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetRegion", CallingConvention = Platform.CC)]
private static extern void _SetRegion( IntPtr self, IntPtr pszRegion );
#endregion
internal void SetRegion( string pszRegion )
{
_SetRegion( Self, pszRegion );
using var str__pszRegion = new Utf8StringToNative( pszRegion );
_SetRegion( Self, str__pszRegion.Pointer );
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[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 )
{
return _SendUserConnectAndAuthenticate( Self, unIPClient, pvAuthBlob, cubAuthBlobSize, ref pSteamIDUser );
_SetAdvertiseServerActive( Self, bActive );
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate SteamId FCreateUnauthenticatedUserConnection( IntPtr self );
private FCreateUnauthenticatedUserConnection _CreateUnauthenticatedUserConnection;
private delegate void FCreateUnauthenticatedUserConnection_Windows( IntPtr self, ref SteamId retVal );
private FCreateUnauthenticatedUserConnection_Windows _CreateUnauthenticatedUserConnection_Windows;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_GetAuthSessionTicket", CallingConvention = Platform.CC)]
private static extern HAuthTicket _GetAuthSessionTicket( IntPtr self, IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket, ref NetIdentity pSnid );
#endregion
internal SteamId CreateUnauthenticatedUserConnection()
internal HAuthTicket GetAuthSessionTicket( IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket, ref NetIdentity pSnid )
{
if ( Config.Os == OsType.Windows )
{
var retVal = default( SteamId );
_CreateUnauthenticatedUserConnection_Windows( Self, ref retVal );
return retVal;
}
return _CreateUnauthenticatedUserConnection( Self );
var returnValue = _GetAuthSessionTicket( Self, pTicket, cbMaxTicket, ref pcbTicket, ref pSnid );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate void FSendUserDisconnect( IntPtr self, SteamId steamIDUser );
private FSendUserDisconnect _SendUserDisconnect;
#endregion
internal void SendUserDisconnect( SteamId steamIDUser )
{
_SendUserDisconnect( Self, steamIDUser );
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBUpdateUserData( IntPtr self, SteamId steamIDUser, string pchPlayerName, uint uScore );
private FBUpdateUserData _BUpdateUserData;
#endregion
internal bool BUpdateUserData( SteamId steamIDUser, string pchPlayerName, uint uScore )
{
return _BUpdateUserData( Self, steamIDUser, pchPlayerName, uScore );
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate HAuthTicket FGetAuthSessionTicket( IntPtr self, IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket );
private FGetAuthSessionTicket _GetAuthSessionTicket;
#endregion
internal HAuthTicket GetAuthSessionTicket( IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket )
{
return _GetAuthSessionTicket( Self, pTicket, cbMaxTicket, ref pcbTicket );
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
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 )
{
return _BeginAuthSession( Self, pAuthTicket, cbAuthTicket, steamID );
var returnValue = _BeginAuthSession( Self, pAuthTicket, cbAuthTicket, steamID );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
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 )
@ -431,9 +313,8 @@ namespace Steamworks
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
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 )
@ -442,32 +323,31 @@ namespace Steamworks
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
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 )
{
return _UserHasLicenseForApp( Self, steamID, appID );
var returnValue = _UserHasLicenseForApp( Self, steamID, appID );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[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 )
{
return _RequestUserGroupStatus( Self, steamIDUser, steamIDGroup );
var returnValue = _RequestUserGroupStatus( Self, steamIDUser, steamIDGroup );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
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()
@ -476,103 +356,116 @@ namespace Steamworks
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
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<GSReputation_t?> GetServerReputation()
internal CallResult<GSReputation_t> GetServerReputation()
{
return await GSReputation_t.GetResultAsync( _GetServerReputation( Self ) );
var returnValue = _GetServerReputation( Self );
return new CallResult<GSReputation_t>( returnValue, IsServer );
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
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()
{
return _GetPublicIP( Self );
var returnValue = _GetPublicIP( Self );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[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 )
{
return _HandleIncomingPacket( Self, pData, cbData, srcIP, srcPort );
var returnValue = _HandleIncomingPacket( Self, pData, cbData, srcIP, srcPort );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
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 )
{
return _GetNextOutgoingPacket( Self, pOut, cbMaxOut, ref pNetAdr, ref pPort );
var returnValue = _GetNextOutgoingPacket( Self, pOut, cbMaxOut, ref pNetAdr, ref pPort );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
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 )
internal CallResult<AssociateWithClanResult_t> AssociateWithClan( SteamId steamIDClan )
{
_EnableHeartbeats( Self, bActive );
var returnValue = _AssociateWithClan( Self, steamIDClan );
return new CallResult<AssociateWithClanResult_t>( returnValue, IsServer );
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate void FSetHeartbeatInterval( IntPtr self, int iHeartbeatInterval );
private FSetHeartbeatInterval _SetHeartbeatInterval;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_ComputeNewPlayerCompatibility", CallingConvention = Platform.CC)]
private static extern SteamAPICall_t _ComputeNewPlayerCompatibility( IntPtr self, SteamId steamIDNewPlayer );
#endregion
internal void SetHeartbeatInterval( int iHeartbeatInterval )
internal CallResult<ComputeNewPlayerCompatibilityResult_t> ComputeNewPlayerCompatibility( SteamId steamIDNewPlayer )
{
_SetHeartbeatInterval( Self, iHeartbeatInterval );
var returnValue = _ComputeNewPlayerCompatibility( Self, steamIDNewPlayer );
return new CallResult<ComputeNewPlayerCompatibilityResult_t>( returnValue, IsServer );
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate void FForceHeartbeat( IntPtr self );
private FForceHeartbeat _ForceHeartbeat;
[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 void ForceHeartbeat()
internal bool SendUserConnectAndAuthenticate_DEPRECATED( uint unIPClient, IntPtr pvAuthBlob, uint cubAuthBlobSize, ref SteamId pSteamIDUser )
{
_ForceHeartbeat( Self );
var returnValue = _SendUserConnectAndAuthenticate_DEPRECATED( Self, unIPClient, pvAuthBlob, cubAuthBlobSize, ref pSteamIDUser );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate SteamAPICall_t FAssociateWithClan( IntPtr self, SteamId steamIDClan );
private FAssociateWithClan _AssociateWithClan;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_CreateUnauthenticatedUserConnection", CallingConvention = Platform.CC)]
private static extern SteamId _CreateUnauthenticatedUserConnection( IntPtr self );
#endregion
internal async Task<AssociateWithClanResult_t?> AssociateWithClan( SteamId steamIDClan )
internal SteamId CreateUnauthenticatedUserConnection()
{
return await AssociateWithClanResult_t.GetResultAsync( _AssociateWithClan( Self, steamIDClan ) );
var returnValue = _CreateUnauthenticatedUserConnection( Self );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate SteamAPICall_t FComputeNewPlayerCompatibility( IntPtr self, SteamId steamIDNewPlayer );
private FComputeNewPlayerCompatibility _ComputeNewPlayerCompatibility;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SendUserDisconnect_DEPRECATED", CallingConvention = Platform.CC)]
private static extern void _SendUserDisconnect_DEPRECATED( IntPtr self, SteamId steamIDUser );
#endregion
internal async Task<ComputeNewPlayerCompatibilityResult_t?> ComputeNewPlayerCompatibility( SteamId steamIDNewPlayer )
internal void SendUserDisconnect_DEPRECATED( SteamId steamIDUser )
{
return await ComputeNewPlayerCompatibilityResult_t.GetResultAsync( _ComputeNewPlayerCompatibility( Self, steamIDNewPlayer ) );
_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, IntPtr pchPlayerName, uint uScore );
#endregion
internal bool BUpdateUserData( SteamId steamIDUser, string pchPlayerName, uint uScore )
{
using var str__pchPlayerName = new Utf8StringToNative( pchPlayerName );
var returnValue = _BUpdateUserData( Self, steamIDUser, str__pchPlayerName.Pointer, uScore );
return returnValue;
}
}

View File

@ -0,0 +1,151 @@
using System;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using Steamworks.Data;
namespace Steamworks
{
internal unsafe partial class ISteamGameServerStats : SteamInterface
{
public const string Version = "SteamGameServerStats001";
internal ISteamGameServerStats( bool IsGameServer )
{
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
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_RequestUserStats", CallingConvention = Platform.CC)]
private static extern SteamAPICall_t _RequestUserStats( IntPtr self, SteamId steamIDUser );
#endregion
internal CallResult<GSStatsReceived_t> RequestUserStats( SteamId steamIDUser )
{
var returnValue = _RequestUserStats( Self, steamIDUser );
return new CallResult<GSStatsReceived_t>( returnValue, IsServer );
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_GetUserStatInt32", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private static extern bool _GetUserStat( IntPtr self, SteamId steamIDUser, IntPtr pchName, ref int pData );
#endregion
internal bool GetUserStat( SteamId steamIDUser, string pchName, ref int pData )
{
using var str__pchName = new Utf8StringToNative( pchName );
var returnValue = _GetUserStat( Self, steamIDUser, str__pchName.Pointer, ref pData );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_GetUserStatFloat", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private static extern bool _GetUserStat( IntPtr self, SteamId steamIDUser, IntPtr pchName, ref float pData );
#endregion
internal bool GetUserStat( SteamId steamIDUser, string pchName, ref float pData )
{
using var str__pchName = new Utf8StringToNative( pchName );
var returnValue = _GetUserStat( Self, steamIDUser, str__pchName.Pointer, ref pData );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_GetUserAchievement", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private static extern bool _GetUserAchievement( IntPtr self, SteamId steamIDUser, IntPtr pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved );
#endregion
internal bool GetUserAchievement( SteamId steamIDUser, string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved )
{
using var str__pchName = new Utf8StringToNative( pchName );
var returnValue = _GetUserAchievement( Self, steamIDUser, str__pchName.Pointer, ref pbAchieved );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_SetUserStatInt32", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private static extern bool _SetUserStat( IntPtr self, SteamId steamIDUser, IntPtr pchName, int nData );
#endregion
internal bool SetUserStat( SteamId steamIDUser, string pchName, int nData )
{
using var str__pchName = new Utf8StringToNative( pchName );
var returnValue = _SetUserStat( Self, steamIDUser, str__pchName.Pointer, nData );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_SetUserStatFloat", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private static extern bool _SetUserStat( IntPtr self, SteamId steamIDUser, IntPtr pchName, float fData );
#endregion
internal bool SetUserStat( SteamId steamIDUser, string pchName, float fData )
{
using var str__pchName = new Utf8StringToNative( pchName );
var returnValue = _SetUserStat( Self, steamIDUser, str__pchName.Pointer, fData );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_UpdateUserAvgRateStat", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private static extern bool _UpdateUserAvgRateStat( IntPtr self, SteamId steamIDUser, IntPtr pchName, float flCountThisSession, double dSessionLength );
#endregion
internal bool UpdateUserAvgRateStat( SteamId steamIDUser, string pchName, float flCountThisSession, double dSessionLength )
{
using var str__pchName = new Utf8StringToNative( pchName );
var returnValue = _UpdateUserAvgRateStat( Self, steamIDUser, str__pchName.Pointer, flCountThisSession, dSessionLength );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_SetUserAchievement", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private static extern bool _SetUserAchievement( IntPtr self, SteamId steamIDUser, IntPtr pchName );
#endregion
internal bool SetUserAchievement( SteamId steamIDUser, string pchName )
{
using var str__pchName = new Utf8StringToNative( pchName );
var returnValue = _SetUserAchievement( Self, steamIDUser, str__pchName.Pointer );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_ClearUserAchievement", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private static extern bool _ClearUserAchievement( IntPtr self, SteamId steamIDUser, IntPtr pchName );
#endregion
internal bool ClearUserAchievement( SteamId steamIDUser, string pchName )
{
using var str__pchName = new Utf8StringToNative( pchName );
var returnValue = _ClearUserAchievement( Self, steamIDUser, str__pchName.Pointer );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_StoreUserStats", CallingConvention = Platform.CC)]
private static extern SteamAPICall_t _StoreUserStats( IntPtr self, SteamId steamIDUser );
#endregion
internal CallResult<GSStatsStored_t> StoreUserStats( SteamId steamIDUser )
{
var returnValue = _StoreUserStats( Self, steamIDUser );
return new CallResult<GSStatsStored_t>( returnValue, IsServer );
}
}
}

View File

@ -0,0 +1,413 @@
using System;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using Steamworks.Data;
namespace Steamworks
{
internal unsafe partial class ISteamHTMLSurface : SteamInterface
{
public const string Version = "STEAMHTMLSURFACE_INTERFACE_VERSION_005";
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, IntPtr pchUserAgent, IntPtr pchUserCSS );
#endregion
internal CallResult<HTML_BrowserReady_t> CreateBrowser( string pchUserAgent, string pchUserCSS )
{
using var str__pchUserAgent = new Utf8StringToNative( pchUserAgent );
using var str__pchUserCSS = new Utf8StringToNative( pchUserCSS );
var returnValue = _CreateBrowser( Self, str__pchUserAgent.Pointer, str__pchUserCSS.Pointer );
return new CallResult<HTML_BrowserReady_t>( 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, IntPtr pchURL, IntPtr pchPostData );
#endregion
internal void LoadURL( HHTMLBrowser unBrowserHandle, string pchURL, string pchPostData )
{
using var str__pchURL = new Utf8StringToNative( pchURL );
using var str__pchPostData = new Utf8StringToNative( pchPostData );
_LoadURL( Self, unBrowserHandle, str__pchURL.Pointer, str__pchPostData.Pointer );
}
#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, IntPtr pchKey, IntPtr pchValue );
#endregion
internal void AddHeader( HHTMLBrowser unBrowserHandle, string pchKey, string pchValue )
{
using var str__pchKey = new Utf8StringToNative( pchKey );
using var str__pchValue = new Utf8StringToNative( pchValue );
_AddHeader( Self, unBrowserHandle, str__pchKey.Pointer, str__pchValue.Pointer );
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_ExecuteJavascript", CallingConvention = Platform.CC)]
private static extern void _ExecuteJavascript( IntPtr self, HHTMLBrowser unBrowserHandle, IntPtr pchScript );
#endregion
internal void ExecuteJavascript( HHTMLBrowser unBrowserHandle, string pchScript )
{
using var str__pchScript = new Utf8StringToNative( pchScript );
_ExecuteJavascript( Self, unBrowserHandle, str__pchScript.Pointer );
}
#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, IntPtr pchSearchStr, [MarshalAs( UnmanagedType.U1 )] bool bCurrentlyInFind, [MarshalAs( UnmanagedType.U1 )] bool bReverse );
#endregion
internal void Find( HHTMLBrowser unBrowserHandle, string pchSearchStr, [MarshalAs( UnmanagedType.U1 )] bool bCurrentlyInFind, [MarshalAs( UnmanagedType.U1 )] bool bReverse )
{
using var str__pchSearchStr = new Utf8StringToNative( pchSearchStr );
_Find( Self, unBrowserHandle, str__pchSearchStr.Pointer, 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, IntPtr pchHostname, IntPtr pchKey, IntPtr pchValue, IntPtr pchPath, RTime32 nExpires, [MarshalAs( UnmanagedType.U1 )] bool bSecure, [MarshalAs( UnmanagedType.U1 )] bool bHTTPOnly );
#endregion
internal void SetCookie( string pchHostname, string pchKey, string pchValue, string pchPath, RTime32 nExpires, [MarshalAs( UnmanagedType.U1 )] bool bSecure, [MarshalAs( UnmanagedType.U1 )] bool bHTTPOnly )
{
using var str__pchHostname = new Utf8StringToNative( pchHostname );
using var str__pchKey = new Utf8StringToNative( pchKey );
using var str__pchValue = new Utf8StringToNative( pchValue );
using var str__pchPath = new Utf8StringToNative( pchPath );
_SetCookie( Self, str__pchHostname.Pointer, str__pchKey.Pointer, str__pchValue.Pointer, str__pchPath.Pointer, 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, IntPtr pchSelectedFiles );
#endregion
internal void FileLoadDialogResponse( HHTMLBrowser unBrowserHandle, string pchSelectedFiles )
{
using var str__pchSelectedFiles = new Utf8StringToNative( pchSelectedFiles );
_FileLoadDialogResponse( Self, unBrowserHandle, str__pchSelectedFiles.Pointer );
}
}
}

View File

@ -0,0 +1,338 @@
using System;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using Steamworks.Data;
namespace Steamworks
{
internal unsafe partial class ISteamHTTP : SteamInterface
{
public const string Version = "STEAMHTTP_INTERFACE_VERSION003";
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, IntPtr pchAbsoluteURL );
#endregion
internal HTTPRequestHandle CreateHTTPRequest( HTTPMethod eHTTPRequestMethod, string pchAbsoluteURL )
{
using var str__pchAbsoluteURL = new Utf8StringToNative( pchAbsoluteURL );
var returnValue = _CreateHTTPRequest( Self, eHTTPRequestMethod, str__pchAbsoluteURL.Pointer );
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, IntPtr pchHeaderName, IntPtr pchHeaderValue );
#endregion
internal bool SetHTTPRequestHeaderValue( HTTPRequestHandle hRequest, string pchHeaderName, string pchHeaderValue )
{
using var str__pchHeaderName = new Utf8StringToNative( pchHeaderName );
using var str__pchHeaderValue = new Utf8StringToNative( pchHeaderValue );
var returnValue = _SetHTTPRequestHeaderValue( Self, hRequest, str__pchHeaderName.Pointer, str__pchHeaderValue.Pointer );
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, IntPtr pchParamName, IntPtr pchParamValue );
#endregion
internal bool SetHTTPRequestGetOrPostParameter( HTTPRequestHandle hRequest, string pchParamName, string pchParamValue )
{
using var str__pchParamName = new Utf8StringToNative( pchParamName );
using var str__pchParamValue = new Utf8StringToNative( pchParamValue );
var returnValue = _SetHTTPRequestGetOrPostParameter( Self, hRequest, str__pchParamName.Pointer, str__pchParamValue.Pointer );
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, IntPtr pchHeaderName, ref uint unResponseHeaderSize );
#endregion
internal bool GetHTTPResponseHeaderSize( HTTPRequestHandle hRequest, string pchHeaderName, ref uint unResponseHeaderSize )
{
using var str__pchHeaderName = new Utf8StringToNative( pchHeaderName );
var returnValue = _GetHTTPResponseHeaderSize( Self, hRequest, str__pchHeaderName.Pointer, 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, IntPtr pchHeaderName, ref byte pHeaderValueBuffer, uint unBufferSize );
#endregion
internal bool GetHTTPResponseHeaderValue( HTTPRequestHandle hRequest, string pchHeaderName, ref byte pHeaderValueBuffer, uint unBufferSize )
{
using var str__pchHeaderName = new Utf8StringToNative( pchHeaderName );
var returnValue = _GetHTTPResponseHeaderValue( Self, hRequest, str__pchHeaderName.Pointer, 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, IntPtr pchContentType, [In,Out] byte[] pubBody, uint unBodyLen );
#endregion
internal bool SetHTTPRequestRawPostBody( HTTPRequestHandle hRequest, string pchContentType, [In,Out] byte[] pubBody, uint unBodyLen )
{
using var str__pchContentType = new Utf8StringToNative( pchContentType );
var returnValue = _SetHTTPRequestRawPostBody( Self, hRequest, str__pchContentType.Pointer, 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, IntPtr pchHost, IntPtr pchUrl, IntPtr pchCookie );
#endregion
internal bool SetCookie( HTTPCookieContainerHandle hCookieContainer, string pchHost, string pchUrl, string pchCookie )
{
using var str__pchHost = new Utf8StringToNative( pchHost );
using var str__pchUrl = new Utf8StringToNative( pchUrl );
using var str__pchCookie = new Utf8StringToNative( pchCookie );
var returnValue = _SetCookie( Self, hCookieContainer, str__pchHost.Pointer, str__pchUrl.Pointer, str__pchCookie.Pointer );
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, IntPtr pchUserAgentInfo );
#endregion
internal bool SetHTTPRequestUserAgentInfo( HTTPRequestHandle hRequest, string pchUserAgentInfo )
{
using var str__pchUserAgentInfo = new Utf8StringToNative( pchUserAgentInfo );
var returnValue = _SetHTTPRequestUserAgentInfo( Self, hRequest, str__pchUserAgentInfo.Pointer );
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;
}
}
}

View File

@ -0,0 +1,529 @@
using System;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using Steamworks.Data;
namespace Steamworks
{
internal unsafe partial class ISteamInput : SteamInterface
{
public const string Version = "SteamInput006";
internal ISteamInput( bool IsGameServer )
{
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
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_Init", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private static extern bool _Init( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bExplicitlyCallRunFrame );
#endregion
internal bool Init( [MarshalAs( UnmanagedType.U1 )] bool bExplicitlyCallRunFrame )
{
var returnValue = _Init( Self, bExplicitlyCallRunFrame );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_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_ISteamInput_SetInputActionManifestFilePath", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private static extern bool _SetInputActionManifestFilePath( IntPtr self, IntPtr pchInputActionManifestAbsolutePath );
#endregion
internal bool SetInputActionManifestFilePath( string pchInputActionManifestAbsolutePath )
{
using var str__pchInputActionManifestAbsolutePath = new Utf8StringToNative( pchInputActionManifestAbsolutePath );
var returnValue = _SetInputActionManifestFilePath( Self, str__pchInputActionManifestAbsolutePath.Pointer );
return returnValue;
}
#region FunctionMeta
[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 )
{
var returnValue = _GetConnectedControllers( Self, handlesOut );
return returnValue;
}
#region FunctionMeta
[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, IntPtr pszActionSetName );
#endregion
internal InputActionSetHandle_t GetActionSetHandle( string pszActionSetName )
{
using var str__pszActionSetName = new Utf8StringToNative( pszActionSetName );
var returnValue = _GetActionSetHandle( Self, str__pszActionSetName.Pointer );
return returnValue;
}
#region FunctionMeta
[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 )
{
_ActivateActionSet( Self, inputHandle, actionSetHandle );
}
#region FunctionMeta
[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 )
{
var returnValue = _GetCurrentActionSet( Self, inputHandle );
return returnValue;
}
#region FunctionMeta
[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 )
{
_ActivateActionSetLayer( Self, inputHandle, actionSetLayerHandle );
}
#region FunctionMeta
[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 )
{
_DeactivateActionSetLayer( Self, inputHandle, actionSetLayerHandle );
}
#region FunctionMeta
[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 )
{
_DeactivateAllActionSetLayers( Self, inputHandle );
}
#region FunctionMeta
[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 )
{
var returnValue = _GetActiveActionSetLayers( Self, inputHandle, handlesOut );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetDigitalActionHandle", CallingConvention = Platform.CC)]
private static extern InputDigitalActionHandle_t _GetDigitalActionHandle( IntPtr self, IntPtr pszActionName );
#endregion
internal InputDigitalActionHandle_t GetDigitalActionHandle( string pszActionName )
{
using var str__pszActionName = new Utf8StringToNative( pszActionName );
var returnValue = _GetDigitalActionHandle( Self, str__pszActionName.Pointer );
return returnValue;
}
#region FunctionMeta
[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 )
{
var returnValue = _GetDigitalActionData( Self, inputHandle, digitalActionHandle );
return returnValue;
}
#region FunctionMeta
[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 )
{
var returnValue = _GetDigitalActionOrigins( Self, inputHandle, actionSetHandle, digitalActionHandle, ref originsOut );
return returnValue;
}
#region FunctionMeta
[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, IntPtr pszActionName );
#endregion
internal InputAnalogActionHandle_t GetAnalogActionHandle( string pszActionName )
{
using var str__pszActionName = new Utf8StringToNative( pszActionName );
var returnValue = _GetAnalogActionHandle( Self, str__pszActionName.Pointer );
return returnValue;
}
#region FunctionMeta
[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 )
{
var returnValue = _GetAnalogActionData( Self, inputHandle, analogActionHandle );
return returnValue;
}
#region FunctionMeta
[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 )
{
var returnValue = _GetAnalogActionOrigins( Self, inputHandle, actionSetHandle, analogActionHandle, ref originsOut );
return returnValue;
}
#region FunctionMeta
[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 GetGlyphPNGForActionOrigin( InputActionOrigin eOrigin, GlyphSize eSize, uint unFlags )
{
var returnValue = _GetGlyphPNGForActionOrigin( Self, eOrigin, eSize, unFlags );
return returnValue;
}
#region FunctionMeta
[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 )
{
var returnValue = _GetStringForActionOrigin( Self, eOrigin );
return returnValue;
}
#region FunctionMeta
[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 )
{
_StopAnalogActionMomentum( Self, inputHandle, eAction );
}
#region FunctionMeta
[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 )
{
var returnValue = _GetMotionData( Self, inputHandle );
return returnValue;
}
#region FunctionMeta
[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 )
{
_TriggerVibration( Self, inputHandle, usLeftSpeed, usRightSpeed );
}
#region FunctionMeta
[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 )
{
_SetLEDColor( Self, inputHandle, nColorR, nColorG, nColorB, nFlags );
}
#region FunctionMeta
[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 Legacy_TriggerHapticPulse( InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec )
{
_Legacy_TriggerHapticPulse( Self, inputHandle, eTargetPad, usDurationMicroSec );
}
#region FunctionMeta
[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 Legacy_TriggerRepeatedHapticPulse( InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec, ushort usOffMicroSec, ushort unRepeat, uint nFlags )
{
_Legacy_TriggerRepeatedHapticPulse( Self, inputHandle, eTargetPad, usDurationMicroSec, usOffMicroSec, unRepeat, nFlags );
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_ShowBindingPanel", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private static extern bool _ShowBindingPanel( IntPtr self, InputHandle_t inputHandle );
#endregion
internal bool ShowBindingPanel( InputHandle_t inputHandle )
{
var returnValue = _ShowBindingPanel( Self, inputHandle );
return returnValue;
}
#region FunctionMeta
[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 )
{
var returnValue = _GetInputTypeForHandle( Self, inputHandle );
return returnValue;
}
#region FunctionMeta
[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 )
{
var returnValue = _GetControllerForGamepadIndex( Self, nIndex );
return returnValue;
}
#region FunctionMeta
[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 )
{
var returnValue = _GetGamepadIndexForController( Self, ulinputHandle );
return returnValue;
}
#region FunctionMeta
[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 )
{
var returnValue = _GetStringForXboxOrigin( Self, eOrigin );
return returnValue;
}
#region FunctionMeta
[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 )
{
var returnValue = _GetGlyphForXboxOrigin( Self, eOrigin );
return returnValue;
}
#region FunctionMeta
[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 )
{
var returnValue = _GetActionOriginFromXboxOrigin( Self, inputHandle, eOrigin );
return returnValue;
}
#region FunctionMeta
[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 )
{
var returnValue = _TranslateActionOrigin( Self, eDestinationInputType, eSourceOrigin );
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;
}
}
}

View File

@ -7,117 +7,88 @@ using Steamworks.Data;
namespace Steamworks
{
internal class ISteamInventory : SteamInterface
internal unsafe partial class ISteamInventory : SteamInterface
{
public ISteamInventory( bool server = false ) : base( server )
public const string Version = "STEAMINVENTORY_INTERFACE_V003";
internal ISteamInventory( bool IsGameServer )
{
SetupInterface( IsGameServer );
}
public override string InterfaceName => "STEAMINVENTORY_INTERFACE_V003";
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamInventory_v003", CallingConvention = Platform.CC)]
internal static extern IntPtr SteamAPI_SteamInventory_v003();
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamInventory_v003();
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameServerInventory_v003", CallingConvention = Platform.CC)]
internal static extern IntPtr SteamAPI_SteamGameServerInventory_v003();
public override IntPtr GetServerInterfacePointer() => SteamAPI_SteamGameServerInventory_v003();
public override void InitInternals()
{
_GetResultStatus = Marshal.GetDelegateForFunctionPointer<FGetResultStatus>( Marshal.ReadIntPtr( VTable, 0) );
_GetResultItems = Marshal.GetDelegateForFunctionPointer<FGetResultItems>( Marshal.ReadIntPtr( VTable, 8) );
_GetResultItemProperty = Marshal.GetDelegateForFunctionPointer<FGetResultItemProperty>( Marshal.ReadIntPtr( VTable, 16) );
_GetResultTimestamp = Marshal.GetDelegateForFunctionPointer<FGetResultTimestamp>( Marshal.ReadIntPtr( VTable, 24) );
_CheckResultSteamID = Marshal.GetDelegateForFunctionPointer<FCheckResultSteamID>( Marshal.ReadIntPtr( VTable, 32) );
_DestroyResult = Marshal.GetDelegateForFunctionPointer<FDestroyResult>( Marshal.ReadIntPtr( VTable, 40) );
_GetAllItems = Marshal.GetDelegateForFunctionPointer<FGetAllItems>( Marshal.ReadIntPtr( VTable, 48) );
_GetItemsByID = Marshal.GetDelegateForFunctionPointer<FGetItemsByID>( Marshal.ReadIntPtr( VTable, 56) );
_SerializeResult = Marshal.GetDelegateForFunctionPointer<FSerializeResult>( Marshal.ReadIntPtr( VTable, 64) );
_DeserializeResult = Marshal.GetDelegateForFunctionPointer<FDeserializeResult>( Marshal.ReadIntPtr( VTable, 72) );
_GenerateItems = Marshal.GetDelegateForFunctionPointer<FGenerateItems>( Marshal.ReadIntPtr( VTable, 80) );
_GrantPromoItems = Marshal.GetDelegateForFunctionPointer<FGrantPromoItems>( Marshal.ReadIntPtr( VTable, 88) );
_AddPromoItem = Marshal.GetDelegateForFunctionPointer<FAddPromoItem>( Marshal.ReadIntPtr( VTable, 96) );
_AddPromoItems = Marshal.GetDelegateForFunctionPointer<FAddPromoItems>( Marshal.ReadIntPtr( VTable, 104) );
_ConsumeItem = Marshal.GetDelegateForFunctionPointer<FConsumeItem>( Marshal.ReadIntPtr( VTable, 112) );
_ExchangeItems = Marshal.GetDelegateForFunctionPointer<FExchangeItems>( Marshal.ReadIntPtr( VTable, 120) );
_TransferItemQuantity = Marshal.GetDelegateForFunctionPointer<FTransferItemQuantity>( Marshal.ReadIntPtr( VTable, 128) );
_SendItemDropHeartbeat = Marshal.GetDelegateForFunctionPointer<FSendItemDropHeartbeat>( Marshal.ReadIntPtr( VTable, 136) );
_TriggerItemDrop = Marshal.GetDelegateForFunctionPointer<FTriggerItemDrop>( Marshal.ReadIntPtr( VTable, 144) );
_TradeItems = Marshal.GetDelegateForFunctionPointer<FTradeItems>( Marshal.ReadIntPtr( VTable, 152) );
_LoadItemDefinitions = Marshal.GetDelegateForFunctionPointer<FLoadItemDefinitions>( Marshal.ReadIntPtr( VTable, 160) );
_GetItemDefinitionIDs = Marshal.GetDelegateForFunctionPointer<FGetItemDefinitionIDs>( Marshal.ReadIntPtr( VTable, 168) );
_GetItemDefinitionProperty = Marshal.GetDelegateForFunctionPointer<FGetItemDefinitionProperty>( Marshal.ReadIntPtr( VTable, 176) );
_RequestEligiblePromoItemDefinitionsIDs = Marshal.GetDelegateForFunctionPointer<FRequestEligiblePromoItemDefinitionsIDs>( Marshal.ReadIntPtr( VTable, 184) );
_GetEligiblePromoItemDefinitionIDs = Marshal.GetDelegateForFunctionPointer<FGetEligiblePromoItemDefinitionIDs>( Marshal.ReadIntPtr( VTable, 192) );
_StartPurchase = Marshal.GetDelegateForFunctionPointer<FStartPurchase>( Marshal.ReadIntPtr( VTable, 200) );
_RequestPrices = Marshal.GetDelegateForFunctionPointer<FRequestPrices>( Marshal.ReadIntPtr( VTable, 208) );
_GetNumItemsWithPrices = Marshal.GetDelegateForFunctionPointer<FGetNumItemsWithPrices>( Marshal.ReadIntPtr( VTable, 216) );
_GetItemsWithPrices = Marshal.GetDelegateForFunctionPointer<FGetItemsWithPrices>( Marshal.ReadIntPtr( VTable, 224) );
_GetItemPrice = Marshal.GetDelegateForFunctionPointer<FGetItemPrice>( Marshal.ReadIntPtr( VTable, 232) );
_StartUpdateProperties = Marshal.GetDelegateForFunctionPointer<FStartUpdateProperties>( Marshal.ReadIntPtr( VTable, 240) );
_RemoveProperty = Marshal.GetDelegateForFunctionPointer<FRemoveProperty>( Marshal.ReadIntPtr( VTable, 248) );
_SetProperty1 = Marshal.GetDelegateForFunctionPointer<FSetProperty1>( Marshal.ReadIntPtr( VTable, 256) );
_SetProperty2 = Marshal.GetDelegateForFunctionPointer<FSetProperty2>( Marshal.ReadIntPtr( VTable, 264) );
_SetProperty3 = Marshal.GetDelegateForFunctionPointer<FSetProperty3>( Marshal.ReadIntPtr( VTable, 272) );
_SetProperty4 = Marshal.GetDelegateForFunctionPointer<FSetProperty4>( Marshal.ReadIntPtr( VTable, 280) );
_SubmitUpdateProperties = Marshal.GetDelegateForFunctionPointer<FSubmitUpdateProperties>( Marshal.ReadIntPtr( VTable, 288) );
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate Result FGetResultStatus( IntPtr self, SteamInventoryResult_t resultHandle );
private FGetResultStatus _GetResultStatus;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetResultStatus", CallingConvention = Platform.CC)]
private static extern Result _GetResultStatus( IntPtr self, SteamInventoryResult_t resultHandle );
#endregion
internal Result GetResultStatus( SteamInventoryResult_t resultHandle )
{
return _GetResultStatus( Self, resultHandle );
var returnValue = _GetResultStatus( Self, resultHandle );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetResultItems", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetResultItems( IntPtr self, SteamInventoryResult_t resultHandle, [In,Out] SteamItemDetails_t[] pOutItemsArray, ref uint punOutItemsArraySize );
private FGetResultItems _GetResultItems;
private static extern bool _GetResultItems( IntPtr self, SteamInventoryResult_t resultHandle, [In,Out] SteamItemDetails_t[] pOutItemsArray, ref uint punOutItemsArraySize );
#endregion
internal bool GetResultItems( SteamInventoryResult_t resultHandle, [In,Out] SteamItemDetails_t[] pOutItemsArray, ref uint punOutItemsArraySize )
{
return _GetResultItems( Self, resultHandle, pOutItemsArray, ref punOutItemsArraySize );
var returnValue = _GetResultItems( Self, resultHandle, pOutItemsArray, ref punOutItemsArraySize );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetResultItemProperty", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetResultItemProperty( IntPtr self, SteamInventoryResult_t resultHandle, uint unItemIndex, string pchPropertyName, StringBuilder pchValueBuffer, ref uint punValueBufferSizeOut );
private FGetResultItemProperty _GetResultItemProperty;
private static extern bool _GetResultItemProperty( IntPtr self, SteamInventoryResult_t resultHandle, uint unItemIndex, IntPtr pchPropertyName, IntPtr pchValueBuffer, ref uint punValueBufferSizeOut );
#endregion
internal bool GetResultItemProperty( SteamInventoryResult_t resultHandle, uint unItemIndex, string pchPropertyName, StringBuilder pchValueBuffer, ref uint punValueBufferSizeOut )
internal bool GetResultItemProperty( SteamInventoryResult_t resultHandle, uint unItemIndex, string pchPropertyName, out string pchValueBuffer )
{
return _GetResultItemProperty( Self, resultHandle, unItemIndex, pchPropertyName, pchValueBuffer, ref punValueBufferSizeOut );
using var str__pchPropertyName = new Utf8StringToNative( pchPropertyName );
using var mem__pchValueBuffer = Helpers.TakeMemory();
uint szpunValueBufferSizeOut = (1024 * 32);
var returnValue = _GetResultItemProperty( Self, resultHandle, unItemIndex, str__pchPropertyName.Pointer, mem__pchValueBuffer, ref szpunValueBufferSizeOut );
pchValueBuffer = Helpers.MemoryToString( mem__pchValueBuffer );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate uint FGetResultTimestamp( IntPtr self, SteamInventoryResult_t resultHandle );
private FGetResultTimestamp _GetResultTimestamp;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetResultTimestamp", CallingConvention = Platform.CC)]
private static extern uint _GetResultTimestamp( IntPtr self, SteamInventoryResult_t resultHandle );
#endregion
internal uint GetResultTimestamp( SteamInventoryResult_t resultHandle )
{
return _GetResultTimestamp( Self, resultHandle );
var returnValue = _GetResultTimestamp( Self, resultHandle );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_CheckResultSteamID", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FCheckResultSteamID( IntPtr self, SteamInventoryResult_t resultHandle, SteamId steamIDExpected );
private FCheckResultSteamID _CheckResultSteamID;
private static extern bool _CheckResultSteamID( IntPtr self, SteamInventoryResult_t resultHandle, SteamId steamIDExpected );
#endregion
internal bool CheckResultSteamID( SteamInventoryResult_t resultHandle, SteamId steamIDExpected )
{
return _CheckResultSteamID( Self, resultHandle, steamIDExpected );
var returnValue = _CheckResultSteamID( Self, resultHandle, steamIDExpected );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate void FDestroyResult( IntPtr self, SteamInventoryResult_t resultHandle );
private FDestroyResult _DestroyResult;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_DestroyResult", CallingConvention = Platform.CC)]
private static extern void _DestroyResult( IntPtr self, SteamInventoryResult_t resultHandle );
#endregion
internal void DestroyResult( SteamInventoryResult_t resultHandle )
@ -126,141 +97,140 @@ namespace Steamworks
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetAllItems", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetAllItems( IntPtr self, ref SteamInventoryResult_t pResultHandle );
private FGetAllItems _GetAllItems;
private static extern bool _GetAllItems( IntPtr self, ref SteamInventoryResult_t pResultHandle );
#endregion
internal bool GetAllItems( ref SteamInventoryResult_t pResultHandle )
{
return _GetAllItems( Self, ref pResultHandle );
var returnValue = _GetAllItems( Self, ref pResultHandle );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetItemsByID", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetItemsByID( IntPtr self, ref SteamInventoryResult_t pResultHandle, ref InventoryItemId pInstanceIDs, uint unCountInstanceIDs );
private FGetItemsByID _GetItemsByID;
private static extern bool _GetItemsByID( IntPtr self, ref SteamInventoryResult_t pResultHandle, ref InventoryItemId pInstanceIDs, uint unCountInstanceIDs );
#endregion
internal bool GetItemsByID( ref SteamInventoryResult_t pResultHandle, ref InventoryItemId pInstanceIDs, uint unCountInstanceIDs )
{
return _GetItemsByID( Self, ref pResultHandle, ref pInstanceIDs, unCountInstanceIDs );
var returnValue = _GetItemsByID( Self, ref pResultHandle, ref pInstanceIDs, unCountInstanceIDs );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_SerializeResult", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSerializeResult( IntPtr self, SteamInventoryResult_t resultHandle, IntPtr pOutBuffer, ref uint punOutBufferSize );
private FSerializeResult _SerializeResult;
private static extern bool _SerializeResult( IntPtr self, SteamInventoryResult_t resultHandle, IntPtr pOutBuffer, ref uint punOutBufferSize );
#endregion
internal bool SerializeResult( SteamInventoryResult_t resultHandle, IntPtr pOutBuffer, ref uint punOutBufferSize )
{
return _SerializeResult( Self, resultHandle, pOutBuffer, ref punOutBufferSize );
var returnValue = _SerializeResult( Self, resultHandle, pOutBuffer, ref punOutBufferSize );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_DeserializeResult", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FDeserializeResult( IntPtr self, ref SteamInventoryResult_t pOutResultHandle, IntPtr pBuffer, uint unBufferSize, [MarshalAs( UnmanagedType.U1 )] bool bRESERVED_MUST_BE_FALSE );
private FDeserializeResult _DeserializeResult;
private static extern bool _DeserializeResult( IntPtr self, ref SteamInventoryResult_t pOutResultHandle, IntPtr pBuffer, uint unBufferSize, [MarshalAs( UnmanagedType.U1 )] bool bRESERVED_MUST_BE_FALSE );
#endregion
internal bool DeserializeResult( ref SteamInventoryResult_t pOutResultHandle, IntPtr pBuffer, uint unBufferSize, [MarshalAs( UnmanagedType.U1 )] bool bRESERVED_MUST_BE_FALSE )
{
return _DeserializeResult( Self, ref pOutResultHandle, pBuffer, unBufferSize, bRESERVED_MUST_BE_FALSE );
var returnValue = _DeserializeResult( Self, ref pOutResultHandle, pBuffer, unBufferSize, bRESERVED_MUST_BE_FALSE );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GenerateItems", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGenerateItems( IntPtr self, ref SteamInventoryResult_t pResultHandle, [In,Out] InventoryDefId[] pArrayItemDefs, [In,Out] uint[] punArrayQuantity, uint unArrayLength );
private FGenerateItems _GenerateItems;
private static extern bool _GenerateItems( IntPtr self, ref SteamInventoryResult_t pResultHandle, [In,Out] InventoryDefId[] pArrayItemDefs, [In,Out] uint[] punArrayQuantity, uint unArrayLength );
#endregion
internal bool GenerateItems( ref SteamInventoryResult_t pResultHandle, [In,Out] InventoryDefId[] pArrayItemDefs, [In,Out] uint[] punArrayQuantity, uint unArrayLength )
{
return _GenerateItems( Self, ref pResultHandle, pArrayItemDefs, punArrayQuantity, unArrayLength );
var returnValue = _GenerateItems( Self, ref pResultHandle, pArrayItemDefs, punArrayQuantity, unArrayLength );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GrantPromoItems", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGrantPromoItems( IntPtr self, ref SteamInventoryResult_t pResultHandle );
private FGrantPromoItems _GrantPromoItems;
private static extern bool _GrantPromoItems( IntPtr self, ref SteamInventoryResult_t pResultHandle );
#endregion
internal bool GrantPromoItems( ref SteamInventoryResult_t pResultHandle )
{
return _GrantPromoItems( Self, ref pResultHandle );
var returnValue = _GrantPromoItems( Self, ref pResultHandle );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_AddPromoItem", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FAddPromoItem( IntPtr self, ref SteamInventoryResult_t pResultHandle, InventoryDefId itemDef );
private FAddPromoItem _AddPromoItem;
private static extern bool _AddPromoItem( IntPtr self, ref SteamInventoryResult_t pResultHandle, InventoryDefId itemDef );
#endregion
internal bool AddPromoItem( ref SteamInventoryResult_t pResultHandle, InventoryDefId itemDef )
{
return _AddPromoItem( Self, ref pResultHandle, itemDef );
var returnValue = _AddPromoItem( Self, ref pResultHandle, itemDef );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_AddPromoItems", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FAddPromoItems( IntPtr self, ref SteamInventoryResult_t pResultHandle, [In,Out] InventoryDefId[] pArrayItemDefs, uint unArrayLength );
private FAddPromoItems _AddPromoItems;
private static extern bool _AddPromoItems( IntPtr self, ref SteamInventoryResult_t pResultHandle, [In,Out] InventoryDefId[] pArrayItemDefs, uint unArrayLength );
#endregion
internal bool AddPromoItems( ref SteamInventoryResult_t pResultHandle, [In,Out] InventoryDefId[] pArrayItemDefs, uint unArrayLength )
{
return _AddPromoItems( Self, ref pResultHandle, pArrayItemDefs, unArrayLength );
var returnValue = _AddPromoItems( Self, ref pResultHandle, pArrayItemDefs, unArrayLength );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_ConsumeItem", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FConsumeItem( IntPtr self, ref SteamInventoryResult_t pResultHandle, InventoryItemId itemConsume, uint unQuantity );
private FConsumeItem _ConsumeItem;
private static extern bool _ConsumeItem( IntPtr self, ref SteamInventoryResult_t pResultHandle, InventoryItemId itemConsume, uint unQuantity );
#endregion
internal bool ConsumeItem( ref SteamInventoryResult_t pResultHandle, InventoryItemId itemConsume, uint unQuantity )
{
return _ConsumeItem( Self, ref pResultHandle, itemConsume, unQuantity );
var returnValue = _ConsumeItem( Self, ref pResultHandle, itemConsume, unQuantity );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_ExchangeItems", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FExchangeItems( IntPtr self, ref SteamInventoryResult_t pResultHandle, [In,Out] InventoryDefId[] pArrayGenerate, [In,Out] uint[] punArrayGenerateQuantity, uint unArrayGenerateLength, [In,Out] InventoryItemId[] pArrayDestroy, [In,Out] uint[] punArrayDestroyQuantity, uint unArrayDestroyLength );
private FExchangeItems _ExchangeItems;
private static extern bool _ExchangeItems( IntPtr self, ref SteamInventoryResult_t pResultHandle, [In,Out] InventoryDefId[] pArrayGenerate, [In,Out] uint[] punArrayGenerateQuantity, uint unArrayGenerateLength, [In,Out] InventoryItemId[] pArrayDestroy, [In,Out] uint[] punArrayDestroyQuantity, uint unArrayDestroyLength );
#endregion
internal bool ExchangeItems( ref SteamInventoryResult_t pResultHandle, [In,Out] InventoryDefId[] pArrayGenerate, [In,Out] uint[] punArrayGenerateQuantity, uint unArrayGenerateLength, [In,Out] InventoryItemId[] pArrayDestroy, [In,Out] uint[] punArrayDestroyQuantity, uint unArrayDestroyLength )
{
return _ExchangeItems( Self, ref pResultHandle, pArrayGenerate, punArrayGenerateQuantity, unArrayGenerateLength, pArrayDestroy, punArrayDestroyQuantity, unArrayDestroyLength );
var returnValue = _ExchangeItems( Self, ref pResultHandle, pArrayGenerate, punArrayGenerateQuantity, unArrayGenerateLength, pArrayDestroy, punArrayDestroyQuantity, unArrayDestroyLength );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_TransferItemQuantity", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FTransferItemQuantity( IntPtr self, ref SteamInventoryResult_t pResultHandle, InventoryItemId itemIdSource, uint unQuantity, InventoryItemId itemIdDest );
private FTransferItemQuantity _TransferItemQuantity;
private static extern bool _TransferItemQuantity( IntPtr self, ref SteamInventoryResult_t pResultHandle, InventoryItemId itemIdSource, uint unQuantity, InventoryItemId itemIdDest );
#endregion
internal bool TransferItemQuantity( ref SteamInventoryResult_t pResultHandle, InventoryItemId itemIdSource, uint unQuantity, InventoryItemId itemIdDest )
{
return _TransferItemQuantity( Self, ref pResultHandle, itemIdSource, unQuantity, itemIdDest );
var returnValue = _TransferItemQuantity( Self, ref pResultHandle, itemIdSource, unQuantity, itemIdDest );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate void FSendItemDropHeartbeat( IntPtr self );
private FSendItemDropHeartbeat _SendItemDropHeartbeat;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_SendItemDropHeartbeat", CallingConvention = Platform.CC)]
private static extern void _SendItemDropHeartbeat( IntPtr self );
#endregion
internal void SendItemDropHeartbeat()
@ -269,226 +239,249 @@ namespace Steamworks
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_TriggerItemDrop", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FTriggerItemDrop( IntPtr self, ref SteamInventoryResult_t pResultHandle, InventoryDefId dropListDefinition );
private FTriggerItemDrop _TriggerItemDrop;
private static extern bool _TriggerItemDrop( IntPtr self, ref SteamInventoryResult_t pResultHandle, InventoryDefId dropListDefinition );
#endregion
internal bool TriggerItemDrop( ref SteamInventoryResult_t pResultHandle, InventoryDefId dropListDefinition )
{
return _TriggerItemDrop( Self, ref pResultHandle, dropListDefinition );
var returnValue = _TriggerItemDrop( Self, ref pResultHandle, dropListDefinition );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_TradeItems", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FTradeItems( IntPtr self, ref SteamInventoryResult_t pResultHandle, SteamId steamIDTradePartner, [In,Out] InventoryItemId[] pArrayGive, [In,Out] uint[] pArrayGiveQuantity, uint nArrayGiveLength, [In,Out] InventoryItemId[] pArrayGet, [In,Out] uint[] pArrayGetQuantity, uint nArrayGetLength );
private FTradeItems _TradeItems;
private static extern bool _TradeItems( IntPtr self, ref SteamInventoryResult_t pResultHandle, SteamId steamIDTradePartner, [In,Out] InventoryItemId[] pArrayGive, [In,Out] uint[] pArrayGiveQuantity, uint nArrayGiveLength, [In,Out] InventoryItemId[] pArrayGet, [In,Out] uint[] pArrayGetQuantity, uint nArrayGetLength );
#endregion
internal bool TradeItems( ref SteamInventoryResult_t pResultHandle, SteamId steamIDTradePartner, [In,Out] InventoryItemId[] pArrayGive, [In,Out] uint[] pArrayGiveQuantity, uint nArrayGiveLength, [In,Out] InventoryItemId[] pArrayGet, [In,Out] uint[] pArrayGetQuantity, uint nArrayGetLength )
{
return _TradeItems( Self, ref pResultHandle, steamIDTradePartner, pArrayGive, pArrayGiveQuantity, nArrayGiveLength, pArrayGet, pArrayGetQuantity, nArrayGetLength );
var returnValue = _TradeItems( Self, ref pResultHandle, steamIDTradePartner, pArrayGive, pArrayGiveQuantity, nArrayGiveLength, pArrayGet, pArrayGetQuantity, nArrayGetLength );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_LoadItemDefinitions", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FLoadItemDefinitions( IntPtr self );
private FLoadItemDefinitions _LoadItemDefinitions;
private static extern bool _LoadItemDefinitions( IntPtr self );
#endregion
internal bool LoadItemDefinitions()
{
return _LoadItemDefinitions( Self );
var returnValue = _LoadItemDefinitions( Self );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetItemDefinitionIDs", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetItemDefinitionIDs( IntPtr self, [In,Out] InventoryDefId[] pItemDefIDs, ref uint punItemDefIDsArraySize );
private FGetItemDefinitionIDs _GetItemDefinitionIDs;
private static extern bool _GetItemDefinitionIDs( IntPtr self, [In,Out] InventoryDefId[] pItemDefIDs, ref uint punItemDefIDsArraySize );
#endregion
internal bool GetItemDefinitionIDs( [In,Out] InventoryDefId[] pItemDefIDs, ref uint punItemDefIDsArraySize )
{
return _GetItemDefinitionIDs( Self, pItemDefIDs, ref punItemDefIDsArraySize );
var returnValue = _GetItemDefinitionIDs( Self, pItemDefIDs, ref punItemDefIDsArraySize );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetItemDefinitionProperty", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetItemDefinitionProperty( IntPtr self, InventoryDefId iDefinition, string pchPropertyName, StringBuilder pchValueBuffer, ref uint punValueBufferSizeOut );
private FGetItemDefinitionProperty _GetItemDefinitionProperty;
private static extern bool _GetItemDefinitionProperty( IntPtr self, InventoryDefId iDefinition, IntPtr pchPropertyName, IntPtr pchValueBuffer, ref uint punValueBufferSizeOut );
#endregion
internal bool GetItemDefinitionProperty( InventoryDefId iDefinition, string pchPropertyName, StringBuilder pchValueBuffer, ref uint punValueBufferSizeOut )
internal bool GetItemDefinitionProperty( InventoryDefId iDefinition, string pchPropertyName, out string pchValueBuffer )
{
return _GetItemDefinitionProperty( Self, iDefinition, pchPropertyName, pchValueBuffer, ref punValueBufferSizeOut );
using var str__pchPropertyName = new Utf8StringToNative( pchPropertyName );
using var mem__pchValueBuffer = Helpers.TakeMemory();
uint szpunValueBufferSizeOut = (1024 * 32);
var returnValue = _GetItemDefinitionProperty( Self, iDefinition, str__pchPropertyName.Pointer, mem__pchValueBuffer, ref szpunValueBufferSizeOut );
pchValueBuffer = Helpers.MemoryToString( mem__pchValueBuffer );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate SteamAPICall_t FRequestEligiblePromoItemDefinitionsIDs( IntPtr self, SteamId steamID );
private FRequestEligiblePromoItemDefinitionsIDs _RequestEligiblePromoItemDefinitionsIDs;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_RequestEligiblePromoItemDefinitionsIDs", CallingConvention = Platform.CC)]
private static extern SteamAPICall_t _RequestEligiblePromoItemDefinitionsIDs( IntPtr self, SteamId steamID );
#endregion
internal async Task<SteamInventoryEligiblePromoItemDefIDs_t?> RequestEligiblePromoItemDefinitionsIDs( SteamId steamID )
internal CallResult<SteamInventoryEligiblePromoItemDefIDs_t> RequestEligiblePromoItemDefinitionsIDs( SteamId steamID )
{
return await SteamInventoryEligiblePromoItemDefIDs_t.GetResultAsync( _RequestEligiblePromoItemDefinitionsIDs( Self, steamID ) );
var returnValue = _RequestEligiblePromoItemDefinitionsIDs( Self, steamID );
return new CallResult<SteamInventoryEligiblePromoItemDefIDs_t>( returnValue, IsServer );
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetEligiblePromoItemDefinitionIDs", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetEligiblePromoItemDefinitionIDs( IntPtr self, SteamId steamID, [In,Out] InventoryDefId[] pItemDefIDs, ref uint punItemDefIDsArraySize );
private FGetEligiblePromoItemDefinitionIDs _GetEligiblePromoItemDefinitionIDs;
private static extern bool _GetEligiblePromoItemDefinitionIDs( IntPtr self, SteamId steamID, [In,Out] InventoryDefId[] pItemDefIDs, ref uint punItemDefIDsArraySize );
#endregion
internal bool GetEligiblePromoItemDefinitionIDs( SteamId steamID, [In,Out] InventoryDefId[] pItemDefIDs, ref uint punItemDefIDsArraySize )
{
return _GetEligiblePromoItemDefinitionIDs( Self, steamID, pItemDefIDs, ref punItemDefIDsArraySize );
var returnValue = _GetEligiblePromoItemDefinitionIDs( Self, steamID, pItemDefIDs, ref punItemDefIDsArraySize );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate SteamAPICall_t FStartPurchase( IntPtr self, [In,Out] InventoryDefId[] pArrayItemDefs, [In,Out] uint[] punArrayQuantity, uint unArrayLength );
private FStartPurchase _StartPurchase;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_StartPurchase", CallingConvention = Platform.CC)]
private static extern SteamAPICall_t _StartPurchase( IntPtr self, [In,Out] InventoryDefId[] pArrayItemDefs, [In,Out] uint[] punArrayQuantity, uint unArrayLength );
#endregion
internal async Task<SteamInventoryStartPurchaseResult_t?> StartPurchase( [In,Out] InventoryDefId[] pArrayItemDefs, [In,Out] uint[] punArrayQuantity, uint unArrayLength )
internal CallResult<SteamInventoryStartPurchaseResult_t> StartPurchase( [In,Out] InventoryDefId[] pArrayItemDefs, [In,Out] uint[] punArrayQuantity, uint unArrayLength )
{
return await SteamInventoryStartPurchaseResult_t.GetResultAsync( _StartPurchase( Self, pArrayItemDefs, punArrayQuantity, unArrayLength ) );
var returnValue = _StartPurchase( Self, pArrayItemDefs, punArrayQuantity, unArrayLength );
return new CallResult<SteamInventoryStartPurchaseResult_t>( returnValue, IsServer );
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate SteamAPICall_t FRequestPrices( IntPtr self );
private FRequestPrices _RequestPrices;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_RequestPrices", CallingConvention = Platform.CC)]
private static extern SteamAPICall_t _RequestPrices( IntPtr self );
#endregion
internal async Task<SteamInventoryRequestPricesResult_t?> RequestPrices()
internal CallResult<SteamInventoryRequestPricesResult_t> RequestPrices()
{
return await SteamInventoryRequestPricesResult_t.GetResultAsync( _RequestPrices( Self ) );
var returnValue = _RequestPrices( Self );
return new CallResult<SteamInventoryRequestPricesResult_t>( returnValue, IsServer );
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate uint FGetNumItemsWithPrices( IntPtr self );
private FGetNumItemsWithPrices _GetNumItemsWithPrices;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetNumItemsWithPrices", CallingConvention = Platform.CC)]
private static extern uint _GetNumItemsWithPrices( IntPtr self );
#endregion
internal uint GetNumItemsWithPrices()
{
return _GetNumItemsWithPrices( Self );
var returnValue = _GetNumItemsWithPrices( Self );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetItemsWithPrices", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetItemsWithPrices( IntPtr self, [In,Out] InventoryDefId[] pArrayItemDefs, [In,Out] ulong[] pCurrentPrices, [In,Out] ulong[] pBasePrices, uint unArrayLength );
private FGetItemsWithPrices _GetItemsWithPrices;
private static extern bool _GetItemsWithPrices( IntPtr self, [In,Out] InventoryDefId[] pArrayItemDefs, [In,Out] ulong[] pCurrentPrices, [In,Out] ulong[] pBasePrices, uint unArrayLength );
#endregion
internal bool GetItemsWithPrices( [In,Out] InventoryDefId[] pArrayItemDefs, [In,Out] ulong[] pCurrentPrices, [In,Out] ulong[] pBasePrices, uint unArrayLength )
{
return _GetItemsWithPrices( Self, pArrayItemDefs, pCurrentPrices, pBasePrices, unArrayLength );
var returnValue = _GetItemsWithPrices( Self, pArrayItemDefs, pCurrentPrices, pBasePrices, unArrayLength );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetItemPrice", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetItemPrice( IntPtr self, InventoryDefId iDefinition, ref ulong pCurrentPrice, ref ulong pBasePrice );
private FGetItemPrice _GetItemPrice;
private static extern bool _GetItemPrice( IntPtr self, InventoryDefId iDefinition, ref ulong pCurrentPrice, ref ulong pBasePrice );
#endregion
internal bool GetItemPrice( InventoryDefId iDefinition, ref ulong pCurrentPrice, ref ulong pBasePrice )
{
return _GetItemPrice( Self, iDefinition, ref pCurrentPrice, ref pBasePrice );
var returnValue = _GetItemPrice( Self, iDefinition, ref pCurrentPrice, ref pBasePrice );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate SteamInventoryUpdateHandle_t FStartUpdateProperties( IntPtr self );
private FStartUpdateProperties _StartUpdateProperties;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_StartUpdateProperties", CallingConvention = Platform.CC)]
private static extern SteamInventoryUpdateHandle_t _StartUpdateProperties( IntPtr self );
#endregion
internal SteamInventoryUpdateHandle_t StartUpdateProperties()
{
return _StartUpdateProperties( Self );
var returnValue = _StartUpdateProperties( Self );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_RemoveProperty", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FRemoveProperty( IntPtr self, SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, string pchPropertyName );
private FRemoveProperty _RemoveProperty;
private static extern bool _RemoveProperty( IntPtr self, SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, IntPtr pchPropertyName );
#endregion
internal bool RemoveProperty( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, string pchPropertyName )
{
return _RemoveProperty( Self, handle, nItemID, pchPropertyName );
using var str__pchPropertyName = new Utf8StringToNative( pchPropertyName );
var returnValue = _RemoveProperty( Self, handle, nItemID, str__pchPropertyName.Pointer );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_SetPropertyString", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetProperty1( IntPtr self, SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, string pchPropertyName, string pchPropertyValue );
private FSetProperty1 _SetProperty1;
private static extern bool _SetProperty( IntPtr self, SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, IntPtr pchPropertyName, IntPtr pchPropertyValue );
#endregion
internal bool SetProperty1( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, string pchPropertyName, string pchPropertyValue )
internal bool SetProperty( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, string pchPropertyName, string pchPropertyValue )
{
return _SetProperty1( Self, handle, nItemID, pchPropertyName, pchPropertyValue );
using var str__pchPropertyName = new Utf8StringToNative( pchPropertyName );
using var str__pchPropertyValue = new Utf8StringToNative( pchPropertyValue );
var returnValue = _SetProperty( Self, handle, nItemID, str__pchPropertyName.Pointer, str__pchPropertyValue.Pointer );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_SetPropertyBool", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetProperty2( IntPtr self, SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, string pchPropertyName, [MarshalAs( UnmanagedType.U1 )] bool bValue );
private FSetProperty2 _SetProperty2;
private static extern bool _SetProperty( IntPtr self, SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, IntPtr pchPropertyName, [MarshalAs( UnmanagedType.U1 )] bool bValue );
#endregion
internal bool SetProperty2( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, string pchPropertyName, [MarshalAs( UnmanagedType.U1 )] bool bValue )
internal bool SetProperty( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, string pchPropertyName, [MarshalAs( UnmanagedType.U1 )] bool bValue )
{
return _SetProperty2( Self, handle, nItemID, pchPropertyName, bValue );
using var str__pchPropertyName = new Utf8StringToNative( pchPropertyName );
var returnValue = _SetProperty( Self, handle, nItemID, str__pchPropertyName.Pointer, bValue );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_SetPropertyInt64", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetProperty3( IntPtr self, SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, string pchPropertyName, long nValue );
private FSetProperty3 _SetProperty3;
private static extern bool _SetProperty( IntPtr self, SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, IntPtr pchPropertyName, long nValue );
#endregion
internal bool SetProperty3( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, string pchPropertyName, long nValue )
internal bool SetProperty( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, string pchPropertyName, long nValue )
{
return _SetProperty3( Self, handle, nItemID, pchPropertyName, nValue );
using var str__pchPropertyName = new Utf8StringToNative( pchPropertyName );
var returnValue = _SetProperty( Self, handle, nItemID, str__pchPropertyName.Pointer, nValue );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_SetPropertyFloat", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetProperty4( IntPtr self, SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, string pchPropertyName, float flValue );
private FSetProperty4 _SetProperty4;
private static extern bool _SetProperty( IntPtr self, SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, IntPtr pchPropertyName, float flValue );
#endregion
internal bool SetProperty4( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, string pchPropertyName, float flValue )
internal bool SetProperty( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, string pchPropertyName, float flValue )
{
return _SetProperty4( Self, handle, nItemID, pchPropertyName, flValue );
using var str__pchPropertyName = new Utf8StringToNative( pchPropertyName );
var returnValue = _SetProperty( Self, handle, nItemID, str__pchPropertyName.Pointer, flValue );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_SubmitUpdateProperties", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSubmitUpdateProperties( IntPtr self, SteamInventoryUpdateHandle_t handle, ref SteamInventoryResult_t pResultHandle );
private FSubmitUpdateProperties _SubmitUpdateProperties;
private static extern bool _SubmitUpdateProperties( IntPtr self, SteamInventoryUpdateHandle_t handle, ref SteamInventoryResult_t pResultHandle );
#endregion
internal bool SubmitUpdateProperties( SteamInventoryUpdateHandle_t handle, ref SteamInventoryResult_t pResultHandle )
{
return _SubmitUpdateProperties( Self, handle, ref pResultHandle );
var returnValue = _SubmitUpdateProperties( Self, handle, ref pResultHandle );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_InspectItem", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private static extern bool _InspectItem( IntPtr self, ref SteamInventoryResult_t pResultHandle, IntPtr pchItemToken );
#endregion
internal bool InspectItem( ref SteamInventoryResult_t pResultHandle, string pchItemToken )
{
using var str__pchItemToken = new Utf8StringToNative( pchItemToken );
var returnValue = _InspectItem( Self, ref pResultHandle, str__pchItemToken.Pointer );
return returnValue;
}
}

View File

@ -0,0 +1,462 @@
using System;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using Steamworks.Data;
namespace Steamworks
{
internal unsafe partial class ISteamMatchmaking : SteamInterface
{
public const string Version = "SteamMatchMaking009";
internal ISteamMatchmaking( bool IsGameServer )
{
SetupInterface( IsGameServer );
}
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamMatchmaking_v009", CallingConvention = Platform.CC)]
internal static extern IntPtr SteamAPI_SteamMatchmaking_v009();
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamMatchmaking_v009();
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetFavoriteGameCount", CallingConvention = Platform.CC)]
private static extern int _GetFavoriteGameCount( IntPtr self );
#endregion
internal int GetFavoriteGameCount()
{
var returnValue = _GetFavoriteGameCount( Self );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetFavoriteGame", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private static extern bool _GetFavoriteGame( IntPtr self, int iGame, ref AppId pnAppID, ref uint pnIP, ref ushort pnConnPort, ref ushort pnQueryPort, ref uint punFlags, ref uint pRTime32LastPlayedOnServer );
#endregion
internal bool GetFavoriteGame( int iGame, ref AppId pnAppID, ref uint pnIP, ref ushort pnConnPort, ref ushort pnQueryPort, ref uint punFlags, ref uint pRTime32LastPlayedOnServer )
{
var returnValue = _GetFavoriteGame( Self, iGame, ref pnAppID, ref pnIP, ref pnConnPort, ref pnQueryPort, ref punFlags, ref pRTime32LastPlayedOnServer );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_AddFavoriteGame", CallingConvention = Platform.CC)]
private static extern int _AddFavoriteGame( IntPtr self, AppId nAppID, uint nIP, ushort nConnPort, ushort nQueryPort, uint unFlags, uint rTime32LastPlayedOnServer );
#endregion
internal int AddFavoriteGame( AppId nAppID, uint nIP, ushort nConnPort, ushort nQueryPort, uint unFlags, uint rTime32LastPlayedOnServer )
{
var returnValue = _AddFavoriteGame( Self, nAppID, nIP, nConnPort, nQueryPort, unFlags, rTime32LastPlayedOnServer );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_RemoveFavoriteGame", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private static extern bool _RemoveFavoriteGame( IntPtr self, AppId nAppID, uint nIP, ushort nConnPort, ushort nQueryPort, uint unFlags );
#endregion
internal bool RemoveFavoriteGame( AppId nAppID, uint nIP, ushort nConnPort, ushort nQueryPort, uint unFlags )
{
var returnValue = _RemoveFavoriteGame( Self, nAppID, nIP, nConnPort, nQueryPort, unFlags );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_RequestLobbyList", CallingConvention = Platform.CC)]
private static extern SteamAPICall_t _RequestLobbyList( IntPtr self );
#endregion
internal CallResult<LobbyMatchList_t> RequestLobbyList()
{
var returnValue = _RequestLobbyList( Self );
return new CallResult<LobbyMatchList_t>( returnValue, IsServer );
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_AddRequestLobbyListStringFilter", CallingConvention = Platform.CC)]
private static extern void _AddRequestLobbyListStringFilter( IntPtr self, IntPtr pchKeyToMatch, IntPtr pchValueToMatch, LobbyComparison eComparisonType );
#endregion
internal void AddRequestLobbyListStringFilter( string pchKeyToMatch, string pchValueToMatch, LobbyComparison eComparisonType )
{
using var str__pchKeyToMatch = new Utf8StringToNative( pchKeyToMatch );
using var str__pchValueToMatch = new Utf8StringToNative( pchValueToMatch );
_AddRequestLobbyListStringFilter( Self, str__pchKeyToMatch.Pointer, str__pchValueToMatch.Pointer, eComparisonType );
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_AddRequestLobbyListNumericalFilter", CallingConvention = Platform.CC)]
private static extern void _AddRequestLobbyListNumericalFilter( IntPtr self, IntPtr pchKeyToMatch, int nValueToMatch, LobbyComparison eComparisonType );
#endregion
internal void AddRequestLobbyListNumericalFilter( string pchKeyToMatch, int nValueToMatch, LobbyComparison eComparisonType )
{
using var str__pchKeyToMatch = new Utf8StringToNative( pchKeyToMatch );
_AddRequestLobbyListNumericalFilter( Self, str__pchKeyToMatch.Pointer, nValueToMatch, eComparisonType );
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_AddRequestLobbyListNearValueFilter", CallingConvention = Platform.CC)]
private static extern void _AddRequestLobbyListNearValueFilter( IntPtr self, IntPtr pchKeyToMatch, int nValueToBeCloseTo );
#endregion
internal void AddRequestLobbyListNearValueFilter( string pchKeyToMatch, int nValueToBeCloseTo )
{
using var str__pchKeyToMatch = new Utf8StringToNative( pchKeyToMatch );
_AddRequestLobbyListNearValueFilter( Self, str__pchKeyToMatch.Pointer, nValueToBeCloseTo );
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_AddRequestLobbyListFilterSlotsAvailable", CallingConvention = Platform.CC)]
private static extern void _AddRequestLobbyListFilterSlotsAvailable( IntPtr self, int nSlotsAvailable );
#endregion
internal void AddRequestLobbyListFilterSlotsAvailable( int nSlotsAvailable )
{
_AddRequestLobbyListFilterSlotsAvailable( Self, nSlotsAvailable );
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_AddRequestLobbyListDistanceFilter", CallingConvention = Platform.CC)]
private static extern void _AddRequestLobbyListDistanceFilter( IntPtr self, LobbyDistanceFilter eLobbyDistanceFilter );
#endregion
internal void AddRequestLobbyListDistanceFilter( LobbyDistanceFilter eLobbyDistanceFilter )
{
_AddRequestLobbyListDistanceFilter( Self, eLobbyDistanceFilter );
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_AddRequestLobbyListResultCountFilter", CallingConvention = Platform.CC)]
private static extern void _AddRequestLobbyListResultCountFilter( IntPtr self, int cMaxResults );
#endregion
internal void AddRequestLobbyListResultCountFilter( int cMaxResults )
{
_AddRequestLobbyListResultCountFilter( Self, cMaxResults );
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_AddRequestLobbyListCompatibleMembersFilter", CallingConvention = Platform.CC)]
private static extern void _AddRequestLobbyListCompatibleMembersFilter( IntPtr self, SteamId steamIDLobby );
#endregion
internal void AddRequestLobbyListCompatibleMembersFilter( SteamId steamIDLobby )
{
_AddRequestLobbyListCompatibleMembersFilter( Self, steamIDLobby );
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyByIndex", CallingConvention = Platform.CC)]
private static extern SteamId _GetLobbyByIndex( IntPtr self, int iLobby );
#endregion
internal SteamId GetLobbyByIndex( int iLobby )
{
var returnValue = _GetLobbyByIndex( Self, iLobby );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_CreateLobby", CallingConvention = Platform.CC)]
private static extern SteamAPICall_t _CreateLobby( IntPtr self, LobbyType eLobbyType, int cMaxMembers );
#endregion
internal CallResult<LobbyCreated_t> CreateLobby( LobbyType eLobbyType, int cMaxMembers )
{
var returnValue = _CreateLobby( Self, eLobbyType, cMaxMembers );
return new CallResult<LobbyCreated_t>( returnValue, IsServer );
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_JoinLobby", CallingConvention = Platform.CC)]
private static extern SteamAPICall_t _JoinLobby( IntPtr self, SteamId steamIDLobby );
#endregion
internal CallResult<LobbyEnter_t> JoinLobby( SteamId steamIDLobby )
{
var returnValue = _JoinLobby( Self, steamIDLobby );
return new CallResult<LobbyEnter_t>( returnValue, IsServer );
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_LeaveLobby", CallingConvention = Platform.CC)]
private static extern void _LeaveLobby( IntPtr self, SteamId steamIDLobby );
#endregion
internal void LeaveLobby( SteamId steamIDLobby )
{
_LeaveLobby( Self, steamIDLobby );
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_InviteUserToLobby", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private static extern bool _InviteUserToLobby( IntPtr self, SteamId steamIDLobby, SteamId steamIDInvitee );
#endregion
internal bool InviteUserToLobby( SteamId steamIDLobby, SteamId steamIDInvitee )
{
var returnValue = _InviteUserToLobby( Self, steamIDLobby, steamIDInvitee );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetNumLobbyMembers", CallingConvention = Platform.CC)]
private static extern int _GetNumLobbyMembers( IntPtr self, SteamId steamIDLobby );
#endregion
internal int GetNumLobbyMembers( SteamId steamIDLobby )
{
var returnValue = _GetNumLobbyMembers( Self, steamIDLobby );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyMemberByIndex", CallingConvention = Platform.CC)]
private static extern SteamId _GetLobbyMemberByIndex( IntPtr self, SteamId steamIDLobby, int iMember );
#endregion
internal SteamId GetLobbyMemberByIndex( SteamId steamIDLobby, int iMember )
{
var returnValue = _GetLobbyMemberByIndex( Self, steamIDLobby, iMember );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyData", CallingConvention = Platform.CC)]
private static extern Utf8StringPointer _GetLobbyData( IntPtr self, SteamId steamIDLobby, IntPtr pchKey );
#endregion
internal string GetLobbyData( SteamId steamIDLobby, string pchKey )
{
using var str__pchKey = new Utf8StringToNative( pchKey );
var returnValue = _GetLobbyData( Self, steamIDLobby, str__pchKey.Pointer );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyData", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private static extern bool _SetLobbyData( IntPtr self, SteamId steamIDLobby, IntPtr pchKey, IntPtr pchValue );
#endregion
internal bool SetLobbyData( SteamId steamIDLobby, string pchKey, string pchValue )
{
using var str__pchKey = new Utf8StringToNative( pchKey );
using var str__pchValue = new Utf8StringToNative( pchValue );
var returnValue = _SetLobbyData( Self, steamIDLobby, str__pchKey.Pointer, str__pchValue.Pointer );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyDataCount", CallingConvention = Platform.CC)]
private static extern int _GetLobbyDataCount( IntPtr self, SteamId steamIDLobby );
#endregion
internal int GetLobbyDataCount( SteamId steamIDLobby )
{
var returnValue = _GetLobbyDataCount( Self, steamIDLobby );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyDataByIndex", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private static extern bool _GetLobbyDataByIndex( IntPtr self, SteamId steamIDLobby, int iLobbyData, IntPtr pchKey, int cchKeyBufferSize, IntPtr pchValue, int cchValueBufferSize );
#endregion
internal bool GetLobbyDataByIndex( SteamId steamIDLobby, int iLobbyData, out string pchKey, out string pchValue )
{
using var mem__pchKey = Helpers.TakeMemory();
using var mem__pchValue = Helpers.TakeMemory();
var returnValue = _GetLobbyDataByIndex( Self, steamIDLobby, iLobbyData, mem__pchKey, (1024 * 32), mem__pchValue, (1024 * 32) );
pchKey = Helpers.MemoryToString( mem__pchKey );
pchValue = Helpers.MemoryToString( mem__pchValue );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_DeleteLobbyData", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private static extern bool _DeleteLobbyData( IntPtr self, SteamId steamIDLobby, IntPtr pchKey );
#endregion
internal bool DeleteLobbyData( SteamId steamIDLobby, string pchKey )
{
using var str__pchKey = new Utf8StringToNative( pchKey );
var returnValue = _DeleteLobbyData( Self, steamIDLobby, str__pchKey.Pointer );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyMemberData", CallingConvention = Platform.CC)]
private static extern Utf8StringPointer _GetLobbyMemberData( IntPtr self, SteamId steamIDLobby, SteamId steamIDUser, IntPtr pchKey );
#endregion
internal string GetLobbyMemberData( SteamId steamIDLobby, SteamId steamIDUser, string pchKey )
{
using var str__pchKey = new Utf8StringToNative( pchKey );
var returnValue = _GetLobbyMemberData( Self, steamIDLobby, steamIDUser, str__pchKey.Pointer );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyMemberData", CallingConvention = Platform.CC)]
private static extern void _SetLobbyMemberData( IntPtr self, SteamId steamIDLobby, IntPtr pchKey, IntPtr pchValue );
#endregion
internal void SetLobbyMemberData( SteamId steamIDLobby, string pchKey, string pchValue )
{
using var str__pchKey = new Utf8StringToNative( pchKey );
using var str__pchValue = new Utf8StringToNative( pchValue );
_SetLobbyMemberData( Self, steamIDLobby, str__pchKey.Pointer, str__pchValue.Pointer );
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SendLobbyChatMsg", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private static extern bool _SendLobbyChatMsg( IntPtr self, SteamId steamIDLobby, IntPtr pvMsgBody, int cubMsgBody );
#endregion
internal bool SendLobbyChatMsg( SteamId steamIDLobby, IntPtr pvMsgBody, int cubMsgBody )
{
var returnValue = _SendLobbyChatMsg( Self, steamIDLobby, pvMsgBody, cubMsgBody );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyChatEntry", CallingConvention = Platform.CC)]
private static extern int _GetLobbyChatEntry( IntPtr self, SteamId steamIDLobby, int iChatID, ref SteamId pSteamIDUser, IntPtr pvData, int cubData, ref ChatEntryType peChatEntryType );
#endregion
internal int GetLobbyChatEntry( SteamId steamIDLobby, int iChatID, ref SteamId pSteamIDUser, IntPtr pvData, int cubData, ref ChatEntryType peChatEntryType )
{
var returnValue = _GetLobbyChatEntry( Self, steamIDLobby, iChatID, ref pSteamIDUser, pvData, cubData, ref peChatEntryType );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_RequestLobbyData", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private static extern bool _RequestLobbyData( IntPtr self, SteamId steamIDLobby );
#endregion
internal bool RequestLobbyData( SteamId steamIDLobby )
{
var returnValue = _RequestLobbyData( Self, steamIDLobby );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyGameServer", CallingConvention = Platform.CC)]
private static extern void _SetLobbyGameServer( IntPtr self, SteamId steamIDLobby, uint unGameServerIP, ushort unGameServerPort, SteamId steamIDGameServer );
#endregion
internal void SetLobbyGameServer( SteamId steamIDLobby, uint unGameServerIP, ushort unGameServerPort, SteamId steamIDGameServer )
{
_SetLobbyGameServer( Self, steamIDLobby, unGameServerIP, unGameServerPort, steamIDGameServer );
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyGameServer", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private static extern bool _GetLobbyGameServer( IntPtr self, SteamId steamIDLobby, ref uint punGameServerIP, ref ushort punGameServerPort, ref SteamId psteamIDGameServer );
#endregion
internal bool GetLobbyGameServer( SteamId steamIDLobby, ref uint punGameServerIP, ref ushort punGameServerPort, ref SteamId psteamIDGameServer )
{
var returnValue = _GetLobbyGameServer( Self, steamIDLobby, ref punGameServerIP, ref punGameServerPort, ref psteamIDGameServer );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyMemberLimit", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private static extern bool _SetLobbyMemberLimit( IntPtr self, SteamId steamIDLobby, int cMaxMembers );
#endregion
internal bool SetLobbyMemberLimit( SteamId steamIDLobby, int cMaxMembers )
{
var returnValue = _SetLobbyMemberLimit( Self, steamIDLobby, cMaxMembers );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyMemberLimit", CallingConvention = Platform.CC)]
private static extern int _GetLobbyMemberLimit( IntPtr self, SteamId steamIDLobby );
#endregion
internal int GetLobbyMemberLimit( SteamId steamIDLobby )
{
var returnValue = _GetLobbyMemberLimit( Self, steamIDLobby );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyType", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private static extern bool _SetLobbyType( IntPtr self, SteamId steamIDLobby, LobbyType eLobbyType );
#endregion
internal bool SetLobbyType( SteamId steamIDLobby, LobbyType eLobbyType )
{
var returnValue = _SetLobbyType( Self, steamIDLobby, eLobbyType );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyJoinable", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private static extern bool _SetLobbyJoinable( IntPtr self, SteamId steamIDLobby, [MarshalAs( UnmanagedType.U1 )] bool bLobbyJoinable );
#endregion
internal bool SetLobbyJoinable( SteamId steamIDLobby, [MarshalAs( UnmanagedType.U1 )] bool bLobbyJoinable )
{
var returnValue = _SetLobbyJoinable( Self, steamIDLobby, bLobbyJoinable );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyOwner", CallingConvention = Platform.CC)]
private static extern SteamId _GetLobbyOwner( IntPtr self, SteamId steamIDLobby );
#endregion
internal SteamId GetLobbyOwner( SteamId steamIDLobby )
{
var returnValue = _GetLobbyOwner( Self, steamIDLobby );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyOwner", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private static extern bool _SetLobbyOwner( IntPtr self, SteamId steamIDLobby, SteamId steamIDNewOwner );
#endregion
internal bool SetLobbyOwner( SteamId steamIDLobby, SteamId steamIDNewOwner )
{
var returnValue = _SetLobbyOwner( Self, steamIDLobby, steamIDNewOwner );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLinkedLobby", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private static extern bool _SetLinkedLobby( IntPtr self, SteamId steamIDLobby, SteamId steamIDLobbyDependent );
#endregion
internal bool SetLinkedLobby( SteamId steamIDLobby, SteamId steamIDLobbyDependent )
{
var returnValue = _SetLinkedLobby( Self, steamIDLobby, steamIDLobbyDependent );
return returnValue;
}
}
}

View File

@ -0,0 +1,38 @@
using System;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using Steamworks.Data;
namespace Steamworks
{
internal unsafe partial class ISteamMatchmakingPingResponse : SteamInterface
{
internal ISteamMatchmakingPingResponse( bool IsGameServer )
{
SetupInterface( IsGameServer );
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingPingResponse_ServerResponded", CallingConvention = Platform.CC)]
private static extern void _ServerResponded( IntPtr self, ref gameserveritem_t server );
#endregion
internal void ServerResponded( ref gameserveritem_t server )
{
_ServerResponded( Self, ref server );
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingPingResponse_ServerFailedToRespond", CallingConvention = Platform.CC)]
private static extern void _ServerFailedToRespond( IntPtr self );
#endregion
internal void ServerFailedToRespond()
{
_ServerFailedToRespond( Self );
}
}
}

View File

@ -0,0 +1,49 @@
using System;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using Steamworks.Data;
namespace Steamworks
{
internal unsafe partial class ISteamMatchmakingPlayersResponse : SteamInterface
{
internal ISteamMatchmakingPlayersResponse( bool IsGameServer )
{
SetupInterface( IsGameServer );
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingPlayersResponse_AddPlayerToList", CallingConvention = Platform.CC)]
private static extern void _AddPlayerToList( IntPtr self, IntPtr pchName, int nScore, float flTimePlayed );
#endregion
internal void AddPlayerToList( string pchName, int nScore, float flTimePlayed )
{
using var str__pchName = new Utf8StringToNative( pchName );
_AddPlayerToList( Self, str__pchName.Pointer, nScore, flTimePlayed );
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingPlayersResponse_PlayersFailedToRespond", CallingConvention = Platform.CC)]
private static extern void _PlayersFailedToRespond( IntPtr self );
#endregion
internal void PlayersFailedToRespond()
{
_PlayersFailedToRespond( Self );
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingPlayersResponse_PlayersRefreshComplete", CallingConvention = Platform.CC)]
private static extern void _PlayersRefreshComplete( IntPtr self );
#endregion
internal void PlayersRefreshComplete()
{
_PlayersRefreshComplete( Self );
}
}
}

View File

@ -0,0 +1,50 @@
using System;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using Steamworks.Data;
namespace Steamworks
{
internal unsafe partial class ISteamMatchmakingRulesResponse : SteamInterface
{
internal ISteamMatchmakingRulesResponse( bool IsGameServer )
{
SetupInterface( IsGameServer );
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingRulesResponse_RulesResponded", CallingConvention = Platform.CC)]
private static extern void _RulesResponded( IntPtr self, IntPtr pchRule, IntPtr pchValue );
#endregion
internal void RulesResponded( string pchRule, string pchValue )
{
using var str__pchRule = new Utf8StringToNative( pchRule );
using var str__pchValue = new Utf8StringToNative( pchValue );
_RulesResponded( Self, str__pchRule.Pointer, str__pchValue.Pointer );
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingRulesResponse_RulesFailedToRespond", CallingConvention = Platform.CC)]
private static extern void _RulesFailedToRespond( IntPtr self );
#endregion
internal void RulesFailedToRespond()
{
_RulesFailedToRespond( Self );
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingRulesResponse_RulesRefreshComplete", CallingConvention = Platform.CC)]
private static extern void _RulesRefreshComplete( IntPtr self );
#endregion
internal void RulesRefreshComplete()
{
_RulesRefreshComplete( Self );
}
}
}

View File

@ -0,0 +1,48 @@
using System;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using Steamworks.Data;
namespace Steamworks
{
internal unsafe partial class ISteamMatchmakingServerListResponse : SteamInterface
{
internal ISteamMatchmakingServerListResponse( bool IsGameServer )
{
SetupInterface( IsGameServer );
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServerListResponse_ServerResponded", CallingConvention = Platform.CC)]
private static extern void _ServerResponded( IntPtr self, HServerListRequest hRequest, int iServer );
#endregion
internal void ServerResponded( HServerListRequest hRequest, int iServer )
{
_ServerResponded( Self, hRequest, iServer );
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServerListResponse_ServerFailedToRespond", CallingConvention = Platform.CC)]
private static extern void _ServerFailedToRespond( IntPtr self, HServerListRequest hRequest, int iServer );
#endregion
internal void ServerFailedToRespond( HServerListRequest hRequest, int iServer )
{
_ServerFailedToRespond( Self, hRequest, iServer );
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServerListResponse_RefreshComplete", CallingConvention = Platform.CC)]
private static extern void _RefreshComplete( IntPtr self, HServerListRequest hRequest, MatchMakingServerResponse response );
#endregion
internal void RefreshComplete( HServerListRequest hRequest, MatchMakingServerResponse response )
{
_RefreshComplete( Self, hRequest, response );
}
}
}

View File

@ -7,105 +7,89 @@ using Steamworks.Data;
namespace Steamworks
{
internal class ISteamMatchmakingServers : SteamInterface
internal unsafe partial class ISteamMatchmakingServers : SteamInterface
{
public ISteamMatchmakingServers( bool server = false ) : base( server )
public const string Version = "SteamMatchMakingServers002";
internal ISteamMatchmakingServers( bool IsGameServer )
{
SetupInterface( IsGameServer );
}
public override string InterfaceName => "SteamMatchMakingServers002";
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamMatchmakingServers_v002", CallingConvention = Platform.CC)]
internal static extern IntPtr SteamAPI_SteamMatchmakingServers_v002();
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamMatchmakingServers_v002();
public override void InitInternals()
{
_RequestInternetServerList = Marshal.GetDelegateForFunctionPointer<FRequestInternetServerList>( Marshal.ReadIntPtr( VTable, 0) );
_RequestLANServerList = Marshal.GetDelegateForFunctionPointer<FRequestLANServerList>( Marshal.ReadIntPtr( VTable, 8) );
_RequestFriendsServerList = Marshal.GetDelegateForFunctionPointer<FRequestFriendsServerList>( Marshal.ReadIntPtr( VTable, 16) );
_RequestFavoritesServerList = Marshal.GetDelegateForFunctionPointer<FRequestFavoritesServerList>( Marshal.ReadIntPtr( VTable, 24) );
_RequestHistoryServerList = Marshal.GetDelegateForFunctionPointer<FRequestHistoryServerList>( Marshal.ReadIntPtr( VTable, 32) );
_RequestSpectatorServerList = Marshal.GetDelegateForFunctionPointer<FRequestSpectatorServerList>( Marshal.ReadIntPtr( VTable, 40) );
_ReleaseRequest = Marshal.GetDelegateForFunctionPointer<FReleaseRequest>( Marshal.ReadIntPtr( VTable, 48) );
_GetServerDetails = Marshal.GetDelegateForFunctionPointer<FGetServerDetails>( Marshal.ReadIntPtr( VTable, 56) );
_CancelQuery = Marshal.GetDelegateForFunctionPointer<FCancelQuery>( Marshal.ReadIntPtr( VTable, 64) );
_RefreshQuery = Marshal.GetDelegateForFunctionPointer<FRefreshQuery>( Marshal.ReadIntPtr( VTable, 72) );
_IsRefreshing = Marshal.GetDelegateForFunctionPointer<FIsRefreshing>( Marshal.ReadIntPtr( VTable, 80) );
_GetServerCount = Marshal.GetDelegateForFunctionPointer<FGetServerCount>( Marshal.ReadIntPtr( VTable, 88) );
_RefreshServer = Marshal.GetDelegateForFunctionPointer<FRefreshServer>( Marshal.ReadIntPtr( VTable, 96) );
_PingServer = Marshal.GetDelegateForFunctionPointer<FPingServer>( Marshal.ReadIntPtr( VTable, 104) );
_PlayerDetails = Marshal.GetDelegateForFunctionPointer<FPlayerDetails>( Marshal.ReadIntPtr( VTable, 112) );
_ServerRules = Marshal.GetDelegateForFunctionPointer<FServerRules>( Marshal.ReadIntPtr( VTable, 120) );
_CancelServerQuery = Marshal.GetDelegateForFunctionPointer<FCancelServerQuery>( Marshal.ReadIntPtr( VTable, 128) );
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate HServerListRequest FRequestInternetServerList( IntPtr self, AppId iApp, [In,Out] ref MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
private FRequestInternetServerList _RequestInternetServerList;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RequestInternetServerList", CallingConvention = Platform.CC)]
private static extern HServerListRequest _RequestInternetServerList( IntPtr self, AppId iApp, IntPtr ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
#endregion
internal HServerListRequest RequestInternetServerList( AppId iApp, [In,Out] ref MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
internal HServerListRequest RequestInternetServerList( AppId iApp, IntPtr ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
{
return _RequestInternetServerList( Self, iApp, ref ppchFilters, nFilters, pRequestServersResponse );
var returnValue = _RequestInternetServerList( Self, iApp, ppchFilters, nFilters, pRequestServersResponse );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate HServerListRequest FRequestLANServerList( IntPtr self, AppId iApp, IntPtr pRequestServersResponse );
private FRequestLANServerList _RequestLANServerList;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RequestLANServerList", CallingConvention = Platform.CC)]
private static extern HServerListRequest _RequestLANServerList( IntPtr self, AppId iApp, IntPtr pRequestServersResponse );
#endregion
internal HServerListRequest RequestLANServerList( AppId iApp, IntPtr pRequestServersResponse )
{
return _RequestLANServerList( Self, iApp, pRequestServersResponse );
var returnValue = _RequestLANServerList( Self, iApp, pRequestServersResponse );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate HServerListRequest FRequestFriendsServerList( IntPtr self, AppId iApp, [In,Out] ref MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
private FRequestFriendsServerList _RequestFriendsServerList;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RequestFriendsServerList", CallingConvention = Platform.CC)]
private static extern HServerListRequest _RequestFriendsServerList( IntPtr self, AppId iApp, IntPtr ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
#endregion
internal HServerListRequest RequestFriendsServerList( AppId iApp, [In,Out] ref MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
internal HServerListRequest RequestFriendsServerList( AppId iApp, IntPtr ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
{
return _RequestFriendsServerList( Self, iApp, ref ppchFilters, nFilters, pRequestServersResponse );
var returnValue = _RequestFriendsServerList( Self, iApp, ppchFilters, nFilters, pRequestServersResponse );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate HServerListRequest FRequestFavoritesServerList( IntPtr self, AppId iApp, [In,Out] ref MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
private FRequestFavoritesServerList _RequestFavoritesServerList;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RequestFavoritesServerList", CallingConvention = Platform.CC)]
private static extern HServerListRequest _RequestFavoritesServerList( IntPtr self, AppId iApp, IntPtr ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
#endregion
internal HServerListRequest RequestFavoritesServerList( AppId iApp, [In,Out] ref MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
internal HServerListRequest RequestFavoritesServerList( AppId iApp, IntPtr ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
{
return _RequestFavoritesServerList( Self, iApp, ref ppchFilters, nFilters, pRequestServersResponse );
var returnValue = _RequestFavoritesServerList( Self, iApp, ppchFilters, nFilters, pRequestServersResponse );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate HServerListRequest FRequestHistoryServerList( IntPtr self, AppId iApp, [In,Out] ref MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
private FRequestHistoryServerList _RequestHistoryServerList;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RequestHistoryServerList", CallingConvention = Platform.CC)]
private static extern HServerListRequest _RequestHistoryServerList( IntPtr self, AppId iApp, IntPtr ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
#endregion
internal HServerListRequest RequestHistoryServerList( AppId iApp, [In,Out] ref MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
internal HServerListRequest RequestHistoryServerList( AppId iApp, IntPtr ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
{
return _RequestHistoryServerList( Self, iApp, ref ppchFilters, nFilters, pRequestServersResponse );
var returnValue = _RequestHistoryServerList( Self, iApp, ppchFilters, nFilters, pRequestServersResponse );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate HServerListRequest FRequestSpectatorServerList( IntPtr self, AppId iApp, [In,Out] ref MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
private FRequestSpectatorServerList _RequestSpectatorServerList;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RequestSpectatorServerList", CallingConvention = Platform.CC)]
private static extern HServerListRequest _RequestSpectatorServerList( IntPtr self, AppId iApp, IntPtr ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
#endregion
internal HServerListRequest RequestSpectatorServerList( AppId iApp, [In,Out] ref MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
internal HServerListRequest RequestSpectatorServerList( AppId iApp, IntPtr ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
{
return _RequestSpectatorServerList( Self, iApp, ref ppchFilters, nFilters, pRequestServersResponse );
var returnValue = _RequestSpectatorServerList( Self, iApp, ppchFilters, nFilters, pRequestServersResponse );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate void FReleaseRequest( IntPtr self, HServerListRequest hServerListRequest );
private FReleaseRequest _ReleaseRequest;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_ReleaseRequest", CallingConvention = Platform.CC)]
private static extern void _ReleaseRequest( IntPtr self, HServerListRequest hServerListRequest );
#endregion
internal void ReleaseRequest( HServerListRequest hServerListRequest )
@ -114,20 +98,19 @@ namespace Steamworks
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate IntPtr FGetServerDetails( IntPtr self, HServerListRequest hRequest, int iServer );
private FGetServerDetails _GetServerDetails;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_GetServerDetails", CallingConvention = Platform.CC)]
private static extern IntPtr _GetServerDetails( IntPtr self, HServerListRequest hRequest, int iServer );
#endregion
internal gameserveritem_t GetServerDetails( HServerListRequest hRequest, int iServer )
{
return gameserveritem_t.Fill( _GetServerDetails( Self, hRequest, iServer ) );
var returnValue = _GetServerDetails( Self, hRequest, iServer );
return returnValue.ToType<gameserveritem_t>();
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate void FCancelQuery( IntPtr self, HServerListRequest hRequest );
private FCancelQuery _CancelQuery;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_CancelQuery", CallingConvention = Platform.CC)]
private static extern void _CancelQuery( IntPtr self, HServerListRequest hRequest );
#endregion
internal void CancelQuery( HServerListRequest hRequest )
@ -136,9 +119,8 @@ namespace Steamworks
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate void FRefreshQuery( IntPtr self, HServerListRequest hRequest );
private FRefreshQuery _RefreshQuery;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RefreshQuery", CallingConvention = Platform.CC)]
private static extern void _RefreshQuery( IntPtr self, HServerListRequest hRequest );
#endregion
internal void RefreshQuery( HServerListRequest hRequest )
@ -147,32 +129,31 @@ namespace Steamworks
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_IsRefreshing", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FIsRefreshing( IntPtr self, HServerListRequest hRequest );
private FIsRefreshing _IsRefreshing;
private static extern bool _IsRefreshing( IntPtr self, HServerListRequest hRequest );
#endregion
internal bool IsRefreshing( HServerListRequest hRequest )
{
return _IsRefreshing( Self, hRequest );
var returnValue = _IsRefreshing( Self, hRequest );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate int FGetServerCount( IntPtr self, HServerListRequest hRequest );
private FGetServerCount _GetServerCount;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_GetServerCount", CallingConvention = Platform.CC)]
private static extern int _GetServerCount( IntPtr self, HServerListRequest hRequest );
#endregion
internal int GetServerCount( HServerListRequest hRequest )
{
return _GetServerCount( Self, hRequest );
var returnValue = _GetServerCount( Self, hRequest );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate void FRefreshServer( IntPtr self, HServerListRequest hRequest, int iServer );
private FRefreshServer _RefreshServer;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RefreshServer", CallingConvention = Platform.CC)]
private static extern void _RefreshServer( IntPtr self, HServerListRequest hRequest, int iServer );
#endregion
internal void RefreshServer( HServerListRequest hRequest, int iServer )
@ -181,42 +162,41 @@ namespace Steamworks
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate HServerQuery FPingServer( IntPtr self, uint unIP, ushort usPort, IntPtr pRequestServersResponse );
private FPingServer _PingServer;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_PingServer", CallingConvention = Platform.CC)]
private static extern HServerQuery _PingServer( IntPtr self, uint unIP, ushort usPort, IntPtr pRequestServersResponse );
#endregion
internal HServerQuery PingServer( uint unIP, ushort usPort, IntPtr pRequestServersResponse )
{
return _PingServer( Self, unIP, usPort, pRequestServersResponse );
var returnValue = _PingServer( Self, unIP, usPort, pRequestServersResponse );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate HServerQuery FPlayerDetails( IntPtr self, uint unIP, ushort usPort, IntPtr pRequestServersResponse );
private FPlayerDetails _PlayerDetails;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_PlayerDetails", CallingConvention = Platform.CC)]
private static extern HServerQuery _PlayerDetails( IntPtr self, uint unIP, ushort usPort, IntPtr pRequestServersResponse );
#endregion
internal HServerQuery PlayerDetails( uint unIP, ushort usPort, IntPtr pRequestServersResponse )
{
return _PlayerDetails( Self, unIP, usPort, pRequestServersResponse );
var returnValue = _PlayerDetails( Self, unIP, usPort, pRequestServersResponse );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate HServerQuery FServerRules( IntPtr self, uint unIP, ushort usPort, IntPtr pRequestServersResponse );
private FServerRules _ServerRules;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_ServerRules", CallingConvention = Platform.CC)]
private static extern HServerQuery _ServerRules( IntPtr self, uint unIP, ushort usPort, IntPtr pRequestServersResponse );
#endregion
internal HServerQuery ServerRules( uint unIP, ushort usPort, IntPtr pRequestServersResponse )
{
return _ServerRules( Self, unIP, usPort, pRequestServersResponse );
var returnValue = _ServerRules( Self, unIP, usPort, pRequestServersResponse );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate void FCancelServerQuery( IntPtr self, HServerQuery hServerQuery );
private FCancelServerQuery _CancelServerQuery;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_CancelServerQuery", CallingConvention = Platform.CC)]
private static extern void _CancelServerQuery( IntPtr self, HServerQuery hServerQuery );
#endregion
internal void CancelServerQuery( HServerQuery hServerQuery )

View File

@ -7,66 +7,58 @@ using Steamworks.Data;
namespace Steamworks
{
internal class ISteamMusic : SteamInterface
internal unsafe partial class ISteamMusic : SteamInterface
{
public ISteamMusic( bool server = false ) : base( server )
public const string Version = "STEAMMUSIC_INTERFACE_VERSION001";
internal ISteamMusic( bool IsGameServer )
{
SetupInterface( IsGameServer );
}
public override string InterfaceName => "STEAMMUSIC_INTERFACE_VERSION001";
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamMusic_v001", CallingConvention = Platform.CC)]
internal static extern IntPtr SteamAPI_SteamMusic_v001();
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamMusic_v001();
public override void InitInternals()
{
_BIsEnabled = Marshal.GetDelegateForFunctionPointer<FBIsEnabled>( Marshal.ReadIntPtr( VTable, 0) );
_BIsPlaying = Marshal.GetDelegateForFunctionPointer<FBIsPlaying>( Marshal.ReadIntPtr( VTable, 8) );
_GetPlaybackStatus = Marshal.GetDelegateForFunctionPointer<FGetPlaybackStatus>( Marshal.ReadIntPtr( VTable, 16) );
_Play = Marshal.GetDelegateForFunctionPointer<FPlay>( Marshal.ReadIntPtr( VTable, 24) );
_Pause = Marshal.GetDelegateForFunctionPointer<FPause>( Marshal.ReadIntPtr( VTable, 32) );
_PlayPrevious = Marshal.GetDelegateForFunctionPointer<FPlayPrevious>( Marshal.ReadIntPtr( VTable, 40) );
_PlayNext = Marshal.GetDelegateForFunctionPointer<FPlayNext>( Marshal.ReadIntPtr( VTable, 48) );
_SetVolume = Marshal.GetDelegateForFunctionPointer<FSetVolume>( Marshal.ReadIntPtr( VTable, 56) );
_GetVolume = Marshal.GetDelegateForFunctionPointer<FGetVolume>( Marshal.ReadIntPtr( VTable, 64) );
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusic_BIsEnabled", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBIsEnabled( IntPtr self );
private FBIsEnabled _BIsEnabled;
private static extern bool _BIsEnabled( IntPtr self );
#endregion
internal bool BIsEnabled()
{
return _BIsEnabled( Self );
var returnValue = _BIsEnabled( Self );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusic_BIsPlaying", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBIsPlaying( IntPtr self );
private FBIsPlaying _BIsPlaying;
private static extern bool _BIsPlaying( IntPtr self );
#endregion
internal bool BIsPlaying()
{
return _BIsPlaying( Self );
var returnValue = _BIsPlaying( Self );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate MusicStatus FGetPlaybackStatus( IntPtr self );
private FGetPlaybackStatus _GetPlaybackStatus;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusic_GetPlaybackStatus", CallingConvention = Platform.CC)]
private static extern MusicStatus _GetPlaybackStatus( IntPtr self );
#endregion
internal MusicStatus GetPlaybackStatus()
{
return _GetPlaybackStatus( Self );
var returnValue = _GetPlaybackStatus( Self );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate void FPlay( IntPtr self );
private FPlay _Play;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusic_Play", CallingConvention = Platform.CC)]
private static extern void _Play( IntPtr self );
#endregion
internal void Play()
@ -75,9 +67,8 @@ namespace Steamworks
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate void FPause( IntPtr self );
private FPause _Pause;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusic_Pause", CallingConvention = Platform.CC)]
private static extern void _Pause( IntPtr self );
#endregion
internal void Pause()
@ -86,9 +77,8 @@ namespace Steamworks
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate void FPlayPrevious( IntPtr self );
private FPlayPrevious _PlayPrevious;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusic_PlayPrevious", CallingConvention = Platform.CC)]
private static extern void _PlayPrevious( IntPtr self );
#endregion
internal void PlayPrevious()
@ -97,9 +87,8 @@ namespace Steamworks
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate void FPlayNext( IntPtr self );
private FPlayNext _PlayNext;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusic_PlayNext", CallingConvention = Platform.CC)]
private static extern void _PlayNext( IntPtr self );
#endregion
internal void PlayNext()
@ -108,9 +97,8 @@ namespace Steamworks
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate void FSetVolume( IntPtr self, float flVolume );
private FSetVolume _SetVolume;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusic_SetVolume", CallingConvention = Platform.CC)]
private static extern void _SetVolume( IntPtr self, float flVolume );
#endregion
internal void SetVolume( float flVolume )
@ -119,14 +107,14 @@ namespace Steamworks
}
#region FunctionMeta
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
private delegate float FGetVolume( IntPtr self );
private FGetVolume _GetVolume;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusic_GetVolume", CallingConvention = Platform.CC)]
private static extern float _GetVolume( IntPtr self );
#endregion
internal float GetVolume()
{
return _GetVolume( Self );
var returnValue = _GetVolume( Self );
return returnValue;
}
}

Some files were not shown because too many files have changed in this diff Show More