From 92b45c75961e2216c62e7f12acd77c1bc30be3ce Mon Sep 17 00:00:00 2001 From: Garry Newman Date: Sat, 22 Feb 2020 20:18:07 +0000 Subject: [PATCH] Latest Generated --- Facepunch.Steamworks/Generated/CustomEnums.cs | 217 + .../Generated/Interfaces/ISteamAppList.cs | 83 + .../Generated/Interfaces/ISteamApps.cs | 227 +- .../Generated/Interfaces/ISteamClient.cs | 414 + .../Generated/Interfaces/ISteamController.cs | 392 + .../Generated/Interfaces/ISteamFriends.cs | 633 +- .../Generated/Interfaces/ISteamGameSearch.cs | 180 + .../Generated/Interfaces/ISteamGameServer.cs | 364 +- .../Interfaces/ISteamGameServerStats.cs | 116 +- .../Generated/Interfaces/ISteamHTMLSurface.cs | 399 + .../Generated/Interfaces/ISteamHTTP.cs | 325 + .../Generated/Interfaces/ISteamInput.cs | 306 +- .../Generated/Interfaces/ISteamInventory.cs | 340 +- .../Generated/Interfaces/ISteamMatchmaking.cs | 322 +- .../ISteamMatchmakingPingResponse.cs | 39 + .../ISteamMatchmakingPlayersResponse.cs | 49 + .../ISteamMatchmakingRulesResponse.cs | 49 + .../ISteamMatchmakingServerListResponse.cs | 49 + .../Interfaces/ISteamMatchmakingServers.cs | 135 +- .../Generated/Interfaces/ISteamMusic.cs | 77 +- .../Generated/Interfaces/ISteamMusicRemote.cs | 408 + .../Generated/Interfaces/ISteamNetworking.cs | 179 +- ...teamNetworkingConnectionCustomSignaling.cs | 41 + ...eamNetworkingCustomSignalingRecvContext.cs | 40 + .../Interfaces/ISteamNetworkingSockets.cs | 388 +- .../Interfaces/ISteamNetworkingUtils.cs | 307 +- .../Interfaces/ISteamParentalSettings.cs | 56 +- .../Generated/Interfaces/ISteamParties.cs | 110 +- .../Generated/Interfaces/ISteamRemotePlay.cs | 103 + .../Interfaces/ISteamRemoteStorage.cs | 279 +- .../Generated/Interfaces/ISteamScreenshots.cs | 77 +- .../Generated/Interfaces/ISteamTV.cs | 97 + .../Generated/Interfaces/ISteamUGC.cs | 677 +- .../Generated/Interfaces/ISteamUser.cs | 257 +- .../Generated/Interfaces/ISteamUserStats.cs | 412 +- .../Generated/Interfaces/ISteamUtils.cs | 285 +- .../Generated/Interfaces/ISteamVideo.cs | 42 +- Facepunch.Steamworks/Generated/SteamApi.cs | 98 - .../Generated/SteamCallbacks.cs | 2938 +++++ .../Generated/SteamConstants.cs | 180 +- Facepunch.Steamworks/Generated/SteamEnums.cs | 609 +- .../Generated/SteamGameServer.cs | 48 - .../Generated/SteamInternal.cs | 49 - .../Generated/SteamStructs.cs | 10823 +--------------- Facepunch.Steamworks/Generated/SteamTypes.cs | 103 +- 45 files changed, 8425 insertions(+), 14897 deletions(-) create mode 100644 Facepunch.Steamworks/Generated/CustomEnums.cs create mode 100644 Facepunch.Steamworks/Generated/Interfaces/ISteamAppList.cs create mode 100644 Facepunch.Steamworks/Generated/Interfaces/ISteamClient.cs create mode 100644 Facepunch.Steamworks/Generated/Interfaces/ISteamController.cs create mode 100644 Facepunch.Steamworks/Generated/Interfaces/ISteamGameSearch.cs create mode 100644 Facepunch.Steamworks/Generated/Interfaces/ISteamHTMLSurface.cs create mode 100644 Facepunch.Steamworks/Generated/Interfaces/ISteamHTTP.cs create mode 100644 Facepunch.Steamworks/Generated/Interfaces/ISteamMatchmakingPingResponse.cs create mode 100644 Facepunch.Steamworks/Generated/Interfaces/ISteamMatchmakingPlayersResponse.cs create mode 100644 Facepunch.Steamworks/Generated/Interfaces/ISteamMatchmakingRulesResponse.cs create mode 100644 Facepunch.Steamworks/Generated/Interfaces/ISteamMatchmakingServerListResponse.cs create mode 100644 Facepunch.Steamworks/Generated/Interfaces/ISteamMusicRemote.cs create mode 100644 Facepunch.Steamworks/Generated/Interfaces/ISteamNetworkingConnectionCustomSignaling.cs create mode 100644 Facepunch.Steamworks/Generated/Interfaces/ISteamNetworkingCustomSignalingRecvContext.cs create mode 100644 Facepunch.Steamworks/Generated/Interfaces/ISteamRemotePlay.cs create mode 100644 Facepunch.Steamworks/Generated/Interfaces/ISteamTV.cs delete mode 100644 Facepunch.Steamworks/Generated/SteamApi.cs create mode 100644 Facepunch.Steamworks/Generated/SteamCallbacks.cs delete mode 100644 Facepunch.Steamworks/Generated/SteamGameServer.cs delete mode 100644 Facepunch.Steamworks/Generated/SteamInternal.cs diff --git a/Facepunch.Steamworks/Generated/CustomEnums.cs b/Facepunch.Steamworks/Generated/CustomEnums.cs new file mode 100644 index 0000000..85fba3c --- /dev/null +++ b/Facepunch.Steamworks/Generated/CustomEnums.cs @@ -0,0 +1,217 @@ +using System; +using System.Runtime.InteropServices; +using System.Linq; +using Steamworks.Data; +using System.Threading.Tasks; + +namespace Steamworks +{ + enum CallbackType + { + SteamServersConnected = 101, + SteamServerConnectFailure = 102, + SteamServersDisconnected = 103, + ClientGameServerDeny = 113, + GSPolicyResponse = 115, + IPCFailure = 117, + LicensesUpdated = 125, + ValidateAuthTicketResponse = 143, + MicroTxnAuthorizationResponse = 152, + EncryptedAppTicketResponse = 154, + GetAuthSessionTicketResponse = 163, + GameWebCallback = 164, + StoreAuthURLResponse = 165, + MarketEligibilityResponse = 166, + DurationControl = 167, + GSClientApprove = 201, + GSClientDeny = 202, + GSClientKick = 203, + GSClientAchievementStatus = 206, + GSGameplayStats = 207, + GSClientGroupStatus = 208, + GSReputation = 209, + AssociateWithClanResult = 210, + ComputeNewPlayerCompatibilityResult = 211, + PersonaStateChange = 304, + GameOverlayActivated = 331, + GameServerChangeRequested = 332, + GameLobbyJoinRequested = 333, + AvatarImageLoaded = 334, + ClanOfficerListResponse = 335, + FriendRichPresenceUpdate = 336, + GameRichPresenceJoinRequested = 337, + GameConnectedClanChatMsg = 338, + GameConnectedChatJoin = 339, + GameConnectedChatLeave = 340, + DownloadClanActivityCountsResult = 341, + JoinClanChatRoomCompletionResult = 342, + GameConnectedFriendChatMsg = 343, + FriendsGetFollowerCount = 344, + FriendsIsFollowing = 345, + FriendsEnumerateFollowingList = 346, + SetPersonaNameResponse = 347, + UnreadChatMessagesChanged = 348, + 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, + DlcInstalled = 1005, + RegisterActivationCodeResponse = 1008, + NewUrlLaunchParameters = 1014, + AppProofOfPurchaseKeyResponse = 1021, + FileDetailsResult = 1023, + 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, + SteamRelayNetworkStatus = 1281, + RemoteStorageAppSyncedClient = 1301, + RemoteStorageAppSyncedServer = 1302, + RemoteStorageAppSyncProgress = 1303, + RemoteStorageAppSyncStatusCheck = 1305, + 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, + GSStatsReceived = 1800, + GSStatsStored = 1801, + HTTPRequestCompleted = 2101, + HTTPRequestHeadersReceived = 2102, + HTTPRequestDataReceived = 2103, + ScreenshotReady = 2301, + ScreenshotRequested = 2302, + 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, + SteamAppInstalled = 3901, + SteamAppUninstalled = 3902, + PlaybackStatusHasChanged = 4001, + VolumeHasChanged = 4002, + MusicPlayerWantsVolume = 4011, + MusicPlayerSelectsQueueEntry = 4012, + MusicPlayerSelectsPlaylistEntry = 4013, + MusicPlayerRemoteWillActivate = 4101, + MusicPlayerRemoteWillDeactivate = 4102, + MusicPlayerRemoteToFront = 4103, + MusicPlayerWillQuit = 4104, + MusicPlayerWantsPlay = 4105, + MusicPlayerWantsPause = 4106, + MusicPlayerWantsPlayPrevious = 4107, + MusicPlayerWantsPlayNext = 4108, + MusicPlayerWantsShuffled = 4109, + MusicPlayerWantsLooped = 4110, + MusicPlayerWantsPlayingRepeatStatus = 4114, + HTML_BrowserReady = 4501, + HTML_NeedsPaint = 4502, + HTML_StartRequest = 4503, + HTML_CloseBrowser = 4504, + HTML_URLChanged = 4505, + HTML_FinishedRequest = 4506, + HTML_OpenLinkInNewTab = 4507, + HTML_ChangedTitle = 4508, + HTML_SearchResults = 4509, + HTML_CanGoBackAndForward = 4510, + HTML_HorizontalScroll = 4511, + HTML_VerticalScroll = 4512, + HTML_LinkAtPosition = 4513, + HTML_JSAlert = 4514, + HTML_JSConfirm = 4515, + HTML_FileOpenDialog = 4516, + HTML_NewWindow = 4521, + HTML_SetCursor = 4522, + HTML_StatusText = 4523, + HTML_ShowToolTip = 4524, + HTML_UpdateToolTip = 4525, + HTML_HideToolTip = 4526, + HTML_BrowserRestarted = 4527, + 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, + } +} diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamAppList.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamAppList.cs new file mode 100644 index 0000000..615b0f9 --- /dev/null +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamAppList.cs @@ -0,0 +1,83 @@ +using System; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; +using Steamworks.Data; + + +namespace Steamworks +{ + internal 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 ) + { + IntPtr 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 ) + { + IntPtr mempchDirectory = Helpers.TakeMemory(); + var returnValue = _GetAppInstallDir( Self, nAppID, mempchDirectory, (1024 * 32) ); + pchDirectory = Helpers.MemoryToString( mempchDirectory ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamAppList_GetAppBuildId", CallingConvention = Platform.CC)] + private static extern int _GetAppBuildId( IntPtr self, AppId nAppID ); + + #endregion + internal int GetAppBuildId( AppId nAppID ) + { + var returnValue = _GetAppBuildId( Self, nAppID ); + return returnValue; + } + + } +} diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamApps.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamApps.cs index af26303..5eb52fd 100644 --- a/Facepunch.Steamworks/Generated/Interfaces/ISteamApps.cs +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamApps.cs @@ -9,78 +9,24 @@ namespace Steamworks { internal class ISteamApps : SteamInterface { - public override string InterfaceName => "STEAMAPPS_INTERFACE_VERSION008"; - public override void InitInternals() + internal ISteamApps( bool IsGameServer ) { - _BIsSubscribed = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) ); - _BIsLowViolence = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) ); - _BIsCybercafe = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) ); - _BIsVACBanned = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) ); - _GetCurrentGameLanguage = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) ); - _GetAvailableGameLanguages = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) ); - _BIsSubscribedApp = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) ); - _BIsDlcInstalled = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) ); - _GetEarliestPurchaseUnixTime = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) ); - _BIsSubscribedFromFreeWeekend = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) ); - _GetDLCCount = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) ); - _BGetDLCDataByIndex = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) ); - _InstallDLC = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) ); - _UninstallDLC = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) ); - _RequestAppProofOfPurchaseKey = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) ); - _GetCurrentBetaName = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) ); - _MarkContentCorrupt = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) ); - _GetInstalledDepots = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) ); - _GetAppInstallDir = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) ); - _BIsAppInstalled = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) ); - _GetAppOwner = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) ); - _GetLaunchQueryParam = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 168 ) ) ); - _GetDlcDownloadProgress = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 176 ) ) ); - _GetAppBuildId = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 184 ) ) ); - _RequestAllProofOfPurchaseKeys = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 192 ) ) ); - _GetFileDetails = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 200 ) ) ); - _GetLaunchCommandLine = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 208 ) ) ); - _BIsSubscribedFromFamilySharing = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 216 ) ) ); - } - internal override void Shutdown() - { - base.Shutdown(); - - _BIsSubscribed = null; - _BIsLowViolence = null; - _BIsCybercafe = null; - _BIsVACBanned = null; - _GetCurrentGameLanguage = null; - _GetAvailableGameLanguages = null; - _BIsSubscribedApp = null; - _BIsDlcInstalled = null; - _GetEarliestPurchaseUnixTime = null; - _BIsSubscribedFromFreeWeekend = null; - _GetDLCCount = null; - _BGetDLCDataByIndex = null; - _InstallDLC = null; - _UninstallDLC = null; - _RequestAppProofOfPurchaseKey = null; - _GetCurrentBetaName = null; - _MarkContentCorrupt = null; - _GetInstalledDepots = null; - _GetAppInstallDir = null; - _BIsAppInstalled = null; - _GetAppOwner = null; - _GetLaunchQueryParam = null; - _GetDlcDownloadProgress = null; - _GetAppBuildId = null; - _RequestAllProofOfPurchaseKeys = null; - _GetFileDetails = null; - _GetLaunchCommandLine = null; - _BIsSubscribedFromFamilySharing = null; + SetupInterface( IsGameServer ); } + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamApps_v008", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamApps_v008(); + public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamApps_v008(); + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameServerApps_v008", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamGameServerApps_v008(); + public override IntPtr GetServerInterfacePointer() => SteamAPI_SteamGameServerApps_v008(); + + #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsSubscribed", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FBIsSubscribed( IntPtr self ); - private FBIsSubscribed _BIsSubscribed; + private static extern bool _BIsSubscribed( IntPtr self ); #endregion internal bool BIsSubscribed() @@ -90,10 +36,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsLowViolence", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FBIsLowViolence( IntPtr self ); - private FBIsLowViolence _BIsLowViolence; + private static extern bool _BIsLowViolence( IntPtr self ); #endregion internal bool BIsLowViolence() @@ -103,10 +48,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsCybercafe", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FBIsCybercafe( IntPtr self ); - private FBIsCybercafe _BIsCybercafe; + private static extern bool _BIsCybercafe( IntPtr self ); #endregion internal bool BIsCybercafe() @@ -116,10 +60,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsVACBanned", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FBIsVACBanned( IntPtr self ); - private FBIsVACBanned _BIsVACBanned; + private static extern bool _BIsVACBanned( IntPtr self ); #endregion internal bool BIsVACBanned() @@ -129,9 +72,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate Utf8StringPointer FGetCurrentGameLanguage( IntPtr self ); - private FGetCurrentGameLanguage _GetCurrentGameLanguage; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetCurrentGameLanguage", CallingConvention = Platform.CC)] + private static extern Utf8StringPointer _GetCurrentGameLanguage( IntPtr self ); #endregion internal string GetCurrentGameLanguage() @@ -141,9 +83,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate Utf8StringPointer FGetAvailableGameLanguages( IntPtr self ); - private FGetAvailableGameLanguages _GetAvailableGameLanguages; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetAvailableGameLanguages", CallingConvention = Platform.CC)] + private static extern Utf8StringPointer _GetAvailableGameLanguages( IntPtr self ); #endregion internal string GetAvailableGameLanguages() @@ -153,10 +94,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsSubscribedApp", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FBIsSubscribedApp( IntPtr self, AppId appID ); - private FBIsSubscribedApp _BIsSubscribedApp; + private static extern bool _BIsSubscribedApp( IntPtr self, AppId appID ); #endregion internal bool BIsSubscribedApp( AppId appID ) @@ -166,10 +106,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsDlcInstalled", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FBIsDlcInstalled( IntPtr self, AppId appID ); - private FBIsDlcInstalled _BIsDlcInstalled; + private static extern bool _BIsDlcInstalled( IntPtr self, AppId appID ); #endregion internal bool BIsDlcInstalled( AppId appID ) @@ -179,9 +118,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate uint FGetEarliestPurchaseUnixTime( IntPtr self, AppId nAppID ); - private FGetEarliestPurchaseUnixTime _GetEarliestPurchaseUnixTime; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetEarliestPurchaseUnixTime", CallingConvention = Platform.CC)] + private static extern uint _GetEarliestPurchaseUnixTime( IntPtr self, AppId nAppID ); #endregion internal uint GetEarliestPurchaseUnixTime( AppId nAppID ) @@ -191,10 +129,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsSubscribedFromFreeWeekend", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FBIsSubscribedFromFreeWeekend( IntPtr self ); - private FBIsSubscribedFromFreeWeekend _BIsSubscribedFromFreeWeekend; + private static extern bool _BIsSubscribedFromFreeWeekend( IntPtr self ); #endregion internal bool BIsSubscribedFromFreeWeekend() @@ -204,9 +141,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetDLCCount( IntPtr self ); - private FGetDLCCount _GetDLCCount; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetDLCCount", CallingConvention = Platform.CC)] + private static extern int _GetDLCCount( IntPtr self ); #endregion internal int GetDLCCount() @@ -216,10 +152,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BGetDLCDataByIndex", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FBGetDLCDataByIndex( IntPtr self, int iDLC, ref AppId pAppID, [MarshalAs( UnmanagedType.U1 )] ref bool pbAvailable, IntPtr pchName, int cchNameBufferSize ); - private FBGetDLCDataByIndex _BGetDLCDataByIndex; + private static extern bool _BGetDLCDataByIndex( IntPtr self, int iDLC, ref AppId pAppID, [MarshalAs( UnmanagedType.U1 )] ref bool pbAvailable, IntPtr pchName, int cchNameBufferSize ); #endregion internal bool BGetDLCDataByIndex( int iDLC, ref AppId pAppID, [MarshalAs( UnmanagedType.U1 )] ref bool pbAvailable, out string pchName ) @@ -231,9 +166,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FInstallDLC( IntPtr self, AppId nAppID ); - private FInstallDLC _InstallDLC; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_InstallDLC", CallingConvention = Platform.CC)] + private static extern void _InstallDLC( IntPtr self, AppId nAppID ); #endregion internal void InstallDLC( AppId nAppID ) @@ -242,9 +176,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FUninstallDLC( IntPtr self, AppId nAppID ); - private FUninstallDLC _UninstallDLC; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_UninstallDLC", CallingConvention = Platform.CC)] + private static extern void _UninstallDLC( IntPtr self, AppId nAppID ); #endregion internal void UninstallDLC( AppId nAppID ) @@ -253,9 +186,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FRequestAppProofOfPurchaseKey( IntPtr self, AppId nAppID ); - private FRequestAppProofOfPurchaseKey _RequestAppProofOfPurchaseKey; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_RequestAppProofOfPurchaseKey", CallingConvention = Platform.CC)] + private static extern void _RequestAppProofOfPurchaseKey( IntPtr self, AppId nAppID ); #endregion internal void RequestAppProofOfPurchaseKey( AppId nAppID ) @@ -264,10 +196,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetCurrentBetaName", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetCurrentBetaName( IntPtr self, IntPtr pchName, int cchNameBufferSize ); - private FGetCurrentBetaName _GetCurrentBetaName; + private static extern bool _GetCurrentBetaName( IntPtr self, IntPtr pchName, int cchNameBufferSize ); #endregion internal bool GetCurrentBetaName( out string pchName ) @@ -279,10 +210,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_MarkContentCorrupt", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FMarkContentCorrupt( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bMissingFilesOnly ); - private FMarkContentCorrupt _MarkContentCorrupt; + private static extern bool _MarkContentCorrupt( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bMissingFilesOnly ); #endregion internal bool MarkContentCorrupt( [MarshalAs( UnmanagedType.U1 )] bool bMissingFilesOnly ) @@ -292,9 +222,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate uint FGetInstalledDepots( IntPtr self, AppId appID, [In,Out] DepotId_t[] pvecDepots, uint cMaxDepots ); - private FGetInstalledDepots _GetInstalledDepots; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetInstalledDepots", CallingConvention = Platform.CC)] + private static extern uint _GetInstalledDepots( IntPtr self, AppId appID, [In,Out] DepotId_t[] pvecDepots, uint cMaxDepots ); #endregion internal uint GetInstalledDepots( AppId appID, [In,Out] DepotId_t[] pvecDepots, uint cMaxDepots ) @@ -304,9 +233,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate uint FGetAppInstallDir( IntPtr self, AppId appID, IntPtr pchFolder, uint cchFolderBufferSize ); - private FGetAppInstallDir _GetAppInstallDir; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetAppInstallDir", CallingConvention = Platform.CC)] + private static extern uint _GetAppInstallDir( IntPtr self, AppId appID, IntPtr pchFolder, uint cchFolderBufferSize ); #endregion internal uint GetAppInstallDir( AppId appID, out string pchFolder ) @@ -318,10 +246,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsAppInstalled", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FBIsAppInstalled( IntPtr self, AppId appID ); - private FBIsAppInstalled _BIsAppInstalled; + private static extern bool _BIsAppInstalled( IntPtr self, AppId appID ); #endregion internal bool BIsAppInstalled( AppId appID ) @@ -331,31 +258,19 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - #if PLATFORM_WIN - private delegate void FGetAppOwner( IntPtr self, ref SteamId retVal ); - #else - private delegate SteamId FGetAppOwner( IntPtr self ); - #endif - private FGetAppOwner _GetAppOwner; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetAppOwner", CallingConvention = Platform.CC)] + private static extern SteamId _GetAppOwner( IntPtr self ); #endregion internal SteamId GetAppOwner() { - #if PLATFORM_WIN - var retVal = default( SteamId ); - _GetAppOwner( Self, ref retVal ); - return retVal; - #else var returnValue = _GetAppOwner( Self ); return returnValue; - #endif } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate Utf8StringPointer FGetLaunchQueryParam( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey ); - private FGetLaunchQueryParam _GetLaunchQueryParam; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetLaunchQueryParam", CallingConvention = Platform.CC)] + private static extern Utf8StringPointer _GetLaunchQueryParam( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey ); #endregion internal string GetLaunchQueryParam( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey ) @@ -365,10 +280,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetDlcDownloadProgress", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetDlcDownloadProgress( IntPtr self, AppId nAppID, ref ulong punBytesDownloaded, ref ulong punBytesTotal ); - private FGetDlcDownloadProgress _GetDlcDownloadProgress; + private static extern bool _GetDlcDownloadProgress( IntPtr self, AppId nAppID, ref ulong punBytesDownloaded, ref ulong punBytesTotal ); #endregion internal bool GetDlcDownloadProgress( AppId nAppID, ref ulong punBytesDownloaded, ref ulong punBytesTotal ) @@ -378,9 +292,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetAppBuildId( IntPtr self ); - private FGetAppBuildId _GetAppBuildId; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetAppBuildId", CallingConvention = Platform.CC)] + private static extern int _GetAppBuildId( IntPtr self ); #endregion internal int GetAppBuildId() @@ -390,9 +303,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FRequestAllProofOfPurchaseKeys( IntPtr self ); - private FRequestAllProofOfPurchaseKeys _RequestAllProofOfPurchaseKeys; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_RequestAllProofOfPurchaseKeys", CallingConvention = Platform.CC)] + private static extern void _RequestAllProofOfPurchaseKeys( IntPtr self ); #endregion internal void RequestAllProofOfPurchaseKeys() @@ -401,21 +313,19 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FGetFileDetails( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszFileName ); - private FGetFileDetails _GetFileDetails; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetFileDetails", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _GetFileDetails( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszFileName ); #endregion - internal async Task GetFileDetails( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszFileName ) + internal CallResult GetFileDetails( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszFileName ) { var returnValue = _GetFileDetails( Self, pszFileName ); - return await FileDetailsResult_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetLaunchCommandLine( IntPtr self, IntPtr pszCommandLine, int cubCommandLine ); - private FGetLaunchCommandLine _GetLaunchCommandLine; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetLaunchCommandLine", CallingConvention = Platform.CC)] + private static extern int _GetLaunchCommandLine( IntPtr self, IntPtr pszCommandLine, int cubCommandLine ); #endregion internal int GetLaunchCommandLine( out string pszCommandLine ) @@ -427,10 +337,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsSubscribedFromFamilySharing", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FBIsSubscribedFromFamilySharing( IntPtr self ); - private FBIsSubscribedFromFamilySharing _BIsSubscribedFromFamilySharing; + private static extern bool _BIsSubscribedFromFamilySharing( IntPtr self ); #endregion internal bool BIsSubscribedFromFamilySharing() diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamClient.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamClient.cs new file mode 100644 index 0000000..7b8e945 --- /dev/null +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamClient.cs @@ -0,0 +1,414 @@ +using System; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; +using Steamworks.Data; + + +namespace Steamworks +{ + internal class ISteamClient : SteamInterface + { + + internal ISteamClient( bool IsGameServer ) + { + SetupInterface( IsGameServer ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_CreateSteamPipe", CallingConvention = Platform.CC)] + private static extern HSteamPipe _CreateSteamPipe( IntPtr self ); + + #endregion + internal HSteamPipe CreateSteamPipe() + { + var returnValue = _CreateSteamPipe( Self ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_BReleaseSteamPipe", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _BReleaseSteamPipe( IntPtr self, HSteamPipe hSteamPipe ); + + #endregion + internal bool BReleaseSteamPipe( HSteamPipe hSteamPipe ) + { + var returnValue = _BReleaseSteamPipe( Self, hSteamPipe ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_ConnectToGlobalUser", CallingConvention = Platform.CC)] + private static extern HSteamUser _ConnectToGlobalUser( IntPtr self, HSteamPipe hSteamPipe ); + + #endregion + internal HSteamUser ConnectToGlobalUser( HSteamPipe hSteamPipe ) + { + var returnValue = _ConnectToGlobalUser( Self, hSteamPipe ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_CreateLocalUser", CallingConvention = Platform.CC)] + private static extern HSteamUser _CreateLocalUser( IntPtr self, ref HSteamPipe phSteamPipe, AccountType eAccountType ); + + #endregion + internal HSteamUser CreateLocalUser( ref HSteamPipe phSteamPipe, AccountType eAccountType ) + { + var returnValue = _CreateLocalUser( Self, ref phSteamPipe, eAccountType ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_ReleaseUser", CallingConvention = Platform.CC)] + private static extern void _ReleaseUser( IntPtr self, HSteamPipe hSteamPipe, HSteamUser hUser ); + + #endregion + internal void ReleaseUser( HSteamPipe hSteamPipe, HSteamUser hUser ) + { + _ReleaseUser( Self, hSteamPipe, hUser ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamUser", CallingConvention = Platform.CC)] + private static extern IntPtr _GetISteamUser( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ); + + #endregion + internal IntPtr GetISteamUser( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ) + { + var returnValue = _GetISteamUser( Self, hSteamUser, hSteamPipe, pchVersion ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamGameServer", CallingConvention = Platform.CC)] + private static extern IntPtr _GetISteamGameServer( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ); + + #endregion + internal IntPtr GetISteamGameServer( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ) + { + var returnValue = _GetISteamGameServer( Self, hSteamUser, hSteamPipe, pchVersion ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_SetLocalIPBinding", CallingConvention = Platform.CC)] + private static extern void _SetLocalIPBinding( IntPtr self, ref SteamIPAddress unIP, ushort usPort ); + + #endregion + internal void SetLocalIPBinding( ref SteamIPAddress unIP, ushort usPort ) + { + _SetLocalIPBinding( Self, ref unIP, usPort ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamFriends", CallingConvention = Platform.CC)] + private static extern IntPtr _GetISteamFriends( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ); + + #endregion + internal IntPtr GetISteamFriends( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ) + { + var returnValue = _GetISteamFriends( Self, hSteamUser, hSteamPipe, pchVersion ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamUtils", CallingConvention = Platform.CC)] + private static extern IntPtr _GetISteamUtils( IntPtr self, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ); + + #endregion + internal IntPtr GetISteamUtils( HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ) + { + var returnValue = _GetISteamUtils( Self, hSteamPipe, pchVersion ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamMatchmaking", CallingConvention = Platform.CC)] + private static extern IntPtr _GetISteamMatchmaking( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ); + + #endregion + internal IntPtr GetISteamMatchmaking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ) + { + var returnValue = _GetISteamMatchmaking( Self, hSteamUser, hSteamPipe, pchVersion ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamMatchmakingServers", CallingConvention = Platform.CC)] + private static extern IntPtr _GetISteamMatchmakingServers( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ); + + #endregion + internal IntPtr GetISteamMatchmakingServers( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ) + { + var returnValue = _GetISteamMatchmakingServers( Self, hSteamUser, hSteamPipe, pchVersion ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamGenericInterface", CallingConvention = Platform.CC)] + private static extern IntPtr _GetISteamGenericInterface( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ); + + #endregion + internal IntPtr GetISteamGenericInterface( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ) + { + var returnValue = _GetISteamGenericInterface( Self, hSteamUser, hSteamPipe, pchVersion ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamUserStats", CallingConvention = Platform.CC)] + private static extern IntPtr _GetISteamUserStats( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ); + + #endregion + internal IntPtr GetISteamUserStats( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ) + { + var returnValue = _GetISteamUserStats( Self, hSteamUser, hSteamPipe, pchVersion ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamGameServerStats", CallingConvention = Platform.CC)] + private static extern IntPtr _GetISteamGameServerStats( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ); + + #endregion + internal IntPtr GetISteamGameServerStats( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ) + { + var returnValue = _GetISteamGameServerStats( Self, hSteamuser, hSteamPipe, pchVersion ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamApps", CallingConvention = Platform.CC)] + private static extern IntPtr _GetISteamApps( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ); + + #endregion + internal IntPtr GetISteamApps( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ) + { + var returnValue = _GetISteamApps( Self, hSteamUser, hSteamPipe, pchVersion ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamNetworking", CallingConvention = Platform.CC)] + private static extern IntPtr _GetISteamNetworking( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ); + + #endregion + internal IntPtr GetISteamNetworking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ) + { + var returnValue = _GetISteamNetworking( Self, hSteamUser, hSteamPipe, pchVersion ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamRemoteStorage", CallingConvention = Platform.CC)] + private static extern IntPtr _GetISteamRemoteStorage( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ); + + #endregion + internal IntPtr GetISteamRemoteStorage( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ) + { + var returnValue = _GetISteamRemoteStorage( Self, hSteamuser, hSteamPipe, pchVersion ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamScreenshots", CallingConvention = Platform.CC)] + private static extern IntPtr _GetISteamScreenshots( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ); + + #endregion + internal IntPtr GetISteamScreenshots( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ) + { + var returnValue = _GetISteamScreenshots( Self, hSteamuser, hSteamPipe, pchVersion ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamGameSearch", CallingConvention = Platform.CC)] + private static extern IntPtr _GetISteamGameSearch( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ); + + #endregion + internal IntPtr GetISteamGameSearch( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ) + { + var returnValue = _GetISteamGameSearch( Self, hSteamuser, hSteamPipe, pchVersion ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetIPCCallCount", CallingConvention = Platform.CC)] + private static extern uint _GetIPCCallCount( IntPtr self ); + + #endregion + internal uint GetIPCCallCount() + { + var returnValue = _GetIPCCallCount( Self ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_SetWarningMessageHook", CallingConvention = Platform.CC)] + private static extern void _SetWarningMessageHook( IntPtr self, IntPtr pFunction ); + + #endregion + internal void SetWarningMessageHook( IntPtr pFunction ) + { + _SetWarningMessageHook( Self, pFunction ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_BShutdownIfAllPipesClosed", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _BShutdownIfAllPipesClosed( IntPtr self ); + + #endregion + internal bool BShutdownIfAllPipesClosed() + { + var returnValue = _BShutdownIfAllPipesClosed( Self ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamHTTP", CallingConvention = Platform.CC)] + private static extern IntPtr _GetISteamHTTP( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ); + + #endregion + internal IntPtr GetISteamHTTP( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ) + { + var returnValue = _GetISteamHTTP( Self, hSteamuser, hSteamPipe, pchVersion ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamController", CallingConvention = Platform.CC)] + private static extern IntPtr _GetISteamController( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ); + + #endregion + internal IntPtr GetISteamController( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ) + { + var returnValue = _GetISteamController( Self, hSteamUser, hSteamPipe, pchVersion ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamUGC", CallingConvention = Platform.CC)] + private static extern IntPtr _GetISteamUGC( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ); + + #endregion + internal IntPtr GetISteamUGC( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ) + { + var returnValue = _GetISteamUGC( Self, hSteamUser, hSteamPipe, pchVersion ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamAppList", CallingConvention = Platform.CC)] + private static extern IntPtr _GetISteamAppList( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ); + + #endregion + internal IntPtr GetISteamAppList( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ) + { + var returnValue = _GetISteamAppList( Self, hSteamUser, hSteamPipe, pchVersion ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamMusic", CallingConvention = Platform.CC)] + private static extern IntPtr _GetISteamMusic( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ); + + #endregion + internal IntPtr GetISteamMusic( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ) + { + var returnValue = _GetISteamMusic( Self, hSteamuser, hSteamPipe, pchVersion ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamMusicRemote", CallingConvention = Platform.CC)] + private static extern IntPtr _GetISteamMusicRemote( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ); + + #endregion + internal IntPtr GetISteamMusicRemote( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ) + { + var returnValue = _GetISteamMusicRemote( Self, hSteamuser, hSteamPipe, pchVersion ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamHTMLSurface", CallingConvention = Platform.CC)] + private static extern IntPtr _GetISteamHTMLSurface( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ); + + #endregion + internal IntPtr GetISteamHTMLSurface( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ) + { + var returnValue = _GetISteamHTMLSurface( Self, hSteamuser, hSteamPipe, pchVersion ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamInventory", CallingConvention = Platform.CC)] + private static extern IntPtr _GetISteamInventory( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ); + + #endregion + internal IntPtr GetISteamInventory( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ) + { + var returnValue = _GetISteamInventory( Self, hSteamuser, hSteamPipe, pchVersion ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamVideo", CallingConvention = Platform.CC)] + private static extern IntPtr _GetISteamVideo( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ); + + #endregion + internal IntPtr GetISteamVideo( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ) + { + var returnValue = _GetISteamVideo( Self, hSteamuser, hSteamPipe, pchVersion ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamParentalSettings", CallingConvention = Platform.CC)] + private static extern IntPtr _GetISteamParentalSettings( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ); + + #endregion + internal IntPtr GetISteamParentalSettings( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ) + { + var returnValue = _GetISteamParentalSettings( Self, hSteamuser, hSteamPipe, pchVersion ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamInput", CallingConvention = Platform.CC)] + private static extern IntPtr _GetISteamInput( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ); + + #endregion + internal IntPtr GetISteamInput( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ) + { + var returnValue = _GetISteamInput( Self, hSteamUser, hSteamPipe, pchVersion ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamParties", CallingConvention = Platform.CC)] + private static extern IntPtr _GetISteamParties( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ); + + #endregion + internal IntPtr GetISteamParties( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ) + { + var returnValue = _GetISteamParties( Self, hSteamUser, hSteamPipe, pchVersion ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamRemotePlay", CallingConvention = Platform.CC)] + private static extern IntPtr _GetISteamRemotePlay( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ); + + #endregion + internal IntPtr GetISteamRemotePlay( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion ) + { + var returnValue = _GetISteamRemotePlay( Self, hSteamUser, hSteamPipe, pchVersion ); + return returnValue; + } + + } +} diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamController.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamController.cs new file mode 100644 index 0000000..4e26a15 --- /dev/null +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamController.cs @@ -0,0 +1,392 @@ +using System; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; +using Steamworks.Data; + + +namespace Steamworks +{ + internal class ISteamController : SteamInterface + { + + internal ISteamController( bool IsGameServer ) + { + SetupInterface( IsGameServer ); + } + + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamController_v007", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamController_v007(); + public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamController_v007(); + + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_Init", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _Init( IntPtr self ); + + #endregion + internal bool Init() + { + var returnValue = _Init( Self ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_Shutdown", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _Shutdown( IntPtr self ); + + #endregion + internal bool Shutdown() + { + var returnValue = _Shutdown( Self ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_RunFrame", CallingConvention = Platform.CC)] + private static extern void _RunFrame( IntPtr self ); + + #endregion + internal void RunFrame() + { + _RunFrame( Self ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetConnectedControllers", CallingConvention = Platform.CC)] + private static extern int _GetConnectedControllers( IntPtr self, [In,Out] ControllerHandle_t[] handlesOut ); + + #endregion + internal int GetConnectedControllers( [In,Out] ControllerHandle_t[] handlesOut ) + { + var returnValue = _GetConnectedControllers( Self, handlesOut ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetActionSetHandle", CallingConvention = Platform.CC)] + private static extern ControllerActionSetHandle_t _GetActionSetHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionSetName ); + + #endregion + internal ControllerActionSetHandle_t GetActionSetHandle( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionSetName ) + { + var returnValue = _GetActionSetHandle( Self, pszActionSetName ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_ActivateActionSet", CallingConvention = Platform.CC)] + private static extern void _ActivateActionSet( IntPtr self, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle ); + + #endregion + internal void ActivateActionSet( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle ) + { + _ActivateActionSet( Self, controllerHandle, actionSetHandle ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetCurrentActionSet", CallingConvention = Platform.CC)] + private static extern ControllerActionSetHandle_t _GetCurrentActionSet( IntPtr self, ControllerHandle_t controllerHandle ); + + #endregion + internal ControllerActionSetHandle_t GetCurrentActionSet( ControllerHandle_t controllerHandle ) + { + var returnValue = _GetCurrentActionSet( Self, controllerHandle ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_ActivateActionSetLayer", CallingConvention = Platform.CC)] + private static extern void _ActivateActionSetLayer( IntPtr self, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle ); + + #endregion + internal void ActivateActionSetLayer( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle ) + { + _ActivateActionSetLayer( Self, controllerHandle, actionSetLayerHandle ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_DeactivateActionSetLayer", CallingConvention = Platform.CC)] + private static extern void _DeactivateActionSetLayer( IntPtr self, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle ); + + #endregion + internal void DeactivateActionSetLayer( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle ) + { + _DeactivateActionSetLayer( Self, controllerHandle, actionSetLayerHandle ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_DeactivateAllActionSetLayers", CallingConvention = Platform.CC)] + private static extern void _DeactivateAllActionSetLayers( IntPtr self, ControllerHandle_t controllerHandle ); + + #endregion + internal void DeactivateAllActionSetLayers( ControllerHandle_t controllerHandle ) + { + _DeactivateAllActionSetLayers( Self, controllerHandle ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetActiveActionSetLayers", CallingConvention = Platform.CC)] + private static extern int _GetActiveActionSetLayers( IntPtr self, ControllerHandle_t controllerHandle, [In,Out] ControllerActionSetHandle_t[] handlesOut ); + + #endregion + internal int GetActiveActionSetLayers( ControllerHandle_t controllerHandle, [In,Out] ControllerActionSetHandle_t[] handlesOut ) + { + var returnValue = _GetActiveActionSetLayers( Self, controllerHandle, handlesOut ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetDigitalActionHandle", CallingConvention = Platform.CC)] + private static extern ControllerDigitalActionHandle_t _GetDigitalActionHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName ); + + #endregion + internal ControllerDigitalActionHandle_t GetDigitalActionHandle( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName ) + { + var returnValue = _GetDigitalActionHandle( Self, pszActionName ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetDigitalActionData", CallingConvention = Platform.CC)] + private static extern DigitalState _GetDigitalActionData( IntPtr self, ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle ); + + #endregion + internal DigitalState GetDigitalActionData( ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle ) + { + var returnValue = _GetDigitalActionData( Self, controllerHandle, digitalActionHandle ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetDigitalActionOrigins", CallingConvention = Platform.CC)] + private static extern int _GetDigitalActionOrigins( IntPtr self, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerDigitalActionHandle_t digitalActionHandle, ref ControllerActionOrigin originsOut ); + + #endregion + internal int GetDigitalActionOrigins( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerDigitalActionHandle_t digitalActionHandle, ref ControllerActionOrigin originsOut ) + { + var returnValue = _GetDigitalActionOrigins( Self, controllerHandle, actionSetHandle, digitalActionHandle, ref originsOut ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetAnalogActionHandle", CallingConvention = Platform.CC)] + private static extern ControllerAnalogActionHandle_t _GetAnalogActionHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName ); + + #endregion + internal ControllerAnalogActionHandle_t GetAnalogActionHandle( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName ) + { + var returnValue = _GetAnalogActionHandle( Self, pszActionName ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetAnalogActionData", CallingConvention = Platform.CC)] + private static extern AnalogState _GetAnalogActionData( IntPtr self, ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle ); + + #endregion + internal AnalogState GetAnalogActionData( ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle ) + { + var returnValue = _GetAnalogActionData( Self, controllerHandle, analogActionHandle ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetAnalogActionOrigins", CallingConvention = Platform.CC)] + private static extern int _GetAnalogActionOrigins( IntPtr self, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerAnalogActionHandle_t analogActionHandle, ref ControllerActionOrigin originsOut ); + + #endregion + internal int GetAnalogActionOrigins( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerAnalogActionHandle_t analogActionHandle, ref ControllerActionOrigin originsOut ) + { + var returnValue = _GetAnalogActionOrigins( Self, controllerHandle, actionSetHandle, analogActionHandle, ref originsOut ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetGlyphForActionOrigin", CallingConvention = Platform.CC)] + private static extern Utf8StringPointer _GetGlyphForActionOrigin( IntPtr self, ControllerActionOrigin eOrigin ); + + #endregion + internal string GetGlyphForActionOrigin( ControllerActionOrigin eOrigin ) + { + var returnValue = _GetGlyphForActionOrigin( Self, eOrigin ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetStringForActionOrigin", CallingConvention = Platform.CC)] + private static extern Utf8StringPointer _GetStringForActionOrigin( IntPtr self, ControllerActionOrigin eOrigin ); + + #endregion + internal string GetStringForActionOrigin( ControllerActionOrigin eOrigin ) + { + var returnValue = _GetStringForActionOrigin( Self, eOrigin ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_StopAnalogActionMomentum", CallingConvention = Platform.CC)] + private static extern void _StopAnalogActionMomentum( IntPtr self, ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t eAction ); + + #endregion + internal void StopAnalogActionMomentum( ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t eAction ) + { + _StopAnalogActionMomentum( Self, controllerHandle, eAction ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetMotionData", CallingConvention = Platform.CC)] + private static extern MotionState _GetMotionData( IntPtr self, ControllerHandle_t controllerHandle ); + + #endregion + internal MotionState GetMotionData( ControllerHandle_t controllerHandle ) + { + var returnValue = _GetMotionData( Self, controllerHandle ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_TriggerHapticPulse", CallingConvention = Platform.CC)] + private static extern void _TriggerHapticPulse( IntPtr self, ControllerHandle_t controllerHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec ); + + #endregion + internal void TriggerHapticPulse( ControllerHandle_t controllerHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec ) + { + _TriggerHapticPulse( Self, controllerHandle, eTargetPad, usDurationMicroSec ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_TriggerRepeatedHapticPulse", CallingConvention = Platform.CC)] + private static extern void _TriggerRepeatedHapticPulse( IntPtr self, ControllerHandle_t controllerHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec, ushort usOffMicroSec, ushort unRepeat, uint nFlags ); + + #endregion + internal void TriggerRepeatedHapticPulse( ControllerHandle_t controllerHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec, ushort usOffMicroSec, ushort unRepeat, uint nFlags ) + { + _TriggerRepeatedHapticPulse( Self, controllerHandle, eTargetPad, usDurationMicroSec, usOffMicroSec, unRepeat, nFlags ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_TriggerVibration", CallingConvention = Platform.CC)] + private static extern void _TriggerVibration( IntPtr self, ControllerHandle_t controllerHandle, ushort usLeftSpeed, ushort usRightSpeed ); + + #endregion + internal void TriggerVibration( ControllerHandle_t controllerHandle, ushort usLeftSpeed, ushort usRightSpeed ) + { + _TriggerVibration( Self, controllerHandle, usLeftSpeed, usRightSpeed ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_SetLEDColor", CallingConvention = Platform.CC)] + private static extern void _SetLEDColor( IntPtr self, ControllerHandle_t controllerHandle, byte nColorR, byte nColorG, byte nColorB, uint nFlags ); + + #endregion + internal void SetLEDColor( ControllerHandle_t controllerHandle, byte nColorR, byte nColorG, byte nColorB, uint nFlags ) + { + _SetLEDColor( Self, controllerHandle, nColorR, nColorG, nColorB, nFlags ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_ShowBindingPanel", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _ShowBindingPanel( IntPtr self, ControllerHandle_t controllerHandle ); + + #endregion + internal bool ShowBindingPanel( ControllerHandle_t controllerHandle ) + { + var returnValue = _ShowBindingPanel( Self, controllerHandle ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetInputTypeForHandle", CallingConvention = Platform.CC)] + private static extern InputType _GetInputTypeForHandle( IntPtr self, ControllerHandle_t controllerHandle ); + + #endregion + internal InputType GetInputTypeForHandle( ControllerHandle_t controllerHandle ) + { + var returnValue = _GetInputTypeForHandle( Self, controllerHandle ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetControllerForGamepadIndex", CallingConvention = Platform.CC)] + private static extern ControllerHandle_t _GetControllerForGamepadIndex( IntPtr self, int nIndex ); + + #endregion + internal ControllerHandle_t GetControllerForGamepadIndex( int nIndex ) + { + var returnValue = _GetControllerForGamepadIndex( Self, nIndex ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetGamepadIndexForController", CallingConvention = Platform.CC)] + private static extern int _GetGamepadIndexForController( IntPtr self, ControllerHandle_t ulControllerHandle ); + + #endregion + internal int GetGamepadIndexForController( ControllerHandle_t ulControllerHandle ) + { + var returnValue = _GetGamepadIndexForController( Self, ulControllerHandle ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetStringForXboxOrigin", CallingConvention = Platform.CC)] + private static extern Utf8StringPointer _GetStringForXboxOrigin( IntPtr self, XboxOrigin eOrigin ); + + #endregion + internal string GetStringForXboxOrigin( XboxOrigin eOrigin ) + { + var returnValue = _GetStringForXboxOrigin( Self, eOrigin ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetGlyphForXboxOrigin", CallingConvention = Platform.CC)] + private static extern Utf8StringPointer _GetGlyphForXboxOrigin( IntPtr self, XboxOrigin eOrigin ); + + #endregion + internal string GetGlyphForXboxOrigin( XboxOrigin eOrigin ) + { + var returnValue = _GetGlyphForXboxOrigin( Self, eOrigin ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetActionOriginFromXboxOrigin", CallingConvention = Platform.CC)] + private static extern ControllerActionOrigin _GetActionOriginFromXboxOrigin( IntPtr self, ControllerHandle_t controllerHandle, XboxOrigin eOrigin ); + + #endregion + internal ControllerActionOrigin GetActionOriginFromXboxOrigin( ControllerHandle_t controllerHandle, XboxOrigin eOrigin ) + { + var returnValue = _GetActionOriginFromXboxOrigin( Self, controllerHandle, eOrigin ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_TranslateActionOrigin", CallingConvention = Platform.CC)] + private static extern ControllerActionOrigin _TranslateActionOrigin( IntPtr self, InputType eDestinationInputType, ControllerActionOrigin eSourceOrigin ); + + #endregion + internal ControllerActionOrigin TranslateActionOrigin( InputType eDestinationInputType, ControllerActionOrigin eSourceOrigin ) + { + var returnValue = _TranslateActionOrigin( Self, eDestinationInputType, eSourceOrigin ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetControllerBindingRevision", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _GetControllerBindingRevision( IntPtr self, ControllerHandle_t controllerHandle, ref int pMajor, ref int pMinor ); + + #endregion + internal bool GetControllerBindingRevision( ControllerHandle_t controllerHandle, ref int pMajor, ref int pMinor ) + { + var returnValue = _GetControllerBindingRevision( Self, controllerHandle, ref pMajor, ref pMinor ); + return returnValue; + } + + } +} diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamFriends.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamFriends.cs index d0cf691..922d570 100644 --- a/Facepunch.Steamworks/Generated/Interfaces/ISteamFriends.cs +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamFriends.cs @@ -9,167 +9,20 @@ namespace Steamworks { internal class ISteamFriends : SteamInterface { - public override string InterfaceName => "SteamFriends017"; - public override void InitInternals() + internal ISteamFriends( bool IsGameServer ) { - _GetPersonaName = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) ); - _SetPersonaName = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) ); - _GetPersonaState = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) ); - _GetFriendCount = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) ); - _GetFriendByIndex = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) ); - _GetFriendRelationship = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) ); - _GetFriendPersonaState = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) ); - _GetFriendPersonaName = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) ); - _GetFriendGamePlayed = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) ); - _GetFriendPersonaNameHistory = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) ); - _GetFriendSteamLevel = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) ); - _GetPlayerNickname = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) ); - _GetFriendsGroupCount = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) ); - _GetFriendsGroupIDByIndex = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) ); - _GetFriendsGroupName = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) ); - _GetFriendsGroupMembersCount = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) ); - _GetFriendsGroupMembersList = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) ); - _HasFriend = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) ); - _GetClanCount = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) ); - _GetClanByIndex = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) ); - _GetClanName = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) ); - _GetClanTag = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 168 ) ) ); - _GetClanActivityCounts = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 176 ) ) ); - _DownloadClanActivityCounts = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 184 ) ) ); - _GetFriendCountFromSource = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 192 ) ) ); - _GetFriendFromSourceByIndex = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 200 ) ) ); - _IsUserInSource = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 208 ) ) ); - _SetInGameVoiceSpeaking = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 216 ) ) ); - _ActivateGameOverlay = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 224 ) ) ); - _ActivateGameOverlayToUser = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 232 ) ) ); - _ActivateGameOverlayToWebPage = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 240 ) ) ); - _ActivateGameOverlayToStore = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 248 ) ) ); - _SetPlayedWith = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 256 ) ) ); - _ActivateGameOverlayInviteDialog = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 264 ) ) ); - _GetSmallFriendAvatar = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 272 ) ) ); - _GetMediumFriendAvatar = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 280 ) ) ); - _GetLargeFriendAvatar = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 288 ) ) ); - _RequestUserInformation = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 296 ) ) ); - _RequestClanOfficerList = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 304 ) ) ); - _GetClanOwner = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 312 ) ) ); - _GetClanOfficerCount = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 320 ) ) ); - _GetClanOfficerByIndex = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 328 ) ) ); - _GetUserRestrictions = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 336 ) ) ); - _SetRichPresence = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 344 ) ) ); - _ClearRichPresence = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 352 ) ) ); - _GetFriendRichPresence = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 360 ) ) ); - _GetFriendRichPresenceKeyCount = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 368 ) ) ); - _GetFriendRichPresenceKeyByIndex = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 376 ) ) ); - _RequestFriendRichPresence = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 384 ) ) ); - _InviteUserToGame = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 392 ) ) ); - _GetCoplayFriendCount = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 400 ) ) ); - _GetCoplayFriend = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 408 ) ) ); - _GetFriendCoplayTime = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 416 ) ) ); - _GetFriendCoplayGame = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 424 ) ) ); - _JoinClanChatRoom = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 432 ) ) ); - _LeaveClanChatRoom = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 440 ) ) ); - _GetClanChatMemberCount = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 448 ) ) ); - _GetChatMemberByIndex = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 456 ) ) ); - _SendClanChatMessage = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 464 ) ) ); - _GetClanChatMessage = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 472 ) ) ); - _IsClanChatAdmin = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 480 ) ) ); - _IsClanChatWindowOpenInSteam = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 488 ) ) ); - _OpenClanChatWindowInSteam = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 496 ) ) ); - _CloseClanChatWindowInSteam = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 504 ) ) ); - _SetListenForFriendsMessages = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 512 ) ) ); - _ReplyToFriendMessage = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 520 ) ) ); - _GetFriendMessage = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 528 ) ) ); - _GetFollowerCount = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 536 ) ) ); - _IsFollowing = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 544 ) ) ); - _EnumerateFollowingList = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 552 ) ) ); - _IsClanPublic = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 560 ) ) ); - _IsClanOfficialGameGroup = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 568 ) ) ); - _GetNumChatsWithUnreadPriorityMessages = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 576 ) ) ); - } - internal override void Shutdown() - { - base.Shutdown(); - - _GetPersonaName = null; - _SetPersonaName = null; - _GetPersonaState = null; - _GetFriendCount = null; - _GetFriendByIndex = null; - _GetFriendRelationship = null; - _GetFriendPersonaState = null; - _GetFriendPersonaName = null; - _GetFriendGamePlayed = null; - _GetFriendPersonaNameHistory = null; - _GetFriendSteamLevel = null; - _GetPlayerNickname = null; - _GetFriendsGroupCount = null; - _GetFriendsGroupIDByIndex = null; - _GetFriendsGroupName = null; - _GetFriendsGroupMembersCount = null; - _GetFriendsGroupMembersList = null; - _HasFriend = null; - _GetClanCount = null; - _GetClanByIndex = null; - _GetClanName = null; - _GetClanTag = null; - _GetClanActivityCounts = null; - _DownloadClanActivityCounts = null; - _GetFriendCountFromSource = null; - _GetFriendFromSourceByIndex = null; - _IsUserInSource = null; - _SetInGameVoiceSpeaking = null; - _ActivateGameOverlay = null; - _ActivateGameOverlayToUser = null; - _ActivateGameOverlayToWebPage = null; - _ActivateGameOverlayToStore = null; - _SetPlayedWith = null; - _ActivateGameOverlayInviteDialog = null; - _GetSmallFriendAvatar = null; - _GetMediumFriendAvatar = null; - _GetLargeFriendAvatar = null; - _RequestUserInformation = null; - _RequestClanOfficerList = null; - _GetClanOwner = null; - _GetClanOfficerCount = null; - _GetClanOfficerByIndex = null; - _GetUserRestrictions = null; - _SetRichPresence = null; - _ClearRichPresence = null; - _GetFriendRichPresence = null; - _GetFriendRichPresenceKeyCount = null; - _GetFriendRichPresenceKeyByIndex = null; - _RequestFriendRichPresence = null; - _InviteUserToGame = null; - _GetCoplayFriendCount = null; - _GetCoplayFriend = null; - _GetFriendCoplayTime = null; - _GetFriendCoplayGame = null; - _JoinClanChatRoom = null; - _LeaveClanChatRoom = null; - _GetClanChatMemberCount = null; - _GetChatMemberByIndex = null; - _SendClanChatMessage = null; - _GetClanChatMessage = null; - _IsClanChatAdmin = null; - _IsClanChatWindowOpenInSteam = null; - _OpenClanChatWindowInSteam = null; - _CloseClanChatWindowInSteam = null; - _SetListenForFriendsMessages = null; - _ReplyToFriendMessage = null; - _GetFriendMessage = null; - _GetFollowerCount = null; - _IsFollowing = null; - _EnumerateFollowingList = null; - _IsClanPublic = null; - _IsClanOfficialGameGroup = null; - _GetNumChatsWithUnreadPriorityMessages = null; + SetupInterface( IsGameServer ); } + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamFriends_v017", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamFriends_v017(); + public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamFriends_v017(); + + #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate Utf8StringPointer FGetPersonaName( IntPtr self ); - private FGetPersonaName _GetPersonaName; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetPersonaName", CallingConvention = Platform.CC)] + private static extern Utf8StringPointer _GetPersonaName( IntPtr self ); #endregion internal string GetPersonaName() @@ -179,21 +32,19 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FSetPersonaName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPersonaName ); - private FSetPersonaName _SetPersonaName; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_SetPersonaName", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _SetPersonaName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPersonaName ); #endregion - internal async Task SetPersonaName( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPersonaName ) + internal CallResult SetPersonaName( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPersonaName ) { var returnValue = _SetPersonaName( Self, pchPersonaName ); - return await SetPersonaNameResponse_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate FriendState FGetPersonaState( IntPtr self ); - private FGetPersonaState _GetPersonaState; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetPersonaState", CallingConvention = Platform.CC)] + private static extern FriendState _GetPersonaState( IntPtr self ); #endregion internal FriendState GetPersonaState() @@ -203,9 +54,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetFriendCount( IntPtr self, int iFriendFlags ); - private FGetFriendCount _GetFriendCount; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendCount", CallingConvention = Platform.CC)] + private static extern int _GetFriendCount( IntPtr self, int iFriendFlags ); #endregion internal int GetFriendCount( int iFriendFlags ) @@ -215,31 +65,19 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - #if PLATFORM_WIN - private delegate void FGetFriendByIndex( IntPtr self, ref SteamId retVal, int iFriend, int iFriendFlags ); - #else - private delegate SteamId FGetFriendByIndex( IntPtr self, int iFriend, int iFriendFlags ); - #endif - private FGetFriendByIndex _GetFriendByIndex; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendByIndex", CallingConvention = Platform.CC)] + private static extern SteamId _GetFriendByIndex( IntPtr self, int iFriend, int iFriendFlags ); #endregion internal SteamId GetFriendByIndex( int iFriend, int iFriendFlags ) { - #if PLATFORM_WIN - var retVal = default( SteamId ); - _GetFriendByIndex( Self, ref retVal, iFriend, iFriendFlags ); - return retVal; - #else var returnValue = _GetFriendByIndex( Self, iFriend, iFriendFlags ); return returnValue; - #endif } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate Relationship FGetFriendRelationship( IntPtr self, SteamId steamIDFriend ); - private FGetFriendRelationship _GetFriendRelationship; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendRelationship", CallingConvention = Platform.CC)] + private static extern Relationship _GetFriendRelationship( IntPtr self, SteamId steamIDFriend ); #endregion internal Relationship GetFriendRelationship( SteamId steamIDFriend ) @@ -249,9 +87,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate FriendState FGetFriendPersonaState( IntPtr self, SteamId steamIDFriend ); - private FGetFriendPersonaState _GetFriendPersonaState; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendPersonaState", CallingConvention = Platform.CC)] + private static extern FriendState _GetFriendPersonaState( IntPtr self, SteamId steamIDFriend ); #endregion internal FriendState GetFriendPersonaState( SteamId steamIDFriend ) @@ -261,9 +98,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate Utf8StringPointer FGetFriendPersonaName( IntPtr self, SteamId steamIDFriend ); - private FGetFriendPersonaName _GetFriendPersonaName; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendPersonaName", CallingConvention = Platform.CC)] + private static extern Utf8StringPointer _GetFriendPersonaName( IntPtr self, SteamId steamIDFriend ); #endregion internal string GetFriendPersonaName( SteamId steamIDFriend ) @@ -273,10 +109,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendGamePlayed", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetFriendGamePlayed( IntPtr self, SteamId steamIDFriend, ref FriendGameInfo_t pFriendGameInfo ); - private FGetFriendGamePlayed _GetFriendGamePlayed; + private static extern bool _GetFriendGamePlayed( IntPtr self, SteamId steamIDFriend, ref FriendGameInfo_t pFriendGameInfo ); #endregion internal bool GetFriendGamePlayed( SteamId steamIDFriend, ref FriendGameInfo_t pFriendGameInfo ) @@ -286,9 +121,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate Utf8StringPointer FGetFriendPersonaNameHistory( IntPtr self, SteamId steamIDFriend, int iPersonaName ); - private FGetFriendPersonaNameHistory _GetFriendPersonaNameHistory; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendPersonaNameHistory", CallingConvention = Platform.CC)] + private static extern Utf8StringPointer _GetFriendPersonaNameHistory( IntPtr self, SteamId steamIDFriend, int iPersonaName ); #endregion internal string GetFriendPersonaNameHistory( SteamId steamIDFriend, int iPersonaName ) @@ -298,9 +132,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetFriendSteamLevel( IntPtr self, SteamId steamIDFriend ); - private FGetFriendSteamLevel _GetFriendSteamLevel; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendSteamLevel", CallingConvention = Platform.CC)] + private static extern int _GetFriendSteamLevel( IntPtr self, SteamId steamIDFriend ); #endregion internal int GetFriendSteamLevel( SteamId steamIDFriend ) @@ -310,9 +143,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate Utf8StringPointer FGetPlayerNickname( IntPtr self, SteamId steamIDPlayer ); - private FGetPlayerNickname _GetPlayerNickname; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetPlayerNickname", CallingConvention = Platform.CC)] + private static extern Utf8StringPointer _GetPlayerNickname( IntPtr self, SteamId steamIDPlayer ); #endregion internal string GetPlayerNickname( SteamId steamIDPlayer ) @@ -322,9 +154,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetFriendsGroupCount( IntPtr self ); - private FGetFriendsGroupCount _GetFriendsGroupCount; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendsGroupCount", CallingConvention = Platform.CC)] + private static extern int _GetFriendsGroupCount( IntPtr self ); #endregion internal int GetFriendsGroupCount() @@ -334,9 +165,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate FriendsGroupID_t FGetFriendsGroupIDByIndex( IntPtr self, int iFG ); - private FGetFriendsGroupIDByIndex _GetFriendsGroupIDByIndex; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendsGroupIDByIndex", CallingConvention = Platform.CC)] + private static extern FriendsGroupID_t _GetFriendsGroupIDByIndex( IntPtr self, int iFG ); #endregion internal FriendsGroupID_t GetFriendsGroupIDByIndex( int iFG ) @@ -346,9 +176,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate Utf8StringPointer FGetFriendsGroupName( IntPtr self, FriendsGroupID_t friendsGroupID ); - private FGetFriendsGroupName _GetFriendsGroupName; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendsGroupName", CallingConvention = Platform.CC)] + private static extern Utf8StringPointer _GetFriendsGroupName( IntPtr self, FriendsGroupID_t friendsGroupID ); #endregion internal string GetFriendsGroupName( FriendsGroupID_t friendsGroupID ) @@ -358,9 +187,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetFriendsGroupMembersCount( IntPtr self, FriendsGroupID_t friendsGroupID ); - private FGetFriendsGroupMembersCount _GetFriendsGroupMembersCount; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendsGroupMembersCount", CallingConvention = Platform.CC)] + private static extern int _GetFriendsGroupMembersCount( IntPtr self, FriendsGroupID_t friendsGroupID ); #endregion internal int GetFriendsGroupMembersCount( FriendsGroupID_t friendsGroupID ) @@ -370,9 +198,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FGetFriendsGroupMembersList( IntPtr self, FriendsGroupID_t friendsGroupID, [In,Out] SteamId[] pOutSteamIDMembers, int nMembersCount ); - private FGetFriendsGroupMembersList _GetFriendsGroupMembersList; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendsGroupMembersList", CallingConvention = Platform.CC)] + private static extern void _GetFriendsGroupMembersList( IntPtr self, FriendsGroupID_t friendsGroupID, [In,Out] SteamId[] pOutSteamIDMembers, int nMembersCount ); #endregion internal void GetFriendsGroupMembersList( FriendsGroupID_t friendsGroupID, [In,Out] SteamId[] pOutSteamIDMembers, int nMembersCount ) @@ -381,10 +208,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_HasFriend", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FHasFriend( IntPtr self, SteamId steamIDFriend, int iFriendFlags ); - private FHasFriend _HasFriend; + private static extern bool _HasFriend( IntPtr self, SteamId steamIDFriend, int iFriendFlags ); #endregion internal bool HasFriend( SteamId steamIDFriend, int iFriendFlags ) @@ -394,9 +220,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetClanCount( IntPtr self ); - private FGetClanCount _GetClanCount; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanCount", CallingConvention = Platform.CC)] + private static extern int _GetClanCount( IntPtr self ); #endregion internal int GetClanCount() @@ -406,31 +231,19 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - #if PLATFORM_WIN - private delegate void FGetClanByIndex( IntPtr self, ref SteamId retVal, int iClan ); - #else - private delegate SteamId FGetClanByIndex( IntPtr self, int iClan ); - #endif - private FGetClanByIndex _GetClanByIndex; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanByIndex", CallingConvention = Platform.CC)] + private static extern SteamId _GetClanByIndex( IntPtr self, int iClan ); #endregion internal SteamId GetClanByIndex( int iClan ) { - #if PLATFORM_WIN - var retVal = default( SteamId ); - _GetClanByIndex( Self, ref retVal, iClan ); - return retVal; - #else var returnValue = _GetClanByIndex( Self, iClan ); return returnValue; - #endif } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate Utf8StringPointer FGetClanName( IntPtr self, SteamId steamIDClan ); - private FGetClanName _GetClanName; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanName", CallingConvention = Platform.CC)] + private static extern Utf8StringPointer _GetClanName( IntPtr self, SteamId steamIDClan ); #endregion internal string GetClanName( SteamId steamIDClan ) @@ -440,9 +253,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate Utf8StringPointer FGetClanTag( IntPtr self, SteamId steamIDClan ); - private FGetClanTag _GetClanTag; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanTag", CallingConvention = Platform.CC)] + private static extern Utf8StringPointer _GetClanTag( IntPtr self, SteamId steamIDClan ); #endregion internal string GetClanTag( SteamId steamIDClan ) @@ -452,10 +264,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanActivityCounts", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetClanActivityCounts( IntPtr self, SteamId steamIDClan, ref int pnOnline, ref int pnInGame, ref int pnChatting ); - private FGetClanActivityCounts _GetClanActivityCounts; + private static extern bool _GetClanActivityCounts( IntPtr self, SteamId steamIDClan, ref int pnOnline, ref int pnInGame, ref int pnChatting ); #endregion internal bool GetClanActivityCounts( SteamId steamIDClan, ref int pnOnline, ref int pnInGame, ref int pnChatting ) @@ -465,21 +276,19 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FDownloadClanActivityCounts( IntPtr self, [In,Out] SteamId[] psteamIDClans, int cClansToRequest ); - private FDownloadClanActivityCounts _DownloadClanActivityCounts; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_DownloadClanActivityCounts", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _DownloadClanActivityCounts( IntPtr self, [In,Out] SteamId[] psteamIDClans, int cClansToRequest ); #endregion - internal async Task DownloadClanActivityCounts( [In,Out] SteamId[] psteamIDClans, int cClansToRequest ) + internal CallResult DownloadClanActivityCounts( [In,Out] SteamId[] psteamIDClans, int cClansToRequest ) { var returnValue = _DownloadClanActivityCounts( Self, psteamIDClans, cClansToRequest ); - return await DownloadClanActivityCountsResult_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetFriendCountFromSource( IntPtr self, SteamId steamIDSource ); - private FGetFriendCountFromSource _GetFriendCountFromSource; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendCountFromSource", CallingConvention = Platform.CC)] + private static extern int _GetFriendCountFromSource( IntPtr self, SteamId steamIDSource ); #endregion internal int GetFriendCountFromSource( SteamId steamIDSource ) @@ -489,32 +298,20 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - #if PLATFORM_WIN - private delegate void FGetFriendFromSourceByIndex( IntPtr self, ref SteamId retVal, SteamId steamIDSource, int iFriend ); - #else - private delegate SteamId FGetFriendFromSourceByIndex( IntPtr self, SteamId steamIDSource, int iFriend ); - #endif - private FGetFriendFromSourceByIndex _GetFriendFromSourceByIndex; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendFromSourceByIndex", CallingConvention = Platform.CC)] + private static extern SteamId _GetFriendFromSourceByIndex( IntPtr self, SteamId steamIDSource, int iFriend ); #endregion internal SteamId GetFriendFromSourceByIndex( SteamId steamIDSource, int iFriend ) { - #if PLATFORM_WIN - var retVal = default( SteamId ); - _GetFriendFromSourceByIndex( Self, ref retVal, steamIDSource, iFriend ); - return retVal; - #else var returnValue = _GetFriendFromSourceByIndex( Self, steamIDSource, iFriend ); return returnValue; - #endif } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_IsUserInSource", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FIsUserInSource( IntPtr self, SteamId steamIDUser, SteamId steamIDSource ); - private FIsUserInSource _IsUserInSource; + private static extern bool _IsUserInSource( IntPtr self, SteamId steamIDUser, SteamId steamIDSource ); #endregion internal bool IsUserInSource( SteamId steamIDUser, SteamId steamIDSource ) @@ -524,9 +321,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FSetInGameVoiceSpeaking( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.U1 )] bool bSpeaking ); - private FSetInGameVoiceSpeaking _SetInGameVoiceSpeaking; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_SetInGameVoiceSpeaking", CallingConvention = Platform.CC)] + private static extern void _SetInGameVoiceSpeaking( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.U1 )] bool bSpeaking ); #endregion internal void SetInGameVoiceSpeaking( SteamId steamIDUser, [MarshalAs( UnmanagedType.U1 )] bool bSpeaking ) @@ -535,9 +331,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FActivateGameOverlay( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDialog ); - private FActivateGameOverlay _ActivateGameOverlay; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_ActivateGameOverlay", CallingConvention = Platform.CC)] + private static extern void _ActivateGameOverlay( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDialog ); #endregion internal void ActivateGameOverlay( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDialog ) @@ -546,9 +341,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FActivateGameOverlayToUser( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDialog, SteamId steamID ); - private FActivateGameOverlayToUser _ActivateGameOverlayToUser; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_ActivateGameOverlayToUser", CallingConvention = Platform.CC)] + private static extern void _ActivateGameOverlayToUser( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDialog, SteamId steamID ); #endregion internal void ActivateGameOverlayToUser( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDialog, SteamId steamID ) @@ -557,9 +351,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FActivateGameOverlayToWebPage( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchURL, ActivateGameOverlayToWebPageMode eMode ); - private FActivateGameOverlayToWebPage _ActivateGameOverlayToWebPage; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage", CallingConvention = Platform.CC)] + private static extern void _ActivateGameOverlayToWebPage( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchURL, ActivateGameOverlayToWebPageMode eMode ); #endregion internal void ActivateGameOverlayToWebPage( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchURL, ActivateGameOverlayToWebPageMode eMode ) @@ -568,9 +361,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FActivateGameOverlayToStore( IntPtr self, AppId nAppID, OverlayToStoreFlag eFlag ); - private FActivateGameOverlayToStore _ActivateGameOverlayToStore; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_ActivateGameOverlayToStore", CallingConvention = Platform.CC)] + private static extern void _ActivateGameOverlayToStore( IntPtr self, AppId nAppID, OverlayToStoreFlag eFlag ); #endregion internal void ActivateGameOverlayToStore( AppId nAppID, OverlayToStoreFlag eFlag ) @@ -579,9 +371,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FSetPlayedWith( IntPtr self, SteamId steamIDUserPlayedWith ); - private FSetPlayedWith _SetPlayedWith; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_SetPlayedWith", CallingConvention = Platform.CC)] + private static extern void _SetPlayedWith( IntPtr self, SteamId steamIDUserPlayedWith ); #endregion internal void SetPlayedWith( SteamId steamIDUserPlayedWith ) @@ -590,9 +381,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FActivateGameOverlayInviteDialog( IntPtr self, SteamId steamIDLobby ); - private FActivateGameOverlayInviteDialog _ActivateGameOverlayInviteDialog; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_ActivateGameOverlayInviteDialog", CallingConvention = Platform.CC)] + private static extern void _ActivateGameOverlayInviteDialog( IntPtr self, SteamId steamIDLobby ); #endregion internal void ActivateGameOverlayInviteDialog( SteamId steamIDLobby ) @@ -601,9 +391,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetSmallFriendAvatar( IntPtr self, SteamId steamIDFriend ); - private FGetSmallFriendAvatar _GetSmallFriendAvatar; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetSmallFriendAvatar", CallingConvention = Platform.CC)] + private static extern int _GetSmallFriendAvatar( IntPtr self, SteamId steamIDFriend ); #endregion internal int GetSmallFriendAvatar( SteamId steamIDFriend ) @@ -613,9 +402,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetMediumFriendAvatar( IntPtr self, SteamId steamIDFriend ); - private FGetMediumFriendAvatar _GetMediumFriendAvatar; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetMediumFriendAvatar", CallingConvention = Platform.CC)] + private static extern int _GetMediumFriendAvatar( IntPtr self, SteamId steamIDFriend ); #endregion internal int GetMediumFriendAvatar( SteamId steamIDFriend ) @@ -625,9 +413,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetLargeFriendAvatar( IntPtr self, SteamId steamIDFriend ); - private FGetLargeFriendAvatar _GetLargeFriendAvatar; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetLargeFriendAvatar", CallingConvention = Platform.CC)] + private static extern int _GetLargeFriendAvatar( IntPtr self, SteamId steamIDFriend ); #endregion internal int GetLargeFriendAvatar( SteamId steamIDFriend ) @@ -637,10 +424,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_RequestUserInformation", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FRequestUserInformation( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.U1 )] bool bRequireNameOnly ); - private FRequestUserInformation _RequestUserInformation; + private static extern bool _RequestUserInformation( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.U1 )] bool bRequireNameOnly ); #endregion internal bool RequestUserInformation( SteamId steamIDUser, [MarshalAs( UnmanagedType.U1 )] bool bRequireNameOnly ) @@ -650,43 +436,30 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FRequestClanOfficerList( IntPtr self, SteamId steamIDClan ); - private FRequestClanOfficerList _RequestClanOfficerList; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_RequestClanOfficerList", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _RequestClanOfficerList( IntPtr self, SteamId steamIDClan ); #endregion - internal async Task RequestClanOfficerList( SteamId steamIDClan ) + internal CallResult RequestClanOfficerList( SteamId steamIDClan ) { var returnValue = _RequestClanOfficerList( Self, steamIDClan ); - return await ClanOfficerListResponse_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - #if PLATFORM_WIN - private delegate void FGetClanOwner( IntPtr self, ref SteamId retVal, SteamId steamIDClan ); - #else - private delegate SteamId FGetClanOwner( IntPtr self, SteamId steamIDClan ); - #endif - private FGetClanOwner _GetClanOwner; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanOwner", CallingConvention = Platform.CC)] + private static extern SteamId _GetClanOwner( IntPtr self, SteamId steamIDClan ); #endregion internal SteamId GetClanOwner( SteamId steamIDClan ) { - #if PLATFORM_WIN - var retVal = default( SteamId ); - _GetClanOwner( Self, ref retVal, steamIDClan ); - return retVal; - #else var returnValue = _GetClanOwner( Self, steamIDClan ); return returnValue; - #endif } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetClanOfficerCount( IntPtr self, SteamId steamIDClan ); - private FGetClanOfficerCount _GetClanOfficerCount; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanOfficerCount", CallingConvention = Platform.CC)] + private static extern int _GetClanOfficerCount( IntPtr self, SteamId steamIDClan ); #endregion internal int GetClanOfficerCount( SteamId steamIDClan ) @@ -696,31 +469,19 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - #if PLATFORM_WIN - private delegate void FGetClanOfficerByIndex( IntPtr self, ref SteamId retVal, SteamId steamIDClan, int iOfficer ); - #else - private delegate SteamId FGetClanOfficerByIndex( IntPtr self, SteamId steamIDClan, int iOfficer ); - #endif - private FGetClanOfficerByIndex _GetClanOfficerByIndex; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanOfficerByIndex", CallingConvention = Platform.CC)] + private static extern SteamId _GetClanOfficerByIndex( IntPtr self, SteamId steamIDClan, int iOfficer ); #endregion internal SteamId GetClanOfficerByIndex( SteamId steamIDClan, int iOfficer ) { - #if PLATFORM_WIN - var retVal = default( SteamId ); - _GetClanOfficerByIndex( Self, ref retVal, steamIDClan, iOfficer ); - return retVal; - #else var returnValue = _GetClanOfficerByIndex( Self, steamIDClan, iOfficer ); return returnValue; - #endif } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate uint FGetUserRestrictions( IntPtr self ); - private FGetUserRestrictions _GetUserRestrictions; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetUserRestrictions", CallingConvention = Platform.CC)] + private static extern uint _GetUserRestrictions( IntPtr self ); #endregion internal uint GetUserRestrictions() @@ -730,10 +491,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_SetRichPresence", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetRichPresence( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue ); - private FSetRichPresence _SetRichPresence; + private static extern bool _SetRichPresence( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue ); #endregion internal bool SetRichPresence( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue ) @@ -743,9 +503,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FClearRichPresence( IntPtr self ); - private FClearRichPresence _ClearRichPresence; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_ClearRichPresence", CallingConvention = Platform.CC)] + private static extern void _ClearRichPresence( IntPtr self ); #endregion internal void ClearRichPresence() @@ -754,9 +513,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate Utf8StringPointer FGetFriendRichPresence( IntPtr self, SteamId steamIDFriend, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey ); - private FGetFriendRichPresence _GetFriendRichPresence; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendRichPresence", CallingConvention = Platform.CC)] + private static extern Utf8StringPointer _GetFriendRichPresence( IntPtr self, SteamId steamIDFriend, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey ); #endregion internal string GetFriendRichPresence( SteamId steamIDFriend, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey ) @@ -766,9 +524,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetFriendRichPresenceKeyCount( IntPtr self, SteamId steamIDFriend ); - private FGetFriendRichPresenceKeyCount _GetFriendRichPresenceKeyCount; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendRichPresenceKeyCount", CallingConvention = Platform.CC)] + private static extern int _GetFriendRichPresenceKeyCount( IntPtr self, SteamId steamIDFriend ); #endregion internal int GetFriendRichPresenceKeyCount( SteamId steamIDFriend ) @@ -778,9 +535,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate Utf8StringPointer FGetFriendRichPresenceKeyByIndex( IntPtr self, SteamId steamIDFriend, int iKey ); - private FGetFriendRichPresenceKeyByIndex _GetFriendRichPresenceKeyByIndex; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendRichPresenceKeyByIndex", CallingConvention = Platform.CC)] + private static extern Utf8StringPointer _GetFriendRichPresenceKeyByIndex( IntPtr self, SteamId steamIDFriend, int iKey ); #endregion internal string GetFriendRichPresenceKeyByIndex( SteamId steamIDFriend, int iKey ) @@ -790,9 +546,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FRequestFriendRichPresence( IntPtr self, SteamId steamIDFriend ); - private FRequestFriendRichPresence _RequestFriendRichPresence; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_RequestFriendRichPresence", CallingConvention = Platform.CC)] + private static extern void _RequestFriendRichPresence( IntPtr self, SteamId steamIDFriend ); #endregion internal void RequestFriendRichPresence( SteamId steamIDFriend ) @@ -801,10 +556,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_InviteUserToGame", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FInviteUserToGame( IntPtr self, SteamId steamIDFriend, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchConnectString ); - private FInviteUserToGame _InviteUserToGame; + private static extern bool _InviteUserToGame( IntPtr self, SteamId steamIDFriend, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchConnectString ); #endregion internal bool InviteUserToGame( SteamId steamIDFriend, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchConnectString ) @@ -814,9 +568,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetCoplayFriendCount( IntPtr self ); - private FGetCoplayFriendCount _GetCoplayFriendCount; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetCoplayFriendCount", CallingConvention = Platform.CC)] + private static extern int _GetCoplayFriendCount( IntPtr self ); #endregion internal int GetCoplayFriendCount() @@ -826,31 +579,19 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - #if PLATFORM_WIN - private delegate void FGetCoplayFriend( IntPtr self, ref SteamId retVal, int iCoplayFriend ); - #else - private delegate SteamId FGetCoplayFriend( IntPtr self, int iCoplayFriend ); - #endif - private FGetCoplayFriend _GetCoplayFriend; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetCoplayFriend", CallingConvention = Platform.CC)] + private static extern SteamId _GetCoplayFriend( IntPtr self, int iCoplayFriend ); #endregion internal SteamId GetCoplayFriend( int iCoplayFriend ) { - #if PLATFORM_WIN - var retVal = default( SteamId ); - _GetCoplayFriend( Self, ref retVal, iCoplayFriend ); - return retVal; - #else var returnValue = _GetCoplayFriend( Self, iCoplayFriend ); return returnValue; - #endif } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetFriendCoplayTime( IntPtr self, SteamId steamIDFriend ); - private FGetFriendCoplayTime _GetFriendCoplayTime; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendCoplayTime", CallingConvention = Platform.CC)] + private static extern int _GetFriendCoplayTime( IntPtr self, SteamId steamIDFriend ); #endregion internal int GetFriendCoplayTime( SteamId steamIDFriend ) @@ -860,9 +601,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate AppId FGetFriendCoplayGame( IntPtr self, SteamId steamIDFriend ); - private FGetFriendCoplayGame _GetFriendCoplayGame; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendCoplayGame", CallingConvention = Platform.CC)] + private static extern AppId _GetFriendCoplayGame( IntPtr self, SteamId steamIDFriend ); #endregion internal AppId GetFriendCoplayGame( SteamId steamIDFriend ) @@ -872,22 +612,20 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FJoinClanChatRoom( IntPtr self, SteamId steamIDClan ); - private FJoinClanChatRoom _JoinClanChatRoom; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_JoinClanChatRoom", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _JoinClanChatRoom( IntPtr self, SteamId steamIDClan ); #endregion - internal async Task JoinClanChatRoom( SteamId steamIDClan ) + internal CallResult JoinClanChatRoom( SteamId steamIDClan ) { var returnValue = _JoinClanChatRoom( Self, steamIDClan ); - return await JoinClanChatRoomCompletionResult_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_LeaveClanChatRoom", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FLeaveClanChatRoom( IntPtr self, SteamId steamIDClan ); - private FLeaveClanChatRoom _LeaveClanChatRoom; + private static extern bool _LeaveClanChatRoom( IntPtr self, SteamId steamIDClan ); #endregion internal bool LeaveClanChatRoom( SteamId steamIDClan ) @@ -897,9 +635,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetClanChatMemberCount( IntPtr self, SteamId steamIDClan ); - private FGetClanChatMemberCount _GetClanChatMemberCount; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanChatMemberCount", CallingConvention = Platform.CC)] + private static extern int _GetClanChatMemberCount( IntPtr self, SteamId steamIDClan ); #endregion internal int GetClanChatMemberCount( SteamId steamIDClan ) @@ -909,32 +646,20 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - #if PLATFORM_WIN - private delegate void FGetChatMemberByIndex( IntPtr self, ref SteamId retVal, SteamId steamIDClan, int iUser ); - #else - private delegate SteamId FGetChatMemberByIndex( IntPtr self, SteamId steamIDClan, int iUser ); - #endif - private FGetChatMemberByIndex _GetChatMemberByIndex; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetChatMemberByIndex", CallingConvention = Platform.CC)] + private static extern SteamId _GetChatMemberByIndex( IntPtr self, SteamId steamIDClan, int iUser ); #endregion internal SteamId GetChatMemberByIndex( SteamId steamIDClan, int iUser ) { - #if PLATFORM_WIN - var retVal = default( SteamId ); - _GetChatMemberByIndex( Self, ref retVal, steamIDClan, iUser ); - return retVal; - #else var returnValue = _GetChatMemberByIndex( Self, steamIDClan, iUser ); return returnValue; - #endif } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_SendClanChatMessage", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSendClanChatMessage( IntPtr self, SteamId steamIDClanChat, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchText ); - private FSendClanChatMessage _SendClanChatMessage; + private static extern bool _SendClanChatMessage( IntPtr self, SteamId steamIDClanChat, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchText ); #endregion internal bool SendClanChatMessage( SteamId steamIDClanChat, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchText ) @@ -944,9 +669,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetClanChatMessage( IntPtr self, SteamId steamIDClanChat, int iMessage, IntPtr prgchText, int cchTextMax, ref ChatEntryType peChatEntryType, ref SteamId psteamidChatter ); - private FGetClanChatMessage _GetClanChatMessage; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanChatMessage", CallingConvention = Platform.CC)] + private static extern int _GetClanChatMessage( IntPtr self, SteamId steamIDClanChat, int iMessage, IntPtr prgchText, int cchTextMax, ref ChatEntryType peChatEntryType, ref SteamId psteamidChatter ); #endregion internal int GetClanChatMessage( SteamId steamIDClanChat, int iMessage, IntPtr prgchText, int cchTextMax, ref ChatEntryType peChatEntryType, ref SteamId psteamidChatter ) @@ -956,10 +680,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_IsClanChatAdmin", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FIsClanChatAdmin( IntPtr self, SteamId steamIDClanChat, SteamId steamIDUser ); - private FIsClanChatAdmin _IsClanChatAdmin; + private static extern bool _IsClanChatAdmin( IntPtr self, SteamId steamIDClanChat, SteamId steamIDUser ); #endregion internal bool IsClanChatAdmin( SteamId steamIDClanChat, SteamId steamIDUser ) @@ -969,10 +692,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_IsClanChatWindowOpenInSteam", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FIsClanChatWindowOpenInSteam( IntPtr self, SteamId steamIDClanChat ); - private FIsClanChatWindowOpenInSteam _IsClanChatWindowOpenInSteam; + private static extern bool _IsClanChatWindowOpenInSteam( IntPtr self, SteamId steamIDClanChat ); #endregion internal bool IsClanChatWindowOpenInSteam( SteamId steamIDClanChat ) @@ -982,10 +704,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_OpenClanChatWindowInSteam", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FOpenClanChatWindowInSteam( IntPtr self, SteamId steamIDClanChat ); - private FOpenClanChatWindowInSteam _OpenClanChatWindowInSteam; + private static extern bool _OpenClanChatWindowInSteam( IntPtr self, SteamId steamIDClanChat ); #endregion internal bool OpenClanChatWindowInSteam( SteamId steamIDClanChat ) @@ -995,10 +716,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_CloseClanChatWindowInSteam", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FCloseClanChatWindowInSteam( IntPtr self, SteamId steamIDClanChat ); - private FCloseClanChatWindowInSteam _CloseClanChatWindowInSteam; + private static extern bool _CloseClanChatWindowInSteam( IntPtr self, SteamId steamIDClanChat ); #endregion internal bool CloseClanChatWindowInSteam( SteamId steamIDClanChat ) @@ -1008,10 +728,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_SetListenForFriendsMessages", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetListenForFriendsMessages( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bInterceptEnabled ); - private FSetListenForFriendsMessages _SetListenForFriendsMessages; + private static extern bool _SetListenForFriendsMessages( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bInterceptEnabled ); #endregion internal bool SetListenForFriendsMessages( [MarshalAs( UnmanagedType.U1 )] bool bInterceptEnabled ) @@ -1021,10 +740,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_ReplyToFriendMessage", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FReplyToFriendMessage( IntPtr self, SteamId steamIDFriend, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchMsgToSend ); - private FReplyToFriendMessage _ReplyToFriendMessage; + private static extern bool _ReplyToFriendMessage( IntPtr self, SteamId steamIDFriend, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchMsgToSend ); #endregion internal bool ReplyToFriendMessage( SteamId steamIDFriend, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchMsgToSend ) @@ -1034,9 +752,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetFriendMessage( IntPtr self, SteamId steamIDFriend, int iMessageID, IntPtr pvData, int cubData, ref ChatEntryType peChatEntryType ); - private FGetFriendMessage _GetFriendMessage; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendMessage", CallingConvention = Platform.CC)] + private static extern int _GetFriendMessage( IntPtr self, SteamId steamIDFriend, int iMessageID, IntPtr pvData, int cubData, ref ChatEntryType peChatEntryType ); #endregion internal int GetFriendMessage( SteamId steamIDFriend, int iMessageID, IntPtr pvData, int cubData, ref ChatEntryType peChatEntryType ) @@ -1046,46 +763,42 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FGetFollowerCount( IntPtr self, SteamId steamID ); - private FGetFollowerCount _GetFollowerCount; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFollowerCount", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _GetFollowerCount( IntPtr self, SteamId steamID ); #endregion - internal async Task GetFollowerCount( SteamId steamID ) + internal CallResult GetFollowerCount( SteamId steamID ) { var returnValue = _GetFollowerCount( Self, steamID ); - return await FriendsGetFollowerCount_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FIsFollowing( IntPtr self, SteamId steamID ); - private FIsFollowing _IsFollowing; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_IsFollowing", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _IsFollowing( IntPtr self, SteamId steamID ); #endregion - internal async Task IsFollowing( SteamId steamID ) + internal CallResult IsFollowing( SteamId steamID ) { var returnValue = _IsFollowing( Self, steamID ); - return await FriendsIsFollowing_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FEnumerateFollowingList( IntPtr self, uint unStartIndex ); - private FEnumerateFollowingList _EnumerateFollowingList; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_EnumerateFollowingList", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _EnumerateFollowingList( IntPtr self, uint unStartIndex ); #endregion - internal async Task EnumerateFollowingList( uint unStartIndex ) + internal CallResult EnumerateFollowingList( uint unStartIndex ) { var returnValue = _EnumerateFollowingList( Self, unStartIndex ); - return await FriendsEnumerateFollowingList_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_IsClanPublic", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FIsClanPublic( IntPtr self, SteamId steamIDClan ); - private FIsClanPublic _IsClanPublic; + private static extern bool _IsClanPublic( IntPtr self, SteamId steamIDClan ); #endregion internal bool IsClanPublic( SteamId steamIDClan ) @@ -1095,10 +808,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_IsClanOfficialGameGroup", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FIsClanOfficialGameGroup( IntPtr self, SteamId steamIDClan ); - private FIsClanOfficialGameGroup _IsClanOfficialGameGroup; + private static extern bool _IsClanOfficialGameGroup( IntPtr self, SteamId steamIDClan ); #endregion internal bool IsClanOfficialGameGroup( SteamId steamIDClan ) @@ -1108,9 +820,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetNumChatsWithUnreadPriorityMessages( IntPtr self ); - private FGetNumChatsWithUnreadPriorityMessages _GetNumChatsWithUnreadPriorityMessages; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetNumChatsWithUnreadPriorityMessages", CallingConvention = Platform.CC)] + private static extern int _GetNumChatsWithUnreadPriorityMessages( IntPtr self ); #endregion internal int GetNumChatsWithUnreadPriorityMessages() @@ -1119,5 +830,15 @@ namespace Steamworks return returnValue; } + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_ActivateGameOverlayRemotePlayTogetherInviteDialog", CallingConvention = Platform.CC)] + private static extern void _ActivateGameOverlayRemotePlayTogetherInviteDialog( IntPtr self, SteamId steamIDLobby ); + + #endregion + internal void ActivateGameOverlayRemotePlayTogetherInviteDialog( SteamId steamIDLobby ) + { + _ActivateGameOverlayRemotePlayTogetherInviteDialog( Self, steamIDLobby ); + } + } } diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamGameSearch.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamGameSearch.cs new file mode 100644 index 0000000..03d814f --- /dev/null +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamGameSearch.cs @@ -0,0 +1,180 @@ +using System; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; +using Steamworks.Data; + + +namespace Steamworks +{ + internal class ISteamGameSearch : SteamInterface + { + + internal ISteamGameSearch( bool IsGameServer ) + { + SetupInterface( IsGameServer ); + } + + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameSearch_v001", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamGameSearch_v001(); + public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamGameSearch_v001(); + + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_AddGameSearchParams", CallingConvention = Platform.CC)] + private static extern GameSearchErrorCode_t _AddGameSearchParams( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToFind, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValuesToFind ); + + #endregion + internal GameSearchErrorCode_t AddGameSearchParams( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToFind, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValuesToFind ) + { + var returnValue = _AddGameSearchParams( Self, pchKeyToFind, pchValuesToFind ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_SearchForGameWithLobby", CallingConvention = Platform.CC)] + private static extern GameSearchErrorCode_t _SearchForGameWithLobby( IntPtr self, SteamId steamIDLobby, int nPlayerMin, int nPlayerMax ); + + #endregion + internal GameSearchErrorCode_t SearchForGameWithLobby( SteamId steamIDLobby, int nPlayerMin, int nPlayerMax ) + { + var returnValue = _SearchForGameWithLobby( Self, steamIDLobby, nPlayerMin, nPlayerMax ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_SearchForGameSolo", CallingConvention = Platform.CC)] + private static extern GameSearchErrorCode_t _SearchForGameSolo( IntPtr self, int nPlayerMin, int nPlayerMax ); + + #endregion + internal GameSearchErrorCode_t SearchForGameSolo( int nPlayerMin, int nPlayerMax ) + { + var returnValue = _SearchForGameSolo( Self, nPlayerMin, nPlayerMax ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_AcceptGame", CallingConvention = Platform.CC)] + private static extern GameSearchErrorCode_t _AcceptGame( IntPtr self ); + + #endregion + internal GameSearchErrorCode_t AcceptGame() + { + var returnValue = _AcceptGame( Self ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_DeclineGame", CallingConvention = Platform.CC)] + private static extern GameSearchErrorCode_t _DeclineGame( IntPtr self ); + + #endregion + internal GameSearchErrorCode_t DeclineGame() + { + var returnValue = _DeclineGame( Self ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_RetrieveConnectionDetails", CallingConvention = Platform.CC)] + private static extern GameSearchErrorCode_t _RetrieveConnectionDetails( IntPtr self, SteamId steamIDHost, IntPtr pchConnectionDetails, int cubConnectionDetails ); + + #endregion + internal GameSearchErrorCode_t RetrieveConnectionDetails( SteamId steamIDHost, out string pchConnectionDetails ) + { + IntPtr mempchConnectionDetails = Helpers.TakeMemory(); + var returnValue = _RetrieveConnectionDetails( Self, steamIDHost, mempchConnectionDetails, (1024 * 32) ); + pchConnectionDetails = Helpers.MemoryToString( mempchConnectionDetails ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_EndGameSearch", CallingConvention = Platform.CC)] + private static extern GameSearchErrorCode_t _EndGameSearch( IntPtr self ); + + #endregion + internal GameSearchErrorCode_t EndGameSearch() + { + var returnValue = _EndGameSearch( Self ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_SetGameHostParams", CallingConvention = Platform.CC)] + private static extern GameSearchErrorCode_t _SetGameHostParams( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue ); + + #endregion + internal GameSearchErrorCode_t SetGameHostParams( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue ) + { + var returnValue = _SetGameHostParams( Self, pchKey, pchValue ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_SetConnectionDetails", CallingConvention = Platform.CC)] + private static extern GameSearchErrorCode_t _SetConnectionDetails( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchConnectionDetails, int cubConnectionDetails ); + + #endregion + internal GameSearchErrorCode_t SetConnectionDetails( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchConnectionDetails, int cubConnectionDetails ) + { + var returnValue = _SetConnectionDetails( Self, pchConnectionDetails, cubConnectionDetails ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_RequestPlayersForGame", CallingConvention = Platform.CC)] + private static extern GameSearchErrorCode_t _RequestPlayersForGame( IntPtr self, int nPlayerMin, int nPlayerMax, int nMaxTeamSize ); + + #endregion + internal GameSearchErrorCode_t RequestPlayersForGame( int nPlayerMin, int nPlayerMax, int nMaxTeamSize ) + { + var returnValue = _RequestPlayersForGame( Self, nPlayerMin, nPlayerMax, nMaxTeamSize ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_HostConfirmGameStart", CallingConvention = Platform.CC)] + private static extern GameSearchErrorCode_t _HostConfirmGameStart( IntPtr self, ulong ullUniqueGameID ); + + #endregion + internal GameSearchErrorCode_t HostConfirmGameStart( ulong ullUniqueGameID ) + { + var returnValue = _HostConfirmGameStart( Self, ullUniqueGameID ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_CancelRequestPlayersForGame", CallingConvention = Platform.CC)] + private static extern GameSearchErrorCode_t _CancelRequestPlayersForGame( IntPtr self ); + + #endregion + internal GameSearchErrorCode_t CancelRequestPlayersForGame() + { + var returnValue = _CancelRequestPlayersForGame( Self ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_SubmitPlayerResult", CallingConvention = Platform.CC)] + private static extern GameSearchErrorCode_t _SubmitPlayerResult( IntPtr self, ulong ullUniqueGameID, SteamId steamIDPlayer, PlayerResult_t EPlayerResult ); + + #endregion + internal GameSearchErrorCode_t SubmitPlayerResult( ulong ullUniqueGameID, SteamId steamIDPlayer, PlayerResult_t EPlayerResult ) + { + var returnValue = _SubmitPlayerResult( Self, ullUniqueGameID, steamIDPlayer, EPlayerResult ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_EndGame", CallingConvention = Platform.CC)] + private static extern GameSearchErrorCode_t _EndGame( IntPtr self, ulong ullUniqueGameID ); + + #endregion + internal GameSearchErrorCode_t EndGame( ulong ullUniqueGameID ) + { + var returnValue = _EndGame( Self, ullUniqueGameID ); + return returnValue; + } + + } +} diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamGameServer.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamGameServer.cs index 50bb040..0edcb33 100644 --- a/Facepunch.Steamworks/Generated/Interfaces/ISteamGameServer.cs +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamGameServer.cs @@ -9,122 +9,20 @@ namespace Steamworks { internal class ISteamGameServer : SteamInterface { - public override string InterfaceName => "SteamGameServer012"; - public override void InitInternals() + internal ISteamGameServer( bool IsGameServer ) { - _InitGameServer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) ); - _SetProduct = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) ); - _SetGameDescription = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) ); - _SetModDir = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) ); - _SetDedicatedServer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) ); - _LogOn = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) ); - _LogOnAnonymous = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) ); - _LogOff = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) ); - _BLoggedOn = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) ); - _BSecure = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) ); - _GetSteamID = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) ); - _WasRestartRequested = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) ); - _SetMaxPlayerCount = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) ); - _SetBotPlayerCount = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) ); - _SetServerName = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) ); - _SetMapName = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) ); - _SetPasswordProtected = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) ); - _SetSpectatorPort = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) ); - _SetSpectatorServerName = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) ); - _ClearAllKeyValues = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) ); - _SetKeyValue = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) ); - _SetGameTags = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 168 ) ) ); - _SetGameData = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 176 ) ) ); - _SetRegion = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 184 ) ) ); - _SendUserConnectAndAuthenticate = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 192 ) ) ); - _CreateUnauthenticatedUserConnection = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 200 ) ) ); - _SendUserDisconnect = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 208 ) ) ); - _BUpdateUserData = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 216 ) ) ); - _GetAuthSessionTicket = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 224 ) ) ); - _BeginAuthSession = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 232 ) ) ); - _EndAuthSession = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 240 ) ) ); - _CancelAuthTicket = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 248 ) ) ); - _UserHasLicenseForApp = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 256 ) ) ); - _RequestUserGroupStatus = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 264 ) ) ); - _GetGameplayStats = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 272 ) ) ); - _GetServerReputation = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 280 ) ) ); - _GetPublicIP = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 288 ) ) ); - _HandleIncomingPacket = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 296 ) ) ); - _GetNextOutgoingPacket = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 304 ) ) ); - _EnableHeartbeats = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 312 ) ) ); - _SetHeartbeatInterval = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 320 ) ) ); - _ForceHeartbeat = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 328 ) ) ); - _AssociateWithClan = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 336 ) ) ); - _ComputeNewPlayerCompatibility = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 344 ) ) ); - } - internal override void Shutdown() - { - base.Shutdown(); - - _InitGameServer = null; - _SetProduct = null; - _SetGameDescription = null; - _SetModDir = null; - _SetDedicatedServer = null; - _LogOn = null; - _LogOnAnonymous = null; - _LogOff = null; - _BLoggedOn = null; - _BSecure = null; - _GetSteamID = null; - _WasRestartRequested = null; - _SetMaxPlayerCount = null; - _SetBotPlayerCount = null; - _SetServerName = null; - _SetMapName = null; - _SetPasswordProtected = null; - _SetSpectatorPort = null; - _SetSpectatorServerName = null; - _ClearAllKeyValues = null; - _SetKeyValue = null; - _SetGameTags = null; - _SetGameData = null; - _SetRegion = null; - _SendUserConnectAndAuthenticate = null; - _CreateUnauthenticatedUserConnection = null; - _SendUserDisconnect = null; - _BUpdateUserData = null; - _GetAuthSessionTicket = null; - _BeginAuthSession = null; - _EndAuthSession = null; - _CancelAuthTicket = null; - _UserHasLicenseForApp = null; - _RequestUserGroupStatus = null; - _GetGameplayStats = null; - _GetServerReputation = null; - _GetPublicIP = null; - _HandleIncomingPacket = null; - _GetNextOutgoingPacket = null; - _EnableHeartbeats = null; - _SetHeartbeatInterval = null; - _ForceHeartbeat = null; - _AssociateWithClan = null; - _ComputeNewPlayerCompatibility = null; + SetupInterface( IsGameServer ); } + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameServer_v013", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamGameServer_v013(); + public override IntPtr GetServerInterfacePointer() => SteamAPI_SteamGameServer_v013(); + + #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FInitGameServer( IntPtr self, uint unIP, ushort usGamePort, ushort usQueryPort, uint unFlags, AppId nGameAppId, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersionString ); - private FInitGameServer _InitGameServer; - - #endregion - internal bool InitGameServer( uint unIP, ushort usGamePort, ushort usQueryPort, uint unFlags, AppId nGameAppId, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersionString ) - { - var returnValue = _InitGameServer( Self, unIP, usGamePort, usQueryPort, unFlags, nGameAppId, pchVersionString ); - return returnValue; - } - - #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FSetProduct( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszProduct ); - private FSetProduct _SetProduct; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetProduct", CallingConvention = Platform.CC)] + private static extern void _SetProduct( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszProduct ); #endregion internal void SetProduct( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszProduct ) @@ -133,9 +31,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FSetGameDescription( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszGameDescription ); - private FSetGameDescription _SetGameDescription; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetGameDescription", CallingConvention = Platform.CC)] + private static extern void _SetGameDescription( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszGameDescription ); #endregion internal void SetGameDescription( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszGameDescription ) @@ -144,9 +41,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FSetModDir( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszModDir ); - private FSetModDir _SetModDir; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetModDir", CallingConvention = Platform.CC)] + private static extern void _SetModDir( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszModDir ); #endregion internal void SetModDir( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszModDir ) @@ -155,9 +51,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FSetDedicatedServer( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bDedicated ); - private FSetDedicatedServer _SetDedicatedServer; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetDedicatedServer", CallingConvention = Platform.CC)] + private static extern void _SetDedicatedServer( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bDedicated ); #endregion internal void SetDedicatedServer( [MarshalAs( UnmanagedType.U1 )] bool bDedicated ) @@ -166,9 +61,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FLogOn( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszToken ); - private FLogOn _LogOn; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_LogOn", CallingConvention = Platform.CC)] + private static extern void _LogOn( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszToken ); #endregion internal void LogOn( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszToken ) @@ -177,9 +71,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FLogOnAnonymous( IntPtr self ); - private FLogOnAnonymous _LogOnAnonymous; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_LogOnAnonymous", CallingConvention = Platform.CC)] + private static extern void _LogOnAnonymous( IntPtr self ); #endregion internal void LogOnAnonymous() @@ -188,9 +81,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FLogOff( IntPtr self ); - private FLogOff _LogOff; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_LogOff", CallingConvention = Platform.CC)] + private static extern void _LogOff( IntPtr self ); #endregion internal void LogOff() @@ -199,10 +91,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_BLoggedOn", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FBLoggedOn( IntPtr self ); - private FBLoggedOn _BLoggedOn; + private static extern bool _BLoggedOn( IntPtr self ); #endregion internal bool BLoggedOn() @@ -212,10 +103,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_BSecure", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FBSecure( IntPtr self ); - private FBSecure _BSecure; + private static extern bool _BSecure( IntPtr self ); #endregion internal bool BSecure() @@ -225,32 +115,20 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - #if PLATFORM_WIN - private delegate void FGetSteamID( IntPtr self, ref SteamId retVal ); - #else - private delegate SteamId FGetSteamID( IntPtr self ); - #endif - private FGetSteamID _GetSteamID; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_GetSteamID", CallingConvention = Platform.CC)] + private static extern SteamId _GetSteamID( IntPtr self ); #endregion internal SteamId GetSteamID() { - #if PLATFORM_WIN - var retVal = default( SteamId ); - _GetSteamID( Self, ref retVal ); - return retVal; - #else var returnValue = _GetSteamID( Self ); return returnValue; - #endif } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_WasRestartRequested", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FWasRestartRequested( IntPtr self ); - private FWasRestartRequested _WasRestartRequested; + private static extern bool _WasRestartRequested( IntPtr self ); #endregion internal bool WasRestartRequested() @@ -260,9 +138,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FSetMaxPlayerCount( IntPtr self, int cPlayersMax ); - private FSetMaxPlayerCount _SetMaxPlayerCount; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetMaxPlayerCount", CallingConvention = Platform.CC)] + private static extern void _SetMaxPlayerCount( IntPtr self, int cPlayersMax ); #endregion internal void SetMaxPlayerCount( int cPlayersMax ) @@ -271,9 +148,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FSetBotPlayerCount( IntPtr self, int cBotplayers ); - private FSetBotPlayerCount _SetBotPlayerCount; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetBotPlayerCount", CallingConvention = Platform.CC)] + private static extern void _SetBotPlayerCount( IntPtr self, int cBotplayers ); #endregion internal void SetBotPlayerCount( int cBotplayers ) @@ -282,9 +158,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FSetServerName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszServerName ); - private FSetServerName _SetServerName; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetServerName", CallingConvention = Platform.CC)] + private static extern void _SetServerName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszServerName ); #endregion internal void SetServerName( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszServerName ) @@ -293,9 +168,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FSetMapName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszMapName ); - private FSetMapName _SetMapName; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetMapName", CallingConvention = Platform.CC)] + private static extern void _SetMapName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszMapName ); #endregion internal void SetMapName( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszMapName ) @@ -304,9 +178,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FSetPasswordProtected( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bPasswordProtected ); - private FSetPasswordProtected _SetPasswordProtected; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetPasswordProtected", CallingConvention = Platform.CC)] + private static extern void _SetPasswordProtected( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bPasswordProtected ); #endregion internal void SetPasswordProtected( [MarshalAs( UnmanagedType.U1 )] bool bPasswordProtected ) @@ -315,9 +188,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FSetSpectatorPort( IntPtr self, ushort unSpectatorPort ); - private FSetSpectatorPort _SetSpectatorPort; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetSpectatorPort", CallingConvention = Platform.CC)] + private static extern void _SetSpectatorPort( IntPtr self, ushort unSpectatorPort ); #endregion internal void SetSpectatorPort( ushort unSpectatorPort ) @@ -326,9 +198,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FSetSpectatorServerName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszSpectatorServerName ); - private FSetSpectatorServerName _SetSpectatorServerName; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetSpectatorServerName", CallingConvention = Platform.CC)] + private static extern void _SetSpectatorServerName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszSpectatorServerName ); #endregion internal void SetSpectatorServerName( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszSpectatorServerName ) @@ -337,9 +208,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FClearAllKeyValues( IntPtr self ); - private FClearAllKeyValues _ClearAllKeyValues; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_ClearAllKeyValues", CallingConvention = Platform.CC)] + private static extern void _ClearAllKeyValues( IntPtr self ); #endregion internal void ClearAllKeyValues() @@ -348,9 +218,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FSetKeyValue( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pValue ); - private FSetKeyValue _SetKeyValue; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetKeyValue", CallingConvention = Platform.CC)] + private static extern void _SetKeyValue( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pValue ); #endregion internal void SetKeyValue( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pValue ) @@ -359,9 +228,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FSetGameTags( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameTags ); - private FSetGameTags _SetGameTags; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetGameTags", CallingConvention = Platform.CC)] + private static extern void _SetGameTags( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameTags ); #endregion internal void SetGameTags( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameTags ) @@ -370,9 +238,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FSetGameData( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameData ); - private FSetGameData _SetGameData; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetGameData", CallingConvention = Platform.CC)] + private static extern void _SetGameData( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameData ); #endregion internal void SetGameData( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameData ) @@ -381,9 +248,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FSetRegion( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszRegion ); - private FSetRegion _SetRegion; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetRegion", CallingConvention = Platform.CC)] + private static extern void _SetRegion( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszRegion ); #endregion internal void SetRegion( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszRegion ) @@ -392,10 +258,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SendUserConnectAndAuthenticate", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSendUserConnectAndAuthenticate( IntPtr self, uint unIPClient, IntPtr pvAuthBlob, uint cubAuthBlobSize, ref SteamId pSteamIDUser ); - private FSendUserConnectAndAuthenticate _SendUserConnectAndAuthenticate; + private static extern bool _SendUserConnectAndAuthenticate( IntPtr self, uint unIPClient, IntPtr pvAuthBlob, uint cubAuthBlobSize, ref SteamId pSteamIDUser ); #endregion internal bool SendUserConnectAndAuthenticate( uint unIPClient, IntPtr pvAuthBlob, uint cubAuthBlobSize, ref SteamId pSteamIDUser ) @@ -405,31 +270,19 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - #if PLATFORM_WIN - private delegate void FCreateUnauthenticatedUserConnection( IntPtr self, ref SteamId retVal ); - #else - private delegate SteamId FCreateUnauthenticatedUserConnection( IntPtr self ); - #endif - private FCreateUnauthenticatedUserConnection _CreateUnauthenticatedUserConnection; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_CreateUnauthenticatedUserConnection", CallingConvention = Platform.CC)] + private static extern SteamId _CreateUnauthenticatedUserConnection( IntPtr self ); #endregion internal SteamId CreateUnauthenticatedUserConnection() { - #if PLATFORM_WIN - var retVal = default( SteamId ); - _CreateUnauthenticatedUserConnection( Self, ref retVal ); - return retVal; - #else var returnValue = _CreateUnauthenticatedUserConnection( Self ); return returnValue; - #endif } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FSendUserDisconnect( IntPtr self, SteamId steamIDUser ); - private FSendUserDisconnect _SendUserDisconnect; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SendUserDisconnect", CallingConvention = Platform.CC)] + private static extern void _SendUserDisconnect( IntPtr self, SteamId steamIDUser ); #endregion internal void SendUserDisconnect( SteamId steamIDUser ) @@ -438,10 +291,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_BUpdateUserData", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FBUpdateUserData( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPlayerName, uint uScore ); - private FBUpdateUserData _BUpdateUserData; + private static extern bool _BUpdateUserData( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPlayerName, uint uScore ); #endregion internal bool BUpdateUserData( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPlayerName, uint uScore ) @@ -451,9 +303,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate HAuthTicket FGetAuthSessionTicket( IntPtr self, IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket ); - private FGetAuthSessionTicket _GetAuthSessionTicket; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_GetAuthSessionTicket", CallingConvention = Platform.CC)] + private static extern HAuthTicket _GetAuthSessionTicket( IntPtr self, IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket ); #endregion internal HAuthTicket GetAuthSessionTicket( IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket ) @@ -463,9 +314,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate BeginAuthResult FBeginAuthSession( IntPtr self, IntPtr pAuthTicket, int cbAuthTicket, SteamId steamID ); - private FBeginAuthSession _BeginAuthSession; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_BeginAuthSession", CallingConvention = Platform.CC)] + private static extern BeginAuthResult _BeginAuthSession( IntPtr self, IntPtr pAuthTicket, int cbAuthTicket, SteamId steamID ); #endregion internal BeginAuthResult BeginAuthSession( IntPtr pAuthTicket, int cbAuthTicket, SteamId steamID ) @@ -475,9 +325,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FEndAuthSession( IntPtr self, SteamId steamID ); - private FEndAuthSession _EndAuthSession; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_EndAuthSession", CallingConvention = Platform.CC)] + private static extern void _EndAuthSession( IntPtr self, SteamId steamID ); #endregion internal void EndAuthSession( SteamId steamID ) @@ -486,9 +335,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FCancelAuthTicket( IntPtr self, HAuthTicket hAuthTicket ); - private FCancelAuthTicket _CancelAuthTicket; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_CancelAuthTicket", CallingConvention = Platform.CC)] + private static extern void _CancelAuthTicket( IntPtr self, HAuthTicket hAuthTicket ); #endregion internal void CancelAuthTicket( HAuthTicket hAuthTicket ) @@ -497,9 +345,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate UserHasLicenseForAppResult FUserHasLicenseForApp( IntPtr self, SteamId steamID, AppId appID ); - private FUserHasLicenseForApp _UserHasLicenseForApp; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_UserHasLicenseForApp", CallingConvention = Platform.CC)] + private static extern UserHasLicenseForAppResult _UserHasLicenseForApp( IntPtr self, SteamId steamID, AppId appID ); #endregion internal UserHasLicenseForAppResult UserHasLicenseForApp( SteamId steamID, AppId appID ) @@ -509,10 +356,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_RequestUserGroupStatus", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FRequestUserGroupStatus( IntPtr self, SteamId steamIDUser, SteamId steamIDGroup ); - private FRequestUserGroupStatus _RequestUserGroupStatus; + private static extern bool _RequestUserGroupStatus( IntPtr self, SteamId steamIDUser, SteamId steamIDGroup ); #endregion internal bool RequestUserGroupStatus( SteamId steamIDUser, SteamId steamIDGroup ) @@ -522,9 +368,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FGetGameplayStats( IntPtr self ); - private FGetGameplayStats _GetGameplayStats; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_GetGameplayStats", CallingConvention = Platform.CC)] + private static extern void _GetGameplayStats( IntPtr self ); #endregion internal void GetGameplayStats() @@ -533,34 +378,31 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FGetServerReputation( IntPtr self ); - private FGetServerReputation _GetServerReputation; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_GetServerReputation", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _GetServerReputation( IntPtr self ); #endregion - internal async Task GetServerReputation() + internal CallResult GetServerReputation() { var returnValue = _GetServerReputation( Self ); - return await GSReputation_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate uint FGetPublicIP( IntPtr self ); - private FGetPublicIP _GetPublicIP; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_GetPublicIP", CallingConvention = Platform.CC)] + private static extern SteamIPAddress _GetPublicIP( IntPtr self ); #endregion - internal uint GetPublicIP() + internal SteamIPAddress GetPublicIP() { var returnValue = _GetPublicIP( Self ); return returnValue; } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_HandleIncomingPacket", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FHandleIncomingPacket( IntPtr self, IntPtr pData, int cbData, uint srcIP, ushort srcPort ); - private FHandleIncomingPacket _HandleIncomingPacket; + private static extern bool _HandleIncomingPacket( IntPtr self, IntPtr pData, int cbData, uint srcIP, ushort srcPort ); #endregion internal bool HandleIncomingPacket( IntPtr pData, int cbData, uint srcIP, ushort srcPort ) @@ -570,9 +412,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetNextOutgoingPacket( IntPtr self, IntPtr pOut, int cbMaxOut, ref uint pNetAdr, ref ushort pPort ); - private FGetNextOutgoingPacket _GetNextOutgoingPacket; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_GetNextOutgoingPacket", CallingConvention = Platform.CC)] + private static extern int _GetNextOutgoingPacket( IntPtr self, IntPtr pOut, int cbMaxOut, ref uint pNetAdr, ref ushort pPort ); #endregion internal int GetNextOutgoingPacket( IntPtr pOut, int cbMaxOut, ref uint pNetAdr, ref ushort pPort ) @@ -582,9 +423,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FEnableHeartbeats( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bActive ); - private FEnableHeartbeats _EnableHeartbeats; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_EnableHeartbeats", CallingConvention = Platform.CC)] + private static extern void _EnableHeartbeats( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bActive ); #endregion internal void EnableHeartbeats( [MarshalAs( UnmanagedType.U1 )] bool bActive ) @@ -593,9 +433,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FSetHeartbeatInterval( IntPtr self, int iHeartbeatInterval ); - private FSetHeartbeatInterval _SetHeartbeatInterval; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetHeartbeatInterval", CallingConvention = Platform.CC)] + private static extern void _SetHeartbeatInterval( IntPtr self, int iHeartbeatInterval ); #endregion internal void SetHeartbeatInterval( int iHeartbeatInterval ) @@ -604,9 +443,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FForceHeartbeat( IntPtr self ); - private FForceHeartbeat _ForceHeartbeat; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_ForceHeartbeat", CallingConvention = Platform.CC)] + private static extern void _ForceHeartbeat( IntPtr self ); #endregion internal void ForceHeartbeat() @@ -615,27 +453,25 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FAssociateWithClan( IntPtr self, SteamId steamIDClan ); - private FAssociateWithClan _AssociateWithClan; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_AssociateWithClan", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _AssociateWithClan( IntPtr self, SteamId steamIDClan ); #endregion - internal async Task AssociateWithClan( SteamId steamIDClan ) + internal CallResult AssociateWithClan( SteamId steamIDClan ) { var returnValue = _AssociateWithClan( Self, steamIDClan ); - return await AssociateWithClanResult_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FComputeNewPlayerCompatibility( IntPtr self, SteamId steamIDNewPlayer ); - private FComputeNewPlayerCompatibility _ComputeNewPlayerCompatibility; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_ComputeNewPlayerCompatibility", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _ComputeNewPlayerCompatibility( IntPtr self, SteamId steamIDNewPlayer ); #endregion - internal async Task ComputeNewPlayerCompatibility( SteamId steamIDNewPlayer ) + internal CallResult ComputeNewPlayerCompatibility( SteamId steamIDNewPlayer ) { var returnValue = _ComputeNewPlayerCompatibility( Self, steamIDNewPlayer ); - return await ComputeNewPlayerCompatibilityResult_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } } diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamGameServerStats.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamGameServerStats.cs index 108b728..cf2243b 100644 --- a/Facepunch.Steamworks/Generated/Interfaces/ISteamGameServerStats.cs +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamGameServerStats.cs @@ -9,88 +9,56 @@ namespace Steamworks { internal class ISteamGameServerStats : SteamInterface { - public override string InterfaceName => "SteamGameServerStats001"; - public override void InitInternals() + internal ISteamGameServerStats( bool IsGameServer ) { - _RequestUserStats = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) ); - _GetUserAchievement = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) ); - _UpdateUserAvgRateStat = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) ); - _SetUserAchievement = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) ); - _ClearUserAchievement = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) ); - _StoreUserStats = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) ); - - #if PLATFORM_WIN - _GetUserStat1 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) ); - _GetUserStat2 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) ); - _SetUserStat1 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) ); - _SetUserStat2 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) ); - #else - _GetUserStat1 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) ); - _GetUserStat2 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) ); - _SetUserStat1 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) ); - _SetUserStat2 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) ); - #endif - } - internal override void Shutdown() - { - base.Shutdown(); - - _RequestUserStats = null; - _GetUserStat1 = null; - _GetUserStat2 = null; - _GetUserAchievement = null; - _SetUserStat1 = null; - _SetUserStat2 = null; - _UpdateUserAvgRateStat = null; - _SetUserAchievement = null; - _ClearUserAchievement = null; - _StoreUserStats = null; + SetupInterface( IsGameServer ); } + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameServerStats_v001", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamGameServerStats_v001(); + public override IntPtr GetServerInterfacePointer() => SteamAPI_SteamGameServerStats_v001(); + + #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FRequestUserStats( IntPtr self, SteamId steamIDUser ); - private FRequestUserStats _RequestUserStats; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_RequestUserStats", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _RequestUserStats( IntPtr self, SteamId steamIDUser ); #endregion - internal async Task RequestUserStats( SteamId steamIDUser ) + internal CallResult RequestUserStats( SteamId steamIDUser ) { var returnValue = _RequestUserStats( Self, steamIDUser ); - return await GSStatsReceived_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_GetUserStatInt32", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetUserStat1( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData ); - private FGetUserStat1 _GetUserStat1; + private static extern bool _GetUserStat( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData ); #endregion - internal bool GetUserStat1( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData ) + internal bool GetUserStat( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData ) { - var returnValue = _GetUserStat1( Self, steamIDUser, pchName, ref pData ); + var returnValue = _GetUserStat( Self, steamIDUser, pchName, ref pData ); return returnValue; } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_GetUserStatFloat", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetUserStat2( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData ); - private FGetUserStat2 _GetUserStat2; + private static extern bool _GetUserStat( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData ); #endregion - internal bool GetUserStat2( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData ) + internal bool GetUserStat( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData ) { - var returnValue = _GetUserStat2( Self, steamIDUser, pchName, ref pData ); + var returnValue = _GetUserStat( Self, steamIDUser, pchName, ref pData ); return returnValue; } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_GetUserAchievement", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved ); - private FGetUserAchievement _GetUserAchievement; + private static extern bool _GetUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved ); #endregion internal bool GetUserAchievement( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved ) @@ -100,36 +68,33 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_SetUserStatInt32", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetUserStat1( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData ); - private FSetUserStat1 _SetUserStat1; + private static extern bool _SetUserStat( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData ); #endregion - internal bool SetUserStat1( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData ) + internal bool SetUserStat( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData ) { - var returnValue = _SetUserStat1( Self, steamIDUser, pchName, nData ); + var returnValue = _SetUserStat( Self, steamIDUser, pchName, nData ); return returnValue; } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_SetUserStatFloat", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetUserStat2( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData ); - private FSetUserStat2 _SetUserStat2; + private static extern bool _SetUserStat( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData ); #endregion - internal bool SetUserStat2( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData ) + internal bool SetUserStat( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData ) { - var returnValue = _SetUserStat2( Self, steamIDUser, pchName, fData ); + var returnValue = _SetUserStat( Self, steamIDUser, pchName, fData ); return returnValue; } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_UpdateUserAvgRateStat", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FUpdateUserAvgRateStat( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float flCountThisSession, double dSessionLength ); - private FUpdateUserAvgRateStat _UpdateUserAvgRateStat; + private static extern bool _UpdateUserAvgRateStat( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float flCountThisSession, double dSessionLength ); #endregion internal bool UpdateUserAvgRateStat( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float flCountThisSession, double dSessionLength ) @@ -139,10 +104,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_SetUserAchievement", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName ); - private FSetUserAchievement _SetUserAchievement; + private static extern bool _SetUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName ); #endregion internal bool SetUserAchievement( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName ) @@ -152,10 +116,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_ClearUserAchievement", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FClearUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName ); - private FClearUserAchievement _ClearUserAchievement; + private static extern bool _ClearUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName ); #endregion internal bool ClearUserAchievement( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName ) @@ -165,15 +128,14 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FStoreUserStats( IntPtr self, SteamId steamIDUser ); - private FStoreUserStats _StoreUserStats; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_StoreUserStats", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _StoreUserStats( IntPtr self, SteamId steamIDUser ); #endregion - internal async Task StoreUserStats( SteamId steamIDUser ) + internal CallResult StoreUserStats( SteamId steamIDUser ) { var returnValue = _StoreUserStats( Self, steamIDUser ); - return await GSStatsStored_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } } diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamHTMLSurface.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamHTMLSurface.cs new file mode 100644 index 0000000..69aef3a --- /dev/null +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamHTMLSurface.cs @@ -0,0 +1,399 @@ +using System; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; +using Steamworks.Data; + + +namespace Steamworks +{ + internal class ISteamHTMLSurface : SteamInterface + { + + internal ISteamHTMLSurface( bool IsGameServer ) + { + SetupInterface( IsGameServer ); + } + + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamHTMLSurface_v005", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamHTMLSurface_v005(); + public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamHTMLSurface_v005(); + + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_Init", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _Init( IntPtr self ); + + #endregion + internal bool Init() + { + var returnValue = _Init( Self ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_Shutdown", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _Shutdown( IntPtr self ); + + #endregion + internal bool Shutdown() + { + var returnValue = _Shutdown( Self ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_CreateBrowser", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _CreateBrowser( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchUserAgent, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchUserCSS ); + + #endregion + internal CallResult CreateBrowser( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchUserAgent, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchUserCSS ) + { + var returnValue = _CreateBrowser( Self, pchUserAgent, pchUserCSS ); + return new CallResult( returnValue ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_RemoveBrowser", CallingConvention = Platform.CC)] + private static extern void _RemoveBrowser( IntPtr self, HHTMLBrowser unBrowserHandle ); + + #endregion + internal void RemoveBrowser( HHTMLBrowser unBrowserHandle ) + { + _RemoveBrowser( Self, unBrowserHandle ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_LoadURL", CallingConvention = Platform.CC)] + private static extern void _LoadURL( IntPtr self, HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchURL, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPostData ); + + #endregion + internal void LoadURL( HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchURL, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPostData ) + { + _LoadURL( Self, unBrowserHandle, pchURL, pchPostData ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_SetSize", CallingConvention = Platform.CC)] + private static extern void _SetSize( IntPtr self, HHTMLBrowser unBrowserHandle, uint unWidth, uint unHeight ); + + #endregion + internal void SetSize( HHTMLBrowser unBrowserHandle, uint unWidth, uint unHeight ) + { + _SetSize( Self, unBrowserHandle, unWidth, unHeight ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_StopLoad", CallingConvention = Platform.CC)] + private static extern void _StopLoad( IntPtr self, HHTMLBrowser unBrowserHandle ); + + #endregion + internal void StopLoad( HHTMLBrowser unBrowserHandle ) + { + _StopLoad( Self, unBrowserHandle ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_Reload", CallingConvention = Platform.CC)] + private static extern void _Reload( IntPtr self, HHTMLBrowser unBrowserHandle ); + + #endregion + internal void Reload( HHTMLBrowser unBrowserHandle ) + { + _Reload( Self, unBrowserHandle ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_GoBack", CallingConvention = Platform.CC)] + private static extern void _GoBack( IntPtr self, HHTMLBrowser unBrowserHandle ); + + #endregion + internal void GoBack( HHTMLBrowser unBrowserHandle ) + { + _GoBack( Self, unBrowserHandle ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_GoForward", CallingConvention = Platform.CC)] + private static extern void _GoForward( IntPtr self, HHTMLBrowser unBrowserHandle ); + + #endregion + internal void GoForward( HHTMLBrowser unBrowserHandle ) + { + _GoForward( Self, unBrowserHandle ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_AddHeader", CallingConvention = Platform.CC)] + private static extern void _AddHeader( IntPtr self, HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue ); + + #endregion + internal void AddHeader( HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue ) + { + _AddHeader( Self, unBrowserHandle, pchKey, pchValue ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_ExecuteJavascript", CallingConvention = Platform.CC)] + private static extern void _ExecuteJavascript( IntPtr self, HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchScript ); + + #endregion + internal void ExecuteJavascript( HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchScript ) + { + _ExecuteJavascript( Self, unBrowserHandle, pchScript ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_MouseUp", CallingConvention = Platform.CC)] + private static extern void _MouseUp( IntPtr self, HHTMLBrowser unBrowserHandle, IntPtr eMouseButton ); + + #endregion + internal void MouseUp( HHTMLBrowser unBrowserHandle, IntPtr eMouseButton ) + { + _MouseUp( Self, unBrowserHandle, eMouseButton ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_MouseDown", CallingConvention = Platform.CC)] + private static extern void _MouseDown( IntPtr self, HHTMLBrowser unBrowserHandle, IntPtr eMouseButton ); + + #endregion + internal void MouseDown( HHTMLBrowser unBrowserHandle, IntPtr eMouseButton ) + { + _MouseDown( Self, unBrowserHandle, eMouseButton ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_MouseDoubleClick", CallingConvention = Platform.CC)] + private static extern void _MouseDoubleClick( IntPtr self, HHTMLBrowser unBrowserHandle, IntPtr eMouseButton ); + + #endregion + internal void MouseDoubleClick( HHTMLBrowser unBrowserHandle, IntPtr eMouseButton ) + { + _MouseDoubleClick( Self, unBrowserHandle, eMouseButton ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_MouseMove", CallingConvention = Platform.CC)] + private static extern void _MouseMove( IntPtr self, HHTMLBrowser unBrowserHandle, int x, int y ); + + #endregion + internal void MouseMove( HHTMLBrowser unBrowserHandle, int x, int y ) + { + _MouseMove( Self, unBrowserHandle, x, y ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_MouseWheel", CallingConvention = Platform.CC)] + private static extern void _MouseWheel( IntPtr self, HHTMLBrowser unBrowserHandle, int nDelta ); + + #endregion + internal void MouseWheel( HHTMLBrowser unBrowserHandle, int nDelta ) + { + _MouseWheel( Self, unBrowserHandle, nDelta ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_KeyDown", CallingConvention = Platform.CC)] + private static extern void _KeyDown( IntPtr self, HHTMLBrowser unBrowserHandle, uint nNativeKeyCode, IntPtr eHTMLKeyModifiers, [MarshalAs( UnmanagedType.U1 )] bool bIsSystemKey ); + + #endregion + internal void KeyDown( HHTMLBrowser unBrowserHandle, uint nNativeKeyCode, IntPtr eHTMLKeyModifiers, [MarshalAs( UnmanagedType.U1 )] bool bIsSystemKey ) + { + _KeyDown( Self, unBrowserHandle, nNativeKeyCode, eHTMLKeyModifiers, bIsSystemKey ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_KeyUp", CallingConvention = Platform.CC)] + private static extern void _KeyUp( IntPtr self, HHTMLBrowser unBrowserHandle, uint nNativeKeyCode, IntPtr eHTMLKeyModifiers ); + + #endregion + internal void KeyUp( HHTMLBrowser unBrowserHandle, uint nNativeKeyCode, IntPtr eHTMLKeyModifiers ) + { + _KeyUp( Self, unBrowserHandle, nNativeKeyCode, eHTMLKeyModifiers ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_KeyChar", CallingConvention = Platform.CC)] + private static extern void _KeyChar( IntPtr self, HHTMLBrowser unBrowserHandle, uint cUnicodeChar, IntPtr eHTMLKeyModifiers ); + + #endregion + internal void KeyChar( HHTMLBrowser unBrowserHandle, uint cUnicodeChar, IntPtr eHTMLKeyModifiers ) + { + _KeyChar( Self, unBrowserHandle, cUnicodeChar, eHTMLKeyModifiers ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_SetHorizontalScroll", CallingConvention = Platform.CC)] + private static extern void _SetHorizontalScroll( IntPtr self, HHTMLBrowser unBrowserHandle, uint nAbsolutePixelScroll ); + + #endregion + internal void SetHorizontalScroll( HHTMLBrowser unBrowserHandle, uint nAbsolutePixelScroll ) + { + _SetHorizontalScroll( Self, unBrowserHandle, nAbsolutePixelScroll ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_SetVerticalScroll", CallingConvention = Platform.CC)] + private static extern void _SetVerticalScroll( IntPtr self, HHTMLBrowser unBrowserHandle, uint nAbsolutePixelScroll ); + + #endregion + internal void SetVerticalScroll( HHTMLBrowser unBrowserHandle, uint nAbsolutePixelScroll ) + { + _SetVerticalScroll( Self, unBrowserHandle, nAbsolutePixelScroll ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_SetKeyFocus", CallingConvention = Platform.CC)] + private static extern void _SetKeyFocus( IntPtr self, HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.U1 )] bool bHasKeyFocus ); + + #endregion + internal void SetKeyFocus( HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.U1 )] bool bHasKeyFocus ) + { + _SetKeyFocus( Self, unBrowserHandle, bHasKeyFocus ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_ViewSource", CallingConvention = Platform.CC)] + private static extern void _ViewSource( IntPtr self, HHTMLBrowser unBrowserHandle ); + + #endregion + internal void ViewSource( HHTMLBrowser unBrowserHandle ) + { + _ViewSource( Self, unBrowserHandle ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_CopyToClipboard", CallingConvention = Platform.CC)] + private static extern void _CopyToClipboard( IntPtr self, HHTMLBrowser unBrowserHandle ); + + #endregion + internal void CopyToClipboard( HHTMLBrowser unBrowserHandle ) + { + _CopyToClipboard( Self, unBrowserHandle ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_PasteFromClipboard", CallingConvention = Platform.CC)] + private static extern void _PasteFromClipboard( IntPtr self, HHTMLBrowser unBrowserHandle ); + + #endregion + internal void PasteFromClipboard( HHTMLBrowser unBrowserHandle ) + { + _PasteFromClipboard( Self, unBrowserHandle ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_Find", CallingConvention = Platform.CC)] + private static extern void _Find( IntPtr self, HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchSearchStr, [MarshalAs( UnmanagedType.U1 )] bool bCurrentlyInFind, [MarshalAs( UnmanagedType.U1 )] bool bReverse ); + + #endregion + internal void Find( HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchSearchStr, [MarshalAs( UnmanagedType.U1 )] bool bCurrentlyInFind, [MarshalAs( UnmanagedType.U1 )] bool bReverse ) + { + _Find( Self, unBrowserHandle, pchSearchStr, bCurrentlyInFind, bReverse ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_StopFind", CallingConvention = Platform.CC)] + private static extern void _StopFind( IntPtr self, HHTMLBrowser unBrowserHandle ); + + #endregion + internal void StopFind( HHTMLBrowser unBrowserHandle ) + { + _StopFind( Self, unBrowserHandle ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_GetLinkAtPosition", CallingConvention = Platform.CC)] + private static extern void _GetLinkAtPosition( IntPtr self, HHTMLBrowser unBrowserHandle, int x, int y ); + + #endregion + internal void GetLinkAtPosition( HHTMLBrowser unBrowserHandle, int x, int y ) + { + _GetLinkAtPosition( Self, unBrowserHandle, x, y ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_SetCookie", CallingConvention = Platform.CC)] + private static extern void _SetCookie( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHostname, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPath, RTime32 nExpires, [MarshalAs( UnmanagedType.U1 )] bool bSecure, [MarshalAs( UnmanagedType.U1 )] bool bHTTPOnly ); + + #endregion + internal void SetCookie( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHostname, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPath, RTime32 nExpires, [MarshalAs( UnmanagedType.U1 )] bool bSecure, [MarshalAs( UnmanagedType.U1 )] bool bHTTPOnly ) + { + _SetCookie( Self, pchHostname, pchKey, pchValue, pchPath, nExpires, bSecure, bHTTPOnly ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_SetPageScaleFactor", CallingConvention = Platform.CC)] + private static extern void _SetPageScaleFactor( IntPtr self, HHTMLBrowser unBrowserHandle, float flZoom, int nPointX, int nPointY ); + + #endregion + internal void SetPageScaleFactor( HHTMLBrowser unBrowserHandle, float flZoom, int nPointX, int nPointY ) + { + _SetPageScaleFactor( Self, unBrowserHandle, flZoom, nPointX, nPointY ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_SetBackgroundMode", CallingConvention = Platform.CC)] + private static extern void _SetBackgroundMode( IntPtr self, HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.U1 )] bool bBackgroundMode ); + + #endregion + internal void SetBackgroundMode( HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.U1 )] bool bBackgroundMode ) + { + _SetBackgroundMode( Self, unBrowserHandle, bBackgroundMode ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_SetDPIScalingFactor", CallingConvention = Platform.CC)] + private static extern void _SetDPIScalingFactor( IntPtr self, HHTMLBrowser unBrowserHandle, float flDPIScaling ); + + #endregion + internal void SetDPIScalingFactor( HHTMLBrowser unBrowserHandle, float flDPIScaling ) + { + _SetDPIScalingFactor( Self, unBrowserHandle, flDPIScaling ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_OpenDeveloperTools", CallingConvention = Platform.CC)] + private static extern void _OpenDeveloperTools( IntPtr self, HHTMLBrowser unBrowserHandle ); + + #endregion + internal void OpenDeveloperTools( HHTMLBrowser unBrowserHandle ) + { + _OpenDeveloperTools( Self, unBrowserHandle ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_AllowStartRequest", CallingConvention = Platform.CC)] + private static extern void _AllowStartRequest( IntPtr self, HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.U1 )] bool bAllowed ); + + #endregion + internal void AllowStartRequest( HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.U1 )] bool bAllowed ) + { + _AllowStartRequest( Self, unBrowserHandle, bAllowed ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_JSDialogResponse", CallingConvention = Platform.CC)] + private static extern void _JSDialogResponse( IntPtr self, HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.U1 )] bool bResult ); + + #endregion + internal void JSDialogResponse( HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.U1 )] bool bResult ) + { + _JSDialogResponse( Self, unBrowserHandle, bResult ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_FileLoadDialogResponse", CallingConvention = Platform.CC)] + private static extern void _FileLoadDialogResponse( IntPtr self, HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchSelectedFiles ); + + #endregion + internal void FileLoadDialogResponse( HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchSelectedFiles ) + { + _FileLoadDialogResponse( Self, unBrowserHandle, pchSelectedFiles ); + } + + } +} diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamHTTP.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamHTTP.cs new file mode 100644 index 0000000..3d1d7b1 --- /dev/null +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamHTTP.cs @@ -0,0 +1,325 @@ +using System; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; +using Steamworks.Data; + + +namespace Steamworks +{ + internal class ISteamHTTP : SteamInterface + { + + internal ISteamHTTP( bool IsGameServer ) + { + SetupInterface( IsGameServer ); + } + + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamHTTP_v003", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamHTTP_v003(); + public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamHTTP_v003(); + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameServerHTTP_v003", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamGameServerHTTP_v003(); + public override IntPtr GetServerInterfacePointer() => SteamAPI_SteamGameServerHTTP_v003(); + + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_CreateHTTPRequest", CallingConvention = Platform.CC)] + private static extern HTTPRequestHandle _CreateHTTPRequest( IntPtr self, HTTPMethod eHTTPRequestMethod, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchAbsoluteURL ); + + #endregion + internal HTTPRequestHandle CreateHTTPRequest( HTTPMethod eHTTPRequestMethod, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchAbsoluteURL ) + { + var returnValue = _CreateHTTPRequest( Self, eHTTPRequestMethod, pchAbsoluteURL ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestContextValue", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _SetHTTPRequestContextValue( IntPtr self, HTTPRequestHandle hRequest, ulong ulContextValue ); + + #endregion + internal bool SetHTTPRequestContextValue( HTTPRequestHandle hRequest, ulong ulContextValue ) + { + var returnValue = _SetHTTPRequestContextValue( Self, hRequest, ulContextValue ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestNetworkActivityTimeout", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _SetHTTPRequestNetworkActivityTimeout( IntPtr self, HTTPRequestHandle hRequest, uint unTimeoutSeconds ); + + #endregion + internal bool SetHTTPRequestNetworkActivityTimeout( HTTPRequestHandle hRequest, uint unTimeoutSeconds ) + { + var returnValue = _SetHTTPRequestNetworkActivityTimeout( Self, hRequest, unTimeoutSeconds ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestHeaderValue", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _SetHTTPRequestHeaderValue( IntPtr self, HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHeaderName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHeaderValue ); + + #endregion + internal bool SetHTTPRequestHeaderValue( HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHeaderName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHeaderValue ) + { + var returnValue = _SetHTTPRequestHeaderValue( Self, hRequest, pchHeaderName, pchHeaderValue ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestGetOrPostParameter", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _SetHTTPRequestGetOrPostParameter( IntPtr self, HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchParamName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchParamValue ); + + #endregion + internal bool SetHTTPRequestGetOrPostParameter( HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchParamName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchParamValue ) + { + var returnValue = _SetHTTPRequestGetOrPostParameter( Self, hRequest, pchParamName, pchParamValue ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SendHTTPRequest", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _SendHTTPRequest( IntPtr self, HTTPRequestHandle hRequest, ref SteamAPICall_t pCallHandle ); + + #endregion + internal bool SendHTTPRequest( HTTPRequestHandle hRequest, ref SteamAPICall_t pCallHandle ) + { + var returnValue = _SendHTTPRequest( Self, hRequest, ref pCallHandle ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SendHTTPRequestAndStreamResponse", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _SendHTTPRequestAndStreamResponse( IntPtr self, HTTPRequestHandle hRequest, ref SteamAPICall_t pCallHandle ); + + #endregion + internal bool SendHTTPRequestAndStreamResponse( HTTPRequestHandle hRequest, ref SteamAPICall_t pCallHandle ) + { + var returnValue = _SendHTTPRequestAndStreamResponse( Self, hRequest, ref pCallHandle ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_DeferHTTPRequest", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _DeferHTTPRequest( IntPtr self, HTTPRequestHandle hRequest ); + + #endregion + internal bool DeferHTTPRequest( HTTPRequestHandle hRequest ) + { + var returnValue = _DeferHTTPRequest( Self, hRequest ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_PrioritizeHTTPRequest", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _PrioritizeHTTPRequest( IntPtr self, HTTPRequestHandle hRequest ); + + #endregion + internal bool PrioritizeHTTPRequest( HTTPRequestHandle hRequest ) + { + var returnValue = _PrioritizeHTTPRequest( Self, hRequest ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_GetHTTPResponseHeaderSize", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _GetHTTPResponseHeaderSize( IntPtr self, HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHeaderName, ref uint unResponseHeaderSize ); + + #endregion + internal bool GetHTTPResponseHeaderSize( HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHeaderName, ref uint unResponseHeaderSize ) + { + var returnValue = _GetHTTPResponseHeaderSize( Self, hRequest, pchHeaderName, ref unResponseHeaderSize ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_GetHTTPResponseHeaderValue", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _GetHTTPResponseHeaderValue( IntPtr self, HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHeaderName, ref byte pHeaderValueBuffer, uint unBufferSize ); + + #endregion + internal bool GetHTTPResponseHeaderValue( HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHeaderName, ref byte pHeaderValueBuffer, uint unBufferSize ) + { + var returnValue = _GetHTTPResponseHeaderValue( Self, hRequest, pchHeaderName, ref pHeaderValueBuffer, unBufferSize ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_GetHTTPResponseBodySize", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _GetHTTPResponseBodySize( IntPtr self, HTTPRequestHandle hRequest, ref uint unBodySize ); + + #endregion + internal bool GetHTTPResponseBodySize( HTTPRequestHandle hRequest, ref uint unBodySize ) + { + var returnValue = _GetHTTPResponseBodySize( Self, hRequest, ref unBodySize ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_GetHTTPResponseBodyData", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _GetHTTPResponseBodyData( IntPtr self, HTTPRequestHandle hRequest, ref byte pBodyDataBuffer, uint unBufferSize ); + + #endregion + internal bool GetHTTPResponseBodyData( HTTPRequestHandle hRequest, ref byte pBodyDataBuffer, uint unBufferSize ) + { + var returnValue = _GetHTTPResponseBodyData( Self, hRequest, ref pBodyDataBuffer, unBufferSize ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_GetHTTPStreamingResponseBodyData", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _GetHTTPStreamingResponseBodyData( IntPtr self, HTTPRequestHandle hRequest, uint cOffset, ref byte pBodyDataBuffer, uint unBufferSize ); + + #endregion + internal bool GetHTTPStreamingResponseBodyData( HTTPRequestHandle hRequest, uint cOffset, ref byte pBodyDataBuffer, uint unBufferSize ) + { + var returnValue = _GetHTTPStreamingResponseBodyData( Self, hRequest, cOffset, ref pBodyDataBuffer, unBufferSize ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_ReleaseHTTPRequest", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _ReleaseHTTPRequest( IntPtr self, HTTPRequestHandle hRequest ); + + #endregion + internal bool ReleaseHTTPRequest( HTTPRequestHandle hRequest ) + { + var returnValue = _ReleaseHTTPRequest( Self, hRequest ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_GetHTTPDownloadProgressPct", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _GetHTTPDownloadProgressPct( IntPtr self, HTTPRequestHandle hRequest, ref float pflPercentOut ); + + #endregion + internal bool GetHTTPDownloadProgressPct( HTTPRequestHandle hRequest, ref float pflPercentOut ) + { + var returnValue = _GetHTTPDownloadProgressPct( Self, hRequest, ref pflPercentOut ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestRawPostBody", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _SetHTTPRequestRawPostBody( IntPtr self, HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchContentType, [In,Out] byte[] pubBody, uint unBodyLen ); + + #endregion + internal bool SetHTTPRequestRawPostBody( HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchContentType, [In,Out] byte[] pubBody, uint unBodyLen ) + { + var returnValue = _SetHTTPRequestRawPostBody( Self, hRequest, pchContentType, pubBody, unBodyLen ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_CreateCookieContainer", CallingConvention = Platform.CC)] + private static extern HTTPCookieContainerHandle _CreateCookieContainer( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bAllowResponsesToModify ); + + #endregion + internal HTTPCookieContainerHandle CreateCookieContainer( [MarshalAs( UnmanagedType.U1 )] bool bAllowResponsesToModify ) + { + var returnValue = _CreateCookieContainer( Self, bAllowResponsesToModify ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_ReleaseCookieContainer", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _ReleaseCookieContainer( IntPtr self, HTTPCookieContainerHandle hCookieContainer ); + + #endregion + internal bool ReleaseCookieContainer( HTTPCookieContainerHandle hCookieContainer ) + { + var returnValue = _ReleaseCookieContainer( Self, hCookieContainer ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetCookie", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _SetCookie( IntPtr self, HTTPCookieContainerHandle hCookieContainer, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHost, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchUrl, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchCookie ); + + #endregion + internal bool SetCookie( HTTPCookieContainerHandle hCookieContainer, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHost, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchUrl, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchCookie ) + { + var returnValue = _SetCookie( Self, hCookieContainer, pchHost, pchUrl, pchCookie ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestCookieContainer", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _SetHTTPRequestCookieContainer( IntPtr self, HTTPRequestHandle hRequest, HTTPCookieContainerHandle hCookieContainer ); + + #endregion + internal bool SetHTTPRequestCookieContainer( HTTPRequestHandle hRequest, HTTPCookieContainerHandle hCookieContainer ) + { + var returnValue = _SetHTTPRequestCookieContainer( Self, hRequest, hCookieContainer ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestUserAgentInfo", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _SetHTTPRequestUserAgentInfo( IntPtr self, HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchUserAgentInfo ); + + #endregion + internal bool SetHTTPRequestUserAgentInfo( HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchUserAgentInfo ) + { + var returnValue = _SetHTTPRequestUserAgentInfo( Self, hRequest, pchUserAgentInfo ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestRequiresVerifiedCertificate", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _SetHTTPRequestRequiresVerifiedCertificate( IntPtr self, HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.U1 )] bool bRequireVerifiedCertificate ); + + #endregion + internal bool SetHTTPRequestRequiresVerifiedCertificate( HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.U1 )] bool bRequireVerifiedCertificate ) + { + var returnValue = _SetHTTPRequestRequiresVerifiedCertificate( Self, hRequest, bRequireVerifiedCertificate ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestAbsoluteTimeoutMS", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _SetHTTPRequestAbsoluteTimeoutMS( IntPtr self, HTTPRequestHandle hRequest, uint unMilliseconds ); + + #endregion + internal bool SetHTTPRequestAbsoluteTimeoutMS( HTTPRequestHandle hRequest, uint unMilliseconds ) + { + var returnValue = _SetHTTPRequestAbsoluteTimeoutMS( Self, hRequest, unMilliseconds ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_GetHTTPRequestWasTimedOut", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _GetHTTPRequestWasTimedOut( IntPtr self, HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.U1 )] ref bool pbWasTimedOut ); + + #endregion + internal bool GetHTTPRequestWasTimedOut( HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.U1 )] ref bool pbWasTimedOut ) + { + var returnValue = _GetHTTPRequestWasTimedOut( Self, hRequest, ref pbWasTimedOut ); + return returnValue; + } + + } +} diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamInput.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamInput.cs index 3f68640..5a1efd8 100644 --- a/Facepunch.Steamworks/Generated/Interfaces/ISteamInput.cs +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamInput.cs @@ -9,113 +9,44 @@ namespace Steamworks { internal class ISteamInput : SteamInterface { - public override string InterfaceName => "SteamInput001"; - public override void InitInternals() + internal ISteamInput( bool IsGameServer ) { - _DoInit = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) ); - _DoShutdown = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) ); - _RunFrame = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) ); - _GetConnectedControllers = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) ); - _GetActionSetHandle = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) ); - _ActivateActionSet = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) ); - _GetCurrentActionSet = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) ); - _ActivateActionSetLayer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) ); - _DeactivateActionSetLayer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) ); - _DeactivateAllActionSetLayers = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) ); - _GetActiveActionSetLayers = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) ); - _GetDigitalActionHandle = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) ); - _GetDigitalActionData = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) ); - _GetDigitalActionOrigins = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) ); - _GetAnalogActionHandle = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) ); - _GetAnalogActionData = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) ); - _GetAnalogActionOrigins = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) ); - _GetGlyphForActionOrigin = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) ); - _GetStringForActionOrigin = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) ); - _StopAnalogActionMomentum = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) ); - _GetMotionData = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) ); - _TriggerVibration = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 168 ) ) ); - _SetLEDColor = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 176 ) ) ); - _TriggerHapticPulse = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 184 ) ) ); - _TriggerRepeatedHapticPulse = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 192 ) ) ); - _ShowBindingPanel = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 200 ) ) ); - _GetInputTypeForHandle = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 208 ) ) ); - _GetControllerForGamepadIndex = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 216 ) ) ); - _GetGamepadIndexForController = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 224 ) ) ); - _GetStringForXboxOrigin = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 232 ) ) ); - _GetGlyphForXboxOrigin = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 240 ) ) ); - _GetActionOriginFromXboxOrigin = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 248 ) ) ); - _TranslateActionOrigin = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 256 ) ) ); - } - internal override void Shutdown() - { - base.Shutdown(); - - _DoInit = null; - _DoShutdown = null; - _RunFrame = null; - _GetConnectedControllers = null; - _GetActionSetHandle = null; - _ActivateActionSet = null; - _GetCurrentActionSet = null; - _ActivateActionSetLayer = null; - _DeactivateActionSetLayer = null; - _DeactivateAllActionSetLayers = null; - _GetActiveActionSetLayers = null; - _GetDigitalActionHandle = null; - _GetDigitalActionData = null; - _GetDigitalActionOrigins = null; - _GetAnalogActionHandle = null; - _GetAnalogActionData = null; - _GetAnalogActionOrigins = null; - _GetGlyphForActionOrigin = null; - _GetStringForActionOrigin = null; - _StopAnalogActionMomentum = null; - _GetMotionData = null; - _TriggerVibration = null; - _SetLEDColor = null; - _TriggerHapticPulse = null; - _TriggerRepeatedHapticPulse = null; - _ShowBindingPanel = null; - _GetInputTypeForHandle = null; - _GetControllerForGamepadIndex = null; - _GetGamepadIndexForController = null; - _GetStringForXboxOrigin = null; - _GetGlyphForXboxOrigin = null; - _GetActionOriginFromXboxOrigin = null; - _TranslateActionOrigin = null; + SetupInterface( IsGameServer ); } + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamInput_v001", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamInput_v001(); + public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamInput_v001(); + + #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_Init", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FDoInit( IntPtr self ); - private FDoInit _DoInit; + private static extern bool _Init( IntPtr self ); #endregion - internal bool DoInit() + internal bool Init() { - var returnValue = _DoInit( Self ); + var returnValue = _Init( Self ); return returnValue; } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_Shutdown", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FDoShutdown( IntPtr self ); - private FDoShutdown _DoShutdown; + private static extern bool _Shutdown( IntPtr self ); #endregion - internal bool DoShutdown() + internal bool Shutdown() { - var returnValue = _DoShutdown( Self ); + var returnValue = _Shutdown( Self ); return returnValue; } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FRunFrame( IntPtr self ); - private FRunFrame _RunFrame; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_RunFrame", CallingConvention = Platform.CC)] + private static extern void _RunFrame( IntPtr self ); #endregion internal void RunFrame() @@ -124,9 +55,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetConnectedControllers( IntPtr self, [In,Out] InputHandle_t[] handlesOut ); - private FGetConnectedControllers _GetConnectedControllers; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetConnectedControllers", CallingConvention = Platform.CC)] + private static extern int _GetConnectedControllers( IntPtr self, [In,Out] InputHandle_t[] handlesOut ); #endregion internal int GetConnectedControllers( [In,Out] InputHandle_t[] handlesOut ) @@ -136,9 +66,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate InputActionSetHandle_t FGetActionSetHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionSetName ); - private FGetActionSetHandle _GetActionSetHandle; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetActionSetHandle", CallingConvention = Platform.CC)] + private static extern InputActionSetHandle_t _GetActionSetHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionSetName ); #endregion internal InputActionSetHandle_t GetActionSetHandle( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionSetName ) @@ -148,9 +77,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FActivateActionSet( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle ); - private FActivateActionSet _ActivateActionSet; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_ActivateActionSet", CallingConvention = Platform.CC)] + private static extern void _ActivateActionSet( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle ); #endregion internal void ActivateActionSet( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle ) @@ -159,9 +87,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate InputActionSetHandle_t FGetCurrentActionSet( IntPtr self, InputHandle_t inputHandle ); - private FGetCurrentActionSet _GetCurrentActionSet; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetCurrentActionSet", CallingConvention = Platform.CC)] + private static extern InputActionSetHandle_t _GetCurrentActionSet( IntPtr self, InputHandle_t inputHandle ); #endregion internal InputActionSetHandle_t GetCurrentActionSet( InputHandle_t inputHandle ) @@ -171,9 +98,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FActivateActionSetLayer( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle ); - private FActivateActionSetLayer _ActivateActionSetLayer; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_ActivateActionSetLayer", CallingConvention = Platform.CC)] + private static extern void _ActivateActionSetLayer( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle ); #endregion internal void ActivateActionSetLayer( InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle ) @@ -182,9 +108,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FDeactivateActionSetLayer( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle ); - private FDeactivateActionSetLayer _DeactivateActionSetLayer; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_DeactivateActionSetLayer", CallingConvention = Platform.CC)] + private static extern void _DeactivateActionSetLayer( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle ); #endregion internal void DeactivateActionSetLayer( InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle ) @@ -193,9 +118,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FDeactivateAllActionSetLayers( IntPtr self, InputHandle_t inputHandle ); - private FDeactivateAllActionSetLayers _DeactivateAllActionSetLayers; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_DeactivateAllActionSetLayers", CallingConvention = Platform.CC)] + private static extern void _DeactivateAllActionSetLayers( IntPtr self, InputHandle_t inputHandle ); #endregion internal void DeactivateAllActionSetLayers( InputHandle_t inputHandle ) @@ -204,9 +128,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetActiveActionSetLayers( IntPtr self, InputHandle_t inputHandle, [In,Out] InputActionSetHandle_t[] handlesOut ); - private FGetActiveActionSetLayers _GetActiveActionSetLayers; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetActiveActionSetLayers", CallingConvention = Platform.CC)] + private static extern int _GetActiveActionSetLayers( IntPtr self, InputHandle_t inputHandle, [In,Out] InputActionSetHandle_t[] handlesOut ); #endregion internal int GetActiveActionSetLayers( InputHandle_t inputHandle, [In,Out] InputActionSetHandle_t[] handlesOut ) @@ -216,9 +139,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate InputDigitalActionHandle_t FGetDigitalActionHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName ); - private FGetDigitalActionHandle _GetDigitalActionHandle; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetDigitalActionHandle", CallingConvention = Platform.CC)] + private static extern InputDigitalActionHandle_t _GetDigitalActionHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName ); #endregion internal InputDigitalActionHandle_t GetDigitalActionHandle( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName ) @@ -228,31 +150,19 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - #if PLATFORM_WIN - private delegate void FGetDigitalActionData( IntPtr self, ref DigitalState retVal, InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle ); - #else - private delegate DigitalState FGetDigitalActionData( IntPtr self, InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle ); - #endif - private FGetDigitalActionData _GetDigitalActionData; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetDigitalActionData", CallingConvention = Platform.CC)] + private static extern DigitalState _GetDigitalActionData( IntPtr self, InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle ); #endregion internal DigitalState GetDigitalActionData( InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle ) { - #if PLATFORM_WIN - var retVal = default( DigitalState ); - _GetDigitalActionData( Self, ref retVal, inputHandle, digitalActionHandle ); - return retVal; - #else var returnValue = _GetDigitalActionData( Self, inputHandle, digitalActionHandle ); return returnValue; - #endif } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetDigitalActionOrigins( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputDigitalActionHandle_t digitalActionHandle, ref InputActionOrigin originsOut ); - private FGetDigitalActionOrigins _GetDigitalActionOrigins; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetDigitalActionOrigins", CallingConvention = Platform.CC)] + private static extern int _GetDigitalActionOrigins( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputDigitalActionHandle_t digitalActionHandle, ref InputActionOrigin originsOut ); #endregion internal int GetDigitalActionOrigins( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputDigitalActionHandle_t digitalActionHandle, ref InputActionOrigin originsOut ) @@ -262,9 +172,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate InputAnalogActionHandle_t FGetAnalogActionHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName ); - private FGetAnalogActionHandle _GetAnalogActionHandle; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetAnalogActionHandle", CallingConvention = Platform.CC)] + private static extern InputAnalogActionHandle_t _GetAnalogActionHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName ); #endregion internal InputAnalogActionHandle_t GetAnalogActionHandle( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName ) @@ -274,31 +183,19 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - #if PLATFORM_WIN - private delegate void FGetAnalogActionData( IntPtr self, ref AnalogState retVal, InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle ); - #else - private delegate AnalogState FGetAnalogActionData( IntPtr self, InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle ); - #endif - private FGetAnalogActionData _GetAnalogActionData; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetAnalogActionData", CallingConvention = Platform.CC)] + private static extern AnalogState _GetAnalogActionData( IntPtr self, InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle ); #endregion internal AnalogState GetAnalogActionData( InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle ) { - #if PLATFORM_WIN - var retVal = default( AnalogState ); - _GetAnalogActionData( Self, ref retVal, inputHandle, analogActionHandle ); - return retVal; - #else var returnValue = _GetAnalogActionData( Self, inputHandle, analogActionHandle ); return returnValue; - #endif } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetAnalogActionOrigins( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputAnalogActionHandle_t analogActionHandle, ref InputActionOrigin originsOut ); - private FGetAnalogActionOrigins _GetAnalogActionOrigins; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetAnalogActionOrigins", CallingConvention = Platform.CC)] + private static extern int _GetAnalogActionOrigins( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputAnalogActionHandle_t analogActionHandle, ref InputActionOrigin originsOut ); #endregion internal int GetAnalogActionOrigins( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputAnalogActionHandle_t analogActionHandle, ref InputActionOrigin originsOut ) @@ -308,9 +205,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate Utf8StringPointer FGetGlyphForActionOrigin( IntPtr self, InputActionOrigin eOrigin ); - private FGetGlyphForActionOrigin _GetGlyphForActionOrigin; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetGlyphForActionOrigin", CallingConvention = Platform.CC)] + private static extern Utf8StringPointer _GetGlyphForActionOrigin( IntPtr self, InputActionOrigin eOrigin ); #endregion internal string GetGlyphForActionOrigin( InputActionOrigin eOrigin ) @@ -320,9 +216,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate Utf8StringPointer FGetStringForActionOrigin( IntPtr self, InputActionOrigin eOrigin ); - private FGetStringForActionOrigin _GetStringForActionOrigin; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetStringForActionOrigin", CallingConvention = Platform.CC)] + private static extern Utf8StringPointer _GetStringForActionOrigin( IntPtr self, InputActionOrigin eOrigin ); #endregion internal string GetStringForActionOrigin( InputActionOrigin eOrigin ) @@ -332,9 +227,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FStopAnalogActionMomentum( IntPtr self, InputHandle_t inputHandle, InputAnalogActionHandle_t eAction ); - private FStopAnalogActionMomentum _StopAnalogActionMomentum; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_StopAnalogActionMomentum", CallingConvention = Platform.CC)] + private static extern void _StopAnalogActionMomentum( IntPtr self, InputHandle_t inputHandle, InputAnalogActionHandle_t eAction ); #endregion internal void StopAnalogActionMomentum( InputHandle_t inputHandle, InputAnalogActionHandle_t eAction ) @@ -343,31 +237,19 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - #if PLATFORM_WIN - private delegate void FGetMotionData( IntPtr self, ref MotionState retVal, InputHandle_t inputHandle ); - #else - private delegate MotionState FGetMotionData( IntPtr self, InputHandle_t inputHandle ); - #endif - private FGetMotionData _GetMotionData; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetMotionData", CallingConvention = Platform.CC)] + private static extern MotionState _GetMotionData( IntPtr self, InputHandle_t inputHandle ); #endregion internal MotionState GetMotionData( InputHandle_t inputHandle ) { - #if PLATFORM_WIN - var retVal = default( MotionState ); - _GetMotionData( Self, ref retVal, inputHandle ); - return retVal; - #else var returnValue = _GetMotionData( Self, inputHandle ); return returnValue; - #endif } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FTriggerVibration( IntPtr self, InputHandle_t inputHandle, ushort usLeftSpeed, ushort usRightSpeed ); - private FTriggerVibration _TriggerVibration; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_TriggerVibration", CallingConvention = Platform.CC)] + private static extern void _TriggerVibration( IntPtr self, InputHandle_t inputHandle, ushort usLeftSpeed, ushort usRightSpeed ); #endregion internal void TriggerVibration( InputHandle_t inputHandle, ushort usLeftSpeed, ushort usRightSpeed ) @@ -376,9 +258,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FSetLEDColor( IntPtr self, InputHandle_t inputHandle, byte nColorR, byte nColorG, byte nColorB, uint nFlags ); - private FSetLEDColor _SetLEDColor; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_SetLEDColor", CallingConvention = Platform.CC)] + private static extern void _SetLEDColor( IntPtr self, InputHandle_t inputHandle, byte nColorR, byte nColorG, byte nColorB, uint nFlags ); #endregion internal void SetLEDColor( InputHandle_t inputHandle, byte nColorR, byte nColorG, byte nColorB, uint nFlags ) @@ -387,9 +268,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FTriggerHapticPulse( IntPtr self, InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec ); - private FTriggerHapticPulse _TriggerHapticPulse; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_TriggerHapticPulse", CallingConvention = Platform.CC)] + private static extern void _TriggerHapticPulse( IntPtr self, InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec ); #endregion internal void TriggerHapticPulse( InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec ) @@ -398,9 +278,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FTriggerRepeatedHapticPulse( IntPtr self, InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec, ushort usOffMicroSec, ushort unRepeat, uint nFlags ); - private FTriggerRepeatedHapticPulse _TriggerRepeatedHapticPulse; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_TriggerRepeatedHapticPulse", CallingConvention = Platform.CC)] + private static extern void _TriggerRepeatedHapticPulse( IntPtr self, InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec, ushort usOffMicroSec, ushort unRepeat, uint nFlags ); #endregion internal void TriggerRepeatedHapticPulse( InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec, ushort usOffMicroSec, ushort unRepeat, uint nFlags ) @@ -409,10 +288,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_ShowBindingPanel", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FShowBindingPanel( IntPtr self, InputHandle_t inputHandle ); - private FShowBindingPanel _ShowBindingPanel; + private static extern bool _ShowBindingPanel( IntPtr self, InputHandle_t inputHandle ); #endregion internal bool ShowBindingPanel( InputHandle_t inputHandle ) @@ -422,9 +300,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate InputType FGetInputTypeForHandle( IntPtr self, InputHandle_t inputHandle ); - private FGetInputTypeForHandle _GetInputTypeForHandle; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetInputTypeForHandle", CallingConvention = Platform.CC)] + private static extern InputType _GetInputTypeForHandle( IntPtr self, InputHandle_t inputHandle ); #endregion internal InputType GetInputTypeForHandle( InputHandle_t inputHandle ) @@ -434,9 +311,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate InputHandle_t FGetControllerForGamepadIndex( IntPtr self, int nIndex ); - private FGetControllerForGamepadIndex _GetControllerForGamepadIndex; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetControllerForGamepadIndex", CallingConvention = Platform.CC)] + private static extern InputHandle_t _GetControllerForGamepadIndex( IntPtr self, int nIndex ); #endregion internal InputHandle_t GetControllerForGamepadIndex( int nIndex ) @@ -446,9 +322,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetGamepadIndexForController( IntPtr self, InputHandle_t ulinputHandle ); - private FGetGamepadIndexForController _GetGamepadIndexForController; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetGamepadIndexForController", CallingConvention = Platform.CC)] + private static extern int _GetGamepadIndexForController( IntPtr self, InputHandle_t ulinputHandle ); #endregion internal int GetGamepadIndexForController( InputHandle_t ulinputHandle ) @@ -458,9 +333,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate Utf8StringPointer FGetStringForXboxOrigin( IntPtr self, XboxOrigin eOrigin ); - private FGetStringForXboxOrigin _GetStringForXboxOrigin; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetStringForXboxOrigin", CallingConvention = Platform.CC)] + private static extern Utf8StringPointer _GetStringForXboxOrigin( IntPtr self, XboxOrigin eOrigin ); #endregion internal string GetStringForXboxOrigin( XboxOrigin eOrigin ) @@ -470,9 +344,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate Utf8StringPointer FGetGlyphForXboxOrigin( IntPtr self, XboxOrigin eOrigin ); - private FGetGlyphForXboxOrigin _GetGlyphForXboxOrigin; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetGlyphForXboxOrigin", CallingConvention = Platform.CC)] + private static extern Utf8StringPointer _GetGlyphForXboxOrigin( IntPtr self, XboxOrigin eOrigin ); #endregion internal string GetGlyphForXboxOrigin( XboxOrigin eOrigin ) @@ -482,9 +355,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate InputActionOrigin FGetActionOriginFromXboxOrigin( IntPtr self, InputHandle_t inputHandle, XboxOrigin eOrigin ); - private FGetActionOriginFromXboxOrigin _GetActionOriginFromXboxOrigin; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetActionOriginFromXboxOrigin", CallingConvention = Platform.CC)] + private static extern InputActionOrigin _GetActionOriginFromXboxOrigin( IntPtr self, InputHandle_t inputHandle, XboxOrigin eOrigin ); #endregion internal InputActionOrigin GetActionOriginFromXboxOrigin( InputHandle_t inputHandle, XboxOrigin eOrigin ) @@ -494,9 +366,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate InputActionOrigin FTranslateActionOrigin( IntPtr self, InputType eDestinationInputType, InputActionOrigin eSourceOrigin ); - private FTranslateActionOrigin _TranslateActionOrigin; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_TranslateActionOrigin", CallingConvention = Platform.CC)] + private static extern InputActionOrigin _TranslateActionOrigin( IntPtr self, InputType eDestinationInputType, InputActionOrigin eSourceOrigin ); #endregion internal InputActionOrigin TranslateActionOrigin( InputType eDestinationInputType, InputActionOrigin eSourceOrigin ) @@ -505,5 +376,28 @@ namespace Steamworks return returnValue; } + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetDeviceBindingRevision", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _GetDeviceBindingRevision( IntPtr self, InputHandle_t inputHandle, ref int pMajor, ref int pMinor ); + + #endregion + internal bool GetDeviceBindingRevision( InputHandle_t inputHandle, ref int pMajor, ref int pMinor ) + { + var returnValue = _GetDeviceBindingRevision( Self, inputHandle, ref pMajor, ref pMinor ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetRemotePlaySessionID", CallingConvention = Platform.CC)] + private static extern uint _GetRemotePlaySessionID( IntPtr self, InputHandle_t inputHandle ); + + #endregion + internal uint GetRemotePlaySessionID( InputHandle_t inputHandle ) + { + var returnValue = _GetRemotePlaySessionID( Self, inputHandle ); + return returnValue; + } + } } diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamInventory.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamInventory.cs index e1a4d34..76245ee 100644 --- a/Facepunch.Steamworks/Generated/Interfaces/ISteamInventory.cs +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamInventory.cs @@ -9,97 +9,28 @@ namespace Steamworks { internal class ISteamInventory : SteamInterface { - public override string InterfaceName => "STEAMINVENTORY_INTERFACE_V003"; - public override void InitInternals() + internal ISteamInventory( bool IsGameServer ) { - _GetResultStatus = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) ); - _GetResultItems = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) ); - _GetResultItemProperty = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) ); - _GetResultTimestamp = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) ); - _CheckResultSteamID = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) ); - _DestroyResult = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) ); - _GetAllItems = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) ); - _GetItemsByID = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) ); - _SerializeResult = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) ); - _DeserializeResult = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) ); - _GenerateItems = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) ); - _GrantPromoItems = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) ); - _AddPromoItem = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) ); - _AddPromoItems = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) ); - _ConsumeItem = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) ); - _ExchangeItems = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) ); - _TransferItemQuantity = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) ); - _SendItemDropHeartbeat = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) ); - _TriggerItemDrop = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) ); - _TradeItems = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) ); - _LoadItemDefinitions = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) ); - _GetItemDefinitionIDs = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 168 ) ) ); - _GetItemDefinitionProperty = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 176 ) ) ); - _RequestEligiblePromoItemDefinitionsIDs = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 184 ) ) ); - _GetEligiblePromoItemDefinitionIDs = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 192 ) ) ); - _StartPurchase = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 200 ) ) ); - _RequestPrices = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 208 ) ) ); - _GetNumItemsWithPrices = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 216 ) ) ); - _GetItemsWithPrices = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 224 ) ) ); - _GetItemPrice = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 232 ) ) ); - _StartUpdateProperties = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 240 ) ) ); - _RemoveProperty = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 248 ) ) ); - _SetProperty1 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 256 ) ) ); - _SetProperty2 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 264 ) ) ); - _SetProperty3 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 272 ) ) ); - _SetProperty4 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 280 ) ) ); - _SubmitUpdateProperties = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 288 ) ) ); - } - internal override void Shutdown() - { - base.Shutdown(); - - _GetResultStatus = null; - _GetResultItems = null; - _GetResultItemProperty = null; - _GetResultTimestamp = null; - _CheckResultSteamID = null; - _DestroyResult = null; - _GetAllItems = null; - _GetItemsByID = null; - _SerializeResult = null; - _DeserializeResult = null; - _GenerateItems = null; - _GrantPromoItems = null; - _AddPromoItem = null; - _AddPromoItems = null; - _ConsumeItem = null; - _ExchangeItems = null; - _TransferItemQuantity = null; - _SendItemDropHeartbeat = null; - _TriggerItemDrop = null; - _TradeItems = null; - _LoadItemDefinitions = null; - _GetItemDefinitionIDs = null; - _GetItemDefinitionProperty = null; - _RequestEligiblePromoItemDefinitionsIDs = null; - _GetEligiblePromoItemDefinitionIDs = null; - _StartPurchase = null; - _RequestPrices = null; - _GetNumItemsWithPrices = null; - _GetItemsWithPrices = null; - _GetItemPrice = null; - _StartUpdateProperties = null; - _RemoveProperty = null; - _SetProperty1 = null; - _SetProperty2 = null; - _SetProperty3 = null; - _SetProperty4 = null; - _SubmitUpdateProperties = null; + SetupInterface( IsGameServer ); } + [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(); + + #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - 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 + /// + /// Find out the status of an asynchronous inventory result handle. + /// internal Result GetResultStatus( SteamInventoryResult_t resultHandle ) { var returnValue = _GetResultStatus( Self, resultHandle ); @@ -107,12 +38,14 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [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 + /// + /// Copies the contents of a result set into a flat array. The specific contents of the result set depend on which query which was used. + /// internal bool GetResultItems( SteamInventoryResult_t resultHandle, [In,Out] SteamItemDetails_t[] pOutItemsArray, ref uint punOutItemsArraySize ) { var returnValue = _GetResultItems( Self, resultHandle, pOutItemsArray, ref punOutItemsArraySize ); @@ -120,10 +53,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [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, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, IntPtr pchValueBuffer, ref uint punValueBufferSizeOut ); - private FGetResultItemProperty _GetResultItemProperty; + private static extern bool _GetResultItemProperty( IntPtr self, SteamInventoryResult_t resultHandle, uint unItemIndex, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, IntPtr pchValueBuffer, ref uint punValueBufferSizeOut ); #endregion internal bool GetResultItemProperty( SteamInventoryResult_t resultHandle, uint unItemIndex, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, out string pchValueBuffer, ref uint punValueBufferSizeOut ) @@ -135,11 +67,13 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - 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 + /// + /// Returns the server time at which the result was generated. Compare against the value of IClientUtils::GetServerRealTime() to determine age. + /// internal uint GetResultTimestamp( SteamInventoryResult_t resultHandle ) { var returnValue = _GetResultTimestamp( Self, resultHandle ); @@ -147,12 +81,14 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [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 + /// + /// Returns true if the result belongs to the target steam ID or false if the result does not. This is important when using DeserializeResult to verify that a remote player is not pretending to have a different users inventory. + /// internal bool CheckResultSteamID( SteamInventoryResult_t resultHandle, SteamId steamIDExpected ) { var returnValue = _CheckResultSteamID( Self, resultHandle, steamIDExpected ); @@ -160,23 +96,27 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - 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 + /// + /// Destroys a result handle and frees all associated memory. + /// internal void DestroyResult( SteamInventoryResult_t resultHandle ) { _DestroyResult( Self, resultHandle ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [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 + /// + /// Captures the entire state of the current users Steam inventory. + /// internal bool GetAllItems( ref SteamInventoryResult_t pResultHandle ) { var returnValue = _GetAllItems( Self, ref pResultHandle ); @@ -184,12 +124,14 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [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 + /// + /// Captures the state of a subset of the current users Steam inventory identified by an array of item instance IDs. + /// internal bool GetItemsByID( ref SteamInventoryResult_t pResultHandle, ref InventoryItemId pInstanceIDs, uint unCountInstanceIDs ) { var returnValue = _GetItemsByID( Self, ref pResultHandle, ref pInstanceIDs, unCountInstanceIDs ); @@ -197,10 +139,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [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 ) @@ -210,10 +151,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [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 ) @@ -223,10 +163,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [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 ) @@ -236,12 +175,14 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [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 + /// + /// GrantPromoItems() checks the list of promotional items for which the user may be eligible and grants the items (one time only). + /// internal bool GrantPromoItems( ref SteamInventoryResult_t pResultHandle ) { var returnValue = _GrantPromoItems( Self, ref pResultHandle ); @@ -249,10 +190,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [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 ) @@ -262,10 +202,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [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 ) @@ -275,12 +214,14 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [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 + /// + /// ConsumeItem() removes items from the inventory permanently. + /// internal bool ConsumeItem( ref SteamInventoryResult_t pResultHandle, InventoryItemId itemConsume, uint unQuantity ) { var returnValue = _ConsumeItem( Self, ref pResultHandle, itemConsume, unQuantity ); @@ -288,10 +229,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [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 ) @@ -301,10 +241,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [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 ) @@ -314,23 +253,27 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - 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 + /// + /// Deprecated method. Playtime accounting is performed on the Steam servers. + /// internal void SendItemDropHeartbeat() { _SendItemDropHeartbeat( Self ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [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 + /// + /// Playtime credit must be consumed and turned into item drops by your game. + /// internal bool TriggerItemDrop( ref SteamInventoryResult_t pResultHandle, InventoryDefId dropListDefinition ) { var returnValue = _TriggerItemDrop( Self, ref pResultHandle, dropListDefinition ); @@ -338,10 +281,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [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 ) @@ -351,12 +293,14 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [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 + /// + /// LoadItemDefinitions triggers the automatic load and refresh of item definitions. + /// internal bool LoadItemDefinitions() { var returnValue = _LoadItemDefinitions( Self ); @@ -364,10 +308,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [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 ) @@ -377,10 +320,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetItemDefinitionProperty", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetItemDefinitionProperty( IntPtr self, InventoryDefId iDefinition, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, IntPtr pchValueBuffer, ref uint punValueBufferSizeOut ); - private FGetItemDefinitionProperty _GetItemDefinitionProperty; + private static extern bool _GetItemDefinitionProperty( IntPtr self, InventoryDefId iDefinition, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, IntPtr pchValueBuffer, ref uint punValueBufferSizeOut ); #endregion internal bool GetItemDefinitionProperty( InventoryDefId iDefinition, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, out string pchValueBuffer, ref uint punValueBufferSizeOut ) @@ -392,22 +334,20 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - 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 RequestEligiblePromoItemDefinitionsIDs( SteamId steamID ) + internal CallResult RequestEligiblePromoItemDefinitionsIDs( SteamId steamID ) { var returnValue = _RequestEligiblePromoItemDefinitionsIDs( Self, steamID ); - return await SteamInventoryEligiblePromoItemDefIDs_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [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 ) @@ -417,33 +357,30 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - 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 StartPurchase( [In,Out] InventoryDefId[] pArrayItemDefs, [In,Out] uint[] punArrayQuantity, uint unArrayLength ) + internal CallResult StartPurchase( [In,Out] InventoryDefId[] pArrayItemDefs, [In,Out] uint[] punArrayQuantity, uint unArrayLength ) { var returnValue = _StartPurchase( Self, pArrayItemDefs, punArrayQuantity, unArrayLength ); - return await SteamInventoryStartPurchaseResult_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - 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 RequestPrices() + internal CallResult RequestPrices() { var returnValue = _RequestPrices( Self ); - return await SteamInventoryRequestPricesResult_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - 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() @@ -453,10 +390,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [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 ) @@ -466,10 +402,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [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 ) @@ -479,9 +414,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - 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() @@ -491,10 +425,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [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, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName ); - private FRemoveProperty _RemoveProperty; + private static extern bool _RemoveProperty( IntPtr self, SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName ); #endregion internal bool RemoveProperty( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName ) @@ -504,62 +437,57 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [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, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyValue ); - private FSetProperty1 _SetProperty1; + private static extern bool _SetProperty( IntPtr self, SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyValue ); #endregion - internal bool SetProperty1( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyValue ) + internal bool SetProperty( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyValue ) { - var returnValue = _SetProperty1( Self, handle, nItemID, pchPropertyName, pchPropertyValue ); + var returnValue = _SetProperty( Self, handle, nItemID, pchPropertyName, pchPropertyValue ); return returnValue; } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [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, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, [MarshalAs( UnmanagedType.U1 )] bool bValue ); - private FSetProperty2 _SetProperty2; + private static extern bool _SetProperty( IntPtr self, SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, [MarshalAs( UnmanagedType.U1 )] bool bValue ); #endregion - internal bool SetProperty2( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, [MarshalAs( UnmanagedType.U1 )] bool bValue ) + internal bool SetProperty( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, [MarshalAs( UnmanagedType.U1 )] bool bValue ) { - var returnValue = _SetProperty2( Self, handle, nItemID, pchPropertyName, bValue ); + var returnValue = _SetProperty( Self, handle, nItemID, pchPropertyName, bValue ); return returnValue; } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [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, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, long nValue ); - private FSetProperty3 _SetProperty3; + private static extern bool _SetProperty( IntPtr self, SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, long nValue ); #endregion - internal bool SetProperty3( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, long nValue ) + internal bool SetProperty( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, long nValue ) { - var returnValue = _SetProperty3( Self, handle, nItemID, pchPropertyName, nValue ); + var returnValue = _SetProperty( Self, handle, nItemID, pchPropertyName, nValue ); return returnValue; } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [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, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, float flValue ); - private FSetProperty4 _SetProperty4; + private static extern bool _SetProperty( IntPtr self, SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, float flValue ); #endregion - internal bool SetProperty4( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, float flValue ) + internal bool SetProperty( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, float flValue ) { - var returnValue = _SetProperty4( Self, handle, nItemID, pchPropertyName, flValue ); + var returnValue = _SetProperty( Self, handle, nItemID, pchPropertyName, flValue ); return returnValue; } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [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 ) diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamMatchmaking.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamMatchmaking.cs index 6a134dc..89e66ee 100644 --- a/Facepunch.Steamworks/Generated/Interfaces/ISteamMatchmaking.cs +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamMatchmaking.cs @@ -9,97 +9,20 @@ namespace Steamworks { internal class ISteamMatchmaking : SteamInterface { - public override string InterfaceName => "SteamMatchMaking009"; - public override void InitInternals() + internal ISteamMatchmaking( bool IsGameServer ) { - _GetFavoriteGameCount = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) ); - _GetFavoriteGame = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) ); - _AddFavoriteGame = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) ); - _RemoveFavoriteGame = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) ); - _RequestLobbyList = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) ); - _AddRequestLobbyListStringFilter = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) ); - _AddRequestLobbyListNumericalFilter = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) ); - _AddRequestLobbyListNearValueFilter = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) ); - _AddRequestLobbyListFilterSlotsAvailable = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) ); - _AddRequestLobbyListDistanceFilter = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) ); - _AddRequestLobbyListResultCountFilter = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) ); - _AddRequestLobbyListCompatibleMembersFilter = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) ); - _GetLobbyByIndex = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) ); - _CreateLobby = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) ); - _JoinLobby = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) ); - _LeaveLobby = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) ); - _InviteUserToLobby = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) ); - _GetNumLobbyMembers = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) ); - _GetLobbyMemberByIndex = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) ); - _GetLobbyData = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) ); - _SetLobbyData = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) ); - _GetLobbyDataCount = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 168 ) ) ); - _GetLobbyDataByIndex = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 176 ) ) ); - _DeleteLobbyData = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 184 ) ) ); - _GetLobbyMemberData = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 192 ) ) ); - _SetLobbyMemberData = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 200 ) ) ); - _SendLobbyChatMsg = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 208 ) ) ); - _GetLobbyChatEntry = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 216 ) ) ); - _RequestLobbyData = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 224 ) ) ); - _SetLobbyGameServer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 232 ) ) ); - _GetLobbyGameServer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 240 ) ) ); - _SetLobbyMemberLimit = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 248 ) ) ); - _GetLobbyMemberLimit = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 256 ) ) ); - _SetLobbyType = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 264 ) ) ); - _SetLobbyJoinable = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 272 ) ) ); - _GetLobbyOwner = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 280 ) ) ); - _SetLobbyOwner = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 288 ) ) ); - _SetLinkedLobby = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 296 ) ) ); - } - internal override void Shutdown() - { - base.Shutdown(); - - _GetFavoriteGameCount = null; - _GetFavoriteGame = null; - _AddFavoriteGame = null; - _RemoveFavoriteGame = null; - _RequestLobbyList = null; - _AddRequestLobbyListStringFilter = null; - _AddRequestLobbyListNumericalFilter = null; - _AddRequestLobbyListNearValueFilter = null; - _AddRequestLobbyListFilterSlotsAvailable = null; - _AddRequestLobbyListDistanceFilter = null; - _AddRequestLobbyListResultCountFilter = null; - _AddRequestLobbyListCompatibleMembersFilter = null; - _GetLobbyByIndex = null; - _CreateLobby = null; - _JoinLobby = null; - _LeaveLobby = null; - _InviteUserToLobby = null; - _GetNumLobbyMembers = null; - _GetLobbyMemberByIndex = null; - _GetLobbyData = null; - _SetLobbyData = null; - _GetLobbyDataCount = null; - _GetLobbyDataByIndex = null; - _DeleteLobbyData = null; - _GetLobbyMemberData = null; - _SetLobbyMemberData = null; - _SendLobbyChatMsg = null; - _GetLobbyChatEntry = null; - _RequestLobbyData = null; - _SetLobbyGameServer = null; - _GetLobbyGameServer = null; - _SetLobbyMemberLimit = null; - _GetLobbyMemberLimit = null; - _SetLobbyType = null; - _SetLobbyJoinable = null; - _GetLobbyOwner = null; - _SetLobbyOwner = null; - _SetLinkedLobby = null; + 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 - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetFavoriteGameCount( IntPtr self ); - private FGetFavoriteGameCount _GetFavoriteGameCount; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetFavoriteGameCount", CallingConvention = Platform.CC)] + private static extern int _GetFavoriteGameCount( IntPtr self ); #endregion internal int GetFavoriteGameCount() @@ -109,10 +32,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetFavoriteGame", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetFavoriteGame( IntPtr self, int iGame, ref AppId pnAppID, ref uint pnIP, ref ushort pnConnPort, ref ushort pnQueryPort, ref uint punFlags, ref uint pRTime32LastPlayedOnServer ); - private FGetFavoriteGame _GetFavoriteGame; + 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 ) @@ -122,9 +44,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FAddFavoriteGame( IntPtr self, AppId nAppID, uint nIP, ushort nConnPort, ushort nQueryPort, uint unFlags, uint rTime32LastPlayedOnServer ); - private FAddFavoriteGame _AddFavoriteGame; + [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 ) @@ -134,10 +55,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_RemoveFavoriteGame", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FRemoveFavoriteGame( IntPtr self, AppId nAppID, uint nIP, ushort nConnPort, ushort nQueryPort, uint unFlags ); - private FRemoveFavoriteGame _RemoveFavoriteGame; + 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 ) @@ -147,21 +67,19 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FRequestLobbyList( IntPtr self ); - private FRequestLobbyList _RequestLobbyList; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_RequestLobbyList", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _RequestLobbyList( IntPtr self ); #endregion - internal async Task RequestLobbyList() + internal CallResult RequestLobbyList() { var returnValue = _RequestLobbyList( Self ); - return await LobbyMatchList_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FAddRequestLobbyListStringFilter( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToMatch, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValueToMatch, LobbyComparison eComparisonType ); - private FAddRequestLobbyListStringFilter _AddRequestLobbyListStringFilter; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_AddRequestLobbyListStringFilter", CallingConvention = Platform.CC)] + private static extern void _AddRequestLobbyListStringFilter( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToMatch, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValueToMatch, LobbyComparison eComparisonType ); #endregion internal void AddRequestLobbyListStringFilter( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToMatch, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValueToMatch, LobbyComparison eComparisonType ) @@ -170,9 +88,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FAddRequestLobbyListNumericalFilter( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToMatch, int nValueToMatch, LobbyComparison eComparisonType ); - private FAddRequestLobbyListNumericalFilter _AddRequestLobbyListNumericalFilter; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_AddRequestLobbyListNumericalFilter", CallingConvention = Platform.CC)] + private static extern void _AddRequestLobbyListNumericalFilter( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToMatch, int nValueToMatch, LobbyComparison eComparisonType ); #endregion internal void AddRequestLobbyListNumericalFilter( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToMatch, int nValueToMatch, LobbyComparison eComparisonType ) @@ -181,9 +98,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FAddRequestLobbyListNearValueFilter( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToMatch, int nValueToBeCloseTo ); - private FAddRequestLobbyListNearValueFilter _AddRequestLobbyListNearValueFilter; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_AddRequestLobbyListNearValueFilter", CallingConvention = Platform.CC)] + private static extern void _AddRequestLobbyListNearValueFilter( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToMatch, int nValueToBeCloseTo ); #endregion internal void AddRequestLobbyListNearValueFilter( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToMatch, int nValueToBeCloseTo ) @@ -192,9 +108,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FAddRequestLobbyListFilterSlotsAvailable( IntPtr self, int nSlotsAvailable ); - private FAddRequestLobbyListFilterSlotsAvailable _AddRequestLobbyListFilterSlotsAvailable; + [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 ) @@ -203,9 +118,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FAddRequestLobbyListDistanceFilter( IntPtr self, LobbyDistanceFilter eLobbyDistanceFilter ); - private FAddRequestLobbyListDistanceFilter _AddRequestLobbyListDistanceFilter; + [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 ) @@ -214,9 +128,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FAddRequestLobbyListResultCountFilter( IntPtr self, int cMaxResults ); - private FAddRequestLobbyListResultCountFilter _AddRequestLobbyListResultCountFilter; + [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 ) @@ -225,9 +138,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FAddRequestLobbyListCompatibleMembersFilter( IntPtr self, SteamId steamIDLobby ); - private FAddRequestLobbyListCompatibleMembersFilter _AddRequestLobbyListCompatibleMembersFilter; + [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 ) @@ -236,55 +148,41 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - #if PLATFORM_WIN - private delegate void FGetLobbyByIndex( IntPtr self, ref SteamId retVal, int iLobby ); - #else - private delegate SteamId FGetLobbyByIndex( IntPtr self, int iLobby ); - #endif - private FGetLobbyByIndex _GetLobbyByIndex; + [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 ) { - #if PLATFORM_WIN - var retVal = default( SteamId ); - _GetLobbyByIndex( Self, ref retVal, iLobby ); - return retVal; - #else var returnValue = _GetLobbyByIndex( Self, iLobby ); return returnValue; - #endif } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FCreateLobby( IntPtr self, LobbyType eLobbyType, int cMaxMembers ); - private FCreateLobby _CreateLobby; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_CreateLobby", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _CreateLobby( IntPtr self, LobbyType eLobbyType, int cMaxMembers ); #endregion - internal async Task CreateLobby( LobbyType eLobbyType, int cMaxMembers ) + internal CallResult CreateLobby( LobbyType eLobbyType, int cMaxMembers ) { var returnValue = _CreateLobby( Self, eLobbyType, cMaxMembers ); - return await LobbyCreated_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FJoinLobby( IntPtr self, SteamId steamIDLobby ); - private FJoinLobby _JoinLobby; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_JoinLobby", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _JoinLobby( IntPtr self, SteamId steamIDLobby ); #endregion - internal async Task JoinLobby( SteamId steamIDLobby ) + internal CallResult JoinLobby( SteamId steamIDLobby ) { var returnValue = _JoinLobby( Self, steamIDLobby ); - return await LobbyEnter_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FLeaveLobby( IntPtr self, SteamId steamIDLobby ); - private FLeaveLobby _LeaveLobby; + [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 ) @@ -293,10 +191,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_InviteUserToLobby", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FInviteUserToLobby( IntPtr self, SteamId steamIDLobby, SteamId steamIDInvitee ); - private FInviteUserToLobby _InviteUserToLobby; + private static extern bool _InviteUserToLobby( IntPtr self, SteamId steamIDLobby, SteamId steamIDInvitee ); #endregion internal bool InviteUserToLobby( SteamId steamIDLobby, SteamId steamIDInvitee ) @@ -306,9 +203,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetNumLobbyMembers( IntPtr self, SteamId steamIDLobby ); - private FGetNumLobbyMembers _GetNumLobbyMembers; + [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 ) @@ -318,31 +214,19 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - #if PLATFORM_WIN - private delegate void FGetLobbyMemberByIndex( IntPtr self, ref SteamId retVal, SteamId steamIDLobby, int iMember ); - #else - private delegate SteamId FGetLobbyMemberByIndex( IntPtr self, SteamId steamIDLobby, int iMember ); - #endif - private FGetLobbyMemberByIndex _GetLobbyMemberByIndex; + [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 ) { - #if PLATFORM_WIN - var retVal = default( SteamId ); - _GetLobbyMemberByIndex( Self, ref retVal, steamIDLobby, iMember ); - return retVal; - #else var returnValue = _GetLobbyMemberByIndex( Self, steamIDLobby, iMember ); return returnValue; - #endif } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate Utf8StringPointer FGetLobbyData( IntPtr self, SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey ); - private FGetLobbyData _GetLobbyData; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyData", CallingConvention = Platform.CC)] + private static extern Utf8StringPointer _GetLobbyData( IntPtr self, SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey ); #endregion internal string GetLobbyData( SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey ) @@ -352,10 +236,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyData", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetLobbyData( IntPtr self, SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue ); - private FSetLobbyData _SetLobbyData; + private static extern bool _SetLobbyData( IntPtr self, SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue ); #endregion internal bool SetLobbyData( SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue ) @@ -365,9 +248,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetLobbyDataCount( IntPtr self, SteamId steamIDLobby ); - private FGetLobbyDataCount _GetLobbyDataCount; + [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 ) @@ -377,10 +259,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyDataByIndex", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetLobbyDataByIndex( IntPtr self, SteamId steamIDLobby, int iLobbyData, IntPtr pchKey, int cchKeyBufferSize, IntPtr pchValue, int cchValueBufferSize ); - private FGetLobbyDataByIndex _GetLobbyDataByIndex; + 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 ) @@ -394,10 +275,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_DeleteLobbyData", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FDeleteLobbyData( IntPtr self, SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey ); - private FDeleteLobbyData _DeleteLobbyData; + private static extern bool _DeleteLobbyData( IntPtr self, SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey ); #endregion internal bool DeleteLobbyData( SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey ) @@ -407,9 +287,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate Utf8StringPointer FGetLobbyMemberData( IntPtr self, SteamId steamIDLobby, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey ); - private FGetLobbyMemberData _GetLobbyMemberData; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyMemberData", CallingConvention = Platform.CC)] + private static extern Utf8StringPointer _GetLobbyMemberData( IntPtr self, SteamId steamIDLobby, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey ); #endregion internal string GetLobbyMemberData( SteamId steamIDLobby, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey ) @@ -419,9 +298,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FSetLobbyMemberData( IntPtr self, SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue ); - private FSetLobbyMemberData _SetLobbyMemberData; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyMemberData", CallingConvention = Platform.CC)] + private static extern void _SetLobbyMemberData( IntPtr self, SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue ); #endregion internal void SetLobbyMemberData( SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue ) @@ -430,10 +308,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SendLobbyChatMsg", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSendLobbyChatMsg( IntPtr self, SteamId steamIDLobby, IntPtr pvMsgBody, int cubMsgBody ); - private FSendLobbyChatMsg _SendLobbyChatMsg; + private static extern bool _SendLobbyChatMsg( IntPtr self, SteamId steamIDLobby, IntPtr pvMsgBody, int cubMsgBody ); #endregion internal bool SendLobbyChatMsg( SteamId steamIDLobby, IntPtr pvMsgBody, int cubMsgBody ) @@ -443,9 +320,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetLobbyChatEntry( IntPtr self, SteamId steamIDLobby, int iChatID, ref SteamId pSteamIDUser, IntPtr pvData, int cubData, ref ChatEntryType peChatEntryType ); - private FGetLobbyChatEntry _GetLobbyChatEntry; + [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 ) @@ -455,10 +331,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_RequestLobbyData", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FRequestLobbyData( IntPtr self, SteamId steamIDLobby ); - private FRequestLobbyData _RequestLobbyData; + private static extern bool _RequestLobbyData( IntPtr self, SteamId steamIDLobby ); #endregion internal bool RequestLobbyData( SteamId steamIDLobby ) @@ -468,9 +343,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FSetLobbyGameServer( IntPtr self, SteamId steamIDLobby, uint unGameServerIP, ushort unGameServerPort, SteamId steamIDGameServer ); - private FSetLobbyGameServer _SetLobbyGameServer; + [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 ) @@ -479,10 +353,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyGameServer", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetLobbyGameServer( IntPtr self, SteamId steamIDLobby, ref uint punGameServerIP, ref ushort punGameServerPort, ref SteamId psteamIDGameServer ); - private FGetLobbyGameServer _GetLobbyGameServer; + 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 ) @@ -492,10 +365,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyMemberLimit", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetLobbyMemberLimit( IntPtr self, SteamId steamIDLobby, int cMaxMembers ); - private FSetLobbyMemberLimit _SetLobbyMemberLimit; + private static extern bool _SetLobbyMemberLimit( IntPtr self, SteamId steamIDLobby, int cMaxMembers ); #endregion internal bool SetLobbyMemberLimit( SteamId steamIDLobby, int cMaxMembers ) @@ -505,9 +377,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetLobbyMemberLimit( IntPtr self, SteamId steamIDLobby ); - private FGetLobbyMemberLimit _GetLobbyMemberLimit; + [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 ) @@ -517,10 +388,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyType", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetLobbyType( IntPtr self, SteamId steamIDLobby, LobbyType eLobbyType ); - private FSetLobbyType _SetLobbyType; + private static extern bool _SetLobbyType( IntPtr self, SteamId steamIDLobby, LobbyType eLobbyType ); #endregion internal bool SetLobbyType( SteamId steamIDLobby, LobbyType eLobbyType ) @@ -530,10 +400,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyJoinable", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetLobbyJoinable( IntPtr self, SteamId steamIDLobby, [MarshalAs( UnmanagedType.U1 )] bool bLobbyJoinable ); - private FSetLobbyJoinable _SetLobbyJoinable; + 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 ) @@ -543,32 +412,20 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - #if PLATFORM_WIN - private delegate void FGetLobbyOwner( IntPtr self, ref SteamId retVal, SteamId steamIDLobby ); - #else - private delegate SteamId FGetLobbyOwner( IntPtr self, SteamId steamIDLobby ); - #endif - private FGetLobbyOwner _GetLobbyOwner; + [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 ) { - #if PLATFORM_WIN - var retVal = default( SteamId ); - _GetLobbyOwner( Self, ref retVal, steamIDLobby ); - return retVal; - #else var returnValue = _GetLobbyOwner( Self, steamIDLobby ); return returnValue; - #endif } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyOwner", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetLobbyOwner( IntPtr self, SteamId steamIDLobby, SteamId steamIDNewOwner ); - private FSetLobbyOwner _SetLobbyOwner; + private static extern bool _SetLobbyOwner( IntPtr self, SteamId steamIDLobby, SteamId steamIDNewOwner ); #endregion internal bool SetLobbyOwner( SteamId steamIDLobby, SteamId steamIDNewOwner ) @@ -578,10 +435,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLinkedLobby", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetLinkedLobby( IntPtr self, SteamId steamIDLobby, SteamId steamIDLobbyDependent ); - private FSetLinkedLobby _SetLinkedLobby; + private static extern bool _SetLinkedLobby( IntPtr self, SteamId steamIDLobby, SteamId steamIDLobbyDependent ); #endregion internal bool SetLinkedLobby( SteamId steamIDLobby, SteamId steamIDLobbyDependent ) diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamMatchmakingPingResponse.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamMatchmakingPingResponse.cs new file mode 100644 index 0000000..9f14a96 --- /dev/null +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamMatchmakingPingResponse.cs @@ -0,0 +1,39 @@ +using System; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; +using Steamworks.Data; + + +namespace Steamworks +{ + internal 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 ); + } + + } +} diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamMatchmakingPlayersResponse.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamMatchmakingPlayersResponse.cs new file mode 100644 index 0000000..ce4f02a --- /dev/null +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamMatchmakingPlayersResponse.cs @@ -0,0 +1,49 @@ +using System; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; +using Steamworks.Data; + + +namespace Steamworks +{ + internal 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, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nScore, float flTimePlayed ); + + #endregion + internal void AddPlayerToList( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nScore, float flTimePlayed ) + { + _AddPlayerToList( Self, pchName, 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 ); + } + + } +} diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamMatchmakingRulesResponse.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamMatchmakingRulesResponse.cs new file mode 100644 index 0000000..7367634 --- /dev/null +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamMatchmakingRulesResponse.cs @@ -0,0 +1,49 @@ +using System; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; +using Steamworks.Data; + + +namespace Steamworks +{ + internal 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, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchRule, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue ); + + #endregion + internal void RulesResponded( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchRule, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue ) + { + _RulesResponded( Self, pchRule, pchValue ); + } + + #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 ); + } + + } +} diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamMatchmakingServerListResponse.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamMatchmakingServerListResponse.cs new file mode 100644 index 0000000..9ab74dc --- /dev/null +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamMatchmakingServerListResponse.cs @@ -0,0 +1,49 @@ +using System; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; +using Steamworks.Data; + + +namespace Steamworks +{ + internal 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 ); + } + + } +} diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamMatchmakingServers.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamMatchmakingServers.cs index 3401895..b1740fa 100644 --- a/Facepunch.Steamworks/Generated/Interfaces/ISteamMatchmakingServers.cs +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamMatchmakingServers.cs @@ -9,55 +9,20 @@ namespace Steamworks { internal class ISteamMatchmakingServers : SteamInterface { - public override string InterfaceName => "SteamMatchMakingServers002"; - public override void InitInternals() + internal ISteamMatchmakingServers( bool IsGameServer ) { - _RequestInternetServerList = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) ); - _RequestLANServerList = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) ); - _RequestFriendsServerList = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) ); - _RequestFavoritesServerList = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) ); - _RequestHistoryServerList = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) ); - _RequestSpectatorServerList = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) ); - _ReleaseRequest = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) ); - _GetServerDetails = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) ); - _CancelQuery = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) ); - _RefreshQuery = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) ); - _IsRefreshing = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) ); - _GetServerCount = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) ); - _RefreshServer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) ); - _PingServer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) ); - _PlayerDetails = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) ); - _ServerRules = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) ); - _CancelServerQuery = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) ); - } - internal override void Shutdown() - { - base.Shutdown(); - - _RequestInternetServerList = null; - _RequestLANServerList = null; - _RequestFriendsServerList = null; - _RequestFavoritesServerList = null; - _RequestHistoryServerList = null; - _RequestSpectatorServerList = null; - _ReleaseRequest = null; - _GetServerDetails = null; - _CancelQuery = null; - _RefreshQuery = null; - _IsRefreshing = null; - _GetServerCount = null; - _RefreshServer = null; - _PingServer = null; - _PlayerDetails = null; - _ServerRules = null; - _CancelServerQuery = null; + SetupInterface( IsGameServer ); } + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamMatchmakingServers_v002", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamMatchmakingServers_v002(); + public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamMatchmakingServers_v002(); + + #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate HServerListRequest FRequestInternetServerList( IntPtr self, AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] 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, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse ); #endregion internal HServerListRequest RequestInternetServerList( AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse ) @@ -67,9 +32,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - 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 ) @@ -79,9 +43,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate HServerListRequest FRequestFriendsServerList( IntPtr self, AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] 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, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse ); #endregion internal HServerListRequest RequestFriendsServerList( AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse ) @@ -91,9 +54,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate HServerListRequest FRequestFavoritesServerList( IntPtr self, AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] 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, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse ); #endregion internal HServerListRequest RequestFavoritesServerList( AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse ) @@ -103,9 +65,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate HServerListRequest FRequestHistoryServerList( IntPtr self, AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] 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, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse ); #endregion internal HServerListRequest RequestHistoryServerList( AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse ) @@ -115,9 +76,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate HServerListRequest FRequestSpectatorServerList( IntPtr self, AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] 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, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse ); #endregion internal HServerListRequest RequestSpectatorServerList( AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse ) @@ -127,9 +87,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - 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 ) @@ -138,21 +97,19 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - 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 ) { var returnValue = _GetServerDetails( Self, hRequest, iServer ); - return gameserveritem_t.Fill( returnValue ); + return returnValue.ToType(); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - 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 ) @@ -161,9 +118,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - 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 ) @@ -172,10 +128,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [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 ) @@ -185,9 +140,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - 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 ) @@ -197,9 +151,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - 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 ) @@ -208,9 +161,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - 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 ) @@ -220,9 +172,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - 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 ) @@ -232,9 +183,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - 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 ) @@ -244,9 +194,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - 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 ) diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamMusic.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamMusic.cs index f07f7ad..1ed2f67 100644 --- a/Facepunch.Steamworks/Generated/Interfaces/ISteamMusic.cs +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamMusic.cs @@ -9,40 +9,21 @@ namespace Steamworks { internal class ISteamMusic : SteamInterface { - public override string InterfaceName => "STEAMMUSIC_INTERFACE_VERSION001"; - public override void InitInternals() + internal ISteamMusic( bool IsGameServer ) { - _BIsEnabled = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) ); - _BIsPlaying = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) ); - _GetPlaybackStatus = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) ); - _Play = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) ); - _Pause = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) ); - _PlayPrevious = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) ); - _PlayNext = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) ); - _SetVolume = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) ); - _GetVolume = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) ); - } - internal override void Shutdown() - { - base.Shutdown(); - - _BIsEnabled = null; - _BIsPlaying = null; - _GetPlaybackStatus = null; - _Play = null; - _Pause = null; - _PlayPrevious = null; - _PlayNext = null; - _SetVolume = null; - _GetVolume = null; + SetupInterface( IsGameServer ); } + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamMusic_v001", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamMusic_v001(); + public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamMusic_v001(); + + #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [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() @@ -52,10 +33,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [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() @@ -65,9 +45,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - 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() @@ -77,9 +56,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - 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() @@ -88,9 +66,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - 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() @@ -99,9 +76,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - 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() @@ -110,9 +86,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - 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() @@ -121,9 +96,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - 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 ) @@ -132,9 +106,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - 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() diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamMusicRemote.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamMusicRemote.cs new file mode 100644 index 0000000..620b7c6 --- /dev/null +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamMusicRemote.cs @@ -0,0 +1,408 @@ +using System; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; +using Steamworks.Data; + + +namespace Steamworks +{ + internal class ISteamMusicRemote : SteamInterface + { + + internal ISteamMusicRemote( bool IsGameServer ) + { + SetupInterface( IsGameServer ); + } + + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamMusicRemote_v001", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamMusicRemote_v001(); + public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamMusicRemote_v001(); + + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_RegisterSteamMusicRemote", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _RegisterSteamMusicRemote( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName ); + + #endregion + internal bool RegisterSteamMusicRemote( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName ) + { + var returnValue = _RegisterSteamMusicRemote( Self, pchName ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_DeregisterSteamMusicRemote", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _DeregisterSteamMusicRemote( IntPtr self ); + + #endregion + internal bool DeregisterSteamMusicRemote() + { + var returnValue = _DeregisterSteamMusicRemote( Self ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_BIsCurrentMusicRemote", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _BIsCurrentMusicRemote( IntPtr self ); + + #endregion + internal bool BIsCurrentMusicRemote() + { + var returnValue = _BIsCurrentMusicRemote( Self ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_BActivationSuccess", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _BActivationSuccess( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bValue ); + + #endregion + internal bool BActivationSuccess( [MarshalAs( UnmanagedType.U1 )] bool bValue ) + { + var returnValue = _BActivationSuccess( Self, bValue ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_SetDisplayName", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _SetDisplayName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDisplayName ); + + #endregion + internal bool SetDisplayName( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDisplayName ) + { + var returnValue = _SetDisplayName( Self, pchDisplayName ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_SetPNGIcon_64x64", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _SetPNGIcon_64x64( IntPtr self, IntPtr pvBuffer, uint cbBufferLength ); + + #endregion + internal bool SetPNGIcon_64x64( IntPtr pvBuffer, uint cbBufferLength ) + { + var returnValue = _SetPNGIcon_64x64( Self, pvBuffer, cbBufferLength ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_EnablePlayPrevious", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _EnablePlayPrevious( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bValue ); + + #endregion + internal bool EnablePlayPrevious( [MarshalAs( UnmanagedType.U1 )] bool bValue ) + { + var returnValue = _EnablePlayPrevious( Self, bValue ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_EnablePlayNext", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _EnablePlayNext( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bValue ); + + #endregion + internal bool EnablePlayNext( [MarshalAs( UnmanagedType.U1 )] bool bValue ) + { + var returnValue = _EnablePlayNext( Self, bValue ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_EnableShuffled", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _EnableShuffled( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bValue ); + + #endregion + internal bool EnableShuffled( [MarshalAs( UnmanagedType.U1 )] bool bValue ) + { + var returnValue = _EnableShuffled( Self, bValue ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_EnableLooped", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _EnableLooped( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bValue ); + + #endregion + internal bool EnableLooped( [MarshalAs( UnmanagedType.U1 )] bool bValue ) + { + var returnValue = _EnableLooped( Self, bValue ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_EnableQueue", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _EnableQueue( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bValue ); + + #endregion + internal bool EnableQueue( [MarshalAs( UnmanagedType.U1 )] bool bValue ) + { + var returnValue = _EnableQueue( Self, bValue ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_EnablePlaylists", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _EnablePlaylists( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bValue ); + + #endregion + internal bool EnablePlaylists( [MarshalAs( UnmanagedType.U1 )] bool bValue ) + { + var returnValue = _EnablePlaylists( Self, bValue ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_UpdatePlaybackStatus", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _UpdatePlaybackStatus( IntPtr self, MusicStatus nStatus ); + + #endregion + internal bool UpdatePlaybackStatus( MusicStatus nStatus ) + { + var returnValue = _UpdatePlaybackStatus( Self, nStatus ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_UpdateShuffled", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _UpdateShuffled( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bValue ); + + #endregion + internal bool UpdateShuffled( [MarshalAs( UnmanagedType.U1 )] bool bValue ) + { + var returnValue = _UpdateShuffled( Self, bValue ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_UpdateLooped", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _UpdateLooped( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bValue ); + + #endregion + internal bool UpdateLooped( [MarshalAs( UnmanagedType.U1 )] bool bValue ) + { + var returnValue = _UpdateLooped( Self, bValue ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_UpdateVolume", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _UpdateVolume( IntPtr self, float flValue ); + + #endregion + internal bool UpdateVolume( float flValue ) + { + var returnValue = _UpdateVolume( Self, flValue ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_CurrentEntryWillChange", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _CurrentEntryWillChange( IntPtr self ); + + #endregion + internal bool CurrentEntryWillChange() + { + var returnValue = _CurrentEntryWillChange( Self ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_CurrentEntryIsAvailable", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _CurrentEntryIsAvailable( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bAvailable ); + + #endregion + internal bool CurrentEntryIsAvailable( [MarshalAs( UnmanagedType.U1 )] bool bAvailable ) + { + var returnValue = _CurrentEntryIsAvailable( Self, bAvailable ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_UpdateCurrentEntryText", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _UpdateCurrentEntryText( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchText ); + + #endregion + internal bool UpdateCurrentEntryText( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchText ) + { + var returnValue = _UpdateCurrentEntryText( Self, pchText ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_UpdateCurrentEntryElapsedSeconds", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _UpdateCurrentEntryElapsedSeconds( IntPtr self, int nValue ); + + #endregion + internal bool UpdateCurrentEntryElapsedSeconds( int nValue ) + { + var returnValue = _UpdateCurrentEntryElapsedSeconds( Self, nValue ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_UpdateCurrentEntryCoverArt", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _UpdateCurrentEntryCoverArt( IntPtr self, IntPtr pvBuffer, uint cbBufferLength ); + + #endregion + internal bool UpdateCurrentEntryCoverArt( IntPtr pvBuffer, uint cbBufferLength ) + { + var returnValue = _UpdateCurrentEntryCoverArt( Self, pvBuffer, cbBufferLength ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_CurrentEntryDidChange", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _CurrentEntryDidChange( IntPtr self ); + + #endregion + internal bool CurrentEntryDidChange() + { + var returnValue = _CurrentEntryDidChange( Self ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_QueueWillChange", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _QueueWillChange( IntPtr self ); + + #endregion + internal bool QueueWillChange() + { + var returnValue = _QueueWillChange( Self ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_ResetQueueEntries", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _ResetQueueEntries( IntPtr self ); + + #endregion + internal bool ResetQueueEntries() + { + var returnValue = _ResetQueueEntries( Self ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_SetQueueEntry", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _SetQueueEntry( IntPtr self, int nID, int nPosition, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchEntryText ); + + #endregion + internal bool SetQueueEntry( int nID, int nPosition, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchEntryText ) + { + var returnValue = _SetQueueEntry( Self, nID, nPosition, pchEntryText ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_SetCurrentQueueEntry", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _SetCurrentQueueEntry( IntPtr self, int nID ); + + #endregion + internal bool SetCurrentQueueEntry( int nID ) + { + var returnValue = _SetCurrentQueueEntry( Self, nID ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_QueueDidChange", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _QueueDidChange( IntPtr self ); + + #endregion + internal bool QueueDidChange() + { + var returnValue = _QueueDidChange( Self ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_PlaylistWillChange", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _PlaylistWillChange( IntPtr self ); + + #endregion + internal bool PlaylistWillChange() + { + var returnValue = _PlaylistWillChange( Self ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_ResetPlaylistEntries", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _ResetPlaylistEntries( IntPtr self ); + + #endregion + internal bool ResetPlaylistEntries() + { + var returnValue = _ResetPlaylistEntries( Self ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_SetPlaylistEntry", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _SetPlaylistEntry( IntPtr self, int nID, int nPosition, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchEntryText ); + + #endregion + internal bool SetPlaylistEntry( int nID, int nPosition, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchEntryText ) + { + var returnValue = _SetPlaylistEntry( Self, nID, nPosition, pchEntryText ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_SetCurrentPlaylistEntry", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _SetCurrentPlaylistEntry( IntPtr self, int nID ); + + #endregion + internal bool SetCurrentPlaylistEntry( int nID ) + { + var returnValue = _SetCurrentPlaylistEntry( Self, nID ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_PlaylistDidChange", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _PlaylistDidChange( IntPtr self ); + + #endregion + internal bool PlaylistDidChange() + { + var returnValue = _PlaylistDidChange( Self ); + return returnValue; + } + + } +} diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamNetworking.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamNetworking.cs index ee94c80..f572078 100644 --- a/Facepunch.Steamworks/Generated/Interfaces/ISteamNetworking.cs +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamNetworking.cs @@ -9,66 +9,24 @@ namespace Steamworks { internal class ISteamNetworking : SteamInterface { - public override string InterfaceName => "SteamNetworking005"; - public override void InitInternals() + internal ISteamNetworking( bool IsGameServer ) { - _SendP2PPacket = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) ); - _IsP2PPacketAvailable = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) ); - _ReadP2PPacket = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) ); - _AcceptP2PSessionWithUser = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) ); - _CloseP2PSessionWithUser = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) ); - _CloseP2PChannelWithUser = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) ); - _GetP2PSessionState = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) ); - _AllowP2PPacketRelay = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) ); - _CreateListenSocket = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) ); - _CreateP2PConnectionSocket = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) ); - _CreateConnectionSocket = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) ); - _DestroySocket = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) ); - _DestroyListenSocket = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) ); - _SendDataOnSocket = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) ); - _IsDataAvailableOnSocket = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) ); - _RetrieveDataFromSocket = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) ); - _IsDataAvailable = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) ); - _RetrieveData = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) ); - _GetSocketInfo = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) ); - _GetListenSocketInfo = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) ); - _GetSocketConnectionType = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) ); - _GetMaxPacketSize = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 168 ) ) ); - } - internal override void Shutdown() - { - base.Shutdown(); - - _SendP2PPacket = null; - _IsP2PPacketAvailable = null; - _ReadP2PPacket = null; - _AcceptP2PSessionWithUser = null; - _CloseP2PSessionWithUser = null; - _CloseP2PChannelWithUser = null; - _GetP2PSessionState = null; - _AllowP2PPacketRelay = null; - _CreateListenSocket = null; - _CreateP2PConnectionSocket = null; - _CreateConnectionSocket = null; - _DestroySocket = null; - _DestroyListenSocket = null; - _SendDataOnSocket = null; - _IsDataAvailableOnSocket = null; - _RetrieveDataFromSocket = null; - _IsDataAvailable = null; - _RetrieveData = null; - _GetSocketInfo = null; - _GetListenSocketInfo = null; - _GetSocketConnectionType = null; - _GetMaxPacketSize = null; + SetupInterface( IsGameServer ); } + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworking_v006", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamNetworking_v006(); + public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamNetworking_v006(); + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameServerNetworking_v006", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamGameServerNetworking_v006(); + public override IntPtr GetServerInterfacePointer() => SteamAPI_SteamGameServerNetworking_v006(); + + #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_SendP2PPacket", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSendP2PPacket( IntPtr self, SteamId steamIDRemote, IntPtr pubData, uint cubData, P2PSend eP2PSendType, int nChannel ); - private FSendP2PPacket _SendP2PPacket; + private static extern bool _SendP2PPacket( IntPtr self, SteamId steamIDRemote, IntPtr pubData, uint cubData, P2PSend eP2PSendType, int nChannel ); #endregion internal bool SendP2PPacket( SteamId steamIDRemote, IntPtr pubData, uint cubData, P2PSend eP2PSendType, int nChannel ) @@ -78,10 +36,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_IsP2PPacketAvailable", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FIsP2PPacketAvailable( IntPtr self, ref uint pcubMsgSize, int nChannel ); - private FIsP2PPacketAvailable _IsP2PPacketAvailable; + private static extern bool _IsP2PPacketAvailable( IntPtr self, ref uint pcubMsgSize, int nChannel ); #endregion internal bool IsP2PPacketAvailable( ref uint pcubMsgSize, int nChannel ) @@ -91,10 +48,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_ReadP2PPacket", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FReadP2PPacket( IntPtr self, IntPtr pubDest, uint cubDest, ref uint pcubMsgSize, ref SteamId psteamIDRemote, int nChannel ); - private FReadP2PPacket _ReadP2PPacket; + private static extern bool _ReadP2PPacket( IntPtr self, IntPtr pubDest, uint cubDest, ref uint pcubMsgSize, ref SteamId psteamIDRemote, int nChannel ); #endregion internal bool ReadP2PPacket( IntPtr pubDest, uint cubDest, ref uint pcubMsgSize, ref SteamId psteamIDRemote, int nChannel ) @@ -104,10 +60,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_AcceptP2PSessionWithUser", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FAcceptP2PSessionWithUser( IntPtr self, SteamId steamIDRemote ); - private FAcceptP2PSessionWithUser _AcceptP2PSessionWithUser; + private static extern bool _AcceptP2PSessionWithUser( IntPtr self, SteamId steamIDRemote ); #endregion internal bool AcceptP2PSessionWithUser( SteamId steamIDRemote ) @@ -117,10 +72,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_CloseP2PSessionWithUser", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FCloseP2PSessionWithUser( IntPtr self, SteamId steamIDRemote ); - private FCloseP2PSessionWithUser _CloseP2PSessionWithUser; + private static extern bool _CloseP2PSessionWithUser( IntPtr self, SteamId steamIDRemote ); #endregion internal bool CloseP2PSessionWithUser( SteamId steamIDRemote ) @@ -130,10 +84,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_CloseP2PChannelWithUser", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FCloseP2PChannelWithUser( IntPtr self, SteamId steamIDRemote, int nChannel ); - private FCloseP2PChannelWithUser _CloseP2PChannelWithUser; + private static extern bool _CloseP2PChannelWithUser( IntPtr self, SteamId steamIDRemote, int nChannel ); #endregion internal bool CloseP2PChannelWithUser( SteamId steamIDRemote, int nChannel ) @@ -143,10 +96,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_GetP2PSessionState", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetP2PSessionState( IntPtr self, SteamId steamIDRemote, ref P2PSessionState_t pConnectionState ); - private FGetP2PSessionState _GetP2PSessionState; + private static extern bool _GetP2PSessionState( IntPtr self, SteamId steamIDRemote, ref P2PSessionState_t pConnectionState ); #endregion internal bool GetP2PSessionState( SteamId steamIDRemote, ref P2PSessionState_t pConnectionState ) @@ -156,10 +108,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_AllowP2PPacketRelay", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FAllowP2PPacketRelay( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bAllow ); - private FAllowP2PPacketRelay _AllowP2PPacketRelay; + private static extern bool _AllowP2PPacketRelay( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bAllow ); #endregion internal bool AllowP2PPacketRelay( [MarshalAs( UnmanagedType.U1 )] bool bAllow ) @@ -169,21 +120,19 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SNetListenSocket_t FCreateListenSocket( IntPtr self, int nVirtualP2PPort, uint nIP, ushort nPort, [MarshalAs( UnmanagedType.U1 )] bool bAllowUseOfPacketRelay ); - private FCreateListenSocket _CreateListenSocket; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_CreateListenSocket", CallingConvention = Platform.CC)] + private static extern SNetListenSocket_t _CreateListenSocket( IntPtr self, int nVirtualP2PPort, SteamIPAddress nIP, ushort nPort, [MarshalAs( UnmanagedType.U1 )] bool bAllowUseOfPacketRelay ); #endregion - internal SNetListenSocket_t CreateListenSocket( int nVirtualP2PPort, uint nIP, ushort nPort, [MarshalAs( UnmanagedType.U1 )] bool bAllowUseOfPacketRelay ) + internal SNetListenSocket_t CreateListenSocket( int nVirtualP2PPort, SteamIPAddress nIP, ushort nPort, [MarshalAs( UnmanagedType.U1 )] bool bAllowUseOfPacketRelay ) { var returnValue = _CreateListenSocket( Self, nVirtualP2PPort, nIP, nPort, bAllowUseOfPacketRelay ); return returnValue; } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SNetSocket_t FCreateP2PConnectionSocket( IntPtr self, SteamId steamIDTarget, int nVirtualPort, int nTimeoutSec, [MarshalAs( UnmanagedType.U1 )] bool bAllowUseOfPacketRelay ); - private FCreateP2PConnectionSocket _CreateP2PConnectionSocket; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_CreateP2PConnectionSocket", CallingConvention = Platform.CC)] + private static extern SNetSocket_t _CreateP2PConnectionSocket( IntPtr self, SteamId steamIDTarget, int nVirtualPort, int nTimeoutSec, [MarshalAs( UnmanagedType.U1 )] bool bAllowUseOfPacketRelay ); #endregion internal SNetSocket_t CreateP2PConnectionSocket( SteamId steamIDTarget, int nVirtualPort, int nTimeoutSec, [MarshalAs( UnmanagedType.U1 )] bool bAllowUseOfPacketRelay ) @@ -193,22 +142,20 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SNetSocket_t FCreateConnectionSocket( IntPtr self, uint nIP, ushort nPort, int nTimeoutSec ); - private FCreateConnectionSocket _CreateConnectionSocket; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_CreateConnectionSocket", CallingConvention = Platform.CC)] + private static extern SNetSocket_t _CreateConnectionSocket( IntPtr self, SteamIPAddress nIP, ushort nPort, int nTimeoutSec ); #endregion - internal SNetSocket_t CreateConnectionSocket( uint nIP, ushort nPort, int nTimeoutSec ) + internal SNetSocket_t CreateConnectionSocket( SteamIPAddress nIP, ushort nPort, int nTimeoutSec ) { var returnValue = _CreateConnectionSocket( Self, nIP, nPort, nTimeoutSec ); return returnValue; } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_DestroySocket", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FDestroySocket( IntPtr self, SNetSocket_t hSocket, [MarshalAs( UnmanagedType.U1 )] bool bNotifyRemoteEnd ); - private FDestroySocket _DestroySocket; + private static extern bool _DestroySocket( IntPtr self, SNetSocket_t hSocket, [MarshalAs( UnmanagedType.U1 )] bool bNotifyRemoteEnd ); #endregion internal bool DestroySocket( SNetSocket_t hSocket, [MarshalAs( UnmanagedType.U1 )] bool bNotifyRemoteEnd ) @@ -218,10 +165,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_DestroyListenSocket", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FDestroyListenSocket( IntPtr self, SNetListenSocket_t hSocket, [MarshalAs( UnmanagedType.U1 )] bool bNotifyRemoteEnd ); - private FDestroyListenSocket _DestroyListenSocket; + private static extern bool _DestroyListenSocket( IntPtr self, SNetListenSocket_t hSocket, [MarshalAs( UnmanagedType.U1 )] bool bNotifyRemoteEnd ); #endregion internal bool DestroyListenSocket( SNetListenSocket_t hSocket, [MarshalAs( UnmanagedType.U1 )] bool bNotifyRemoteEnd ) @@ -231,10 +177,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_SendDataOnSocket", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSendDataOnSocket( IntPtr self, SNetSocket_t hSocket, [In,Out] IntPtr[] pubData, uint cubData, [MarshalAs( UnmanagedType.U1 )] bool bReliable ); - private FSendDataOnSocket _SendDataOnSocket; + private static extern bool _SendDataOnSocket( IntPtr self, SNetSocket_t hSocket, [In,Out] IntPtr[] pubData, uint cubData, [MarshalAs( UnmanagedType.U1 )] bool bReliable ); #endregion internal bool SendDataOnSocket( SNetSocket_t hSocket, [In,Out] IntPtr[] pubData, uint cubData, [MarshalAs( UnmanagedType.U1 )] bool bReliable ) @@ -244,10 +189,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_IsDataAvailableOnSocket", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FIsDataAvailableOnSocket( IntPtr self, SNetSocket_t hSocket, ref uint pcubMsgSize ); - private FIsDataAvailableOnSocket _IsDataAvailableOnSocket; + private static extern bool _IsDataAvailableOnSocket( IntPtr self, SNetSocket_t hSocket, ref uint pcubMsgSize ); #endregion internal bool IsDataAvailableOnSocket( SNetSocket_t hSocket, ref uint pcubMsgSize ) @@ -257,10 +201,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_RetrieveDataFromSocket", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FRetrieveDataFromSocket( IntPtr self, SNetSocket_t hSocket, [In,Out] IntPtr[] pubDest, uint cubDest, ref uint pcubMsgSize ); - private FRetrieveDataFromSocket _RetrieveDataFromSocket; + private static extern bool _RetrieveDataFromSocket( IntPtr self, SNetSocket_t hSocket, [In,Out] IntPtr[] pubDest, uint cubDest, ref uint pcubMsgSize ); #endregion internal bool RetrieveDataFromSocket( SNetSocket_t hSocket, [In,Out] IntPtr[] pubDest, uint cubDest, ref uint pcubMsgSize ) @@ -270,10 +213,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_IsDataAvailable", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FIsDataAvailable( IntPtr self, SNetListenSocket_t hListenSocket, ref uint pcubMsgSize, ref SNetSocket_t phSocket ); - private FIsDataAvailable _IsDataAvailable; + private static extern bool _IsDataAvailable( IntPtr self, SNetListenSocket_t hListenSocket, ref uint pcubMsgSize, ref SNetSocket_t phSocket ); #endregion internal bool IsDataAvailable( SNetListenSocket_t hListenSocket, ref uint pcubMsgSize, ref SNetSocket_t phSocket ) @@ -283,10 +225,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_RetrieveData", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FRetrieveData( IntPtr self, SNetListenSocket_t hListenSocket, [In,Out] IntPtr[] pubDest, uint cubDest, ref uint pcubMsgSize, ref SNetSocket_t phSocket ); - private FRetrieveData _RetrieveData; + private static extern bool _RetrieveData( IntPtr self, SNetListenSocket_t hListenSocket, [In,Out] IntPtr[] pubDest, uint cubDest, ref uint pcubMsgSize, ref SNetSocket_t phSocket ); #endregion internal bool RetrieveData( SNetListenSocket_t hListenSocket, [In,Out] IntPtr[] pubDest, uint cubDest, ref uint pcubMsgSize, ref SNetSocket_t phSocket ) @@ -296,35 +237,32 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_GetSocketInfo", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetSocketInfo( IntPtr self, SNetSocket_t hSocket, ref SteamId pSteamIDRemote, ref int peSocketStatus, ref uint punIPRemote, ref ushort punPortRemote ); - private FGetSocketInfo _GetSocketInfo; + private static extern bool _GetSocketInfo( IntPtr self, SNetSocket_t hSocket, ref SteamId pSteamIDRemote, ref int peSocketStatus, ref SteamIPAddress punIPRemote, ref ushort punPortRemote ); #endregion - internal bool GetSocketInfo( SNetSocket_t hSocket, ref SteamId pSteamIDRemote, ref int peSocketStatus, ref uint punIPRemote, ref ushort punPortRemote ) + internal bool GetSocketInfo( SNetSocket_t hSocket, ref SteamId pSteamIDRemote, ref int peSocketStatus, ref SteamIPAddress punIPRemote, ref ushort punPortRemote ) { var returnValue = _GetSocketInfo( Self, hSocket, ref pSteamIDRemote, ref peSocketStatus, ref punIPRemote, ref punPortRemote ); return returnValue; } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_GetListenSocketInfo", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetListenSocketInfo( IntPtr self, SNetListenSocket_t hListenSocket, ref uint pnIP, ref ushort pnPort ); - private FGetListenSocketInfo _GetListenSocketInfo; + private static extern bool _GetListenSocketInfo( IntPtr self, SNetListenSocket_t hListenSocket, ref SteamIPAddress pnIP, ref ushort pnPort ); #endregion - internal bool GetListenSocketInfo( SNetListenSocket_t hListenSocket, ref uint pnIP, ref ushort pnPort ) + internal bool GetListenSocketInfo( SNetListenSocket_t hListenSocket, ref SteamIPAddress pnIP, ref ushort pnPort ) { var returnValue = _GetListenSocketInfo( Self, hListenSocket, ref pnIP, ref pnPort ); return returnValue; } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SNetSocketConnectionType FGetSocketConnectionType( IntPtr self, SNetSocket_t hSocket ); - private FGetSocketConnectionType _GetSocketConnectionType; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_GetSocketConnectionType", CallingConvention = Platform.CC)] + private static extern SNetSocketConnectionType _GetSocketConnectionType( IntPtr self, SNetSocket_t hSocket ); #endregion internal SNetSocketConnectionType GetSocketConnectionType( SNetSocket_t hSocket ) @@ -334,9 +272,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetMaxPacketSize( IntPtr self, SNetSocket_t hSocket ); - private FGetMaxPacketSize _GetMaxPacketSize; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_GetMaxPacketSize", CallingConvention = Platform.CC)] + private static extern int _GetMaxPacketSize( IntPtr self, SNetSocket_t hSocket ); #endregion internal int GetMaxPacketSize( SNetSocket_t hSocket ) diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamNetworkingConnectionCustomSignaling.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamNetworkingConnectionCustomSignaling.cs new file mode 100644 index 0000000..3379820 --- /dev/null +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamNetworkingConnectionCustomSignaling.cs @@ -0,0 +1,41 @@ +using System; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; +using Steamworks.Data; + + +namespace Steamworks +{ + internal class ISteamNetworkingConnectionCustomSignaling : SteamInterface + { + + internal ISteamNetworkingConnectionCustomSignaling( bool IsGameServer ) + { + SetupInterface( IsGameServer ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingConnectionCustomSignaling_SendSignal", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _SendSignal( IntPtr self, Connection hConn, ref ConnectionInfo info, IntPtr pMsg, int cbMsg ); + + #endregion + internal bool SendSignal( Connection hConn, ref ConnectionInfo info, IntPtr pMsg, int cbMsg ) + { + var returnValue = _SendSignal( Self, hConn, ref info, pMsg, cbMsg ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingConnectionCustomSignaling_Release", CallingConvention = Platform.CC)] + private static extern void _Release( IntPtr self ); + + #endregion + internal void Release() + { + _Release( Self ); + } + + } +} diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamNetworkingCustomSignalingRecvContext.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamNetworkingCustomSignalingRecvContext.cs new file mode 100644 index 0000000..6709195 --- /dev/null +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamNetworkingCustomSignalingRecvContext.cs @@ -0,0 +1,40 @@ +using System; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; +using Steamworks.Data; + + +namespace Steamworks +{ + internal class ISteamNetworkingCustomSignalingRecvContext : SteamInterface + { + + internal ISteamNetworkingCustomSignalingRecvContext( bool IsGameServer ) + { + SetupInterface( IsGameServer ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingCustomSignalingRecvContext_OnConnectRequest", CallingConvention = Platform.CC)] + private static extern IntPtr _OnConnectRequest( IntPtr self, Connection hConn, ref NetIdentity identityPeer ); + + #endregion + internal IntPtr OnConnectRequest( Connection hConn, ref NetIdentity identityPeer ) + { + var returnValue = _OnConnectRequest( Self, hConn, ref identityPeer ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingCustomSignalingRecvContext_SendRejectionSignal", CallingConvention = Platform.CC)] + private static extern void _SendRejectionSignal( IntPtr self, ref NetIdentity identityPeer, IntPtr pMsg, int cbMsg ); + + #endregion + internal void SendRejectionSignal( ref NetIdentity identityPeer, IntPtr pMsg, int cbMsg ) + { + _SendRejectionSignal( Self, ref identityPeer, pMsg, cbMsg ); + } + + } +} diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamNetworkingSockets.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamNetworkingSockets.cs index 4dcf5c5..d6cd2f7 100644 --- a/Facepunch.Steamworks/Generated/Interfaces/ISteamNetworkingSockets.cs +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamNetworkingSockets.cs @@ -9,127 +9,67 @@ namespace Steamworks { internal class ISteamNetworkingSockets : SteamInterface { - public override string InterfaceName => "SteamNetworkingSockets002"; - public override void InitInternals() + internal ISteamNetworkingSockets( bool IsGameServer ) { - _CreateListenSocketIP = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) ); - _ConnectByIPAddress = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) ); - _CreateListenSocketP2P = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) ); - _ConnectP2P = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) ); - _AcceptConnection = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) ); - _CloseConnection = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) ); - _CloseListenSocket = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) ); - _SetConnectionUserData = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) ); - _GetConnectionUserData = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) ); - _SetConnectionName = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) ); - _GetConnectionName = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) ); - _SendMessageToConnection = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) ); - _FlushMessagesOnConnection = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) ); - _ReceiveMessagesOnConnection = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) ); - _ReceiveMessagesOnListenSocket = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) ); - _GetConnectionInfo = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) ); - _GetQuickConnectionStatus = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) ); - _GetDetailedConnectionStatus = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) ); - _GetListenSocketAddress = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) ); - _CreateSocketPair = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) ); - _GetIdentity = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) ); - _ReceivedRelayAuthTicket = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 168 ) ) ); - _FindRelayAuthTicketForServer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 176 ) ) ); - _ConnectToHostedDedicatedServer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 184 ) ) ); - _GetHostedDedicatedServerPort = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 192 ) ) ); - _GetHostedDedicatedServerPOPID = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 200 ) ) ); - _GetHostedDedicatedServerAddress = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 208 ) ) ); - _CreateHostedDedicatedServerListenSocket = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 216 ) ) ); - _RunCallbacks = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 224 ) ) ); - } - internal override void Shutdown() - { - base.Shutdown(); - - _CreateListenSocketIP = null; - _ConnectByIPAddress = null; - _CreateListenSocketP2P = null; - _ConnectP2P = null; - _AcceptConnection = null; - _CloseConnection = null; - _CloseListenSocket = null; - _SetConnectionUserData = null; - _GetConnectionUserData = null; - _SetConnectionName = null; - _GetConnectionName = null; - _SendMessageToConnection = null; - _FlushMessagesOnConnection = null; - _ReceiveMessagesOnConnection = null; - _ReceiveMessagesOnListenSocket = null; - _GetConnectionInfo = null; - _GetQuickConnectionStatus = null; - _GetDetailedConnectionStatus = null; - _GetListenSocketAddress = null; - _CreateSocketPair = null; - _GetIdentity = null; - _ReceivedRelayAuthTicket = null; - _FindRelayAuthTicketForServer = null; - _ConnectToHostedDedicatedServer = null; - _GetHostedDedicatedServerPort = null; - _GetHostedDedicatedServerPOPID = null; - _GetHostedDedicatedServerAddress = null; - _CreateHostedDedicatedServerListenSocket = null; - _RunCallbacks = null; + SetupInterface( IsGameServer ); } + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingSockets_v008", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamNetworkingSockets_v008(); + public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamNetworkingSockets_v008(); + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameServerNetworkingSockets_v008", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamGameServerNetworkingSockets_v008(); + public override IntPtr GetServerInterfacePointer() => SteamAPI_SteamGameServerNetworkingSockets_v008(); + + #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate Socket FCreateListenSocketIP( IntPtr self, ref NetAddress localAddress ); - private FCreateListenSocketIP _CreateListenSocketIP; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_CreateListenSocketIP", CallingConvention = Platform.CC)] + private static extern Socket _CreateListenSocketIP( IntPtr self, ref NetAddress localAddress, int nOptions, [In,Out] NetKeyValue[] pOptions ); #endregion - internal Socket CreateListenSocketIP( ref NetAddress localAddress ) + internal Socket CreateListenSocketIP( ref NetAddress localAddress, int nOptions, [In,Out] NetKeyValue[] pOptions ) { - var returnValue = _CreateListenSocketIP( Self, ref localAddress ); + var returnValue = _CreateListenSocketIP( Self, ref localAddress, nOptions, pOptions ); return returnValue; } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate Connection FConnectByIPAddress( IntPtr self, ref NetAddress address ); - private FConnectByIPAddress _ConnectByIPAddress; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_ConnectByIPAddress", CallingConvention = Platform.CC)] + private static extern Connection _ConnectByIPAddress( IntPtr self, ref NetAddress address, int nOptions, [In,Out] NetKeyValue[] pOptions ); #endregion - internal Connection ConnectByIPAddress( ref NetAddress address ) + internal Connection ConnectByIPAddress( ref NetAddress address, int nOptions, [In,Out] NetKeyValue[] pOptions ) { - var returnValue = _ConnectByIPAddress( Self, ref address ); + var returnValue = _ConnectByIPAddress( Self, ref address, nOptions, pOptions ); return returnValue; } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate Socket FCreateListenSocketP2P( IntPtr self, int nVirtualPort ); - private FCreateListenSocketP2P _CreateListenSocketP2P; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_CreateListenSocketP2P", CallingConvention = Platform.CC)] + private static extern Socket _CreateListenSocketP2P( IntPtr self, int nVirtualPort, int nOptions, [In,Out] NetKeyValue[] pOptions ); #endregion - internal Socket CreateListenSocketP2P( int nVirtualPort ) + internal Socket CreateListenSocketP2P( int nVirtualPort, int nOptions, [In,Out] NetKeyValue[] pOptions ) { - var returnValue = _CreateListenSocketP2P( Self, nVirtualPort ); + var returnValue = _CreateListenSocketP2P( Self, nVirtualPort, nOptions, pOptions ); return returnValue; } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate Connection FConnectP2P( IntPtr self, ref NetIdentity identityRemote, int nVirtualPort ); - private FConnectP2P _ConnectP2P; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_ConnectP2P", CallingConvention = Platform.CC)] + private static extern Connection _ConnectP2P( IntPtr self, ref NetIdentity identityRemote, int nVirtualPort, int nOptions, [In,Out] NetKeyValue[] pOptions ); #endregion - internal Connection ConnectP2P( ref NetIdentity identityRemote, int nVirtualPort ) + internal Connection ConnectP2P( ref NetIdentity identityRemote, int nVirtualPort, int nOptions, [In,Out] NetKeyValue[] pOptions ) { - var returnValue = _ConnectP2P( Self, ref identityRemote, nVirtualPort ); + var returnValue = _ConnectP2P( Self, ref identityRemote, nVirtualPort, nOptions, pOptions ); return returnValue; } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate Result FAcceptConnection( IntPtr self, Connection hConn ); - private FAcceptConnection _AcceptConnection; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_AcceptConnection", CallingConvention = Platform.CC)] + private static extern Result _AcceptConnection( IntPtr self, Connection hConn ); #endregion internal Result AcceptConnection( Connection hConn ) @@ -139,10 +79,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_CloseConnection", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FCloseConnection( IntPtr self, Connection hPeer, int nReason, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszDebug, [MarshalAs( UnmanagedType.U1 )] bool bEnableLinger ); - private FCloseConnection _CloseConnection; + private static extern bool _CloseConnection( IntPtr self, Connection hPeer, int nReason, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszDebug, [MarshalAs( UnmanagedType.U1 )] bool bEnableLinger ); #endregion internal bool CloseConnection( Connection hPeer, int nReason, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszDebug, [MarshalAs( UnmanagedType.U1 )] bool bEnableLinger ) @@ -152,10 +91,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_CloseListenSocket", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FCloseListenSocket( IntPtr self, Socket hSocket ); - private FCloseListenSocket _CloseListenSocket; + private static extern bool _CloseListenSocket( IntPtr self, Socket hSocket ); #endregion internal bool CloseListenSocket( Socket hSocket ) @@ -165,10 +103,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_SetConnectionUserData", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetConnectionUserData( IntPtr self, Connection hPeer, long nUserData ); - private FSetConnectionUserData _SetConnectionUserData; + private static extern bool _SetConnectionUserData( IntPtr self, Connection hPeer, long nUserData ); #endregion internal bool SetConnectionUserData( Connection hPeer, long nUserData ) @@ -178,9 +115,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate long FGetConnectionUserData( IntPtr self, Connection hPeer ); - private FGetConnectionUserData _GetConnectionUserData; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetConnectionUserData", CallingConvention = Platform.CC)] + private static extern long _GetConnectionUserData( IntPtr self, Connection hPeer ); #endregion internal long GetConnectionUserData( Connection hPeer ) @@ -190,9 +126,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FSetConnectionName( IntPtr self, Connection hPeer, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszName ); - private FSetConnectionName _SetConnectionName; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_SetConnectionName", CallingConvention = Platform.CC)] + private static extern void _SetConnectionName( IntPtr self, Connection hPeer, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszName ); #endregion internal void SetConnectionName( Connection hPeer, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszName ) @@ -201,10 +136,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetConnectionName", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetConnectionName( IntPtr self, Connection hPeer, IntPtr pszName, int nMaxLen ); - private FGetConnectionName _GetConnectionName; + private static extern bool _GetConnectionName( IntPtr self, Connection hPeer, IntPtr pszName, int nMaxLen ); #endregion internal bool GetConnectionName( Connection hPeer, out string pszName ) @@ -216,21 +150,29 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate Result FSendMessageToConnection( IntPtr self, Connection hConn, IntPtr pData, uint cbData, int nSendFlags ); - private FSendMessageToConnection _SendMessageToConnection; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_SendMessageToConnection", CallingConvention = Platform.CC)] + private static extern Result _SendMessageToConnection( IntPtr self, Connection hConn, IntPtr pData, uint cbData, int nSendFlags, ref long pOutMessageNumber ); #endregion - internal Result SendMessageToConnection( Connection hConn, IntPtr pData, uint cbData, int nSendFlags ) + internal Result SendMessageToConnection( Connection hConn, IntPtr pData, uint cbData, int nSendFlags, ref long pOutMessageNumber ) { - var returnValue = _SendMessageToConnection( Self, hConn, pData, cbData, nSendFlags ); + var returnValue = _SendMessageToConnection( Self, hConn, pData, cbData, nSendFlags, ref pOutMessageNumber ); return returnValue; } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate Result FFlushMessagesOnConnection( IntPtr self, Connection hConn ); - private FFlushMessagesOnConnection _FlushMessagesOnConnection; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_SendMessages", CallingConvention = Platform.CC)] + private static extern void _SendMessages( IntPtr self, int nMessages, ref NetMsg pMessages, [In,Out] long[] pOutMessageNumberOrResult ); + + #endregion + internal void SendMessages( int nMessages, ref NetMsg pMessages, [In,Out] long[] pOutMessageNumberOrResult ) + { + _SendMessages( Self, nMessages, ref pMessages, pOutMessageNumberOrResult ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_FlushMessagesOnConnection", CallingConvention = Platform.CC)] + private static extern Result _FlushMessagesOnConnection( IntPtr self, Connection hConn ); #endregion internal Result FlushMessagesOnConnection( Connection hConn ) @@ -240,9 +182,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FReceiveMessagesOnConnection( IntPtr self, Connection hConn, IntPtr ppOutMessages, int nMaxMessages ); - private FReceiveMessagesOnConnection _ReceiveMessagesOnConnection; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_ReceiveMessagesOnConnection", CallingConvention = Platform.CC)] + private static extern int _ReceiveMessagesOnConnection( IntPtr self, Connection hConn, IntPtr ppOutMessages, int nMaxMessages ); #endregion internal int ReceiveMessagesOnConnection( Connection hConn, IntPtr ppOutMessages, int nMaxMessages ) @@ -252,22 +193,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FReceiveMessagesOnListenSocket( IntPtr self, Socket hSocket, IntPtr ppOutMessages, int nMaxMessages ); - private FReceiveMessagesOnListenSocket _ReceiveMessagesOnListenSocket; - - #endregion - internal int ReceiveMessagesOnListenSocket( Socket hSocket, IntPtr ppOutMessages, int nMaxMessages ) - { - var returnValue = _ReceiveMessagesOnListenSocket( Self, hSocket, ppOutMessages, nMaxMessages ); - return returnValue; - } - - #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetConnectionInfo", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetConnectionInfo( IntPtr self, Connection hConn, ref ConnectionInfo pInfo ); - private FGetConnectionInfo _GetConnectionInfo; + private static extern bool _GetConnectionInfo( IntPtr self, Connection hConn, ref ConnectionInfo pInfo ); #endregion internal bool GetConnectionInfo( Connection hConn, ref ConnectionInfo pInfo ) @@ -277,10 +205,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetQuickConnectionStatus", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetQuickConnectionStatus( IntPtr self, Connection hConn, ref SteamNetworkingQuickConnectionStatus pStats ); - private FGetQuickConnectionStatus _GetQuickConnectionStatus; + private static extern bool _GetQuickConnectionStatus( IntPtr self, Connection hConn, ref SteamNetworkingQuickConnectionStatus pStats ); #endregion internal bool GetQuickConnectionStatus( Connection hConn, ref SteamNetworkingQuickConnectionStatus pStats ) @@ -290,9 +217,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetDetailedConnectionStatus( IntPtr self, Connection hConn, IntPtr pszBuf, int cbBuf ); - private FGetDetailedConnectionStatus _GetDetailedConnectionStatus; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetDetailedConnectionStatus", CallingConvention = Platform.CC)] + private static extern int _GetDetailedConnectionStatus( IntPtr self, Connection hConn, IntPtr pszBuf, int cbBuf ); #endregion internal int GetDetailedConnectionStatus( Connection hConn, out string pszBuf ) @@ -304,10 +230,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetListenSocketAddress", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetListenSocketAddress( IntPtr self, Socket hSocket, ref NetAddress address ); - private FGetListenSocketAddress _GetListenSocketAddress; + private static extern bool _GetListenSocketAddress( IntPtr self, Socket hSocket, ref NetAddress address ); #endregion internal bool GetListenSocketAddress( Socket hSocket, ref NetAddress address ) @@ -317,10 +242,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_CreateSocketPair", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FCreateSocketPair( IntPtr self, [In,Out] Connection[] pOutConnection1, [In,Out] Connection[] pOutConnection2, [MarshalAs( UnmanagedType.U1 )] bool bUseNetworkLoopback, ref NetIdentity pIdentity1, ref NetIdentity pIdentity2 ); - private FCreateSocketPair _CreateSocketPair; + private static extern bool _CreateSocketPair( IntPtr self, [In,Out] Connection[] pOutConnection1, [In,Out] Connection[] pOutConnection2, [MarshalAs( UnmanagedType.U1 )] bool bUseNetworkLoopback, ref NetIdentity pIdentity1, ref NetIdentity pIdentity2 ); #endregion internal bool CreateSocketPair( [In,Out] Connection[] pOutConnection1, [In,Out] Connection[] pOutConnection2, [MarshalAs( UnmanagedType.U1 )] bool bUseNetworkLoopback, ref NetIdentity pIdentity1, ref NetIdentity pIdentity2 ) @@ -330,10 +254,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetIdentity", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetIdentity( IntPtr self, ref NetIdentity pIdentity ); - private FGetIdentity _GetIdentity; + private static extern bool _GetIdentity( IntPtr self, ref NetIdentity pIdentity ); #endregion internal bool GetIdentity( ref NetIdentity pIdentity ) @@ -343,10 +266,77 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_InitAuthentication", CallingConvention = Platform.CC)] + private static extern SteamNetworkingAvailability _InitAuthentication( IntPtr self ); + + #endregion + internal SteamNetworkingAvailability InitAuthentication() + { + var returnValue = _InitAuthentication( Self ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetAuthenticationStatus", CallingConvention = Platform.CC)] + private static extern SteamNetworkingAvailability _GetAuthenticationStatus( IntPtr self, ref SteamNetAuthenticationStatus_t pDetails ); + + #endregion + internal SteamNetworkingAvailability GetAuthenticationStatus( ref SteamNetAuthenticationStatus_t pDetails ) + { + var returnValue = _GetAuthenticationStatus( Self, ref pDetails ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_CreatePollGroup", CallingConvention = Platform.CC)] + private static extern HSteamNetPollGroup _CreatePollGroup( IntPtr self ); + + #endregion + internal HSteamNetPollGroup CreatePollGroup() + { + var returnValue = _CreatePollGroup( Self ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_DestroyPollGroup", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FReceivedRelayAuthTicket( IntPtr self, IntPtr pvTicket, int cbTicket, [In,Out] SteamDatagramRelayAuthTicket[] pOutParsedTicket ); - private FReceivedRelayAuthTicket _ReceivedRelayAuthTicket; + private static extern bool _DestroyPollGroup( IntPtr self, HSteamNetPollGroup hPollGroup ); + + #endregion + internal bool DestroyPollGroup( HSteamNetPollGroup hPollGroup ) + { + var returnValue = _DestroyPollGroup( Self, hPollGroup ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_SetConnectionPollGroup", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _SetConnectionPollGroup( IntPtr self, Connection hConn, HSteamNetPollGroup hPollGroup ); + + #endregion + internal bool SetConnectionPollGroup( Connection hConn, HSteamNetPollGroup hPollGroup ) + { + var returnValue = _SetConnectionPollGroup( Self, hConn, hPollGroup ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_ReceiveMessagesOnPollGroup", CallingConvention = Platform.CC)] + private static extern int _ReceiveMessagesOnPollGroup( IntPtr self, HSteamNetPollGroup hPollGroup, IntPtr ppOutMessages, int nMaxMessages ); + + #endregion + internal int ReceiveMessagesOnPollGroup( HSteamNetPollGroup hPollGroup, IntPtr ppOutMessages, int nMaxMessages ) + { + var returnValue = _ReceiveMessagesOnPollGroup( Self, hPollGroup, ppOutMessages, nMaxMessages ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_ReceivedRelayAuthTicket", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _ReceivedRelayAuthTicket( IntPtr self, IntPtr pvTicket, int cbTicket, [In,Out] SteamDatagramRelayAuthTicket[] pOutParsedTicket ); #endregion internal bool ReceivedRelayAuthTicket( IntPtr pvTicket, int cbTicket, [In,Out] SteamDatagramRelayAuthTicket[] pOutParsedTicket ) @@ -356,9 +346,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FFindRelayAuthTicketForServer( IntPtr self, ref NetIdentity identityGameServer, int nVirtualPort, [In,Out] SteamDatagramRelayAuthTicket[] pOutParsedTicket ); - private FFindRelayAuthTicketForServer _FindRelayAuthTicketForServer; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_FindRelayAuthTicketForServer", CallingConvention = Platform.CC)] + private static extern int _FindRelayAuthTicketForServer( IntPtr self, ref NetIdentity identityGameServer, int nVirtualPort, [In,Out] SteamDatagramRelayAuthTicket[] pOutParsedTicket ); #endregion internal int FindRelayAuthTicketForServer( ref NetIdentity identityGameServer, int nVirtualPort, [In,Out] SteamDatagramRelayAuthTicket[] pOutParsedTicket ) @@ -368,21 +357,19 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate Connection FConnectToHostedDedicatedServer( IntPtr self, ref NetIdentity identityTarget, int nVirtualPort ); - private FConnectToHostedDedicatedServer _ConnectToHostedDedicatedServer; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_ConnectToHostedDedicatedServer", CallingConvention = Platform.CC)] + private static extern Connection _ConnectToHostedDedicatedServer( IntPtr self, ref NetIdentity identityTarget, int nVirtualPort, int nOptions, [In,Out] NetKeyValue[] pOptions ); #endregion - internal Connection ConnectToHostedDedicatedServer( ref NetIdentity identityTarget, int nVirtualPort ) + internal Connection ConnectToHostedDedicatedServer( ref NetIdentity identityTarget, int nVirtualPort, int nOptions, [In,Out] NetKeyValue[] pOptions ) { - var returnValue = _ConnectToHostedDedicatedServer( Self, ref identityTarget, nVirtualPort ); + var returnValue = _ConnectToHostedDedicatedServer( Self, ref identityTarget, nVirtualPort, nOptions, pOptions ); return returnValue; } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate ushort FGetHostedDedicatedServerPort( IntPtr self ); - private FGetHostedDedicatedServerPort _GetHostedDedicatedServerPort; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetHostedDedicatedServerPort", CallingConvention = Platform.CC)] + private static extern ushort _GetHostedDedicatedServerPort( IntPtr self ); #endregion internal ushort GetHostedDedicatedServerPort() @@ -392,9 +379,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamNetworkingPOPID FGetHostedDedicatedServerPOPID( IntPtr self ); - private FGetHostedDedicatedServerPOPID _GetHostedDedicatedServerPOPID; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetHostedDedicatedServerPOPID", CallingConvention = Platform.CC)] + private static extern SteamNetworkingPOPID _GetHostedDedicatedServerPOPID( IntPtr self ); #endregion internal SteamNetworkingPOPID GetHostedDedicatedServerPOPID() @@ -404,39 +390,83 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetHostedDedicatedServerAddress( IntPtr self, ref SteamDatagramHostedAddress pRouting ); - private FGetHostedDedicatedServerAddress _GetHostedDedicatedServerAddress; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetHostedDedicatedServerAddress", CallingConvention = Platform.CC)] + private static extern Result _GetHostedDedicatedServerAddress( IntPtr self, ref SteamDatagramHostedAddress pRouting ); #endregion - internal bool GetHostedDedicatedServerAddress( ref SteamDatagramHostedAddress pRouting ) + internal Result GetHostedDedicatedServerAddress( ref SteamDatagramHostedAddress pRouting ) { var returnValue = _GetHostedDedicatedServerAddress( Self, ref pRouting ); return returnValue; } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate Socket FCreateHostedDedicatedServerListenSocket( IntPtr self, int nVirtualPort ); - private FCreateHostedDedicatedServerListenSocket _CreateHostedDedicatedServerListenSocket; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_CreateHostedDedicatedServerListenSocket", CallingConvention = Platform.CC)] + private static extern Socket _CreateHostedDedicatedServerListenSocket( IntPtr self, int nVirtualPort, int nOptions, [In,Out] NetKeyValue[] pOptions ); #endregion - internal Socket CreateHostedDedicatedServerListenSocket( int nVirtualPort ) + internal Socket CreateHostedDedicatedServerListenSocket( int nVirtualPort, int nOptions, [In,Out] NetKeyValue[] pOptions ) { - var returnValue = _CreateHostedDedicatedServerListenSocket( Self, nVirtualPort ); + var returnValue = _CreateHostedDedicatedServerListenSocket( Self, nVirtualPort, nOptions, pOptions ); return returnValue; } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FRunCallbacks( IntPtr self, IntPtr pCallbacks ); - private FRunCallbacks _RunCallbacks; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetGameCoordinatorServerLogin", CallingConvention = Platform.CC)] + private static extern Result _GetGameCoordinatorServerLogin( IntPtr self, ref SteamDatagramGameCoordinatorServerLogin pLoginInfo, ref int pcbSignedBlob, IntPtr pBlob ); #endregion - internal void RunCallbacks( IntPtr pCallbacks ) + internal Result GetGameCoordinatorServerLogin( ref SteamDatagramGameCoordinatorServerLogin pLoginInfo, ref int pcbSignedBlob, IntPtr pBlob ) { - _RunCallbacks( Self, pCallbacks ); + var returnValue = _GetGameCoordinatorServerLogin( Self, ref pLoginInfo, ref pcbSignedBlob, pBlob ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_ConnectP2PCustomSignaling", CallingConvention = Platform.CC)] + private static extern Connection _ConnectP2PCustomSignaling( IntPtr self, IntPtr pSignaling, ref NetIdentity pPeerIdentity, int nOptions, [In,Out] NetKeyValue[] pOptions ); + + #endregion + internal Connection ConnectP2PCustomSignaling( IntPtr pSignaling, ref NetIdentity pPeerIdentity, int nOptions, [In,Out] NetKeyValue[] pOptions ) + { + var returnValue = _ConnectP2PCustomSignaling( Self, pSignaling, ref pPeerIdentity, nOptions, pOptions ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_ReceivedP2PCustomSignal", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _ReceivedP2PCustomSignal( IntPtr self, IntPtr pMsg, int cbMsg, IntPtr pContext ); + + #endregion + internal bool ReceivedP2PCustomSignal( IntPtr pMsg, int cbMsg, IntPtr pContext ) + { + var returnValue = _ReceivedP2PCustomSignal( Self, pMsg, cbMsg, pContext ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetCertificateRequest", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _GetCertificateRequest( IntPtr self, ref int pcbBlob, IntPtr pBlob, ref SteamNetworkingErrMsg errMsg ); + + #endregion + internal bool GetCertificateRequest( ref int pcbBlob, IntPtr pBlob, ref SteamNetworkingErrMsg errMsg ) + { + var returnValue = _GetCertificateRequest( Self, ref pcbBlob, pBlob, ref errMsg ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_SetCertificate", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _SetCertificate( IntPtr self, IntPtr pCertificate, int cbCertificate, ref SteamNetworkingErrMsg errMsg ); + + #endregion + internal bool SetCertificate( IntPtr pCertificate, int cbCertificate, ref SteamNetworkingErrMsg errMsg ) + { + var returnValue = _SetCertificate( Self, pCertificate, cbCertificate, ref errMsg ); + return returnValue; } } diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamNetworkingUtils.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamNetworkingUtils.cs index 8da7049..30f265b 100644 --- a/Facepunch.Steamworks/Generated/Interfaces/ISteamNetworkingUtils.cs +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamNetworkingUtils.cs @@ -9,55 +9,52 @@ namespace Steamworks { internal class ISteamNetworkingUtils : SteamInterface { - public override string InterfaceName => "SteamNetworkingUtils001"; - public override void InitInternals() + internal ISteamNetworkingUtils( bool IsGameServer ) { - _GetLocalPingLocation = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) ); - _EstimatePingTimeBetweenTwoLocations = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) ); - _EstimatePingTimeFromLocalHost = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) ); - _ConvertPingLocationToString = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) ); - _ParsePingLocationString = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) ); - _CheckPingDataUpToDate = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) ); - _IsPingMeasurementInProgress = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) ); - _GetPingToDataCenter = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) ); - _GetDirectPingToPOP = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) ); - _GetPOPCount = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) ); - _GetPOPList = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) ); - _GetLocalTimestamp = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) ); - _SetDebugOutputFunction = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) ); - _SetConfigValue = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) ); - _GetConfigValue = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) ); - _GetConfigValueInfo = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) ); - _GetFirstConfigValue = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) ); + SetupInterface( IsGameServer ); } - internal override void Shutdown() + + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingUtils_v003", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamNetworkingUtils_v003(); + public override IntPtr GetGlobalInterfacePointer() => SteamAPI_SteamNetworkingUtils_v003(); + + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_AllocateMessage", CallingConvention = Platform.CC)] + private static extern IntPtr _AllocateMessage( IntPtr self, int cbAllocateBuffer ); + + #endregion + internal NetMsg AllocateMessage( int cbAllocateBuffer ) { - base.Shutdown(); - - _GetLocalPingLocation = null; - _EstimatePingTimeBetweenTwoLocations = null; - _EstimatePingTimeFromLocalHost = null; - _ConvertPingLocationToString = null; - _ParsePingLocationString = null; - _CheckPingDataUpToDate = null; - _IsPingMeasurementInProgress = null; - _GetPingToDataCenter = null; - _GetDirectPingToPOP = null; - _GetPOPCount = null; - _GetPOPList = null; - _GetLocalTimestamp = null; - _SetDebugOutputFunction = null; - _SetConfigValue = null; - _GetConfigValue = null; - _GetConfigValueInfo = null; - _GetFirstConfigValue = null; + var returnValue = _AllocateMessage( Self, cbAllocateBuffer ); + return returnValue.ToType(); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate float FGetLocalPingLocation( IntPtr self, ref PingLocation result ); - private FGetLocalPingLocation _GetLocalPingLocation; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_InitRelayNetworkAccess", CallingConvention = Platform.CC)] + private static extern void _InitRelayNetworkAccess( IntPtr self ); + + #endregion + internal void InitRelayNetworkAccess() + { + _InitRelayNetworkAccess( Self ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetRelayNetworkStatus", CallingConvention = Platform.CC)] + private static extern SteamNetworkingAvailability _GetRelayNetworkStatus( IntPtr self, ref SteamRelayNetworkStatus_t pDetails ); + + #endregion + internal SteamNetworkingAvailability GetRelayNetworkStatus( ref SteamRelayNetworkStatus_t pDetails ) + { + var returnValue = _GetRelayNetworkStatus( Self, ref pDetails ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetLocalPingLocation", CallingConvention = Platform.CC)] + private static extern float _GetLocalPingLocation( IntPtr self, ref PingLocation result ); #endregion internal float GetLocalPingLocation( ref PingLocation result ) @@ -67,9 +64,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FEstimatePingTimeBetweenTwoLocations( IntPtr self, ref PingLocation location1, ref PingLocation location2 ); - private FEstimatePingTimeBetweenTwoLocations _EstimatePingTimeBetweenTwoLocations; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_EstimatePingTimeBetweenTwoLocations", CallingConvention = Platform.CC)] + private static extern int _EstimatePingTimeBetweenTwoLocations( IntPtr self, ref PingLocation location1, ref PingLocation location2 ); #endregion internal int EstimatePingTimeBetweenTwoLocations( ref PingLocation location1, ref PingLocation location2 ) @@ -79,9 +75,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FEstimatePingTimeFromLocalHost( IntPtr self, ref PingLocation remoteLocation ); - private FEstimatePingTimeFromLocalHost _EstimatePingTimeFromLocalHost; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_EstimatePingTimeFromLocalHost", CallingConvention = Platform.CC)] + private static extern int _EstimatePingTimeFromLocalHost( IntPtr self, ref PingLocation remoteLocation ); #endregion internal int EstimatePingTimeFromLocalHost( ref PingLocation remoteLocation ) @@ -91,9 +86,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FConvertPingLocationToString( IntPtr self, ref PingLocation location, IntPtr pszBuf, int cchBufSize ); - private FConvertPingLocationToString _ConvertPingLocationToString; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_ConvertPingLocationToString", CallingConvention = Platform.CC)] + private static extern void _ConvertPingLocationToString( IntPtr self, ref PingLocation location, IntPtr pszBuf, int cchBufSize ); #endregion internal void ConvertPingLocationToString( ref PingLocation location, out string pszBuf ) @@ -104,10 +98,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_ParsePingLocationString", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FParsePingLocationString( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszString, ref PingLocation result ); - private FParsePingLocationString _ParsePingLocationString; + private static extern bool _ParsePingLocationString( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszString, ref PingLocation result ); #endregion internal bool ParsePingLocationString( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszString, ref PingLocation result ) @@ -117,10 +110,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_CheckPingDataUpToDate", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FCheckPingDataUpToDate( IntPtr self, float flMaxAgeSeconds ); - private FCheckPingDataUpToDate _CheckPingDataUpToDate; + private static extern bool _CheckPingDataUpToDate( IntPtr self, float flMaxAgeSeconds ); #endregion internal bool CheckPingDataUpToDate( float flMaxAgeSeconds ) @@ -130,22 +122,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FIsPingMeasurementInProgress( IntPtr self ); - private FIsPingMeasurementInProgress _IsPingMeasurementInProgress; - - #endregion - internal bool IsPingMeasurementInProgress() - { - var returnValue = _IsPingMeasurementInProgress( Self ); - return returnValue; - } - - #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetPingToDataCenter( IntPtr self, SteamNetworkingPOPID popID, ref SteamNetworkingPOPID pViaRelayPoP ); - private FGetPingToDataCenter _GetPingToDataCenter; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetPingToDataCenter", CallingConvention = Platform.CC)] + private static extern int _GetPingToDataCenter( IntPtr self, SteamNetworkingPOPID popID, ref SteamNetworkingPOPID pViaRelayPoP ); #endregion internal int GetPingToDataCenter( SteamNetworkingPOPID popID, ref SteamNetworkingPOPID pViaRelayPoP ) @@ -155,9 +133,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetDirectPingToPOP( IntPtr self, SteamNetworkingPOPID popID ); - private FGetDirectPingToPOP _GetDirectPingToPOP; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetDirectPingToPOP", CallingConvention = Platform.CC)] + private static extern int _GetDirectPingToPOP( IntPtr self, SteamNetworkingPOPID popID ); #endregion internal int GetDirectPingToPOP( SteamNetworkingPOPID popID ) @@ -167,9 +144,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetPOPCount( IntPtr self ); - private FGetPOPCount _GetPOPCount; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetPOPCount", CallingConvention = Platform.CC)] + private static extern int _GetPOPCount( IntPtr self ); #endregion internal int GetPOPCount() @@ -179,9 +155,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetPOPList( IntPtr self, ref SteamNetworkingPOPID list, int nListSz ); - private FGetPOPList _GetPOPList; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetPOPList", CallingConvention = Platform.CC)] + private static extern int _GetPOPList( IntPtr self, ref SteamNetworkingPOPID list, int nListSz ); #endregion internal int GetPOPList( ref SteamNetworkingPOPID list, int nListSz ) @@ -191,9 +166,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate long FGetLocalTimestamp( IntPtr self ); - private FGetLocalTimestamp _GetLocalTimestamp; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetLocalTimestamp", CallingConvention = Platform.CC)] + private static extern long _GetLocalTimestamp( IntPtr self ); #endregion internal long GetLocalTimestamp() @@ -203,9 +177,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FSetDebugOutputFunction( IntPtr self, DebugOutputType eDetailLevel, FSteamNetworkingSocketsDebugOutput pfnFunc ); - private FSetDebugOutputFunction _SetDebugOutputFunction; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SetDebugOutputFunction", CallingConvention = Platform.CC)] + private static extern void _SetDebugOutputFunction( IntPtr self, DebugOutputType eDetailLevel, FSteamNetworkingSocketsDebugOutput pfnFunc ); #endregion internal void SetDebugOutputFunction( DebugOutputType eDetailLevel, FSteamNetworkingSocketsDebugOutput pfnFunc ) @@ -214,47 +187,127 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SetGlobalConfigValueInt32", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetConfigValue( IntPtr self, NetConfig eValue, NetScope eScopeType, long scopeObj, NetConfigType eDataType, IntPtr pArg ); - private FSetConfigValue _SetConfigValue; + private static extern bool _SetGlobalConfigValueInt32( IntPtr self, NetConfig eValue, int val ); #endregion - internal bool SetConfigValue( NetConfig eValue, NetScope eScopeType, long scopeObj, NetConfigType eDataType, IntPtr pArg ) + internal bool SetGlobalConfigValueInt32( NetConfig eValue, int val ) + { + var returnValue = _SetGlobalConfigValueInt32( Self, eValue, val ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SetGlobalConfigValueFloat", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _SetGlobalConfigValueFloat( IntPtr self, NetConfig eValue, float val ); + + #endregion + internal bool SetGlobalConfigValueFloat( NetConfig eValue, float val ) + { + var returnValue = _SetGlobalConfigValueFloat( Self, eValue, val ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SetGlobalConfigValueString", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _SetGlobalConfigValueString( IntPtr self, NetConfig eValue, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string val ); + + #endregion + internal bool SetGlobalConfigValueString( NetConfig eValue, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string val ) + { + var returnValue = _SetGlobalConfigValueString( Self, eValue, val ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SetConnectionConfigValueInt32", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _SetConnectionConfigValueInt32( IntPtr self, Connection hConn, NetConfig eValue, int val ); + + #endregion + internal bool SetConnectionConfigValueInt32( Connection hConn, NetConfig eValue, int val ) + { + var returnValue = _SetConnectionConfigValueInt32( Self, hConn, eValue, val ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SetConnectionConfigValueFloat", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _SetConnectionConfigValueFloat( IntPtr self, Connection hConn, NetConfig eValue, float val ); + + #endregion + internal bool SetConnectionConfigValueFloat( Connection hConn, NetConfig eValue, float val ) + { + var returnValue = _SetConnectionConfigValueFloat( Self, hConn, eValue, val ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SetConnectionConfigValueString", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _SetConnectionConfigValueString( IntPtr self, Connection hConn, NetConfig eValue, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string val ); + + #endregion + internal bool SetConnectionConfigValueString( Connection hConn, NetConfig eValue, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string val ) + { + var returnValue = _SetConnectionConfigValueString( Self, hConn, eValue, val ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SetConfigValue", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _SetConfigValue( IntPtr self, NetConfig eValue, NetConfigScope eScopeType, IntPtr scopeObj, NetConfigType eDataType, IntPtr pArg ); + + #endregion + internal bool SetConfigValue( NetConfig eValue, NetConfigScope eScopeType, IntPtr scopeObj, NetConfigType eDataType, IntPtr pArg ) { var returnValue = _SetConfigValue( Self, eValue, eScopeType, scopeObj, eDataType, pArg ); return returnValue; } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate NetConfigResult FGetConfigValue( IntPtr self, NetConfig eValue, NetScope eScopeType, long scopeObj, ref NetConfigType pOutDataType, IntPtr pResult, ref ulong cbResult ); - private FGetConfigValue _GetConfigValue; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SetConfigValueStruct", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _SetConfigValueStruct( IntPtr self, ref NetKeyValue opt, NetConfigScope eScopeType, IntPtr scopeObj ); #endregion - internal NetConfigResult GetConfigValue( NetConfig eValue, NetScope eScopeType, long scopeObj, ref NetConfigType pOutDataType, IntPtr pResult, ref ulong cbResult ) + internal bool SetConfigValueStruct( ref NetKeyValue opt, NetConfigScope eScopeType, IntPtr scopeObj ) + { + var returnValue = _SetConfigValueStruct( Self, ref opt, eScopeType, scopeObj ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetConfigValue", CallingConvention = Platform.CC)] + private static extern NetConfigResult _GetConfigValue( IntPtr self, NetConfig eValue, NetConfigScope eScopeType, IntPtr scopeObj, ref NetConfigType pOutDataType, IntPtr pResult, ref UIntPtr cbResult ); + + #endregion + internal NetConfigResult GetConfigValue( NetConfig eValue, NetConfigScope eScopeType, IntPtr scopeObj, ref NetConfigType pOutDataType, IntPtr pResult, ref UIntPtr cbResult ) { var returnValue = _GetConfigValue( Self, eValue, eScopeType, scopeObj, ref pOutDataType, pResult, ref cbResult ); return returnValue; } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetConfigValueInfo", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetConfigValueInfo( IntPtr self, NetConfig eValue, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pOutName, ref NetConfigType pOutDataType, [In,Out] NetScope[] pOutScope, [In,Out] NetConfig[] pOutNextValue ); - private FGetConfigValueInfo _GetConfigValueInfo; + private static extern bool _GetConfigValueInfo( IntPtr self, NetConfig eValue, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pOutName, ref NetConfigType pOutDataType, [In,Out] NetConfigScope[] pOutScope, [In,Out] NetConfig[] pOutNextValue ); #endregion - internal bool GetConfigValueInfo( NetConfig eValue, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pOutName, ref NetConfigType pOutDataType, [In,Out] NetScope[] pOutScope, [In,Out] NetConfig[] pOutNextValue ) + internal bool GetConfigValueInfo( NetConfig eValue, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pOutName, ref NetConfigType pOutDataType, [In,Out] NetConfigScope[] pOutScope, [In,Out] NetConfig[] pOutNextValue ) { var returnValue = _GetConfigValueInfo( Self, eValue, pOutName, ref pOutDataType, pOutScope, pOutNextValue ); return returnValue; } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate NetConfig FGetFirstConfigValue( IntPtr self ); - private FGetFirstConfigValue _GetFirstConfigValue; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetFirstConfigValue", CallingConvention = Platform.CC)] + private static extern NetConfig _GetFirstConfigValue( IntPtr self ); #endregion internal NetConfig GetFirstConfigValue() @@ -263,5 +316,53 @@ namespace Steamworks return returnValue; } + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SteamNetworkingIPAddr_ToString", CallingConvention = Platform.CC)] + private static extern void _SteamNetworkingIPAddr_ToString( IntPtr self, ref NetAddress addr, IntPtr buf, uint cbBuf, [MarshalAs( UnmanagedType.U1 )] bool bWithPort ); + + #endregion + internal void SteamNetworkingIPAddr_ToString( ref NetAddress addr, out string buf, [MarshalAs( UnmanagedType.U1 )] bool bWithPort ) + { + IntPtr membuf = Helpers.TakeMemory(); + _SteamNetworkingIPAddr_ToString( Self, ref addr, membuf, (1024 * 32), bWithPort ); + buf = Helpers.MemoryToString( membuf ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SteamNetworkingIPAddr_ParseString", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _SteamNetworkingIPAddr_ParseString( IntPtr self, ref NetAddress pAddr, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszStr ); + + #endregion + internal bool SteamNetworkingIPAddr_ParseString( ref NetAddress pAddr, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszStr ) + { + var returnValue = _SteamNetworkingIPAddr_ParseString( Self, ref pAddr, pszStr ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SteamNetworkingIdentity_ToString", CallingConvention = Platform.CC)] + private static extern void _SteamNetworkingIdentity_ToString( IntPtr self, ref NetIdentity identity, IntPtr buf, uint cbBuf ); + + #endregion + internal void SteamNetworkingIdentity_ToString( ref NetIdentity identity, out string buf ) + { + IntPtr membuf = Helpers.TakeMemory(); + _SteamNetworkingIdentity_ToString( Self, ref identity, membuf, (1024 * 32) ); + buf = Helpers.MemoryToString( membuf ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SteamNetworkingIdentity_ParseString", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _SteamNetworkingIdentity_ParseString( IntPtr self, ref NetIdentity pIdentity, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszStr ); + + #endregion + internal bool SteamNetworkingIdentity_ParseString( ref NetIdentity pIdentity, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszStr ) + { + var returnValue = _SteamNetworkingIdentity_ParseString( Self, ref pIdentity, pszStr ); + return returnValue; + } + } } diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamParentalSettings.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamParentalSettings.cs index 84e3f15..3968079 100644 --- a/Facepunch.Steamworks/Generated/Interfaces/ISteamParentalSettings.cs +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamParentalSettings.cs @@ -9,34 +9,21 @@ namespace Steamworks { internal class ISteamParentalSettings : SteamInterface { - public override string InterfaceName => "STEAMPARENTALSETTINGS_INTERFACE_VERSION001"; - public override void InitInternals() + internal ISteamParentalSettings( bool IsGameServer ) { - _BIsParentalLockEnabled = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) ); - _BIsParentalLockLocked = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) ); - _BIsAppBlocked = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) ); - _BIsAppInBlockList = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) ); - _BIsFeatureBlocked = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) ); - _BIsFeatureInBlockList = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) ); - } - internal override void Shutdown() - { - base.Shutdown(); - - _BIsParentalLockEnabled = null; - _BIsParentalLockLocked = null; - _BIsAppBlocked = null; - _BIsAppInBlockList = null; - _BIsFeatureBlocked = null; - _BIsFeatureInBlockList = null; + SetupInterface( IsGameServer ); } + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamParentalSettings_v001", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamParentalSettings_v001(); + public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamParentalSettings_v001(); + + #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParentalSettings_BIsParentalLockEnabled", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FBIsParentalLockEnabled( IntPtr self ); - private FBIsParentalLockEnabled _BIsParentalLockEnabled; + private static extern bool _BIsParentalLockEnabled( IntPtr self ); #endregion internal bool BIsParentalLockEnabled() @@ -46,10 +33,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParentalSettings_BIsParentalLockLocked", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FBIsParentalLockLocked( IntPtr self ); - private FBIsParentalLockLocked _BIsParentalLockLocked; + private static extern bool _BIsParentalLockLocked( IntPtr self ); #endregion internal bool BIsParentalLockLocked() @@ -59,10 +45,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParentalSettings_BIsAppBlocked", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FBIsAppBlocked( IntPtr self, AppId nAppID ); - private FBIsAppBlocked _BIsAppBlocked; + private static extern bool _BIsAppBlocked( IntPtr self, AppId nAppID ); #endregion internal bool BIsAppBlocked( AppId nAppID ) @@ -72,10 +57,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParentalSettings_BIsAppInBlockList", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FBIsAppInBlockList( IntPtr self, AppId nAppID ); - private FBIsAppInBlockList _BIsAppInBlockList; + private static extern bool _BIsAppInBlockList( IntPtr self, AppId nAppID ); #endregion internal bool BIsAppInBlockList( AppId nAppID ) @@ -85,10 +69,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParentalSettings_BIsFeatureBlocked", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FBIsFeatureBlocked( IntPtr self, ParentalFeature eFeature ); - private FBIsFeatureBlocked _BIsFeatureBlocked; + private static extern bool _BIsFeatureBlocked( IntPtr self, ParentalFeature eFeature ); #endregion internal bool BIsFeatureBlocked( ParentalFeature eFeature ) @@ -98,10 +81,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParentalSettings_BIsFeatureInBlockList", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FBIsFeatureInBlockList( IntPtr self, ParentalFeature eFeature ); - private FBIsFeatureInBlockList _BIsFeatureInBlockList; + private static extern bool _BIsFeatureInBlockList( IntPtr self, ParentalFeature eFeature ); #endregion internal bool BIsFeatureInBlockList( ParentalFeature eFeature ) diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamParties.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamParties.cs index 58a5029..f69024e 100644 --- a/Facepunch.Steamworks/Generated/Interfaces/ISteamParties.cs +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamParties.cs @@ -9,45 +9,20 @@ namespace Steamworks { internal class ISteamParties : SteamInterface { - public override string InterfaceName => "SteamParties002"; - public override void InitInternals() + internal ISteamParties( bool IsGameServer ) { - _GetNumActiveBeacons = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) ); - _GetBeaconByIndex = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) ); - _GetBeaconDetails = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) ); - _JoinParty = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) ); - _GetNumAvailableBeaconLocations = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) ); - _GetAvailableBeaconLocations = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) ); - _CreateBeacon = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) ); - _OnReservationCompleted = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) ); - _CancelReservation = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) ); - _ChangeNumOpenSlots = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) ); - _DestroyBeacon = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) ); - _GetBeaconLocationData = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) ); - } - internal override void Shutdown() - { - base.Shutdown(); - - _GetNumActiveBeacons = null; - _GetBeaconByIndex = null; - _GetBeaconDetails = null; - _JoinParty = null; - _GetNumAvailableBeaconLocations = null; - _GetAvailableBeaconLocations = null; - _CreateBeacon = null; - _OnReservationCompleted = null; - _CancelReservation = null; - _ChangeNumOpenSlots = null; - _DestroyBeacon = null; - _GetBeaconLocationData = null; + SetupInterface( IsGameServer ); } + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamParties_v002", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamParties_v002(); + public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamParties_v002(); + + #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate uint FGetNumActiveBeacons( IntPtr self ); - private FGetNumActiveBeacons _GetNumActiveBeacons; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_GetNumActiveBeacons", CallingConvention = Platform.CC)] + private static extern uint _GetNumActiveBeacons( IntPtr self ); #endregion internal uint GetNumActiveBeacons() @@ -57,9 +32,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate PartyBeaconID_t FGetBeaconByIndex( IntPtr self, uint unIndex ); - private FGetBeaconByIndex _GetBeaconByIndex; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_GetBeaconByIndex", CallingConvention = Platform.CC)] + private static extern PartyBeaconID_t _GetBeaconByIndex( IntPtr self, uint unIndex ); #endregion internal PartyBeaconID_t GetBeaconByIndex( uint unIndex ) @@ -69,10 +43,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_GetBeaconDetails", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetBeaconDetails( IntPtr self, PartyBeaconID_t ulBeaconID, ref SteamId pSteamIDBeaconOwner, ref SteamPartyBeaconLocation_t pLocation, IntPtr pchMetadata, int cchMetadata ); - private FGetBeaconDetails _GetBeaconDetails; + private static extern bool _GetBeaconDetails( IntPtr self, PartyBeaconID_t ulBeaconID, ref SteamId pSteamIDBeaconOwner, ref SteamPartyBeaconLocation_t pLocation, IntPtr pchMetadata, int cchMetadata ); #endregion internal bool GetBeaconDetails( PartyBeaconID_t ulBeaconID, ref SteamId pSteamIDBeaconOwner, ref SteamPartyBeaconLocation_t pLocation, out string pchMetadata ) @@ -84,22 +57,20 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FJoinParty( IntPtr self, PartyBeaconID_t ulBeaconID ); - private FJoinParty _JoinParty; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_JoinParty", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _JoinParty( IntPtr self, PartyBeaconID_t ulBeaconID ); #endregion - internal async Task JoinParty( PartyBeaconID_t ulBeaconID ) + internal CallResult JoinParty( PartyBeaconID_t ulBeaconID ) { var returnValue = _JoinParty( Self, ulBeaconID ); - return await JoinPartyCallback_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_GetNumAvailableBeaconLocations", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetNumAvailableBeaconLocations( IntPtr self, ref uint puNumLocations ); - private FGetNumAvailableBeaconLocations _GetNumAvailableBeaconLocations; + private static extern bool _GetNumAvailableBeaconLocations( IntPtr self, ref uint puNumLocations ); #endregion internal bool GetNumAvailableBeaconLocations( ref uint puNumLocations ) @@ -109,10 +80,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_GetAvailableBeaconLocations", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetAvailableBeaconLocations( IntPtr self, ref SteamPartyBeaconLocation_t pLocationList, uint uMaxNumLocations ); - private FGetAvailableBeaconLocations _GetAvailableBeaconLocations; + private static extern bool _GetAvailableBeaconLocations( IntPtr self, ref SteamPartyBeaconLocation_t pLocationList, uint uMaxNumLocations ); #endregion internal bool GetAvailableBeaconLocations( ref SteamPartyBeaconLocation_t pLocationList, uint uMaxNumLocations ) @@ -122,21 +92,19 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FCreateBeacon( IntPtr self, uint unOpenSlots, ref SteamPartyBeaconLocation_t pBeaconLocation, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchConnectString, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchMetadata ); - private FCreateBeacon _CreateBeacon; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_CreateBeacon", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _CreateBeacon( IntPtr self, uint unOpenSlots, ref SteamPartyBeaconLocation_t pBeaconLocation, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchConnectString, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchMetadata ); #endregion - internal async Task CreateBeacon( uint unOpenSlots, /* ref */ SteamPartyBeaconLocation_t pBeaconLocation, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchConnectString, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchMetadata ) + internal CallResult CreateBeacon( uint unOpenSlots, /* ref */ SteamPartyBeaconLocation_t pBeaconLocation, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchConnectString, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchMetadata ) { var returnValue = _CreateBeacon( Self, unOpenSlots, ref pBeaconLocation, pchConnectString, pchMetadata ); - return await CreateBeaconCallback_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FOnReservationCompleted( IntPtr self, PartyBeaconID_t ulBeacon, SteamId steamIDUser ); - private FOnReservationCompleted _OnReservationCompleted; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_OnReservationCompleted", CallingConvention = Platform.CC)] + private static extern void _OnReservationCompleted( IntPtr self, PartyBeaconID_t ulBeacon, SteamId steamIDUser ); #endregion internal void OnReservationCompleted( PartyBeaconID_t ulBeacon, SteamId steamIDUser ) @@ -145,9 +113,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FCancelReservation( IntPtr self, PartyBeaconID_t ulBeacon, SteamId steamIDUser ); - private FCancelReservation _CancelReservation; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_CancelReservation", CallingConvention = Platform.CC)] + private static extern void _CancelReservation( IntPtr self, PartyBeaconID_t ulBeacon, SteamId steamIDUser ); #endregion internal void CancelReservation( PartyBeaconID_t ulBeacon, SteamId steamIDUser ) @@ -156,22 +123,20 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FChangeNumOpenSlots( IntPtr self, PartyBeaconID_t ulBeacon, uint unOpenSlots ); - private FChangeNumOpenSlots _ChangeNumOpenSlots; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_ChangeNumOpenSlots", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _ChangeNumOpenSlots( IntPtr self, PartyBeaconID_t ulBeacon, uint unOpenSlots ); #endregion - internal async Task ChangeNumOpenSlots( PartyBeaconID_t ulBeacon, uint unOpenSlots ) + internal CallResult ChangeNumOpenSlots( PartyBeaconID_t ulBeacon, uint unOpenSlots ) { var returnValue = _ChangeNumOpenSlots( Self, ulBeacon, unOpenSlots ); - return await ChangeNumOpenSlotsCallback_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_DestroyBeacon", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FDestroyBeacon( IntPtr self, PartyBeaconID_t ulBeacon ); - private FDestroyBeacon _DestroyBeacon; + private static extern bool _DestroyBeacon( IntPtr self, PartyBeaconID_t ulBeacon ); #endregion internal bool DestroyBeacon( PartyBeaconID_t ulBeacon ) @@ -181,10 +146,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_GetBeaconLocationData", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetBeaconLocationData( IntPtr self, SteamPartyBeaconLocation_t BeaconLocation, SteamPartyBeaconLocationData eData, IntPtr pchDataStringOut, int cchDataStringOut ); - private FGetBeaconLocationData _GetBeaconLocationData; + private static extern bool _GetBeaconLocationData( IntPtr self, SteamPartyBeaconLocation_t BeaconLocation, SteamPartyBeaconLocationData eData, IntPtr pchDataStringOut, int cchDataStringOut ); #endregion internal bool GetBeaconLocationData( SteamPartyBeaconLocation_t BeaconLocation, SteamPartyBeaconLocationData eData, out string pchDataStringOut ) diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamRemotePlay.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamRemotePlay.cs new file mode 100644 index 0000000..f2d98c2 --- /dev/null +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamRemotePlay.cs @@ -0,0 +1,103 @@ +using System; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; +using Steamworks.Data; + + +namespace Steamworks +{ + internal class ISteamRemotePlay : SteamInterface + { + + internal ISteamRemotePlay( bool IsGameServer ) + { + SetupInterface( IsGameServer ); + } + + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamRemotePlay_v001", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamRemotePlay_v001(); + public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamRemotePlay_v001(); + + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemotePlay_GetSessionCount", CallingConvention = Platform.CC)] + private static extern uint _GetSessionCount( IntPtr self ); + + #endregion + internal uint GetSessionCount() + { + var returnValue = _GetSessionCount( Self ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemotePlay_GetSessionID", CallingConvention = Platform.CC)] + private static extern RemotePlaySessionID_t _GetSessionID( IntPtr self, int iSessionIndex ); + + #endregion + internal RemotePlaySessionID_t GetSessionID( int iSessionIndex ) + { + var returnValue = _GetSessionID( Self, iSessionIndex ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemotePlay_GetSessionSteamID", CallingConvention = Platform.CC)] + private static extern SteamId _GetSessionSteamID( IntPtr self, RemotePlaySessionID_t unSessionID ); + + #endregion + internal SteamId GetSessionSteamID( RemotePlaySessionID_t unSessionID ) + { + var returnValue = _GetSessionSteamID( Self, unSessionID ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemotePlay_GetSessionClientName", CallingConvention = Platform.CC)] + private static extern Utf8StringPointer _GetSessionClientName( IntPtr self, RemotePlaySessionID_t unSessionID ); + + #endregion + internal string GetSessionClientName( RemotePlaySessionID_t unSessionID ) + { + var returnValue = _GetSessionClientName( Self, unSessionID ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemotePlay_GetSessionClientFormFactor", CallingConvention = Platform.CC)] + private static extern SteamDeviceFormFactor _GetSessionClientFormFactor( IntPtr self, RemotePlaySessionID_t unSessionID ); + + #endregion + internal SteamDeviceFormFactor GetSessionClientFormFactor( RemotePlaySessionID_t unSessionID ) + { + var returnValue = _GetSessionClientFormFactor( Self, unSessionID ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemotePlay_BGetSessionClientResolution", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _BGetSessionClientResolution( IntPtr self, RemotePlaySessionID_t unSessionID, ref int pnResolutionX, ref int pnResolutionY ); + + #endregion + internal bool BGetSessionClientResolution( RemotePlaySessionID_t unSessionID, ref int pnResolutionX, ref int pnResolutionY ) + { + var returnValue = _BGetSessionClientResolution( Self, unSessionID, ref pnResolutionX, ref pnResolutionY ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemotePlay_BSendRemotePlayTogetherInvite", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _BSendRemotePlayTogetherInvite( IntPtr self, SteamId steamIDFriend ); + + #endregion + internal bool BSendRemotePlayTogetherInvite( SteamId steamIDFriend ) + { + var returnValue = _BSendRemotePlayTogetherInvite( Self, steamIDFriend ); + return returnValue; + } + + } +} diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamRemoteStorage.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamRemoteStorage.cs index 48e9030..825a9fb 100644 --- a/Facepunch.Steamworks/Generated/Interfaces/ISteamRemoteStorage.cs +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamRemoteStorage.cs @@ -9,106 +9,21 @@ namespace Steamworks { internal class ISteamRemoteStorage : SteamInterface { - public override string InterfaceName => "STEAMREMOTESTORAGE_INTERFACE_VERSION014"; - public override void InitInternals() + internal ISteamRemoteStorage( bool IsGameServer ) { - _FileWrite = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) ); - _FileRead = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) ); - _FileWriteAsync = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) ); - _FileReadAsync = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) ); - _FileReadAsyncComplete = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) ); - _FileForget = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) ); - _FileDelete = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) ); - _FileShare = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) ); - _SetSyncPlatforms = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) ); - _FileWriteStreamOpen = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) ); - _FileWriteStreamWriteChunk = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) ); - _FileWriteStreamClose = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) ); - _FileWriteStreamCancel = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) ); - _FileExists = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) ); - _FilePersisted = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) ); - _GetFileSize = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) ); - _GetFileTimestamp = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) ); - _GetSyncPlatforms = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) ); - _GetFileCount = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) ); - _GetFileNameAndSize = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) ); - _GetQuota = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) ); - _IsCloudEnabledForAccount = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 168 ) ) ); - _IsCloudEnabledForApp = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 176 ) ) ); - _SetCloudEnabledForApp = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 184 ) ) ); - _UGCDownload = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 192 ) ) ); - _GetUGCDownloadProgress = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 200 ) ) ); - _GetUGCDetails = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 208 ) ) ); - _UGCRead = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 216 ) ) ); - _GetCachedUGCCount = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 224 ) ) ); - // PublishWorkshopFile is deprecated - // CreatePublishedFileUpdateRequest is deprecated - // UpdatePublishedFileFile is deprecated - // UpdatePublishedFilePreviewFile is deprecated - // UpdatePublishedFileTitle is deprecated - // UpdatePublishedFileDescription is deprecated - // UpdatePublishedFileVisibility is deprecated - // UpdatePublishedFileTags is deprecated - // CommitPublishedFileUpdate is deprecated - // GetPublishedFileDetails is deprecated - // DeletePublishedFile is deprecated - // EnumerateUserPublishedFiles is deprecated - // SubscribePublishedFile is deprecated - // EnumerateUserSubscribedFiles is deprecated - // UnsubscribePublishedFile is deprecated - // UpdatePublishedFileSetChangeDescription is deprecated - // GetPublishedItemVoteDetails is deprecated - // UpdateUserPublishedItemVote is deprecated - // GetUserPublishedItemVoteDetails is deprecated - // EnumerateUserSharedWorkshopFiles is deprecated - // PublishVideo is deprecated - // SetUserPublishedFileAction is deprecated - // EnumeratePublishedFilesByUserAction is deprecated - // EnumeratePublishedWorkshopFiles is deprecated - _UGCDownloadToLocation = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 424 ) ) ); - } - internal override void Shutdown() - { - base.Shutdown(); - - _FileWrite = null; - _FileRead = null; - _FileWriteAsync = null; - _FileReadAsync = null; - _FileReadAsyncComplete = null; - _FileForget = null; - _FileDelete = null; - _FileShare = null; - _SetSyncPlatforms = null; - _FileWriteStreamOpen = null; - _FileWriteStreamWriteChunk = null; - _FileWriteStreamClose = null; - _FileWriteStreamCancel = null; - _FileExists = null; - _FilePersisted = null; - _GetFileSize = null; - _GetFileTimestamp = null; - _GetSyncPlatforms = null; - _GetFileCount = null; - _GetFileNameAndSize = null; - _GetQuota = null; - _IsCloudEnabledForAccount = null; - _IsCloudEnabledForApp = null; - _SetCloudEnabledForApp = null; - _UGCDownload = null; - _GetUGCDownloadProgress = null; - _GetUGCDetails = null; - _UGCRead = null; - _GetCachedUGCCount = null; - _UGCDownloadToLocation = null; + SetupInterface( IsGameServer ); } + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamRemoteStorage_v014", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamRemoteStorage_v014(); + public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamRemoteStorage_v014(); + + #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileWrite", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FFileWrite( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, int cubData ); - private FFileWrite _FileWrite; + private static extern bool _FileWrite( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, int cubData ); #endregion internal bool FileWrite( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, int cubData ) @@ -118,9 +33,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FFileRead( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, int cubDataToRead ); - private FFileRead _FileRead; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileRead", CallingConvention = Platform.CC)] + private static extern int _FileRead( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, int cubDataToRead ); #endregion internal int FileRead( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, int cubDataToRead ) @@ -130,34 +44,31 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FFileWriteAsync( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, uint cubData ); - private FFileWriteAsync _FileWriteAsync; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileWriteAsync", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _FileWriteAsync( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, uint cubData ); #endregion - internal async Task FileWriteAsync( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, uint cubData ) + internal CallResult FileWriteAsync( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, uint cubData ) { var returnValue = _FileWriteAsync( Self, pchFile, pvData, cubData ); - return await RemoteStorageFileWriteAsyncComplete_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FFileReadAsync( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, uint nOffset, uint cubToRead ); - private FFileReadAsync _FileReadAsync; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileReadAsync", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _FileReadAsync( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, uint nOffset, uint cubToRead ); #endregion - internal async Task FileReadAsync( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, uint nOffset, uint cubToRead ) + internal CallResult FileReadAsync( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, uint nOffset, uint cubToRead ) { var returnValue = _FileReadAsync( Self, pchFile, nOffset, cubToRead ); - return await RemoteStorageFileReadAsyncComplete_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileReadAsyncComplete", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FFileReadAsyncComplete( IntPtr self, SteamAPICall_t hReadCall, IntPtr pvBuffer, uint cubToRead ); - private FFileReadAsyncComplete _FileReadAsyncComplete; + private static extern bool _FileReadAsyncComplete( IntPtr self, SteamAPICall_t hReadCall, IntPtr pvBuffer, uint cubToRead ); #endregion internal bool FileReadAsyncComplete( SteamAPICall_t hReadCall, IntPtr pvBuffer, uint cubToRead ) @@ -167,10 +78,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileForget", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FFileForget( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ); - private FFileForget _FileForget; + private static extern bool _FileForget( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ); #endregion internal bool FileForget( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ) @@ -180,10 +90,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileDelete", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FFileDelete( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ); - private FFileDelete _FileDelete; + private static extern bool _FileDelete( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ); #endregion internal bool FileDelete( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ) @@ -193,22 +102,20 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FFileShare( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ); - private FFileShare _FileShare; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileShare", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _FileShare( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ); #endregion - internal async Task FileShare( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ) + internal CallResult FileShare( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ) { var returnValue = _FileShare( Self, pchFile ); - return await RemoteStorageFileShareResult_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_SetSyncPlatforms", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetSyncPlatforms( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, RemoteStoragePlatform eRemoteStoragePlatform ); - private FSetSyncPlatforms _SetSyncPlatforms; + private static extern bool _SetSyncPlatforms( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, RemoteStoragePlatform eRemoteStoragePlatform ); #endregion internal bool SetSyncPlatforms( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, RemoteStoragePlatform eRemoteStoragePlatform ) @@ -218,9 +125,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate UGCFileWriteStreamHandle_t FFileWriteStreamOpen( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ); - private FFileWriteStreamOpen _FileWriteStreamOpen; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileWriteStreamOpen", CallingConvention = Platform.CC)] + private static extern UGCFileWriteStreamHandle_t _FileWriteStreamOpen( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ); #endregion internal UGCFileWriteStreamHandle_t FileWriteStreamOpen( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ) @@ -230,10 +136,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileWriteStreamWriteChunk", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FFileWriteStreamWriteChunk( IntPtr self, UGCFileWriteStreamHandle_t writeHandle, IntPtr pvData, int cubData ); - private FFileWriteStreamWriteChunk _FileWriteStreamWriteChunk; + private static extern bool _FileWriteStreamWriteChunk( IntPtr self, UGCFileWriteStreamHandle_t writeHandle, IntPtr pvData, int cubData ); #endregion internal bool FileWriteStreamWriteChunk( UGCFileWriteStreamHandle_t writeHandle, IntPtr pvData, int cubData ) @@ -243,10 +148,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileWriteStreamClose", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FFileWriteStreamClose( IntPtr self, UGCFileWriteStreamHandle_t writeHandle ); - private FFileWriteStreamClose _FileWriteStreamClose; + private static extern bool _FileWriteStreamClose( IntPtr self, UGCFileWriteStreamHandle_t writeHandle ); #endregion internal bool FileWriteStreamClose( UGCFileWriteStreamHandle_t writeHandle ) @@ -256,10 +160,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileWriteStreamCancel", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FFileWriteStreamCancel( IntPtr self, UGCFileWriteStreamHandle_t writeHandle ); - private FFileWriteStreamCancel _FileWriteStreamCancel; + private static extern bool _FileWriteStreamCancel( IntPtr self, UGCFileWriteStreamHandle_t writeHandle ); #endregion internal bool FileWriteStreamCancel( UGCFileWriteStreamHandle_t writeHandle ) @@ -269,10 +172,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileExists", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FFileExists( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ); - private FFileExists _FileExists; + private static extern bool _FileExists( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ); #endregion internal bool FileExists( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ) @@ -282,10 +184,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FilePersisted", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FFilePersisted( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ); - private FFilePersisted _FilePersisted; + private static extern bool _FilePersisted( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ); #endregion internal bool FilePersisted( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ) @@ -295,9 +196,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetFileSize( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ); - private FGetFileSize _GetFileSize; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetFileSize", CallingConvention = Platform.CC)] + private static extern int _GetFileSize( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ); #endregion internal int GetFileSize( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ) @@ -307,9 +207,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate long FGetFileTimestamp( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ); - private FGetFileTimestamp _GetFileTimestamp; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetFileTimestamp", CallingConvention = Platform.CC)] + private static extern long _GetFileTimestamp( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ); #endregion internal long GetFileTimestamp( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ) @@ -319,9 +218,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate RemoteStoragePlatform FGetSyncPlatforms( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ); - private FGetSyncPlatforms _GetSyncPlatforms; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetSyncPlatforms", CallingConvention = Platform.CC)] + private static extern RemoteStoragePlatform _GetSyncPlatforms( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ); #endregion internal RemoteStoragePlatform GetSyncPlatforms( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ) @@ -331,9 +229,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetFileCount( IntPtr self ); - private FGetFileCount _GetFileCount; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetFileCount", CallingConvention = Platform.CC)] + private static extern int _GetFileCount( IntPtr self ); #endregion internal int GetFileCount() @@ -343,9 +240,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate Utf8StringPointer FGetFileNameAndSize( IntPtr self, int iFile, ref int pnFileSizeInBytes ); - private FGetFileNameAndSize _GetFileNameAndSize; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetFileNameAndSize", CallingConvention = Platform.CC)] + private static extern Utf8StringPointer _GetFileNameAndSize( IntPtr self, int iFile, ref int pnFileSizeInBytes ); #endregion internal string GetFileNameAndSize( int iFile, ref int pnFileSizeInBytes ) @@ -355,10 +251,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetQuota", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetQuota( IntPtr self, ref ulong pnTotalBytes, ref ulong puAvailableBytes ); - private FGetQuota _GetQuota; + private static extern bool _GetQuota( IntPtr self, ref ulong pnTotalBytes, ref ulong puAvailableBytes ); #endregion internal bool GetQuota( ref ulong pnTotalBytes, ref ulong puAvailableBytes ) @@ -368,10 +263,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_IsCloudEnabledForAccount", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FIsCloudEnabledForAccount( IntPtr self ); - private FIsCloudEnabledForAccount _IsCloudEnabledForAccount; + private static extern bool _IsCloudEnabledForAccount( IntPtr self ); #endregion internal bool IsCloudEnabledForAccount() @@ -381,10 +275,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_IsCloudEnabledForApp", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FIsCloudEnabledForApp( IntPtr self ); - private FIsCloudEnabledForApp _IsCloudEnabledForApp; + private static extern bool _IsCloudEnabledForApp( IntPtr self ); #endregion internal bool IsCloudEnabledForApp() @@ -394,9 +287,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FSetCloudEnabledForApp( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bEnabled ); - private FSetCloudEnabledForApp _SetCloudEnabledForApp; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_SetCloudEnabledForApp", CallingConvention = Platform.CC)] + private static extern void _SetCloudEnabledForApp( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bEnabled ); #endregion internal void SetCloudEnabledForApp( [MarshalAs( UnmanagedType.U1 )] bool bEnabled ) @@ -405,22 +297,20 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FUGCDownload( IntPtr self, UGCHandle_t hContent, uint unPriority ); - private FUGCDownload _UGCDownload; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_UGCDownload", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _UGCDownload( IntPtr self, UGCHandle_t hContent, uint unPriority ); #endregion - internal async Task UGCDownload( UGCHandle_t hContent, uint unPriority ) + internal CallResult UGCDownload( UGCHandle_t hContent, uint unPriority ) { var returnValue = _UGCDownload( Self, hContent, unPriority ); - return await RemoteStorageDownloadUGCResult_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetUGCDownloadProgress", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetUGCDownloadProgress( IntPtr self, UGCHandle_t hContent, ref int pnBytesDownloaded, ref int pnBytesExpected ); - private FGetUGCDownloadProgress _GetUGCDownloadProgress; + private static extern bool _GetUGCDownloadProgress( IntPtr self, UGCHandle_t hContent, ref int pnBytesDownloaded, ref int pnBytesExpected ); #endregion internal bool GetUGCDownloadProgress( UGCHandle_t hContent, ref int pnBytesDownloaded, ref int pnBytesExpected ) @@ -430,10 +320,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetUGCDetails", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetUGCDetails( IntPtr self, UGCHandle_t hContent, ref AppId pnAppID, [In,Out] ref char[] ppchName, ref int pnFileSizeInBytes, ref SteamId pSteamIDOwner ); - private FGetUGCDetails _GetUGCDetails; + private static extern bool _GetUGCDetails( IntPtr self, UGCHandle_t hContent, ref AppId pnAppID, [In,Out] ref char[] ppchName, ref int pnFileSizeInBytes, ref SteamId pSteamIDOwner ); #endregion internal bool GetUGCDetails( UGCHandle_t hContent, ref AppId pnAppID, [In,Out] ref char[] ppchName, ref int pnFileSizeInBytes, ref SteamId pSteamIDOwner ) @@ -443,9 +332,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FUGCRead( IntPtr self, UGCHandle_t hContent, IntPtr pvData, int cubDataToRead, uint cOffset, UGCReadAction eAction ); - private FUGCRead _UGCRead; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_UGCRead", CallingConvention = Platform.CC)] + private static extern int _UGCRead( IntPtr self, UGCHandle_t hContent, IntPtr pvData, int cubDataToRead, uint cOffset, UGCReadAction eAction ); #endregion internal int UGCRead( UGCHandle_t hContent, IntPtr pvData, int cubDataToRead, uint cOffset, UGCReadAction eAction ) @@ -455,9 +343,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetCachedUGCCount( IntPtr self ); - private FGetCachedUGCCount _GetCachedUGCCount; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetCachedUGCCount", CallingConvention = Platform.CC)] + private static extern int _GetCachedUGCCount( IntPtr self ); #endregion internal int GetCachedUGCCount() @@ -467,15 +354,25 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FUGCDownloadToLocation( IntPtr self, UGCHandle_t hContent, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLocation, uint unPriority ); - private FUGCDownloadToLocation _UGCDownloadToLocation; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetCachedUGCHandle", CallingConvention = Platform.CC)] + private static extern UGCHandle_t _GetCachedUGCHandle( IntPtr self, int iCachedContent ); #endregion - internal async Task UGCDownloadToLocation( UGCHandle_t hContent, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLocation, uint unPriority ) + internal UGCHandle_t GetCachedUGCHandle( int iCachedContent ) + { + var returnValue = _GetCachedUGCHandle( Self, iCachedContent ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_UGCDownloadToLocation", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _UGCDownloadToLocation( IntPtr self, UGCHandle_t hContent, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLocation, uint unPriority ); + + #endregion + internal CallResult UGCDownloadToLocation( UGCHandle_t hContent, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLocation, uint unPriority ) { var returnValue = _UGCDownloadToLocation( Self, hContent, pchLocation, unPriority ); - return await RemoteStorageDownloadUGCResult_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } } diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamScreenshots.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamScreenshots.cs index 84e570c..c076519 100644 --- a/Facepunch.Steamworks/Generated/Interfaces/ISteamScreenshots.cs +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamScreenshots.cs @@ -9,39 +9,20 @@ namespace Steamworks { internal class ISteamScreenshots : SteamInterface { - public override string InterfaceName => "STEAMSCREENSHOTS_INTERFACE_VERSION003"; - public override void InitInternals() + internal ISteamScreenshots( bool IsGameServer ) { - _WriteScreenshot = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) ); - _AddScreenshotToLibrary = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) ); - _TriggerScreenshot = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) ); - _HookScreenshots = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) ); - _SetLocation = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) ); - _TagUser = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) ); - _TagPublishedFile = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) ); - _IsScreenshotsHooked = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) ); - _AddVRScreenshotToLibrary = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) ); - } - internal override void Shutdown() - { - base.Shutdown(); - - _WriteScreenshot = null; - _AddScreenshotToLibrary = null; - _TriggerScreenshot = null; - _HookScreenshots = null; - _SetLocation = null; - _TagUser = null; - _TagPublishedFile = null; - _IsScreenshotsHooked = null; - _AddVRScreenshotToLibrary = null; + SetupInterface( IsGameServer ); } + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamScreenshots_v003", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamScreenshots_v003(); + public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamScreenshots_v003(); + + #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate ScreenshotHandle FWriteScreenshot( IntPtr self, IntPtr pubRGB, uint cubRGB, int nWidth, int nHeight ); - private FWriteScreenshot _WriteScreenshot; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamScreenshots_WriteScreenshot", CallingConvention = Platform.CC)] + private static extern ScreenshotHandle _WriteScreenshot( IntPtr self, IntPtr pubRGB, uint cubRGB, int nWidth, int nHeight ); #endregion internal ScreenshotHandle WriteScreenshot( IntPtr pubRGB, uint cubRGB, int nWidth, int nHeight ) @@ -51,9 +32,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate ScreenshotHandle FAddScreenshotToLibrary( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFilename, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchThumbnailFilename, int nWidth, int nHeight ); - private FAddScreenshotToLibrary _AddScreenshotToLibrary; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamScreenshots_AddScreenshotToLibrary", CallingConvention = Platform.CC)] + private static extern ScreenshotHandle _AddScreenshotToLibrary( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFilename, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchThumbnailFilename, int nWidth, int nHeight ); #endregion internal ScreenshotHandle AddScreenshotToLibrary( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFilename, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchThumbnailFilename, int nWidth, int nHeight ) @@ -63,9 +43,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FTriggerScreenshot( IntPtr self ); - private FTriggerScreenshot _TriggerScreenshot; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamScreenshots_TriggerScreenshot", CallingConvention = Platform.CC)] + private static extern void _TriggerScreenshot( IntPtr self ); #endregion internal void TriggerScreenshot() @@ -74,9 +53,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FHookScreenshots( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bHook ); - private FHookScreenshots _HookScreenshots; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamScreenshots_HookScreenshots", CallingConvention = Platform.CC)] + private static extern void _HookScreenshots( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bHook ); #endregion internal void HookScreenshots( [MarshalAs( UnmanagedType.U1 )] bool bHook ) @@ -85,10 +63,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamScreenshots_SetLocation", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetLocation( IntPtr self, ScreenshotHandle hScreenshot, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLocation ); - private FSetLocation _SetLocation; + private static extern bool _SetLocation( IntPtr self, ScreenshotHandle hScreenshot, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLocation ); #endregion internal bool SetLocation( ScreenshotHandle hScreenshot, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLocation ) @@ -98,10 +75,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamScreenshots_TagUser", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FTagUser( IntPtr self, ScreenshotHandle hScreenshot, SteamId steamID ); - private FTagUser _TagUser; + private static extern bool _TagUser( IntPtr self, ScreenshotHandle hScreenshot, SteamId steamID ); #endregion internal bool TagUser( ScreenshotHandle hScreenshot, SteamId steamID ) @@ -111,10 +87,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamScreenshots_TagPublishedFile", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FTagPublishedFile( IntPtr self, ScreenshotHandle hScreenshot, PublishedFileId unPublishedFileID ); - private FTagPublishedFile _TagPublishedFile; + private static extern bool _TagPublishedFile( IntPtr self, ScreenshotHandle hScreenshot, PublishedFileId unPublishedFileID ); #endregion internal bool TagPublishedFile( ScreenshotHandle hScreenshot, PublishedFileId unPublishedFileID ) @@ -124,10 +99,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamScreenshots_IsScreenshotsHooked", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FIsScreenshotsHooked( IntPtr self ); - private FIsScreenshotsHooked _IsScreenshotsHooked; + private static extern bool _IsScreenshotsHooked( IntPtr self ); #endregion internal bool IsScreenshotsHooked() @@ -137,9 +111,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate ScreenshotHandle FAddVRScreenshotToLibrary( IntPtr self, VRScreenshotType eType, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFilename, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVRFilename ); - private FAddVRScreenshotToLibrary _AddVRScreenshotToLibrary; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamScreenshots_AddVRScreenshotToLibrary", CallingConvention = Platform.CC)] + private static extern ScreenshotHandle _AddVRScreenshotToLibrary( IntPtr self, VRScreenshotType eType, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFilename, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVRFilename ); #endregion internal ScreenshotHandle AddVRScreenshotToLibrary( VRScreenshotType eType, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFilename, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVRFilename ) diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamTV.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamTV.cs new file mode 100644 index 0000000..1a8a6ba --- /dev/null +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamTV.cs @@ -0,0 +1,97 @@ +using System; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; +using Steamworks.Data; + + +namespace Steamworks +{ + internal class ISteamTV : SteamInterface + { + + internal ISteamTV( bool IsGameServer ) + { + SetupInterface( IsGameServer ); + } + + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamTV_v001", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamTV_v001(); + public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamTV_v001(); + + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamTV_IsBroadcasting", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _IsBroadcasting( IntPtr self, ref int pnNumViewers ); + + #endregion + internal bool IsBroadcasting( ref int pnNumViewers ) + { + var returnValue = _IsBroadcasting( Self, ref pnNumViewers ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamTV_AddBroadcastGameData", CallingConvention = Platform.CC)] + private static extern void _AddBroadcastGameData( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue ); + + #endregion + internal void AddBroadcastGameData( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue ) + { + _AddBroadcastGameData( Self, pchKey, pchValue ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamTV_RemoveBroadcastGameData", CallingConvention = Platform.CC)] + private static extern void _RemoveBroadcastGameData( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey ); + + #endregion + internal void RemoveBroadcastGameData( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey ) + { + _RemoveBroadcastGameData( Self, pchKey ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamTV_AddTimelineMarker", CallingConvention = Platform.CC)] + private static extern void _AddTimelineMarker( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchTemplateName, [MarshalAs( UnmanagedType.U1 )] bool bPersistent, byte nColorR, byte nColorG, byte nColorB ); + + #endregion + internal void AddTimelineMarker( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchTemplateName, [MarshalAs( UnmanagedType.U1 )] bool bPersistent, byte nColorR, byte nColorG, byte nColorB ) + { + _AddTimelineMarker( Self, pchTemplateName, bPersistent, nColorR, nColorG, nColorB ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamTV_RemoveTimelineMarker", CallingConvention = Platform.CC)] + private static extern void _RemoveTimelineMarker( IntPtr self ); + + #endregion + internal void RemoveTimelineMarker() + { + _RemoveTimelineMarker( Self ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamTV_AddRegion", CallingConvention = Platform.CC)] + private static extern uint _AddRegion( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchElementName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchTimelineDataSection, ref SteamTVRegion_t pSteamTVRegion, SteamTVRegionBehavior eSteamTVRegionBehavior ); + + #endregion + internal uint AddRegion( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchElementName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchTimelineDataSection, ref SteamTVRegion_t pSteamTVRegion, SteamTVRegionBehavior eSteamTVRegionBehavior ) + { + var returnValue = _AddRegion( Self, pchElementName, pchTimelineDataSection, ref pSteamTVRegion, eSteamTVRegionBehavior ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamTV_RemoveRegion", CallingConvention = Platform.CC)] + private static extern void _RemoveRegion( IntPtr self, uint unRegionHandle ); + + #endregion + internal void RemoveRegion( uint unRegionHandle ) + { + _RemoveRegion( Self, unRegionHandle ); + } + + } +} diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamUGC.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamUGC.cs index 941eb34..9e4958b 100644 --- a/Facepunch.Steamworks/Generated/Interfaces/ISteamUGC.cs +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamUGC.cs @@ -9,179 +9,23 @@ namespace Steamworks { internal class ISteamUGC : SteamInterface { - public override string InterfaceName => "STEAMUGC_INTERFACE_VERSION012"; - public override void InitInternals() + internal ISteamUGC( bool IsGameServer ) { - _CreateQueryUserUGCRequest = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) ); - _CreateQueryUGCDetailsRequest = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) ); - _SendQueryUGCRequest = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) ); - _GetQueryUGCResult = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) ); - _GetQueryUGCPreviewURL = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) ); - _GetQueryUGCMetadata = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) ); - _GetQueryUGCChildren = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) ); - _GetQueryUGCStatistic = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) ); - _GetQueryUGCNumAdditionalPreviews = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) ); - _GetQueryUGCAdditionalPreview = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) ); - _GetQueryUGCNumKeyValueTags = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) ); - _GetQueryUGCKeyValueTag = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) ); - _ReleaseQueryUGCRequest = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) ); - _AddRequiredTag = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) ); - _AddExcludedTag = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) ); - _SetReturnOnlyIDs = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) ); - _SetReturnKeyValueTags = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) ); - _SetReturnLongDescription = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) ); - _SetReturnMetadata = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) ); - _SetReturnChildren = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 168 ) ) ); - _SetReturnAdditionalPreviews = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 176 ) ) ); - _SetReturnTotalOnly = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 184 ) ) ); - _SetReturnPlaytimeStats = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 192 ) ) ); - _SetLanguage = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 200 ) ) ); - _SetAllowCachedResponse = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 208 ) ) ); - _SetCloudFileNameFilter = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 216 ) ) ); - _SetMatchAnyTag = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 224 ) ) ); - _SetSearchText = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 232 ) ) ); - _SetRankedByTrendDays = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 240 ) ) ); - _AddRequiredKeyValueTag = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 248 ) ) ); - _RequestUGCDetails = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 256 ) ) ); - _CreateItem = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 264 ) ) ); - _StartItemUpdate = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 272 ) ) ); - _SetItemTitle = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 280 ) ) ); - _SetItemDescription = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 288 ) ) ); - _SetItemUpdateLanguage = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 296 ) ) ); - _SetItemMetadata = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 304 ) ) ); - _SetItemVisibility = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 312 ) ) ); - _SetItemTags = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 320 ) ) ); - _SetItemContent = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 328 ) ) ); - _SetItemPreview = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 336 ) ) ); - _SetAllowLegacyUpload = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 344 ) ) ); - _RemoveItemKeyValueTags = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 352 ) ) ); - _AddItemKeyValueTag = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 360 ) ) ); - _AddItemPreviewFile = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 368 ) ) ); - _AddItemPreviewVideo = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 376 ) ) ); - _UpdateItemPreviewFile = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 384 ) ) ); - _UpdateItemPreviewVideo = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 392 ) ) ); - _RemoveItemPreview = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 400 ) ) ); - _SubmitItemUpdate = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 408 ) ) ); - _GetItemUpdateProgress = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 416 ) ) ); - _SetUserItemVote = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 424 ) ) ); - _GetUserItemVote = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 432 ) ) ); - _AddItemToFavorites = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 440 ) ) ); - _RemoveItemFromFavorites = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 448 ) ) ); - _SubscribeItem = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 456 ) ) ); - _UnsubscribeItem = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 464 ) ) ); - _GetNumSubscribedItems = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 472 ) ) ); - _GetSubscribedItems = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 480 ) ) ); - _GetItemState = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 488 ) ) ); - _GetItemInstallInfo = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 496 ) ) ); - _GetItemDownloadInfo = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 504 ) ) ); - _DownloadItem = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 512 ) ) ); - _BInitWorkshopForGameServer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 520 ) ) ); - _SuspendDownloads = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 528 ) ) ); - _StartPlaytimeTracking = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 536 ) ) ); - _StopPlaytimeTracking = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 544 ) ) ); - _StopPlaytimeTrackingForAllItems = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 552 ) ) ); - _AddDependency = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 560 ) ) ); - _RemoveDependency = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 568 ) ) ); - _AddAppDependency = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 576 ) ) ); - _RemoveAppDependency = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 584 ) ) ); - _GetAppDependencies = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 592 ) ) ); - _DeleteItem = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 600 ) ) ); - - #if PLATFORM_WIN - _CreateQueryAllUGCRequest1 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) ); - _CreateQueryAllUGCRequest2 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) ); - #else - _CreateQueryAllUGCRequest1 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) ); - _CreateQueryAllUGCRequest2 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) ); - #endif - } - internal override void Shutdown() - { - base.Shutdown(); - - _CreateQueryUserUGCRequest = null; - _CreateQueryAllUGCRequest1 = null; - _CreateQueryAllUGCRequest2 = null; - _CreateQueryUGCDetailsRequest = null; - _SendQueryUGCRequest = null; - _GetQueryUGCResult = null; - _GetQueryUGCPreviewURL = null; - _GetQueryUGCMetadata = null; - _GetQueryUGCChildren = null; - _GetQueryUGCStatistic = null; - _GetQueryUGCNumAdditionalPreviews = null; - _GetQueryUGCAdditionalPreview = null; - _GetQueryUGCNumKeyValueTags = null; - _GetQueryUGCKeyValueTag = null; - _ReleaseQueryUGCRequest = null; - _AddRequiredTag = null; - _AddExcludedTag = null; - _SetReturnOnlyIDs = null; - _SetReturnKeyValueTags = null; - _SetReturnLongDescription = null; - _SetReturnMetadata = null; - _SetReturnChildren = null; - _SetReturnAdditionalPreviews = null; - _SetReturnTotalOnly = null; - _SetReturnPlaytimeStats = null; - _SetLanguage = null; - _SetAllowCachedResponse = null; - _SetCloudFileNameFilter = null; - _SetMatchAnyTag = null; - _SetSearchText = null; - _SetRankedByTrendDays = null; - _AddRequiredKeyValueTag = null; - _RequestUGCDetails = null; - _CreateItem = null; - _StartItemUpdate = null; - _SetItemTitle = null; - _SetItemDescription = null; - _SetItemUpdateLanguage = null; - _SetItemMetadata = null; - _SetItemVisibility = null; - _SetItemTags = null; - _SetItemContent = null; - _SetItemPreview = null; - _SetAllowLegacyUpload = null; - _RemoveItemKeyValueTags = null; - _AddItemKeyValueTag = null; - _AddItemPreviewFile = null; - _AddItemPreviewVideo = null; - _UpdateItemPreviewFile = null; - _UpdateItemPreviewVideo = null; - _RemoveItemPreview = null; - _SubmitItemUpdate = null; - _GetItemUpdateProgress = null; - _SetUserItemVote = null; - _GetUserItemVote = null; - _AddItemToFavorites = null; - _RemoveItemFromFavorites = null; - _SubscribeItem = null; - _UnsubscribeItem = null; - _GetNumSubscribedItems = null; - _GetSubscribedItems = null; - _GetItemState = null; - _GetItemInstallInfo = null; - _GetItemDownloadInfo = null; - _DownloadItem = null; - _BInitWorkshopForGameServer = null; - _SuspendDownloads = null; - _StartPlaytimeTracking = null; - _StopPlaytimeTracking = null; - _StopPlaytimeTrackingForAllItems = null; - _AddDependency = null; - _RemoveDependency = null; - _AddAppDependency = null; - _RemoveAppDependency = null; - _GetAppDependencies = null; - _DeleteItem = null; + SetupInterface( IsGameServer ); } + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamUGC_v014", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamUGC_v014(); + public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamUGC_v014(); + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameServerUGC_v014", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamGameServerUGC_v014(); + public override IntPtr GetServerInterfacePointer() => SteamAPI_SteamGameServerUGC_v014(); + + #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate UGCQueryHandle_t FCreateQueryUserUGCRequest( IntPtr self, AccountID_t unAccountID, UserUGCList eListType, UgcType eMatchingUGCType, UserUGCListSortOrder eSortOrder, AppId nCreatorAppID, AppId nConsumerAppID, uint unPage ); - private FCreateQueryUserUGCRequest _CreateQueryUserUGCRequest; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_CreateQueryUserUGCRequest", CallingConvention = Platform.CC)] + private static extern UGCQueryHandle_t _CreateQueryUserUGCRequest( IntPtr self, AccountID_t unAccountID, UserUGCList eListType, UgcType eMatchingUGCType, UserUGCListSortOrder eSortOrder, AppId nCreatorAppID, AppId nConsumerAppID, uint unPage ); #endregion internal UGCQueryHandle_t CreateQueryUserUGCRequest( AccountID_t unAccountID, UserUGCList eListType, UgcType eMatchingUGCType, UserUGCListSortOrder eSortOrder, AppId nCreatorAppID, AppId nConsumerAppID, uint unPage ) @@ -191,33 +35,30 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate UGCQueryHandle_t FCreateQueryAllUGCRequest1( IntPtr self, UGCQuery eQueryType, UgcType eMatchingeMatchingUGCTypeFileType, AppId nCreatorAppID, AppId nConsumerAppID, uint unPage ); - private FCreateQueryAllUGCRequest1 _CreateQueryAllUGCRequest1; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_CreateQueryAllUGCRequestPage", CallingConvention = Platform.CC)] + private static extern UGCQueryHandle_t _CreateQueryAllUGCRequest( IntPtr self, UGCQuery eQueryType, UgcType eMatchingeMatchingUGCTypeFileType, AppId nCreatorAppID, AppId nConsumerAppID, uint unPage ); #endregion - internal UGCQueryHandle_t CreateQueryAllUGCRequest1( UGCQuery eQueryType, UgcType eMatchingeMatchingUGCTypeFileType, AppId nCreatorAppID, AppId nConsumerAppID, uint unPage ) + internal UGCQueryHandle_t CreateQueryAllUGCRequest( UGCQuery eQueryType, UgcType eMatchingeMatchingUGCTypeFileType, AppId nCreatorAppID, AppId nConsumerAppID, uint unPage ) { - var returnValue = _CreateQueryAllUGCRequest1( Self, eQueryType, eMatchingeMatchingUGCTypeFileType, nCreatorAppID, nConsumerAppID, unPage ); + var returnValue = _CreateQueryAllUGCRequest( Self, eQueryType, eMatchingeMatchingUGCTypeFileType, nCreatorAppID, nConsumerAppID, unPage ); return returnValue; } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate UGCQueryHandle_t FCreateQueryAllUGCRequest2( IntPtr self, UGCQuery eQueryType, UgcType eMatchingeMatchingUGCTypeFileType, AppId nCreatorAppID, AppId nConsumerAppID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchCursor ); - private FCreateQueryAllUGCRequest2 _CreateQueryAllUGCRequest2; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_CreateQueryAllUGCRequestCursor", CallingConvention = Platform.CC)] + private static extern UGCQueryHandle_t _CreateQueryAllUGCRequest( IntPtr self, UGCQuery eQueryType, UgcType eMatchingeMatchingUGCTypeFileType, AppId nCreatorAppID, AppId nConsumerAppID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchCursor ); #endregion - internal UGCQueryHandle_t CreateQueryAllUGCRequest2( UGCQuery eQueryType, UgcType eMatchingeMatchingUGCTypeFileType, AppId nCreatorAppID, AppId nConsumerAppID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchCursor ) + internal UGCQueryHandle_t CreateQueryAllUGCRequest( UGCQuery eQueryType, UgcType eMatchingeMatchingUGCTypeFileType, AppId nCreatorAppID, AppId nConsumerAppID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchCursor ) { - var returnValue = _CreateQueryAllUGCRequest2( Self, eQueryType, eMatchingeMatchingUGCTypeFileType, nCreatorAppID, nConsumerAppID, pchCursor ); + var returnValue = _CreateQueryAllUGCRequest( Self, eQueryType, eMatchingeMatchingUGCTypeFileType, nCreatorAppID, nConsumerAppID, pchCursor ); return returnValue; } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate UGCQueryHandle_t FCreateQueryUGCDetailsRequest( IntPtr self, [In,Out] PublishedFileId[] pvecPublishedFileID, uint unNumPublishedFileIDs ); - private FCreateQueryUGCDetailsRequest _CreateQueryUGCDetailsRequest; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_CreateQueryUGCDetailsRequest", CallingConvention = Platform.CC)] + private static extern UGCQueryHandle_t _CreateQueryUGCDetailsRequest( IntPtr self, [In,Out] PublishedFileId[] pvecPublishedFileID, uint unNumPublishedFileIDs ); #endregion internal UGCQueryHandle_t CreateQueryUGCDetailsRequest( [In,Out] PublishedFileId[] pvecPublishedFileID, uint unNumPublishedFileIDs ) @@ -227,22 +68,20 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FSendQueryUGCRequest( IntPtr self, UGCQueryHandle_t handle ); - private FSendQueryUGCRequest _SendQueryUGCRequest; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SendQueryUGCRequest", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _SendQueryUGCRequest( IntPtr self, UGCQueryHandle_t handle ); #endregion - internal async Task SendQueryUGCRequest( UGCQueryHandle_t handle ) + internal CallResult SendQueryUGCRequest( UGCQueryHandle_t handle ) { var returnValue = _SendQueryUGCRequest( Self, handle ); - return await SteamUGCQueryCompleted_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCResult", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetQueryUGCResult( IntPtr self, UGCQueryHandle_t handle, uint index, ref SteamUGCDetails_t pDetails ); - private FGetQueryUGCResult _GetQueryUGCResult; + private static extern bool _GetQueryUGCResult( IntPtr self, UGCQueryHandle_t handle, uint index, ref SteamUGCDetails_t pDetails ); #endregion internal bool GetQueryUGCResult( UGCQueryHandle_t handle, uint index, ref SteamUGCDetails_t pDetails ) @@ -252,10 +91,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCPreviewURL", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetQueryUGCPreviewURL( IntPtr self, UGCQueryHandle_t handle, uint index, IntPtr pchURL, uint cchURLSize ); - private FGetQueryUGCPreviewURL _GetQueryUGCPreviewURL; + private static extern bool _GetQueryUGCPreviewURL( IntPtr self, UGCQueryHandle_t handle, uint index, IntPtr pchURL, uint cchURLSize ); #endregion internal bool GetQueryUGCPreviewURL( UGCQueryHandle_t handle, uint index, out string pchURL ) @@ -267,10 +105,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCMetadata", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetQueryUGCMetadata( IntPtr self, UGCQueryHandle_t handle, uint index, IntPtr pchMetadata, uint cchMetadatasize ); - private FGetQueryUGCMetadata _GetQueryUGCMetadata; + private static extern bool _GetQueryUGCMetadata( IntPtr self, UGCQueryHandle_t handle, uint index, IntPtr pchMetadata, uint cchMetadatasize ); #endregion internal bool GetQueryUGCMetadata( UGCQueryHandle_t handle, uint index, out string pchMetadata ) @@ -282,10 +119,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCChildren", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetQueryUGCChildren( IntPtr self, UGCQueryHandle_t handle, uint index, [In,Out] PublishedFileId[] pvecPublishedFileID, uint cMaxEntries ); - private FGetQueryUGCChildren _GetQueryUGCChildren; + private static extern bool _GetQueryUGCChildren( IntPtr self, UGCQueryHandle_t handle, uint index, [In,Out] PublishedFileId[] pvecPublishedFileID, uint cMaxEntries ); #endregion internal bool GetQueryUGCChildren( UGCQueryHandle_t handle, uint index, [In,Out] PublishedFileId[] pvecPublishedFileID, uint cMaxEntries ) @@ -295,10 +131,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCStatistic", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetQueryUGCStatistic( IntPtr self, UGCQueryHandle_t handle, uint index, ItemStatistic eStatType, ref ulong pStatValue ); - private FGetQueryUGCStatistic _GetQueryUGCStatistic; + private static extern bool _GetQueryUGCStatistic( IntPtr self, UGCQueryHandle_t handle, uint index, ItemStatistic eStatType, ref ulong pStatValue ); #endregion internal bool GetQueryUGCStatistic( UGCQueryHandle_t handle, uint index, ItemStatistic eStatType, ref ulong pStatValue ) @@ -308,9 +143,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate uint FGetQueryUGCNumAdditionalPreviews( IntPtr self, UGCQueryHandle_t handle, uint index ); - private FGetQueryUGCNumAdditionalPreviews _GetQueryUGCNumAdditionalPreviews; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCNumAdditionalPreviews", CallingConvention = Platform.CC)] + private static extern uint _GetQueryUGCNumAdditionalPreviews( IntPtr self, UGCQueryHandle_t handle, uint index ); #endregion internal uint GetQueryUGCNumAdditionalPreviews( UGCQueryHandle_t handle, uint index ) @@ -320,10 +154,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCAdditionalPreview", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetQueryUGCAdditionalPreview( IntPtr self, UGCQueryHandle_t handle, uint index, uint previewIndex, IntPtr pchURLOrVideoID, uint cchURLSize, IntPtr pchOriginalFileName, uint cchOriginalFileNameSize, ref ItemPreviewType pPreviewType ); - private FGetQueryUGCAdditionalPreview _GetQueryUGCAdditionalPreview; + private static extern bool _GetQueryUGCAdditionalPreview( IntPtr self, UGCQueryHandle_t handle, uint index, uint previewIndex, IntPtr pchURLOrVideoID, uint cchURLSize, IntPtr pchOriginalFileName, uint cchOriginalFileNameSize, ref ItemPreviewType pPreviewType ); #endregion internal bool GetQueryUGCAdditionalPreview( UGCQueryHandle_t handle, uint index, uint previewIndex, out string pchURLOrVideoID, out string pchOriginalFileName, ref ItemPreviewType pPreviewType ) @@ -337,9 +170,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate uint FGetQueryUGCNumKeyValueTags( IntPtr self, UGCQueryHandle_t handle, uint index ); - private FGetQueryUGCNumKeyValueTags _GetQueryUGCNumKeyValueTags; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCNumKeyValueTags", CallingConvention = Platform.CC)] + private static extern uint _GetQueryUGCNumKeyValueTags( IntPtr self, UGCQueryHandle_t handle, uint index ); #endregion internal uint GetQueryUGCNumKeyValueTags( UGCQueryHandle_t handle, uint index ) @@ -349,10 +181,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCKeyValueTag", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetQueryUGCKeyValueTag( IntPtr self, UGCQueryHandle_t handle, uint index, uint keyValueTagIndex, IntPtr pchKey, uint cchKeySize, IntPtr pchValue, uint cchValueSize ); - private FGetQueryUGCKeyValueTag _GetQueryUGCKeyValueTag; + private static extern bool _GetQueryUGCKeyValueTag( IntPtr self, UGCQueryHandle_t handle, uint index, uint keyValueTagIndex, IntPtr pchKey, uint cchKeySize, IntPtr pchValue, uint cchValueSize ); #endregion internal bool GetQueryUGCKeyValueTag( UGCQueryHandle_t handle, uint index, uint keyValueTagIndex, out string pchKey, out string pchValue ) @@ -366,10 +197,23 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryFirstUGCKeyValueTag", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FReleaseQueryUGCRequest( IntPtr self, UGCQueryHandle_t handle ); - private FReleaseQueryUGCRequest _ReleaseQueryUGCRequest; + private static extern bool _GetQueryUGCKeyValueTag( IntPtr self, UGCQueryHandle_t handle, uint index, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, IntPtr pchValue, uint cchValueSize ); + + #endregion + internal bool GetQueryUGCKeyValueTag( UGCQueryHandle_t handle, uint index, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, out string pchValue ) + { + IntPtr mempchValue = Helpers.TakeMemory(); + var returnValue = _GetQueryUGCKeyValueTag( Self, handle, index, pchKey, mempchValue, (1024 * 32) ); + pchValue = Helpers.MemoryToString( mempchValue ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_ReleaseQueryUGCRequest", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _ReleaseQueryUGCRequest( IntPtr self, UGCQueryHandle_t handle ); #endregion internal bool ReleaseQueryUGCRequest( UGCQueryHandle_t handle ) @@ -379,10 +223,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_AddRequiredTag", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FAddRequiredTag( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pTagName ); - private FAddRequiredTag _AddRequiredTag; + private static extern bool _AddRequiredTag( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pTagName ); #endregion internal bool AddRequiredTag( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pTagName ) @@ -392,10 +235,21 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_AddRequiredTagGroup", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FAddExcludedTag( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pTagName ); - private FAddExcludedTag _AddExcludedTag; + private static extern bool _AddRequiredTagGroup( IntPtr self, UGCQueryHandle_t handle, ref SteamParamStringArray_t pTagGroups ); + + #endregion + internal bool AddRequiredTagGroup( UGCQueryHandle_t handle, ref SteamParamStringArray_t pTagGroups ) + { + var returnValue = _AddRequiredTagGroup( Self, handle, ref pTagGroups ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_AddExcludedTag", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _AddExcludedTag( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pTagName ); #endregion internal bool AddExcludedTag( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pTagName ) @@ -405,10 +259,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetReturnOnlyIDs", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetReturnOnlyIDs( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnOnlyIDs ); - private FSetReturnOnlyIDs _SetReturnOnlyIDs; + private static extern bool _SetReturnOnlyIDs( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnOnlyIDs ); #endregion internal bool SetReturnOnlyIDs( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnOnlyIDs ) @@ -418,10 +271,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetReturnKeyValueTags", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetReturnKeyValueTags( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnKeyValueTags ); - private FSetReturnKeyValueTags _SetReturnKeyValueTags; + private static extern bool _SetReturnKeyValueTags( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnKeyValueTags ); #endregion internal bool SetReturnKeyValueTags( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnKeyValueTags ) @@ -431,10 +283,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetReturnLongDescription", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetReturnLongDescription( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnLongDescription ); - private FSetReturnLongDescription _SetReturnLongDescription; + private static extern bool _SetReturnLongDescription( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnLongDescription ); #endregion internal bool SetReturnLongDescription( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnLongDescription ) @@ -444,10 +295,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetReturnMetadata", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetReturnMetadata( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnMetadata ); - private FSetReturnMetadata _SetReturnMetadata; + private static extern bool _SetReturnMetadata( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnMetadata ); #endregion internal bool SetReturnMetadata( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnMetadata ) @@ -457,10 +307,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetReturnChildren", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetReturnChildren( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnChildren ); - private FSetReturnChildren _SetReturnChildren; + private static extern bool _SetReturnChildren( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnChildren ); #endregion internal bool SetReturnChildren( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnChildren ) @@ -470,10 +319,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetReturnAdditionalPreviews", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetReturnAdditionalPreviews( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnAdditionalPreviews ); - private FSetReturnAdditionalPreviews _SetReturnAdditionalPreviews; + private static extern bool _SetReturnAdditionalPreviews( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnAdditionalPreviews ); #endregion internal bool SetReturnAdditionalPreviews( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnAdditionalPreviews ) @@ -483,10 +331,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetReturnTotalOnly", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetReturnTotalOnly( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnTotalOnly ); - private FSetReturnTotalOnly _SetReturnTotalOnly; + private static extern bool _SetReturnTotalOnly( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnTotalOnly ); #endregion internal bool SetReturnTotalOnly( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnTotalOnly ) @@ -496,10 +343,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetReturnPlaytimeStats", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetReturnPlaytimeStats( IntPtr self, UGCQueryHandle_t handle, uint unDays ); - private FSetReturnPlaytimeStats _SetReturnPlaytimeStats; + private static extern bool _SetReturnPlaytimeStats( IntPtr self, UGCQueryHandle_t handle, uint unDays ); #endregion internal bool SetReturnPlaytimeStats( UGCQueryHandle_t handle, uint unDays ) @@ -509,10 +355,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetLanguage", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetLanguage( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLanguage ); - private FSetLanguage _SetLanguage; + private static extern bool _SetLanguage( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLanguage ); #endregion internal bool SetLanguage( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLanguage ) @@ -522,10 +367,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetAllowCachedResponse", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetAllowCachedResponse( IntPtr self, UGCQueryHandle_t handle, uint unMaxAgeSeconds ); - private FSetAllowCachedResponse _SetAllowCachedResponse; + private static extern bool _SetAllowCachedResponse( IntPtr self, UGCQueryHandle_t handle, uint unMaxAgeSeconds ); #endregion internal bool SetAllowCachedResponse( UGCQueryHandle_t handle, uint unMaxAgeSeconds ) @@ -535,10 +379,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetCloudFileNameFilter", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetCloudFileNameFilter( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pMatchCloudFileName ); - private FSetCloudFileNameFilter _SetCloudFileNameFilter; + private static extern bool _SetCloudFileNameFilter( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pMatchCloudFileName ); #endregion internal bool SetCloudFileNameFilter( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pMatchCloudFileName ) @@ -548,10 +391,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetMatchAnyTag", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetMatchAnyTag( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bMatchAnyTag ); - private FSetMatchAnyTag _SetMatchAnyTag; + private static extern bool _SetMatchAnyTag( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bMatchAnyTag ); #endregion internal bool SetMatchAnyTag( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bMatchAnyTag ) @@ -561,10 +403,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetSearchText", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetSearchText( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pSearchText ); - private FSetSearchText _SetSearchText; + private static extern bool _SetSearchText( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pSearchText ); #endregion internal bool SetSearchText( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pSearchText ) @@ -574,10 +415,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetRankedByTrendDays", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetRankedByTrendDays( IntPtr self, UGCQueryHandle_t handle, uint unDays ); - private FSetRankedByTrendDays _SetRankedByTrendDays; + private static extern bool _SetRankedByTrendDays( IntPtr self, UGCQueryHandle_t handle, uint unDays ); #endregion internal bool SetRankedByTrendDays( UGCQueryHandle_t handle, uint unDays ) @@ -587,10 +427,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_AddRequiredKeyValueTag", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FAddRequiredKeyValueTag( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pValue ); - private FAddRequiredKeyValueTag _AddRequiredKeyValueTag; + private static extern bool _AddRequiredKeyValueTag( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pValue ); #endregion internal bool AddRequiredKeyValueTag( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pValue ) @@ -600,33 +439,30 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FRequestUGCDetails( IntPtr self, PublishedFileId nPublishedFileID, uint unMaxAgeSeconds ); - private FRequestUGCDetails _RequestUGCDetails; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_RequestUGCDetails", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _RequestUGCDetails( IntPtr self, PublishedFileId nPublishedFileID, uint unMaxAgeSeconds ); #endregion - internal async Task RequestUGCDetails( PublishedFileId nPublishedFileID, uint unMaxAgeSeconds ) + internal CallResult RequestUGCDetails( PublishedFileId nPublishedFileID, uint unMaxAgeSeconds ) { var returnValue = _RequestUGCDetails( Self, nPublishedFileID, unMaxAgeSeconds ); - return await SteamUGCRequestUGCDetailsResult_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FCreateItem( IntPtr self, AppId nConsumerAppId, WorkshopFileType eFileType ); - private FCreateItem _CreateItem; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_CreateItem", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _CreateItem( IntPtr self, AppId nConsumerAppId, WorkshopFileType eFileType ); #endregion - internal async Task CreateItem( AppId nConsumerAppId, WorkshopFileType eFileType ) + internal CallResult CreateItem( AppId nConsumerAppId, WorkshopFileType eFileType ) { var returnValue = _CreateItem( Self, nConsumerAppId, eFileType ); - return await CreateItemResult_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate UGCUpdateHandle_t FStartItemUpdate( IntPtr self, AppId nConsumerAppId, PublishedFileId nPublishedFileID ); - private FStartItemUpdate _StartItemUpdate; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_StartItemUpdate", CallingConvention = Platform.CC)] + private static extern UGCUpdateHandle_t _StartItemUpdate( IntPtr self, AppId nConsumerAppId, PublishedFileId nPublishedFileID ); #endregion internal UGCUpdateHandle_t StartItemUpdate( AppId nConsumerAppId, PublishedFileId nPublishedFileID ) @@ -636,10 +472,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetItemTitle", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetItemTitle( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchTitle ); - private FSetItemTitle _SetItemTitle; + private static extern bool _SetItemTitle( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchTitle ); #endregion internal bool SetItemTitle( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchTitle ) @@ -649,10 +484,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetItemDescription", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetItemDescription( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDescription ); - private FSetItemDescription _SetItemDescription; + private static extern bool _SetItemDescription( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDescription ); #endregion internal bool SetItemDescription( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDescription ) @@ -662,10 +496,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetItemUpdateLanguage", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetItemUpdateLanguage( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLanguage ); - private FSetItemUpdateLanguage _SetItemUpdateLanguage; + private static extern bool _SetItemUpdateLanguage( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLanguage ); #endregion internal bool SetItemUpdateLanguage( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLanguage ) @@ -675,10 +508,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetItemMetadata", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetItemMetadata( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchMetaData ); - private FSetItemMetadata _SetItemMetadata; + private static extern bool _SetItemMetadata( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchMetaData ); #endregion internal bool SetItemMetadata( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchMetaData ) @@ -688,10 +520,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetItemVisibility", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetItemVisibility( IntPtr self, UGCUpdateHandle_t handle, RemoteStoragePublishedFileVisibility eVisibility ); - private FSetItemVisibility _SetItemVisibility; + private static extern bool _SetItemVisibility( IntPtr self, UGCUpdateHandle_t handle, RemoteStoragePublishedFileVisibility eVisibility ); #endregion internal bool SetItemVisibility( UGCUpdateHandle_t handle, RemoteStoragePublishedFileVisibility eVisibility ) @@ -701,10 +532,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetItemTags", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetItemTags( IntPtr self, UGCUpdateHandle_t updateHandle, ref SteamParamStringArray_t pTags ); - private FSetItemTags _SetItemTags; + private static extern bool _SetItemTags( IntPtr self, UGCUpdateHandle_t updateHandle, ref SteamParamStringArray_t pTags ); #endregion internal bool SetItemTags( UGCUpdateHandle_t updateHandle, ref SteamParamStringArray_t pTags ) @@ -714,10 +544,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetItemContent", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetItemContent( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszContentFolder ); - private FSetItemContent _SetItemContent; + private static extern bool _SetItemContent( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszContentFolder ); #endregion internal bool SetItemContent( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszContentFolder ) @@ -727,10 +556,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetItemPreview", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetItemPreview( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszPreviewFile ); - private FSetItemPreview _SetItemPreview; + private static extern bool _SetItemPreview( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszPreviewFile ); #endregion internal bool SetItemPreview( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszPreviewFile ) @@ -740,10 +568,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetAllowLegacyUpload", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetAllowLegacyUpload( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bAllowLegacyUpload ); - private FSetAllowLegacyUpload _SetAllowLegacyUpload; + private static extern bool _SetAllowLegacyUpload( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bAllowLegacyUpload ); #endregion internal bool SetAllowLegacyUpload( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bAllowLegacyUpload ) @@ -753,10 +580,21 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_RemoveAllItemKeyValueTags", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FRemoveItemKeyValueTags( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey ); - private FRemoveItemKeyValueTags _RemoveItemKeyValueTags; + private static extern bool _RemoveAllItemKeyValueTags( IntPtr self, UGCUpdateHandle_t handle ); + + #endregion + internal bool RemoveAllItemKeyValueTags( UGCUpdateHandle_t handle ) + { + var returnValue = _RemoveAllItemKeyValueTags( Self, handle ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_RemoveItemKeyValueTags", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _RemoveItemKeyValueTags( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey ); #endregion internal bool RemoveItemKeyValueTags( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey ) @@ -766,10 +604,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_AddItemKeyValueTag", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FAddItemKeyValueTag( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue ); - private FAddItemKeyValueTag _AddItemKeyValueTag; + private static extern bool _AddItemKeyValueTag( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue ); #endregion internal bool AddItemKeyValueTag( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue ) @@ -779,10 +616,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_AddItemPreviewFile", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FAddItemPreviewFile( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszPreviewFile, ItemPreviewType type ); - private FAddItemPreviewFile _AddItemPreviewFile; + private static extern bool _AddItemPreviewFile( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszPreviewFile, ItemPreviewType type ); #endregion internal bool AddItemPreviewFile( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszPreviewFile, ItemPreviewType type ) @@ -792,10 +628,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_AddItemPreviewVideo", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FAddItemPreviewVideo( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszVideoID ); - private FAddItemPreviewVideo _AddItemPreviewVideo; + private static extern bool _AddItemPreviewVideo( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszVideoID ); #endregion internal bool AddItemPreviewVideo( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszVideoID ) @@ -805,10 +640,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_UpdateItemPreviewFile", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FUpdateItemPreviewFile( IntPtr self, UGCUpdateHandle_t handle, uint index, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszPreviewFile ); - private FUpdateItemPreviewFile _UpdateItemPreviewFile; + private static extern bool _UpdateItemPreviewFile( IntPtr self, UGCUpdateHandle_t handle, uint index, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszPreviewFile ); #endregion internal bool UpdateItemPreviewFile( UGCUpdateHandle_t handle, uint index, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszPreviewFile ) @@ -818,10 +652,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_UpdateItemPreviewVideo", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FUpdateItemPreviewVideo( IntPtr self, UGCUpdateHandle_t handle, uint index, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszVideoID ); - private FUpdateItemPreviewVideo _UpdateItemPreviewVideo; + private static extern bool _UpdateItemPreviewVideo( IntPtr self, UGCUpdateHandle_t handle, uint index, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszVideoID ); #endregion internal bool UpdateItemPreviewVideo( UGCUpdateHandle_t handle, uint index, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszVideoID ) @@ -831,10 +664,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_RemoveItemPreview", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FRemoveItemPreview( IntPtr self, UGCUpdateHandle_t handle, uint index ); - private FRemoveItemPreview _RemoveItemPreview; + private static extern bool _RemoveItemPreview( IntPtr self, UGCUpdateHandle_t handle, uint index ); #endregion internal bool RemoveItemPreview( UGCUpdateHandle_t handle, uint index ) @@ -844,21 +676,19 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FSubmitItemUpdate( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchChangeNote ); - private FSubmitItemUpdate _SubmitItemUpdate; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SubmitItemUpdate", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _SubmitItemUpdate( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchChangeNote ); #endregion - internal async Task SubmitItemUpdate( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchChangeNote ) + internal CallResult SubmitItemUpdate( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchChangeNote ) { var returnValue = _SubmitItemUpdate( Self, handle, pchChangeNote ); - return await SubmitItemUpdateResult_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate ItemUpdateStatus FGetItemUpdateProgress( IntPtr self, UGCUpdateHandle_t handle, ref ulong punBytesProcessed, ref ulong punBytesTotal ); - private FGetItemUpdateProgress _GetItemUpdateProgress; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetItemUpdateProgress", CallingConvention = Platform.CC)] + private static extern ItemUpdateStatus _GetItemUpdateProgress( IntPtr self, UGCUpdateHandle_t handle, ref ulong punBytesProcessed, ref ulong punBytesTotal ); #endregion internal ItemUpdateStatus GetItemUpdateProgress( UGCUpdateHandle_t handle, ref ulong punBytesProcessed, ref ulong punBytesTotal ) @@ -868,81 +698,74 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FSetUserItemVote( IntPtr self, PublishedFileId nPublishedFileID, [MarshalAs( UnmanagedType.U1 )] bool bVoteUp ); - private FSetUserItemVote _SetUserItemVote; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetUserItemVote", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _SetUserItemVote( IntPtr self, PublishedFileId nPublishedFileID, [MarshalAs( UnmanagedType.U1 )] bool bVoteUp ); #endregion - internal async Task SetUserItemVote( PublishedFileId nPublishedFileID, [MarshalAs( UnmanagedType.U1 )] bool bVoteUp ) + internal CallResult SetUserItemVote( PublishedFileId nPublishedFileID, [MarshalAs( UnmanagedType.U1 )] bool bVoteUp ) { var returnValue = _SetUserItemVote( Self, nPublishedFileID, bVoteUp ); - return await SetUserItemVoteResult_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FGetUserItemVote( IntPtr self, PublishedFileId nPublishedFileID ); - private FGetUserItemVote _GetUserItemVote; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetUserItemVote", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _GetUserItemVote( IntPtr self, PublishedFileId nPublishedFileID ); #endregion - internal async Task GetUserItemVote( PublishedFileId nPublishedFileID ) + internal CallResult GetUserItemVote( PublishedFileId nPublishedFileID ) { var returnValue = _GetUserItemVote( Self, nPublishedFileID ); - return await GetUserItemVoteResult_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FAddItemToFavorites( IntPtr self, AppId nAppId, PublishedFileId nPublishedFileID ); - private FAddItemToFavorites _AddItemToFavorites; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_AddItemToFavorites", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _AddItemToFavorites( IntPtr self, AppId nAppId, PublishedFileId nPublishedFileID ); #endregion - internal async Task AddItemToFavorites( AppId nAppId, PublishedFileId nPublishedFileID ) + internal CallResult AddItemToFavorites( AppId nAppId, PublishedFileId nPublishedFileID ) { var returnValue = _AddItemToFavorites( Self, nAppId, nPublishedFileID ); - return await UserFavoriteItemsListChanged_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FRemoveItemFromFavorites( IntPtr self, AppId nAppId, PublishedFileId nPublishedFileID ); - private FRemoveItemFromFavorites _RemoveItemFromFavorites; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_RemoveItemFromFavorites", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _RemoveItemFromFavorites( IntPtr self, AppId nAppId, PublishedFileId nPublishedFileID ); #endregion - internal async Task RemoveItemFromFavorites( AppId nAppId, PublishedFileId nPublishedFileID ) + internal CallResult RemoveItemFromFavorites( AppId nAppId, PublishedFileId nPublishedFileID ) { var returnValue = _RemoveItemFromFavorites( Self, nAppId, nPublishedFileID ); - return await UserFavoriteItemsListChanged_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FSubscribeItem( IntPtr self, PublishedFileId nPublishedFileID ); - private FSubscribeItem _SubscribeItem; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SubscribeItem", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _SubscribeItem( IntPtr self, PublishedFileId nPublishedFileID ); #endregion - internal async Task SubscribeItem( PublishedFileId nPublishedFileID ) + internal CallResult SubscribeItem( PublishedFileId nPublishedFileID ) { var returnValue = _SubscribeItem( Self, nPublishedFileID ); - return await RemoteStorageSubscribePublishedFileResult_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FUnsubscribeItem( IntPtr self, PublishedFileId nPublishedFileID ); - private FUnsubscribeItem _UnsubscribeItem; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_UnsubscribeItem", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _UnsubscribeItem( IntPtr self, PublishedFileId nPublishedFileID ); #endregion - internal async Task UnsubscribeItem( PublishedFileId nPublishedFileID ) + internal CallResult UnsubscribeItem( PublishedFileId nPublishedFileID ) { var returnValue = _UnsubscribeItem( Self, nPublishedFileID ); - return await RemoteStorageUnsubscribePublishedFileResult_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate uint FGetNumSubscribedItems( IntPtr self ); - private FGetNumSubscribedItems _GetNumSubscribedItems; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetNumSubscribedItems", CallingConvention = Platform.CC)] + private static extern uint _GetNumSubscribedItems( IntPtr self ); #endregion internal uint GetNumSubscribedItems() @@ -952,9 +775,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate uint FGetSubscribedItems( IntPtr self, [In,Out] PublishedFileId[] pvecPublishedFileID, uint cMaxEntries ); - private FGetSubscribedItems _GetSubscribedItems; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetSubscribedItems", CallingConvention = Platform.CC)] + private static extern uint _GetSubscribedItems( IntPtr self, [In,Out] PublishedFileId[] pvecPublishedFileID, uint cMaxEntries ); #endregion internal uint GetSubscribedItems( [In,Out] PublishedFileId[] pvecPublishedFileID, uint cMaxEntries ) @@ -964,9 +786,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate uint FGetItemState( IntPtr self, PublishedFileId nPublishedFileID ); - private FGetItemState _GetItemState; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetItemState", CallingConvention = Platform.CC)] + private static extern uint _GetItemState( IntPtr self, PublishedFileId nPublishedFileID ); #endregion internal uint GetItemState( PublishedFileId nPublishedFileID ) @@ -976,10 +797,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetItemInstallInfo", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetItemInstallInfo( IntPtr self, PublishedFileId nPublishedFileID, ref ulong punSizeOnDisk, IntPtr pchFolder, uint cchFolderSize, ref uint punTimeStamp ); - private FGetItemInstallInfo _GetItemInstallInfo; + private static extern bool _GetItemInstallInfo( IntPtr self, PublishedFileId nPublishedFileID, ref ulong punSizeOnDisk, IntPtr pchFolder, uint cchFolderSize, ref uint punTimeStamp ); #endregion internal bool GetItemInstallInfo( PublishedFileId nPublishedFileID, ref ulong punSizeOnDisk, out string pchFolder, ref uint punTimeStamp ) @@ -991,10 +811,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetItemDownloadInfo", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetItemDownloadInfo( IntPtr self, PublishedFileId nPublishedFileID, ref ulong punBytesDownloaded, ref ulong punBytesTotal ); - private FGetItemDownloadInfo _GetItemDownloadInfo; + private static extern bool _GetItemDownloadInfo( IntPtr self, PublishedFileId nPublishedFileID, ref ulong punBytesDownloaded, ref ulong punBytesTotal ); #endregion internal bool GetItemDownloadInfo( PublishedFileId nPublishedFileID, ref ulong punBytesDownloaded, ref ulong punBytesTotal ) @@ -1004,10 +823,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_DownloadItem", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FDownloadItem( IntPtr self, PublishedFileId nPublishedFileID, [MarshalAs( UnmanagedType.U1 )] bool bHighPriority ); - private FDownloadItem _DownloadItem; + private static extern bool _DownloadItem( IntPtr self, PublishedFileId nPublishedFileID, [MarshalAs( UnmanagedType.U1 )] bool bHighPriority ); #endregion internal bool DownloadItem( PublishedFileId nPublishedFileID, [MarshalAs( UnmanagedType.U1 )] bool bHighPriority ) @@ -1017,10 +835,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_BInitWorkshopForGameServer", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FBInitWorkshopForGameServer( IntPtr self, DepotId_t unWorkshopDepotID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszFolder ); - private FBInitWorkshopForGameServer _BInitWorkshopForGameServer; + private static extern bool _BInitWorkshopForGameServer( IntPtr self, DepotId_t unWorkshopDepotID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszFolder ); #endregion internal bool BInitWorkshopForGameServer( DepotId_t unWorkshopDepotID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszFolder ) @@ -1030,9 +847,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FSuspendDownloads( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bSuspend ); - private FSuspendDownloads _SuspendDownloads; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SuspendDownloads", CallingConvention = Platform.CC)] + private static extern void _SuspendDownloads( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bSuspend ); #endregion internal void SuspendDownloads( [MarshalAs( UnmanagedType.U1 )] bool bSuspend ) @@ -1041,111 +857,102 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FStartPlaytimeTracking( IntPtr self, [In,Out] PublishedFileId[] pvecPublishedFileID, uint unNumPublishedFileIDs ); - private FStartPlaytimeTracking _StartPlaytimeTracking; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_StartPlaytimeTracking", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _StartPlaytimeTracking( IntPtr self, [In,Out] PublishedFileId[] pvecPublishedFileID, uint unNumPublishedFileIDs ); #endregion - internal async Task StartPlaytimeTracking( [In,Out] PublishedFileId[] pvecPublishedFileID, uint unNumPublishedFileIDs ) + internal CallResult StartPlaytimeTracking( [In,Out] PublishedFileId[] pvecPublishedFileID, uint unNumPublishedFileIDs ) { var returnValue = _StartPlaytimeTracking( Self, pvecPublishedFileID, unNumPublishedFileIDs ); - return await StartPlaytimeTrackingResult_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FStopPlaytimeTracking( IntPtr self, [In,Out] PublishedFileId[] pvecPublishedFileID, uint unNumPublishedFileIDs ); - private FStopPlaytimeTracking _StopPlaytimeTracking; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_StopPlaytimeTracking", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _StopPlaytimeTracking( IntPtr self, [In,Out] PublishedFileId[] pvecPublishedFileID, uint unNumPublishedFileIDs ); #endregion - internal async Task StopPlaytimeTracking( [In,Out] PublishedFileId[] pvecPublishedFileID, uint unNumPublishedFileIDs ) + internal CallResult StopPlaytimeTracking( [In,Out] PublishedFileId[] pvecPublishedFileID, uint unNumPublishedFileIDs ) { var returnValue = _StopPlaytimeTracking( Self, pvecPublishedFileID, unNumPublishedFileIDs ); - return await StopPlaytimeTrackingResult_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FStopPlaytimeTrackingForAllItems( IntPtr self ); - private FStopPlaytimeTrackingForAllItems _StopPlaytimeTrackingForAllItems; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_StopPlaytimeTrackingForAllItems", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _StopPlaytimeTrackingForAllItems( IntPtr self ); #endregion - internal async Task StopPlaytimeTrackingForAllItems() + internal CallResult StopPlaytimeTrackingForAllItems() { var returnValue = _StopPlaytimeTrackingForAllItems( Self ); - return await StopPlaytimeTrackingResult_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FAddDependency( IntPtr self, PublishedFileId nParentPublishedFileID, PublishedFileId nChildPublishedFileID ); - private FAddDependency _AddDependency; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_AddDependency", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _AddDependency( IntPtr self, PublishedFileId nParentPublishedFileID, PublishedFileId nChildPublishedFileID ); #endregion - internal async Task AddDependency( PublishedFileId nParentPublishedFileID, PublishedFileId nChildPublishedFileID ) + internal CallResult AddDependency( PublishedFileId nParentPublishedFileID, PublishedFileId nChildPublishedFileID ) { var returnValue = _AddDependency( Self, nParentPublishedFileID, nChildPublishedFileID ); - return await AddUGCDependencyResult_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FRemoveDependency( IntPtr self, PublishedFileId nParentPublishedFileID, PublishedFileId nChildPublishedFileID ); - private FRemoveDependency _RemoveDependency; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_RemoveDependency", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _RemoveDependency( IntPtr self, PublishedFileId nParentPublishedFileID, PublishedFileId nChildPublishedFileID ); #endregion - internal async Task RemoveDependency( PublishedFileId nParentPublishedFileID, PublishedFileId nChildPublishedFileID ) + internal CallResult RemoveDependency( PublishedFileId nParentPublishedFileID, PublishedFileId nChildPublishedFileID ) { var returnValue = _RemoveDependency( Self, nParentPublishedFileID, nChildPublishedFileID ); - return await RemoveUGCDependencyResult_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FAddAppDependency( IntPtr self, PublishedFileId nPublishedFileID, AppId nAppID ); - private FAddAppDependency _AddAppDependency; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_AddAppDependency", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _AddAppDependency( IntPtr self, PublishedFileId nPublishedFileID, AppId nAppID ); #endregion - internal async Task AddAppDependency( PublishedFileId nPublishedFileID, AppId nAppID ) + internal CallResult AddAppDependency( PublishedFileId nPublishedFileID, AppId nAppID ) { var returnValue = _AddAppDependency( Self, nPublishedFileID, nAppID ); - return await AddAppDependencyResult_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FRemoveAppDependency( IntPtr self, PublishedFileId nPublishedFileID, AppId nAppID ); - private FRemoveAppDependency _RemoveAppDependency; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_RemoveAppDependency", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _RemoveAppDependency( IntPtr self, PublishedFileId nPublishedFileID, AppId nAppID ); #endregion - internal async Task RemoveAppDependency( PublishedFileId nPublishedFileID, AppId nAppID ) + internal CallResult RemoveAppDependency( PublishedFileId nPublishedFileID, AppId nAppID ) { var returnValue = _RemoveAppDependency( Self, nPublishedFileID, nAppID ); - return await RemoveAppDependencyResult_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FGetAppDependencies( IntPtr self, PublishedFileId nPublishedFileID ); - private FGetAppDependencies _GetAppDependencies; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetAppDependencies", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _GetAppDependencies( IntPtr self, PublishedFileId nPublishedFileID ); #endregion - internal async Task GetAppDependencies( PublishedFileId nPublishedFileID ) + internal CallResult GetAppDependencies( PublishedFileId nPublishedFileID ) { var returnValue = _GetAppDependencies( Self, nPublishedFileID ); - return await GetAppDependenciesResult_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FDeleteItem( IntPtr self, PublishedFileId nPublishedFileID ); - private FDeleteItem _DeleteItem; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_DeleteItem", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _DeleteItem( IntPtr self, PublishedFileId nPublishedFileID ); #endregion - internal async Task DeleteItem( PublishedFileId nPublishedFileID ) + internal CallResult DeleteItem( PublishedFileId nPublishedFileID ) { var returnValue = _DeleteItem( Self, nPublishedFileID ); - return await DeleteItemResult_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } } diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamUser.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamUser.cs index b44bd13..fde25cf 100644 --- a/Facepunch.Steamworks/Generated/Interfaces/ISteamUser.cs +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamUser.cs @@ -9,81 +9,20 @@ namespace Steamworks { internal class ISteamUser : SteamInterface { - public override string InterfaceName => "SteamUser020"; - public override void InitInternals() + internal ISteamUser( bool IsGameServer ) { - _GetHSteamUser = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) ); - _BLoggedOn = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) ); - _GetSteamID = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) ); - _InitiateGameConnection = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) ); - _TerminateGameConnection = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) ); - _TrackAppUsageEvent = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) ); - _GetUserDataFolder = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) ); - _StartVoiceRecording = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) ); - _StopVoiceRecording = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) ); - _GetAvailableVoice = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) ); - _GetVoice = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) ); - _DecompressVoice = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) ); - _GetVoiceOptimalSampleRate = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) ); - _GetAuthSessionTicket = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) ); - _BeginAuthSession = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) ); - _EndAuthSession = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) ); - _CancelAuthTicket = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) ); - _UserHasLicenseForApp = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) ); - _BIsBehindNAT = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) ); - _AdvertiseGame = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) ); - _RequestEncryptedAppTicket = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) ); - _GetEncryptedAppTicket = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 168 ) ) ); - _GetGameBadgeLevel = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 176 ) ) ); - _GetPlayerSteamLevel = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 184 ) ) ); - _RequestStoreAuthURL = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 192 ) ) ); - _BIsPhoneVerified = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 200 ) ) ); - _BIsTwoFactorEnabled = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 208 ) ) ); - _BIsPhoneIdentifying = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 216 ) ) ); - _BIsPhoneRequiringVerification = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 224 ) ) ); - _GetMarketEligibility = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 232 ) ) ); - } - internal override void Shutdown() - { - base.Shutdown(); - - _GetHSteamUser = null; - _BLoggedOn = null; - _GetSteamID = null; - _InitiateGameConnection = null; - _TerminateGameConnection = null; - _TrackAppUsageEvent = null; - _GetUserDataFolder = null; - _StartVoiceRecording = null; - _StopVoiceRecording = null; - _GetAvailableVoice = null; - _GetVoice = null; - _DecompressVoice = null; - _GetVoiceOptimalSampleRate = null; - _GetAuthSessionTicket = null; - _BeginAuthSession = null; - _EndAuthSession = null; - _CancelAuthTicket = null; - _UserHasLicenseForApp = null; - _BIsBehindNAT = null; - _AdvertiseGame = null; - _RequestEncryptedAppTicket = null; - _GetEncryptedAppTicket = null; - _GetGameBadgeLevel = null; - _GetPlayerSteamLevel = null; - _RequestStoreAuthURL = null; - _BIsPhoneVerified = null; - _BIsTwoFactorEnabled = null; - _BIsPhoneIdentifying = null; - _BIsPhoneRequiringVerification = null; - _GetMarketEligibility = null; + SetupInterface( IsGameServer ); } + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamUser_v020", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamUser_v020(); + public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamUser_v020(); + + #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate HSteamUser FGetHSteamUser( IntPtr self ); - private FGetHSteamUser _GetHSteamUser; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetHSteamUser", CallingConvention = Platform.CC)] + private static extern HSteamUser _GetHSteamUser( IntPtr self ); #endregion internal HSteamUser GetHSteamUser() @@ -93,10 +32,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_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() @@ -106,31 +44,19 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - #if PLATFORM_WIN - private delegate void FGetSteamID( IntPtr self, ref SteamId retVal ); - #else - private delegate SteamId FGetSteamID( IntPtr self ); - #endif - private FGetSteamID _GetSteamID; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetSteamID", CallingConvention = Platform.CC)] + private static extern SteamId _GetSteamID( IntPtr self ); #endregion internal SteamId GetSteamID() { - #if PLATFORM_WIN - var retVal = default( SteamId ); - _GetSteamID( Self, ref retVal ); - return retVal; - #else var returnValue = _GetSteamID( Self ); return returnValue; - #endif } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FInitiateGameConnection( IntPtr self, IntPtr pAuthBlob, int cbMaxAuthBlob, SteamId steamIDGameServer, uint unIPServer, ushort usPortServer, [MarshalAs( UnmanagedType.U1 )] bool bSecure ); - private FInitiateGameConnection _InitiateGameConnection; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_InitiateGameConnection", CallingConvention = Platform.CC)] + private static extern int _InitiateGameConnection( IntPtr self, IntPtr pAuthBlob, int cbMaxAuthBlob, SteamId steamIDGameServer, uint unIPServer, ushort usPortServer, [MarshalAs( UnmanagedType.U1 )] bool bSecure ); #endregion internal int InitiateGameConnection( IntPtr pAuthBlob, int cbMaxAuthBlob, SteamId steamIDGameServer, uint unIPServer, ushort usPortServer, [MarshalAs( UnmanagedType.U1 )] bool bSecure ) @@ -140,9 +66,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FTerminateGameConnection( IntPtr self, uint unIPServer, ushort usPortServer ); - private FTerminateGameConnection _TerminateGameConnection; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_TerminateGameConnection", CallingConvention = Platform.CC)] + private static extern void _TerminateGameConnection( IntPtr self, uint unIPServer, ushort usPortServer ); #endregion internal void TerminateGameConnection( uint unIPServer, ushort usPortServer ) @@ -151,9 +76,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FTrackAppUsageEvent( IntPtr self, GameId gameID, int eAppUsageEvent, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchExtraInfo ); - private FTrackAppUsageEvent _TrackAppUsageEvent; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_TrackAppUsageEvent", CallingConvention = Platform.CC)] + private static extern void _TrackAppUsageEvent( IntPtr self, GameId gameID, int eAppUsageEvent, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchExtraInfo ); #endregion internal void TrackAppUsageEvent( GameId gameID, int eAppUsageEvent, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchExtraInfo ) @@ -162,10 +86,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetUserDataFolder", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetUserDataFolder( IntPtr self, IntPtr pchBuffer, int cubBuffer ); - private FGetUserDataFolder _GetUserDataFolder; + private static extern bool _GetUserDataFolder( IntPtr self, IntPtr pchBuffer, int cubBuffer ); #endregion internal bool GetUserDataFolder( out string pchBuffer ) @@ -177,9 +100,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FStartVoiceRecording( IntPtr self ); - private FStartVoiceRecording _StartVoiceRecording; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_StartVoiceRecording", CallingConvention = Platform.CC)] + private static extern void _StartVoiceRecording( IntPtr self ); #endregion internal void StartVoiceRecording() @@ -188,9 +110,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FStopVoiceRecording( IntPtr self ); - private FStopVoiceRecording _StopVoiceRecording; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_StopVoiceRecording", CallingConvention = Platform.CC)] + private static extern void _StopVoiceRecording( IntPtr self ); #endregion internal void StopVoiceRecording() @@ -199,9 +120,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate VoiceResult FGetAvailableVoice( IntPtr self, ref uint pcbCompressed, ref uint pcbUncompressed_Deprecated, uint nUncompressedVoiceDesiredSampleRate_Deprecated ); - private FGetAvailableVoice _GetAvailableVoice; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetAvailableVoice", CallingConvention = Platform.CC)] + private static extern VoiceResult _GetAvailableVoice( IntPtr self, ref uint pcbCompressed, ref uint pcbUncompressed_Deprecated, uint nUncompressedVoiceDesiredSampleRate_Deprecated ); #endregion internal VoiceResult GetAvailableVoice( ref uint pcbCompressed, ref uint pcbUncompressed_Deprecated, uint nUncompressedVoiceDesiredSampleRate_Deprecated ) @@ -211,9 +131,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate VoiceResult FGetVoice( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bWantCompressed, IntPtr pDestBuffer, uint cbDestBufferSize, ref uint nBytesWritten, [MarshalAs( UnmanagedType.U1 )] bool bWantUncompressed_Deprecated, IntPtr pUncompressedDestBuffer_Deprecated, uint cbUncompressedDestBufferSize_Deprecated, ref uint nUncompressBytesWritten_Deprecated, uint nUncompressedVoiceDesiredSampleRate_Deprecated ); - private FGetVoice _GetVoice; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetVoice", CallingConvention = Platform.CC)] + private static extern VoiceResult _GetVoice( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bWantCompressed, IntPtr pDestBuffer, uint cbDestBufferSize, ref uint nBytesWritten, [MarshalAs( UnmanagedType.U1 )] bool bWantUncompressed_Deprecated, IntPtr pUncompressedDestBuffer_Deprecated, uint cbUncompressedDestBufferSize_Deprecated, ref uint nUncompressBytesWritten_Deprecated, uint nUncompressedVoiceDesiredSampleRate_Deprecated ); #endregion internal VoiceResult GetVoice( [MarshalAs( UnmanagedType.U1 )] bool bWantCompressed, IntPtr pDestBuffer, uint cbDestBufferSize, ref uint nBytesWritten, [MarshalAs( UnmanagedType.U1 )] bool bWantUncompressed_Deprecated, IntPtr pUncompressedDestBuffer_Deprecated, uint cbUncompressedDestBufferSize_Deprecated, ref uint nUncompressBytesWritten_Deprecated, uint nUncompressedVoiceDesiredSampleRate_Deprecated ) @@ -223,9 +142,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate VoiceResult FDecompressVoice( IntPtr self, IntPtr pCompressed, uint cbCompressed, IntPtr pDestBuffer, uint cbDestBufferSize, ref uint nBytesWritten, uint nDesiredSampleRate ); - private FDecompressVoice _DecompressVoice; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_DecompressVoice", CallingConvention = Platform.CC)] + private static extern VoiceResult _DecompressVoice( IntPtr self, IntPtr pCompressed, uint cbCompressed, IntPtr pDestBuffer, uint cbDestBufferSize, ref uint nBytesWritten, uint nDesiredSampleRate ); #endregion internal VoiceResult DecompressVoice( IntPtr pCompressed, uint cbCompressed, IntPtr pDestBuffer, uint cbDestBufferSize, ref uint nBytesWritten, uint nDesiredSampleRate ) @@ -235,9 +153,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate uint FGetVoiceOptimalSampleRate( IntPtr self ); - private FGetVoiceOptimalSampleRate _GetVoiceOptimalSampleRate; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetVoiceOptimalSampleRate", CallingConvention = Platform.CC)] + private static extern uint _GetVoiceOptimalSampleRate( IntPtr self ); #endregion internal uint GetVoiceOptimalSampleRate() @@ -247,9 +164,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate HAuthTicket FGetAuthSessionTicket( IntPtr self, IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket ); - private FGetAuthSessionTicket _GetAuthSessionTicket; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetAuthSessionTicket", CallingConvention = Platform.CC)] + private static extern HAuthTicket _GetAuthSessionTicket( IntPtr self, IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket ); #endregion internal HAuthTicket GetAuthSessionTicket( IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket ) @@ -259,9 +175,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate BeginAuthResult FBeginAuthSession( IntPtr self, IntPtr pAuthTicket, int cbAuthTicket, SteamId steamID ); - private FBeginAuthSession _BeginAuthSession; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_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 ) @@ -271,9 +186,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FEndAuthSession( IntPtr self, SteamId steamID ); - private FEndAuthSession _EndAuthSession; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_EndAuthSession", CallingConvention = Platform.CC)] + private static extern void _EndAuthSession( IntPtr self, SteamId steamID ); #endregion internal void EndAuthSession( SteamId steamID ) @@ -282,9 +196,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FCancelAuthTicket( IntPtr self, HAuthTicket hAuthTicket ); - private FCancelAuthTicket _CancelAuthTicket; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_CancelAuthTicket", CallingConvention = Platform.CC)] + private static extern void _CancelAuthTicket( IntPtr self, HAuthTicket hAuthTicket ); #endregion internal void CancelAuthTicket( HAuthTicket hAuthTicket ) @@ -293,9 +206,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate UserHasLicenseForAppResult FUserHasLicenseForApp( IntPtr self, SteamId steamID, AppId appID ); - private FUserHasLicenseForApp _UserHasLicenseForApp; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_UserHasLicenseForApp", CallingConvention = Platform.CC)] + private static extern UserHasLicenseForAppResult _UserHasLicenseForApp( IntPtr self, SteamId steamID, AppId appID ); #endregion internal UserHasLicenseForAppResult UserHasLicenseForApp( SteamId steamID, AppId appID ) @@ -305,10 +217,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_BIsBehindNAT", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FBIsBehindNAT( IntPtr self ); - private FBIsBehindNAT _BIsBehindNAT; + private static extern bool _BIsBehindNAT( IntPtr self ); #endregion internal bool BIsBehindNAT() @@ -318,9 +229,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FAdvertiseGame( IntPtr self, SteamId steamIDGameServer, uint unIPServer, ushort usPortServer ); - private FAdvertiseGame _AdvertiseGame; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_AdvertiseGame", CallingConvention = Platform.CC)] + private static extern void _AdvertiseGame( IntPtr self, SteamId steamIDGameServer, uint unIPServer, ushort usPortServer ); #endregion internal void AdvertiseGame( SteamId steamIDGameServer, uint unIPServer, ushort usPortServer ) @@ -329,22 +239,20 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FRequestEncryptedAppTicket( IntPtr self, IntPtr pDataToInclude, int cbDataToInclude ); - private FRequestEncryptedAppTicket _RequestEncryptedAppTicket; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_RequestEncryptedAppTicket", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _RequestEncryptedAppTicket( IntPtr self, IntPtr pDataToInclude, int cbDataToInclude ); #endregion - internal async Task RequestEncryptedAppTicket( IntPtr pDataToInclude, int cbDataToInclude ) + internal CallResult RequestEncryptedAppTicket( IntPtr pDataToInclude, int cbDataToInclude ) { var returnValue = _RequestEncryptedAppTicket( Self, pDataToInclude, cbDataToInclude ); - return await EncryptedAppTicketResponse_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetEncryptedAppTicket", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetEncryptedAppTicket( IntPtr self, IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket ); - private FGetEncryptedAppTicket _GetEncryptedAppTicket; + private static extern bool _GetEncryptedAppTicket( IntPtr self, IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket ); #endregion internal bool GetEncryptedAppTicket( IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket ) @@ -354,9 +262,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetGameBadgeLevel( IntPtr self, int nSeries, [MarshalAs( UnmanagedType.U1 )] bool bFoil ); - private FGetGameBadgeLevel _GetGameBadgeLevel; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetGameBadgeLevel", CallingConvention = Platform.CC)] + private static extern int _GetGameBadgeLevel( IntPtr self, int nSeries, [MarshalAs( UnmanagedType.U1 )] bool bFoil ); #endregion internal int GetGameBadgeLevel( int nSeries, [MarshalAs( UnmanagedType.U1 )] bool bFoil ) @@ -366,9 +273,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetPlayerSteamLevel( IntPtr self ); - private FGetPlayerSteamLevel _GetPlayerSteamLevel; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetPlayerSteamLevel", CallingConvention = Platform.CC)] + private static extern int _GetPlayerSteamLevel( IntPtr self ); #endregion internal int GetPlayerSteamLevel() @@ -378,22 +284,20 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FRequestStoreAuthURL( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchRedirectURL ); - private FRequestStoreAuthURL _RequestStoreAuthURL; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_RequestStoreAuthURL", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _RequestStoreAuthURL( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchRedirectURL ); #endregion - internal async Task RequestStoreAuthURL( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchRedirectURL ) + internal CallResult RequestStoreAuthURL( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchRedirectURL ) { var returnValue = _RequestStoreAuthURL( Self, pchRedirectURL ); - return await StoreAuthURLResponse_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_BIsPhoneVerified", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FBIsPhoneVerified( IntPtr self ); - private FBIsPhoneVerified _BIsPhoneVerified; + private static extern bool _BIsPhoneVerified( IntPtr self ); #endregion internal bool BIsPhoneVerified() @@ -403,10 +307,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_BIsTwoFactorEnabled", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FBIsTwoFactorEnabled( IntPtr self ); - private FBIsTwoFactorEnabled _BIsTwoFactorEnabled; + private static extern bool _BIsTwoFactorEnabled( IntPtr self ); #endregion internal bool BIsTwoFactorEnabled() @@ -416,10 +319,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_BIsPhoneIdentifying", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FBIsPhoneIdentifying( IntPtr self ); - private FBIsPhoneIdentifying _BIsPhoneIdentifying; + private static extern bool _BIsPhoneIdentifying( IntPtr self ); #endregion internal bool BIsPhoneIdentifying() @@ -429,10 +331,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_BIsPhoneRequiringVerification", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FBIsPhoneRequiringVerification( IntPtr self ); - private FBIsPhoneRequiringVerification _BIsPhoneRequiringVerification; + private static extern bool _BIsPhoneRequiringVerification( IntPtr self ); #endregion internal bool BIsPhoneRequiringVerification() @@ -442,15 +343,25 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FGetMarketEligibility( IntPtr self ); - private FGetMarketEligibility _GetMarketEligibility; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetMarketEligibility", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _GetMarketEligibility( IntPtr self ); #endregion - internal async Task GetMarketEligibility() + internal CallResult GetMarketEligibility() { var returnValue = _GetMarketEligibility( Self ); - return await MarketEligibilityResponse_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetDurationControl", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _GetDurationControl( IntPtr self ); + + #endregion + internal CallResult GetDurationControl() + { + var returnValue = _GetDurationControl( Self ); + return new CallResult( returnValue ); } } diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamUserStats.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamUserStats.cs index 4376970..b19279b 100644 --- a/Facepunch.Steamworks/Generated/Interfaces/ISteamUserStats.cs +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamUserStats.cs @@ -9,122 +9,21 @@ namespace Steamworks { internal class ISteamUserStats : SteamInterface { - public override string InterfaceName => "STEAMUSERSTATS_INTERFACE_VERSION011"; - public override void InitInternals() + internal ISteamUserStats( bool IsGameServer ) { - _RequestCurrentStats = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) ); - _UpdateAvgRateStat = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) ); - _GetAchievement = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) ); - _SetAchievement = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) ); - _ClearAchievement = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) ); - _GetAchievementAndUnlockTime = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) ); - _StoreStats = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) ); - _GetAchievementIcon = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) ); - _GetAchievementDisplayAttribute = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) ); - _IndicateAchievementProgress = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) ); - _GetNumAchievements = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) ); - _GetAchievementName = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) ); - _RequestUserStats = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) ); - _GetUserAchievement = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) ); - _GetUserAchievementAndUnlockTime = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) ); - _ResetAllStats = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 168 ) ) ); - _FindOrCreateLeaderboard = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 176 ) ) ); - _FindLeaderboard = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 184 ) ) ); - _GetLeaderboardName = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 192 ) ) ); - _GetLeaderboardEntryCount = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 200 ) ) ); - _GetLeaderboardSortMethod = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 208 ) ) ); - _GetLeaderboardDisplayType = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 216 ) ) ); - _DownloadLeaderboardEntries = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 224 ) ) ); - _DownloadLeaderboardEntriesForUsers = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 232 ) ) ); - _GetDownloadedLeaderboardEntry = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 240 ) ) ); - _UploadLeaderboardScore = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 248 ) ) ); - _AttachLeaderboardUGC = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 256 ) ) ); - _GetNumberOfCurrentPlayers = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 264 ) ) ); - _RequestGlobalAchievementPercentages = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 272 ) ) ); - _GetMostAchievedAchievementInfo = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 280 ) ) ); - _GetNextMostAchievedAchievementInfo = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 288 ) ) ); - _GetAchievementAchievedPercent = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 296 ) ) ); - _RequestGlobalStats = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 304 ) ) ); - - #if PLATFORM_WIN - _GetStat1 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) ); - _GetStat2 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) ); - _SetStat1 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) ); - _SetStat2 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) ); - _GetUserStat1 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) ); - _GetUserStat2 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) ); - _GetGlobalStat1 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 320 ) ) ); - _GetGlobalStat2 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 312 ) ) ); - _GetGlobalStatHistory1 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 336 ) ) ); - _GetGlobalStatHistory2 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 328 ) ) ); - #else - _GetStat1 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) ); - _GetStat2 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) ); - _SetStat1 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) ); - _SetStat2 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) ); - _GetUserStat1 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) ); - _GetUserStat2 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) ); - _GetGlobalStat1 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 312 ) ) ); - _GetGlobalStat2 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 320 ) ) ); - _GetGlobalStatHistory1 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 328 ) ) ); - _GetGlobalStatHistory2 = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 336 ) ) ); - #endif - } - internal override void Shutdown() - { - base.Shutdown(); - - _RequestCurrentStats = null; - _GetStat1 = null; - _GetStat2 = null; - _SetStat1 = null; - _SetStat2 = null; - _UpdateAvgRateStat = null; - _GetAchievement = null; - _SetAchievement = null; - _ClearAchievement = null; - _GetAchievementAndUnlockTime = null; - _StoreStats = null; - _GetAchievementIcon = null; - _GetAchievementDisplayAttribute = null; - _IndicateAchievementProgress = null; - _GetNumAchievements = null; - _GetAchievementName = null; - _RequestUserStats = null; - _GetUserStat1 = null; - _GetUserStat2 = null; - _GetUserAchievement = null; - _GetUserAchievementAndUnlockTime = null; - _ResetAllStats = null; - _FindOrCreateLeaderboard = null; - _FindLeaderboard = null; - _GetLeaderboardName = null; - _GetLeaderboardEntryCount = null; - _GetLeaderboardSortMethod = null; - _GetLeaderboardDisplayType = null; - _DownloadLeaderboardEntries = null; - _DownloadLeaderboardEntriesForUsers = null; - _GetDownloadedLeaderboardEntry = null; - _UploadLeaderboardScore = null; - _AttachLeaderboardUGC = null; - _GetNumberOfCurrentPlayers = null; - _RequestGlobalAchievementPercentages = null; - _GetMostAchievedAchievementInfo = null; - _GetNextMostAchievedAchievementInfo = null; - _GetAchievementAchievedPercent = null; - _RequestGlobalStats = null; - _GetGlobalStat1 = null; - _GetGlobalStat2 = null; - _GetGlobalStatHistory1 = null; - _GetGlobalStatHistory2 = null; + SetupInterface( IsGameServer ); } + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamUserStats_v011", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamUserStats_v011(); + public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamUserStats_v011(); + + #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_RequestCurrentStats", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FRequestCurrentStats( IntPtr self ); - private FRequestCurrentStats _RequestCurrentStats; + private static extern bool _RequestCurrentStats( IntPtr self ); #endregion internal bool RequestCurrentStats() @@ -134,62 +33,57 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetStatInt32", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetStat1( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData ); - private FGetStat1 _GetStat1; + private static extern bool _GetStat( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData ); #endregion - internal bool GetStat1( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData ) + internal bool GetStat( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData ) { - var returnValue = _GetStat1( Self, pchName, ref pData ); + var returnValue = _GetStat( Self, pchName, ref pData ); return returnValue; } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetStatFloat", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetStat2( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData ); - private FGetStat2 _GetStat2; + private static extern bool _GetStat( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData ); #endregion - internal bool GetStat2( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData ) + internal bool GetStat( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData ) { - var returnValue = _GetStat2( Self, pchName, ref pData ); + var returnValue = _GetStat( Self, pchName, ref pData ); return returnValue; } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_SetStatInt32", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetStat1( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData ); - private FSetStat1 _SetStat1; + private static extern bool _SetStat( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData ); #endregion - internal bool SetStat1( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData ) + internal bool SetStat( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData ) { - var returnValue = _SetStat1( Self, pchName, nData ); + var returnValue = _SetStat( Self, pchName, nData ); return returnValue; } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_SetStatFloat", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetStat2( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData ); - private FSetStat2 _SetStat2; + private static extern bool _SetStat( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData ); #endregion - internal bool SetStat2( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData ) + internal bool SetStat( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData ) { - var returnValue = _SetStat2( Self, pchName, fData ); + var returnValue = _SetStat( Self, pchName, fData ); return returnValue; } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_UpdateAvgRateStat", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FUpdateAvgRateStat( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float flCountThisSession, double dSessionLength ); - private FUpdateAvgRateStat _UpdateAvgRateStat; + private static extern bool _UpdateAvgRateStat( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float flCountThisSession, double dSessionLength ); #endregion internal bool UpdateAvgRateStat( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float flCountThisSession, double dSessionLength ) @@ -199,10 +93,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievement", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetAchievement( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved ); - private FGetAchievement _GetAchievement; + private static extern bool _GetAchievement( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved ); #endregion internal bool GetAchievement( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved ) @@ -212,10 +105,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_SetAchievement", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FSetAchievement( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName ); - private FSetAchievement _SetAchievement; + private static extern bool _SetAchievement( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName ); #endregion internal bool SetAchievement( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName ) @@ -225,10 +117,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_ClearAchievement", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FClearAchievement( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName ); - private FClearAchievement _ClearAchievement; + private static extern bool _ClearAchievement( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName ); #endregion internal bool ClearAchievement( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName ) @@ -238,10 +129,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievementAndUnlockTime", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetAchievementAndUnlockTime( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved, ref uint punUnlockTime ); - private FGetAchievementAndUnlockTime _GetAchievementAndUnlockTime; + private static extern bool _GetAchievementAndUnlockTime( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved, ref uint punUnlockTime ); #endregion internal bool GetAchievementAndUnlockTime( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved, ref uint punUnlockTime ) @@ -251,10 +141,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_StoreStats", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FStoreStats( IntPtr self ); - private FStoreStats _StoreStats; + private static extern bool _StoreStats( IntPtr self ); #endregion internal bool StoreStats() @@ -264,9 +153,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetAchievementIcon( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName ); - private FGetAchievementIcon _GetAchievementIcon; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievementIcon", CallingConvention = Platform.CC)] + private static extern int _GetAchievementIcon( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName ); #endregion internal int GetAchievementIcon( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName ) @@ -276,9 +164,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate Utf8StringPointer FGetAchievementDisplayAttribute( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey ); - private FGetAchievementDisplayAttribute _GetAchievementDisplayAttribute; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievementDisplayAttribute", CallingConvention = Platform.CC)] + private static extern Utf8StringPointer _GetAchievementDisplayAttribute( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey ); #endregion internal string GetAchievementDisplayAttribute( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey ) @@ -288,10 +175,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_IndicateAchievementProgress", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FIndicateAchievementProgress( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, uint nCurProgress, uint nMaxProgress ); - private FIndicateAchievementProgress _IndicateAchievementProgress; + private static extern bool _IndicateAchievementProgress( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, uint nCurProgress, uint nMaxProgress ); #endregion internal bool IndicateAchievementProgress( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, uint nCurProgress, uint nMaxProgress ) @@ -301,9 +187,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate uint FGetNumAchievements( IntPtr self ); - private FGetNumAchievements _GetNumAchievements; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetNumAchievements", CallingConvention = Platform.CC)] + private static extern uint _GetNumAchievements( IntPtr self ); #endregion internal uint GetNumAchievements() @@ -313,9 +198,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate Utf8StringPointer FGetAchievementName( IntPtr self, uint iAchievement ); - private FGetAchievementName _GetAchievementName; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievementName", CallingConvention = Platform.CC)] + private static extern Utf8StringPointer _GetAchievementName( IntPtr self, uint iAchievement ); #endregion internal string GetAchievementName( uint iAchievement ) @@ -325,48 +209,44 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FRequestUserStats( IntPtr self, SteamId steamIDUser ); - private FRequestUserStats _RequestUserStats; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_RequestUserStats", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _RequestUserStats( IntPtr self, SteamId steamIDUser ); #endregion - internal async Task RequestUserStats( SteamId steamIDUser ) + internal CallResult RequestUserStats( SteamId steamIDUser ) { var returnValue = _RequestUserStats( Self, steamIDUser ); - return await UserStatsReceived_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetUserStatInt32", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetUserStat1( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData ); - private FGetUserStat1 _GetUserStat1; + private static extern bool _GetUserStat( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData ); #endregion - internal bool GetUserStat1( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData ) + internal bool GetUserStat( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData ) { - var returnValue = _GetUserStat1( Self, steamIDUser, pchName, ref pData ); + var returnValue = _GetUserStat( Self, steamIDUser, pchName, ref pData ); return returnValue; } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetUserStatFloat", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetUserStat2( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData ); - private FGetUserStat2 _GetUserStat2; + private static extern bool _GetUserStat( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData ); #endregion - internal bool GetUserStat2( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData ) + internal bool GetUserStat( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData ) { - var returnValue = _GetUserStat2( Self, steamIDUser, pchName, ref pData ); + var returnValue = _GetUserStat( Self, steamIDUser, pchName, ref pData ); return returnValue; } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetUserAchievement", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved ); - private FGetUserAchievement _GetUserAchievement; + private static extern bool _GetUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved ); #endregion internal bool GetUserAchievement( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved ) @@ -376,10 +256,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetUserAchievementAndUnlockTime", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetUserAchievementAndUnlockTime( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved, ref uint punUnlockTime ); - private FGetUserAchievementAndUnlockTime _GetUserAchievementAndUnlockTime; + private static extern bool _GetUserAchievementAndUnlockTime( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved, ref uint punUnlockTime ); #endregion internal bool GetUserAchievementAndUnlockTime( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved, ref uint punUnlockTime ) @@ -389,10 +268,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_ResetAllStats", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FResetAllStats( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bAchievementsToo ); - private FResetAllStats _ResetAllStats; + private static extern bool _ResetAllStats( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bAchievementsToo ); #endregion internal bool ResetAllStats( [MarshalAs( UnmanagedType.U1 )] bool bAchievementsToo ) @@ -402,33 +280,30 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FFindOrCreateLeaderboard( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLeaderboardName, LeaderboardSort eLeaderboardSortMethod, LeaderboardDisplay eLeaderboardDisplayType ); - private FFindOrCreateLeaderboard _FindOrCreateLeaderboard; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_FindOrCreateLeaderboard", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _FindOrCreateLeaderboard( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLeaderboardName, LeaderboardSort eLeaderboardSortMethod, LeaderboardDisplay eLeaderboardDisplayType ); #endregion - internal async Task FindOrCreateLeaderboard( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLeaderboardName, LeaderboardSort eLeaderboardSortMethod, LeaderboardDisplay eLeaderboardDisplayType ) + internal CallResult FindOrCreateLeaderboard( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLeaderboardName, LeaderboardSort eLeaderboardSortMethod, LeaderboardDisplay eLeaderboardDisplayType ) { var returnValue = _FindOrCreateLeaderboard( Self, pchLeaderboardName, eLeaderboardSortMethod, eLeaderboardDisplayType ); - return await LeaderboardFindResult_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FFindLeaderboard( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLeaderboardName ); - private FFindLeaderboard _FindLeaderboard; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_FindLeaderboard", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _FindLeaderboard( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLeaderboardName ); #endregion - internal async Task FindLeaderboard( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLeaderboardName ) + internal CallResult FindLeaderboard( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLeaderboardName ) { var returnValue = _FindLeaderboard( Self, pchLeaderboardName ); - return await LeaderboardFindResult_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate Utf8StringPointer FGetLeaderboardName( IntPtr self, SteamLeaderboard_t hSteamLeaderboard ); - private FGetLeaderboardName _GetLeaderboardName; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetLeaderboardName", CallingConvention = Platform.CC)] + private static extern Utf8StringPointer _GetLeaderboardName( IntPtr self, SteamLeaderboard_t hSteamLeaderboard ); #endregion internal string GetLeaderboardName( SteamLeaderboard_t hSteamLeaderboard ) @@ -438,9 +313,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetLeaderboardEntryCount( IntPtr self, SteamLeaderboard_t hSteamLeaderboard ); - private FGetLeaderboardEntryCount _GetLeaderboardEntryCount; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetLeaderboardEntryCount", CallingConvention = Platform.CC)] + private static extern int _GetLeaderboardEntryCount( IntPtr self, SteamLeaderboard_t hSteamLeaderboard ); #endregion internal int GetLeaderboardEntryCount( SteamLeaderboard_t hSteamLeaderboard ) @@ -450,9 +324,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate LeaderboardSort FGetLeaderboardSortMethod( IntPtr self, SteamLeaderboard_t hSteamLeaderboard ); - private FGetLeaderboardSortMethod _GetLeaderboardSortMethod; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetLeaderboardSortMethod", CallingConvention = Platform.CC)] + private static extern LeaderboardSort _GetLeaderboardSortMethod( IntPtr self, SteamLeaderboard_t hSteamLeaderboard ); #endregion internal LeaderboardSort GetLeaderboardSortMethod( SteamLeaderboard_t hSteamLeaderboard ) @@ -462,9 +335,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate LeaderboardDisplay FGetLeaderboardDisplayType( IntPtr self, SteamLeaderboard_t hSteamLeaderboard ); - private FGetLeaderboardDisplayType _GetLeaderboardDisplayType; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetLeaderboardDisplayType", CallingConvention = Platform.CC)] + private static extern LeaderboardDisplay _GetLeaderboardDisplayType( IntPtr self, SteamLeaderboard_t hSteamLeaderboard ); #endregion internal LeaderboardDisplay GetLeaderboardDisplayType( SteamLeaderboard_t hSteamLeaderboard ) @@ -474,34 +346,34 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FDownloadLeaderboardEntries( IntPtr self, SteamLeaderboard_t hSteamLeaderboard, LeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd ); - private FDownloadLeaderboardEntries _DownloadLeaderboardEntries; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_DownloadLeaderboardEntries", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _DownloadLeaderboardEntries( IntPtr self, SteamLeaderboard_t hSteamLeaderboard, LeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd ); #endregion - internal async Task DownloadLeaderboardEntries( SteamLeaderboard_t hSteamLeaderboard, LeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd ) + internal CallResult DownloadLeaderboardEntries( SteamLeaderboard_t hSteamLeaderboard, LeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd ) { var returnValue = _DownloadLeaderboardEntries( Self, hSteamLeaderboard, eLeaderboardDataRequest, nRangeStart, nRangeEnd ); - return await LeaderboardScoresDownloaded_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FDownloadLeaderboardEntriesForUsers( IntPtr self, SteamLeaderboard_t hSteamLeaderboard, [In,Out] SteamId[] prgUsers, int cUsers ); - private FDownloadLeaderboardEntriesForUsers _DownloadLeaderboardEntriesForUsers; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_DownloadLeaderboardEntriesForUsers", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _DownloadLeaderboardEntriesForUsers( IntPtr self, SteamLeaderboard_t hSteamLeaderboard, [In,Out] SteamId[] prgUsers, int cUsers ); #endregion - internal async Task DownloadLeaderboardEntriesForUsers( SteamLeaderboard_t hSteamLeaderboard, [In,Out] SteamId[] prgUsers, int cUsers ) + /// + /// Downloads leaderboard entries for an arbitrary set of users - ELeaderboardDataRequest is k_ELeaderboardDataRequestUsers + /// + internal CallResult DownloadLeaderboardEntriesForUsers( SteamLeaderboard_t hSteamLeaderboard, [In,Out] SteamId[] prgUsers, int cUsers ) { var returnValue = _DownloadLeaderboardEntriesForUsers( Self, hSteamLeaderboard, prgUsers, cUsers ); - return await LeaderboardScoresDownloaded_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetDownloadedLeaderboardEntry", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetDownloadedLeaderboardEntry( IntPtr self, SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, ref LeaderboardEntry_t pLeaderboardEntry, [In,Out] int[] pDetails, int cDetailsMax ); - private FGetDownloadedLeaderboardEntry _GetDownloadedLeaderboardEntry; + private static extern bool _GetDownloadedLeaderboardEntry( IntPtr self, SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, ref LeaderboardEntry_t pLeaderboardEntry, [In,Out] int[] pDetails, int cDetailsMax ); #endregion internal bool GetDownloadedLeaderboardEntry( SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, ref LeaderboardEntry_t pLeaderboardEntry, [In,Out] int[] pDetails, int cDetailsMax ) @@ -511,57 +383,52 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FUploadLeaderboardScore( IntPtr self, SteamLeaderboard_t hSteamLeaderboard, LeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int nScore, [In,Out] int[] pScoreDetails, int cScoreDetailsCount ); - private FUploadLeaderboardScore _UploadLeaderboardScore; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_UploadLeaderboardScore", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _UploadLeaderboardScore( IntPtr self, SteamLeaderboard_t hSteamLeaderboard, LeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int nScore, [In,Out] int[] pScoreDetails, int cScoreDetailsCount ); #endregion - internal async Task UploadLeaderboardScore( SteamLeaderboard_t hSteamLeaderboard, LeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int nScore, [In,Out] int[] pScoreDetails, int cScoreDetailsCount ) + internal CallResult UploadLeaderboardScore( SteamLeaderboard_t hSteamLeaderboard, LeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int nScore, [In,Out] int[] pScoreDetails, int cScoreDetailsCount ) { var returnValue = _UploadLeaderboardScore( Self, hSteamLeaderboard, eLeaderboardUploadScoreMethod, nScore, pScoreDetails, cScoreDetailsCount ); - return await LeaderboardScoreUploaded_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FAttachLeaderboardUGC( IntPtr self, SteamLeaderboard_t hSteamLeaderboard, UGCHandle_t hUGC ); - private FAttachLeaderboardUGC _AttachLeaderboardUGC; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_AttachLeaderboardUGC", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _AttachLeaderboardUGC( IntPtr self, SteamLeaderboard_t hSteamLeaderboard, UGCHandle_t hUGC ); #endregion - internal async Task AttachLeaderboardUGC( SteamLeaderboard_t hSteamLeaderboard, UGCHandle_t hUGC ) + internal CallResult AttachLeaderboardUGC( SteamLeaderboard_t hSteamLeaderboard, UGCHandle_t hUGC ) { var returnValue = _AttachLeaderboardUGC( Self, hSteamLeaderboard, hUGC ); - return await LeaderboardUGCSet_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FGetNumberOfCurrentPlayers( IntPtr self ); - private FGetNumberOfCurrentPlayers _GetNumberOfCurrentPlayers; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetNumberOfCurrentPlayers", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _GetNumberOfCurrentPlayers( IntPtr self ); #endregion - internal async Task GetNumberOfCurrentPlayers() + internal CallResult GetNumberOfCurrentPlayers() { var returnValue = _GetNumberOfCurrentPlayers( Self ); - return await NumberOfCurrentPlayers_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FRequestGlobalAchievementPercentages( IntPtr self ); - private FRequestGlobalAchievementPercentages _RequestGlobalAchievementPercentages; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_RequestGlobalAchievementPercentages", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _RequestGlobalAchievementPercentages( IntPtr self ); #endregion - internal async Task RequestGlobalAchievementPercentages() + internal CallResult RequestGlobalAchievementPercentages() { var returnValue = _RequestGlobalAchievementPercentages( Self ); - return await GlobalAchievementPercentagesReady_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetMostAchievedAchievementInfo( IntPtr self, IntPtr pchName, uint unNameBufLen, ref float pflPercent, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved ); - private FGetMostAchievedAchievementInfo _GetMostAchievedAchievementInfo; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetMostAchievedAchievementInfo", CallingConvention = Platform.CC)] + private static extern int _GetMostAchievedAchievementInfo( IntPtr self, IntPtr pchName, uint unNameBufLen, ref float pflPercent, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved ); #endregion internal int GetMostAchievedAchievementInfo( out string pchName, ref float pflPercent, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved ) @@ -573,9 +440,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetNextMostAchievedAchievementInfo( IntPtr self, int iIteratorPrevious, IntPtr pchName, uint unNameBufLen, ref float pflPercent, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved ); - private FGetNextMostAchievedAchievementInfo _GetNextMostAchievedAchievementInfo; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetNextMostAchievedAchievementInfo", CallingConvention = Platform.CC)] + private static extern int _GetNextMostAchievedAchievementInfo( IntPtr self, int iIteratorPrevious, IntPtr pchName, uint unNameBufLen, ref float pflPercent, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved ); #endregion internal int GetNextMostAchievedAchievementInfo( int iIteratorPrevious, out string pchName, ref float pflPercent, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved ) @@ -587,10 +453,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievementAchievedPercent", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetAchievementAchievedPercent( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pflPercent ); - private FGetAchievementAchievedPercent _GetAchievementAchievedPercent; + private static extern bool _GetAchievementAchievedPercent( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pflPercent ); #endregion internal bool GetAchievementAchievedPercent( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pflPercent ) @@ -600,64 +465,59 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FRequestGlobalStats( IntPtr self, int nHistoryDays ); - private FRequestGlobalStats _RequestGlobalStats; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_RequestGlobalStats", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _RequestGlobalStats( IntPtr self, int nHistoryDays ); #endregion - internal async Task RequestGlobalStats( int nHistoryDays ) + internal CallResult RequestGlobalStats( int nHistoryDays ) { var returnValue = _RequestGlobalStats( Self, nHistoryDays ); - return await GlobalStatsReceived_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetGlobalStatInt64", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetGlobalStat1( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref long pData ); - private FGetGlobalStat1 _GetGlobalStat1; + private static extern bool _GetGlobalStat( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref long pData ); #endregion - internal bool GetGlobalStat1( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref long pData ) + internal bool GetGlobalStat( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref long pData ) { - var returnValue = _GetGlobalStat1( Self, pchStatName, ref pData ); + var returnValue = _GetGlobalStat( Self, pchStatName, ref pData ); return returnValue; } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetGlobalStatDouble", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetGlobalStat2( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref double pData ); - private FGetGlobalStat2 _GetGlobalStat2; + private static extern bool _GetGlobalStat( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref double pData ); #endregion - internal bool GetGlobalStat2( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref double pData ) + internal bool GetGlobalStat( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref double pData ) { - var returnValue = _GetGlobalStat2( Self, pchStatName, ref pData ); + var returnValue = _GetGlobalStat( Self, pchStatName, ref pData ); return returnValue; } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetGlobalStatHistory1( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, [In,Out] long[] pData, uint cubData ); - private FGetGlobalStatHistory1 _GetGlobalStatHistory1; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetGlobalStatHistoryInt64", CallingConvention = Platform.CC)] + private static extern int _GetGlobalStatHistory( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, [In,Out] long[] pData, uint cubData ); #endregion - internal int GetGlobalStatHistory1( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, [In,Out] long[] pData, uint cubData ) + internal int GetGlobalStatHistory( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, [In,Out] long[] pData, uint cubData ) { - var returnValue = _GetGlobalStatHistory1( Self, pchStatName, pData, cubData ); + var returnValue = _GetGlobalStatHistory( Self, pchStatName, pData, cubData ); return returnValue; } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate int FGetGlobalStatHistory2( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, [In,Out] double[] pData, uint cubData ); - private FGetGlobalStatHistory2 _GetGlobalStatHistory2; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetGlobalStatHistoryDouble", CallingConvention = Platform.CC)] + private static extern int _GetGlobalStatHistory( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, [In,Out] double[] pData, uint cubData ); #endregion - internal int GetGlobalStatHistory2( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, [In,Out] double[] pData, uint cubData ) + internal int GetGlobalStatHistory( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, [In,Out] double[] pData, uint cubData ) { - var returnValue = _GetGlobalStatHistory2( Self, pchStatName, pData, cubData ); + var returnValue = _GetGlobalStatHistory( Self, pchStatName, pData, cubData ); return returnValue; } diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamUtils.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamUtils.cs index bfe1161..65ea947 100644 --- a/Facepunch.Steamworks/Generated/Interfaces/ISteamUtils.cs +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamUtils.cs @@ -9,81 +9,23 @@ namespace Steamworks { internal class ISteamUtils : SteamInterface { - public override string InterfaceName => "SteamUtils009"; - public override void InitInternals() + internal ISteamUtils( bool IsGameServer ) { - _GetSecondsSinceAppActive = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) ); - _GetSecondsSinceComputerActive = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) ); - _GetConnectedUniverse = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) ); - _GetServerRealTime = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) ); - _GetIPCountry = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) ); - _GetImageSize = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) ); - _GetImageRGBA = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) ); - _GetCSERIPPort = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) ); - _GetCurrentBatteryPower = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) ); - _GetAppID = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) ); - _SetOverlayNotificationPosition = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) ); - _IsAPICallCompleted = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) ); - _GetAPICallFailureReason = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) ); - _GetAPICallResult = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) ); - _RunFrame = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) ); - _GetIPCCallCount = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) ); - _SetWarningMessageHook = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) ); - _IsOverlayEnabled = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) ); - _BOverlayNeedsPresent = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) ); - _CheckFileSignature = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) ); - _ShowGamepadTextInput = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) ); - _GetEnteredGamepadTextLength = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 168 ) ) ); - _GetEnteredGamepadTextInput = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 176 ) ) ); - _GetSteamUILanguage = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 184 ) ) ); - _IsSteamRunningInVR = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 192 ) ) ); - _SetOverlayNotificationInset = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 200 ) ) ); - _IsSteamInBigPictureMode = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 208 ) ) ); - _StartVRDashboard = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 216 ) ) ); - _IsVRHeadsetStreamingEnabled = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 224 ) ) ); - _SetVRHeadsetStreamingEnabled = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 232 ) ) ); - } - internal override void Shutdown() - { - base.Shutdown(); - - _GetSecondsSinceAppActive = null; - _GetSecondsSinceComputerActive = null; - _GetConnectedUniverse = null; - _GetServerRealTime = null; - _GetIPCountry = null; - _GetImageSize = null; - _GetImageRGBA = null; - _GetCSERIPPort = null; - _GetCurrentBatteryPower = null; - _GetAppID = null; - _SetOverlayNotificationPosition = null; - _IsAPICallCompleted = null; - _GetAPICallFailureReason = null; - _GetAPICallResult = null; - _RunFrame = null; - _GetIPCCallCount = null; - _SetWarningMessageHook = null; - _IsOverlayEnabled = null; - _BOverlayNeedsPresent = null; - _CheckFileSignature = null; - _ShowGamepadTextInput = null; - _GetEnteredGamepadTextLength = null; - _GetEnteredGamepadTextInput = null; - _GetSteamUILanguage = null; - _IsSteamRunningInVR = null; - _SetOverlayNotificationInset = null; - _IsSteamInBigPictureMode = null; - _StartVRDashboard = null; - _IsVRHeadsetStreamingEnabled = null; - _SetVRHeadsetStreamingEnabled = null; + SetupInterface( IsGameServer ); } + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamUtils_v009", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamUtils_v009(); + public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamUtils_v009(); + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameServerUtils_v009", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamGameServerUtils_v009(); + public override IntPtr GetServerInterfacePointer() => SteamAPI_SteamGameServerUtils_v009(); + + #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate uint FGetSecondsSinceAppActive( IntPtr self ); - private FGetSecondsSinceAppActive _GetSecondsSinceAppActive; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetSecondsSinceAppActive", CallingConvention = Platform.CC)] + private static extern uint _GetSecondsSinceAppActive( IntPtr self ); #endregion internal uint GetSecondsSinceAppActive() @@ -93,9 +35,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate uint FGetSecondsSinceComputerActive( IntPtr self ); - private FGetSecondsSinceComputerActive _GetSecondsSinceComputerActive; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetSecondsSinceComputerActive", CallingConvention = Platform.CC)] + private static extern uint _GetSecondsSinceComputerActive( IntPtr self ); #endregion internal uint GetSecondsSinceComputerActive() @@ -105,9 +46,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate Universe FGetConnectedUniverse( IntPtr self ); - private FGetConnectedUniverse _GetConnectedUniverse; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetConnectedUniverse", CallingConvention = Platform.CC)] + private static extern Universe _GetConnectedUniverse( IntPtr self ); #endregion internal Universe GetConnectedUniverse() @@ -117,9 +57,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate uint FGetServerRealTime( IntPtr self ); - private FGetServerRealTime _GetServerRealTime; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetServerRealTime", CallingConvention = Platform.CC)] + private static extern uint _GetServerRealTime( IntPtr self ); #endregion internal uint GetServerRealTime() @@ -129,9 +68,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate Utf8StringPointer FGetIPCountry( IntPtr self ); - private FGetIPCountry _GetIPCountry; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetIPCountry", CallingConvention = Platform.CC)] + private static extern Utf8StringPointer _GetIPCountry( IntPtr self ); #endregion internal string GetIPCountry() @@ -141,10 +79,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetImageSize", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetImageSize( IntPtr self, int iImage, ref uint pnWidth, ref uint pnHeight ); - private FGetImageSize _GetImageSize; + private static extern bool _GetImageSize( IntPtr self, int iImage, ref uint pnWidth, ref uint pnHeight ); #endregion internal bool GetImageSize( int iImage, ref uint pnWidth, ref uint pnHeight ) @@ -154,10 +91,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetImageRGBA", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetImageRGBA( IntPtr self, int iImage, [In,Out] byte[] pubDest, int nDestBufferSize ); - private FGetImageRGBA _GetImageRGBA; + private static extern bool _GetImageRGBA( IntPtr self, int iImage, [In,Out] byte[] pubDest, int nDestBufferSize ); #endregion internal bool GetImageRGBA( int iImage, [In,Out] byte[] pubDest, int nDestBufferSize ) @@ -167,10 +103,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetCSERIPPort", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetCSERIPPort( IntPtr self, ref uint unIP, ref ushort usPort ); - private FGetCSERIPPort _GetCSERIPPort; + private static extern bool _GetCSERIPPort( IntPtr self, ref uint unIP, ref ushort usPort ); #endregion internal bool GetCSERIPPort( ref uint unIP, ref ushort usPort ) @@ -180,9 +115,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate byte FGetCurrentBatteryPower( IntPtr self ); - private FGetCurrentBatteryPower _GetCurrentBatteryPower; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetCurrentBatteryPower", CallingConvention = Platform.CC)] + private static extern byte _GetCurrentBatteryPower( IntPtr self ); #endregion internal byte GetCurrentBatteryPower() @@ -192,9 +126,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate uint FGetAppID( IntPtr self ); - private FGetAppID _GetAppID; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetAppID", CallingConvention = Platform.CC)] + private static extern uint _GetAppID( IntPtr self ); #endregion internal uint GetAppID() @@ -204,9 +137,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FSetOverlayNotificationPosition( IntPtr self, NotificationPosition eNotificationPosition ); - private FSetOverlayNotificationPosition _SetOverlayNotificationPosition; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_SetOverlayNotificationPosition", CallingConvention = Platform.CC)] + private static extern void _SetOverlayNotificationPosition( IntPtr self, NotificationPosition eNotificationPosition ); #endregion internal void SetOverlayNotificationPosition( NotificationPosition eNotificationPosition ) @@ -215,10 +147,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_IsAPICallCompleted", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FIsAPICallCompleted( IntPtr self, SteamAPICall_t hSteamAPICall, [MarshalAs( UnmanagedType.U1 )] ref bool pbFailed ); - private FIsAPICallCompleted _IsAPICallCompleted; + private static extern bool _IsAPICallCompleted( IntPtr self, SteamAPICall_t hSteamAPICall, [MarshalAs( UnmanagedType.U1 )] ref bool pbFailed ); #endregion internal bool IsAPICallCompleted( SteamAPICall_t hSteamAPICall, [MarshalAs( UnmanagedType.U1 )] ref bool pbFailed ) @@ -228,9 +159,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICallFailure FGetAPICallFailureReason( IntPtr self, SteamAPICall_t hSteamAPICall ); - private FGetAPICallFailureReason _GetAPICallFailureReason; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetAPICallFailureReason", CallingConvention = Platform.CC)] + private static extern SteamAPICallFailure _GetAPICallFailureReason( IntPtr self, SteamAPICall_t hSteamAPICall ); #endregion internal SteamAPICallFailure GetAPICallFailureReason( SteamAPICall_t hSteamAPICall ) @@ -240,10 +170,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetAPICallResult", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetAPICallResult( IntPtr self, SteamAPICall_t hSteamAPICall, IntPtr pCallback, int cubCallback, int iCallbackExpected, [MarshalAs( UnmanagedType.U1 )] ref bool pbFailed ); - private FGetAPICallResult _GetAPICallResult; + private static extern bool _GetAPICallResult( IntPtr self, SteamAPICall_t hSteamAPICall, IntPtr pCallback, int cubCallback, int iCallbackExpected, [MarshalAs( UnmanagedType.U1 )] ref bool pbFailed ); #endregion internal bool GetAPICallResult( SteamAPICall_t hSteamAPICall, IntPtr pCallback, int cubCallback, int iCallbackExpected, [MarshalAs( UnmanagedType.U1 )] ref bool pbFailed ) @@ -253,20 +182,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FRunFrame( IntPtr self ); - private FRunFrame _RunFrame; - - #endregion - internal void RunFrame() - { - _RunFrame( Self ); - } - - #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate uint FGetIPCCallCount( IntPtr self ); - private FGetIPCCallCount _GetIPCCallCount; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetIPCCallCount", CallingConvention = Platform.CC)] + private static extern uint _GetIPCCallCount( IntPtr self ); #endregion internal uint GetIPCCallCount() @@ -276,9 +193,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FSetWarningMessageHook( IntPtr self, IntPtr pFunction ); - private FSetWarningMessageHook _SetWarningMessageHook; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_SetWarningMessageHook", CallingConvention = Platform.CC)] + private static extern void _SetWarningMessageHook( IntPtr self, IntPtr pFunction ); #endregion internal void SetWarningMessageHook( IntPtr pFunction ) @@ -287,10 +203,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_IsOverlayEnabled", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FIsOverlayEnabled( IntPtr self ); - private FIsOverlayEnabled _IsOverlayEnabled; + private static extern bool _IsOverlayEnabled( IntPtr self ); #endregion internal bool IsOverlayEnabled() @@ -300,10 +215,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_BOverlayNeedsPresent", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FBOverlayNeedsPresent( IntPtr self ); - private FBOverlayNeedsPresent _BOverlayNeedsPresent; + private static extern bool _BOverlayNeedsPresent( IntPtr self ); #endregion internal bool BOverlayNeedsPresent() @@ -313,22 +227,20 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate SteamAPICall_t FCheckFileSignature( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string szFileName ); - private FCheckFileSignature _CheckFileSignature; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_CheckFileSignature", CallingConvention = Platform.CC)] + private static extern SteamAPICall_t _CheckFileSignature( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string szFileName ); #endregion - internal async Task CheckFileSignature( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string szFileName ) + internal CallResult CheckFileSignature( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string szFileName ) { var returnValue = _CheckFileSignature( Self, szFileName ); - return await CheckFileSignature_t.GetResultAsync( returnValue ); + return new CallResult( returnValue ); } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_ShowGamepadTextInput", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FShowGamepadTextInput( IntPtr self, GamepadTextInputMode eInputMode, GamepadTextInputLineMode eLineInputMode, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDescription, uint unCharMax, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchExistingText ); - private FShowGamepadTextInput _ShowGamepadTextInput; + private static extern bool _ShowGamepadTextInput( IntPtr self, GamepadTextInputMode eInputMode, GamepadTextInputLineMode eLineInputMode, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDescription, uint unCharMax, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchExistingText ); #endregion internal bool ShowGamepadTextInput( GamepadTextInputMode eInputMode, GamepadTextInputLineMode eLineInputMode, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDescription, uint unCharMax, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchExistingText ) @@ -338,9 +250,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate uint FGetEnteredGamepadTextLength( IntPtr self ); - private FGetEnteredGamepadTextLength _GetEnteredGamepadTextLength; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetEnteredGamepadTextLength", CallingConvention = Platform.CC)] + private static extern uint _GetEnteredGamepadTextLength( IntPtr self ); #endregion internal uint GetEnteredGamepadTextLength() @@ -350,10 +261,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetEnteredGamepadTextInput", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetEnteredGamepadTextInput( IntPtr self, IntPtr pchText, uint cchText ); - private FGetEnteredGamepadTextInput _GetEnteredGamepadTextInput; + private static extern bool _GetEnteredGamepadTextInput( IntPtr self, IntPtr pchText, uint cchText ); #endregion internal bool GetEnteredGamepadTextInput( out string pchText ) @@ -365,9 +275,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate Utf8StringPointer FGetSteamUILanguage( IntPtr self ); - private FGetSteamUILanguage _GetSteamUILanguage; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetSteamUILanguage", CallingConvention = Platform.CC)] + private static extern Utf8StringPointer _GetSteamUILanguage( IntPtr self ); #endregion internal string GetSteamUILanguage() @@ -377,10 +286,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_IsSteamRunningInVR", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FIsSteamRunningInVR( IntPtr self ); - private FIsSteamRunningInVR _IsSteamRunningInVR; + private static extern bool _IsSteamRunningInVR( IntPtr self ); #endregion internal bool IsSteamRunningInVR() @@ -390,9 +298,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FSetOverlayNotificationInset( IntPtr self, int nHorizontalInset, int nVerticalInset ); - private FSetOverlayNotificationInset _SetOverlayNotificationInset; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_SetOverlayNotificationInset", CallingConvention = Platform.CC)] + private static extern void _SetOverlayNotificationInset( IntPtr self, int nHorizontalInset, int nVerticalInset ); #endregion internal void SetOverlayNotificationInset( int nHorizontalInset, int nVerticalInset ) @@ -401,10 +308,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_IsSteamInBigPictureMode", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FIsSteamInBigPictureMode( IntPtr self ); - private FIsSteamInBigPictureMode _IsSteamInBigPictureMode; + private static extern bool _IsSteamInBigPictureMode( IntPtr self ); #endregion internal bool IsSteamInBigPictureMode() @@ -414,9 +320,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FStartVRDashboard( IntPtr self ); - private FStartVRDashboard _StartVRDashboard; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_StartVRDashboard", CallingConvention = Platform.CC)] + private static extern void _StartVRDashboard( IntPtr self ); #endregion internal void StartVRDashboard() @@ -425,10 +330,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_IsVRHeadsetStreamingEnabled", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FIsVRHeadsetStreamingEnabled( IntPtr self ); - private FIsVRHeadsetStreamingEnabled _IsVRHeadsetStreamingEnabled; + private static extern bool _IsVRHeadsetStreamingEnabled( IntPtr self ); #endregion internal bool IsVRHeadsetStreamingEnabled() @@ -438,9 +342,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FSetVRHeadsetStreamingEnabled( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bEnabled ); - private FSetVRHeadsetStreamingEnabled _SetVRHeadsetStreamingEnabled; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_SetVRHeadsetStreamingEnabled", CallingConvention = Platform.CC)] + private static extern void _SetVRHeadsetStreamingEnabled( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bEnabled ); #endregion internal void SetVRHeadsetStreamingEnabled( [MarshalAs( UnmanagedType.U1 )] bool bEnabled ) @@ -448,5 +351,53 @@ namespace Steamworks _SetVRHeadsetStreamingEnabled( Self, bEnabled ); } + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_IsSteamChinaLauncher", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _IsSteamChinaLauncher( IntPtr self ); + + #endregion + internal bool IsSteamChinaLauncher() + { + var returnValue = _IsSteamChinaLauncher( Self ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_InitFilterText", CallingConvention = Platform.CC)] + [return: MarshalAs( UnmanagedType.I1 )] + private static extern bool _InitFilterText( IntPtr self ); + + #endregion + internal bool InitFilterText() + { + var returnValue = _InitFilterText( Self ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_FilterText", CallingConvention = Platform.CC)] + private static extern int _FilterText( IntPtr self, IntPtr pchOutFilteredText, uint nByteSizeOutFilteredText, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchInputMessage, [MarshalAs( UnmanagedType.U1 )] bool bLegalOnly ); + + #endregion + internal int FilterText( out string pchOutFilteredText, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchInputMessage, [MarshalAs( UnmanagedType.U1 )] bool bLegalOnly ) + { + IntPtr mempchOutFilteredText = Helpers.TakeMemory(); + var returnValue = _FilterText( Self, mempchOutFilteredText, (1024 * 32), pchInputMessage, bLegalOnly ); + pchOutFilteredText = Helpers.MemoryToString( mempchOutFilteredText ); + return returnValue; + } + + #region FunctionMeta + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetIPv6ConnectivityState", CallingConvention = Platform.CC)] + private static extern SteamIPv6ConnectivityState _GetIPv6ConnectivityState( IntPtr self, SteamIPv6ConnectivityProtocol eProtocol ); + + #endregion + internal SteamIPv6ConnectivityState GetIPv6ConnectivityState( SteamIPv6ConnectivityProtocol eProtocol ) + { + var returnValue = _GetIPv6ConnectivityState( Self, eProtocol ); + return returnValue; + } + } } diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamVideo.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamVideo.cs index 9c45cd7..28a9c13 100644 --- a/Facepunch.Steamworks/Generated/Interfaces/ISteamVideo.cs +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamVideo.cs @@ -9,29 +9,20 @@ namespace Steamworks { internal class ISteamVideo : SteamInterface { - public override string InterfaceName => "STEAMVIDEO_INTERFACE_V002"; - public override void InitInternals() + internal ISteamVideo( bool IsGameServer ) { - _GetVideoURL = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) ); - _IsBroadcasting = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) ); - _GetOPFSettings = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) ); - _GetOPFStringForApp = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) ); - } - internal override void Shutdown() - { - base.Shutdown(); - - _GetVideoURL = null; - _IsBroadcasting = null; - _GetOPFSettings = null; - _GetOPFStringForApp = null; + SetupInterface( IsGameServer ); } + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamVideo_v002", CallingConvention = Platform.CC)] + internal static extern IntPtr SteamAPI_SteamVideo_v002(); + public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamVideo_v002(); + + #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FGetVideoURL( IntPtr self, AppId unVideoAppID ); - private FGetVideoURL _GetVideoURL; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamVideo_GetVideoURL", CallingConvention = Platform.CC)] + private static extern void _GetVideoURL( IntPtr self, AppId unVideoAppID ); #endregion internal void GetVideoURL( AppId unVideoAppID ) @@ -40,10 +31,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamVideo_IsBroadcasting", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FIsBroadcasting( IntPtr self, ref int pnNumViewers ); - private FIsBroadcasting _IsBroadcasting; + private static extern bool _IsBroadcasting( IntPtr self, ref int pnNumViewers ); #endregion internal bool IsBroadcasting( ref int pnNumViewers ) @@ -53,9 +43,8 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] - private delegate void FGetOPFSettings( IntPtr self, AppId unVideoAppID ); - private FGetOPFSettings _GetOPFSettings; + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamVideo_GetOPFSettings", CallingConvention = Platform.CC)] + private static extern void _GetOPFSettings( IntPtr self, AppId unVideoAppID ); #endregion internal void GetOPFSettings( AppId unVideoAppID ) @@ -64,10 +53,9 @@ namespace Steamworks } #region FunctionMeta - [UnmanagedFunctionPointer( Platform.MemberConvention )] + [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamVideo_GetOPFStringForApp", CallingConvention = Platform.CC)] [return: MarshalAs( UnmanagedType.I1 )] - private delegate bool FGetOPFStringForApp( IntPtr self, AppId unVideoAppID, IntPtr pchBuffer, ref int pnBufferSize ); - private FGetOPFStringForApp _GetOPFStringForApp; + private static extern bool _GetOPFStringForApp( IntPtr self, AppId unVideoAppID, IntPtr pchBuffer, ref int pnBufferSize ); #endregion internal bool GetOPFStringForApp( AppId unVideoAppID, out string pchBuffer, ref int pnBufferSize ) diff --git a/Facepunch.Steamworks/Generated/SteamApi.cs b/Facepunch.Steamworks/Generated/SteamApi.cs deleted file mode 100644 index e65a2bd..0000000 --- a/Facepunch.Steamworks/Generated/SteamApi.cs +++ /dev/null @@ -1,98 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; -using Steamworks.Data; - - -namespace Steamworks -{ - internal static class SteamAPI - { - internal static class Native - { - [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_Init", CallingConvention = CallingConvention.Cdecl )] - [return: MarshalAs( UnmanagedType.I1 )] - public static extern bool SteamAPI_Init(); - - [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_RunCallbacks", CallingConvention = CallingConvention.Cdecl )] - public static extern void SteamAPI_RunCallbacks(); - - [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_RegisterCallback", CallingConvention = CallingConvention.Cdecl )] - public static extern void SteamAPI_RegisterCallback( IntPtr pCallback, int callback ); - - [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_UnregisterCallback", CallingConvention = CallingConvention.Cdecl )] - public static extern void SteamAPI_UnregisterCallback( IntPtr pCallback ); - - [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_RegisterCallResult", CallingConvention = CallingConvention.Cdecl )] - public static extern void SteamAPI_RegisterCallResult( IntPtr pCallback, SteamAPICall_t callback ); - - [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_UnregisterCallResult", CallingConvention = CallingConvention.Cdecl )] - public static extern void SteamAPI_UnregisterCallResult( IntPtr pCallback, SteamAPICall_t callback ); - - [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_Shutdown", CallingConvention = CallingConvention.Cdecl )] - public static extern void SteamAPI_Shutdown(); - - [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_GetHSteamUser", CallingConvention = CallingConvention.Cdecl )] - public static extern HSteamUser SteamAPI_GetHSteamUser(); - - [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_GetHSteamPipe", CallingConvention = CallingConvention.Cdecl )] - public static extern HSteamPipe SteamAPI_GetHSteamPipe(); - - [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_RestartAppIfNecessary", CallingConvention = CallingConvention.Cdecl )] - [return: MarshalAs( UnmanagedType.I1 )] - public static extern bool SteamAPI_RestartAppIfNecessary( uint unOwnAppID ); - - } - static internal bool Init() - { - return Native.SteamAPI_Init(); - } - - static internal void RunCallbacks() - { - Native.SteamAPI_RunCallbacks(); - } - - static internal void RegisterCallback( IntPtr pCallback, int callback ) - { - Native.SteamAPI_RegisterCallback( pCallback, callback ); - } - - static internal void UnregisterCallback( IntPtr pCallback ) - { - Native.SteamAPI_UnregisterCallback( pCallback ); - } - - static internal void RegisterCallResult( IntPtr pCallback, SteamAPICall_t callback ) - { - Native.SteamAPI_RegisterCallResult( pCallback, callback ); - } - - static internal void UnregisterCallResult( IntPtr pCallback, SteamAPICall_t callback ) - { - Native.SteamAPI_UnregisterCallResult( pCallback, callback ); - } - - static internal void Shutdown() - { - Native.SteamAPI_Shutdown(); - } - - static internal HSteamUser GetHSteamUser() - { - return Native.SteamAPI_GetHSteamUser(); - } - - static internal HSteamPipe GetHSteamPipe() - { - return Native.SteamAPI_GetHSteamPipe(); - } - - static internal bool RestartAppIfNecessary( uint unOwnAppID ) - { - return Native.SteamAPI_RestartAppIfNecessary( unOwnAppID ); - } - - } -} diff --git a/Facepunch.Steamworks/Generated/SteamCallbacks.cs b/Facepunch.Steamworks/Generated/SteamCallbacks.cs new file mode 100644 index 0000000..d9af095 --- /dev/null +++ b/Facepunch.Steamworks/Generated/SteamCallbacks.cs @@ -0,0 +1,2938 @@ +using System; +using System.Runtime.InteropServices; +using System.Linq; +using Steamworks.Data; +using System.Threading.Tasks; + +namespace Steamworks.Data +{ + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct SteamServersConnected_t : ICallbackData + { + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamServersConnected_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.SteamServersConnected; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct SteamServerConnectFailure_t : ICallbackData + { + internal Result Result; // m_eResult EResult + [MarshalAs(UnmanagedType.I1)] + internal bool StillRetrying; // m_bStillRetrying bool + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamServerConnectFailure_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.SteamServerConnectFailure; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct SteamServersDisconnected_t : ICallbackData + { + internal Result Result; // m_eResult EResult + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamServersDisconnected_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.SteamServersDisconnected; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct ClientGameServerDeny_t : ICallbackData + { + internal uint AppID; // m_uAppID uint32 + internal uint GameServerIP; // m_unGameServerIP uint32 + internal ushort GameServerPort; // m_usGameServerPort uint16 + internal ushort Secure; // m_bSecure uint16 + internal uint Reason; // m_uReason uint32 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(ClientGameServerDeny_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.ClientGameServerDeny; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct IPCFailure_t : ICallbackData + { + internal byte FailureType; // m_eFailureType uint8 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(IPCFailure_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.IPCFailure; + #endregion + internal enum EFailureType : int + { + FlushedCallbackQueue = 0, + PipeFail = 1, + } + + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct LicensesUpdated_t : ICallbackData + { + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(LicensesUpdated_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.LicensesUpdated; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] + internal struct ValidateAuthTicketResponse_t : ICallbackData + { + internal ulong SteamID; // m_SteamID CSteamID + internal AuthResponse AuthSessionResponse; // m_eAuthSessionResponse EAuthSessionResponse + internal ulong OwnerSteamID; // m_OwnerSteamID CSteamID + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(ValidateAuthTicketResponse_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.ValidateAuthTicketResponse; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct MicroTxnAuthorizationResponse_t : ICallbackData + { + internal uint AppID; // m_unAppID uint32 + internal ulong OrderID; // m_ulOrderID uint64 + internal byte Authorized; // m_bAuthorized uint8 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(MicroTxnAuthorizationResponse_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.MicroTxnAuthorizationResponse; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct EncryptedAppTicketResponse_t : ICallbackData + { + internal Result Result; // m_eResult EResult + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(EncryptedAppTicketResponse_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.EncryptedAppTicketResponse; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct GetAuthSessionTicketResponse_t : ICallbackData + { + internal uint AuthTicket; // m_hAuthTicket HAuthTicket + internal Result Result; // m_eResult EResult + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GetAuthSessionTicketResponse_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.GetAuthSessionTicketResponse; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct GameWebCallback_t : ICallbackData + { + internal string URLUTF8() => System.Text.Encoding.UTF8.GetString( URL, 0, System.Array.IndexOf( URL, 0 ) ); + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] // byte[] m_szURL + internal byte[] URL; // m_szURL char [256] + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GameWebCallback_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.GameWebCallback; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct StoreAuthURLResponse_t : ICallbackData + { + internal string URLUTF8() => System.Text.Encoding.UTF8.GetString( URL, 0, System.Array.IndexOf( URL, 0 ) ); + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 512)] // byte[] m_szURL + internal byte[] URL; // m_szURL char [512] + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(StoreAuthURLResponse_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.StoreAuthURLResponse; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct MarketEligibilityResponse_t : ICallbackData + { + [MarshalAs(UnmanagedType.I1)] + internal bool Allowed; // m_bAllowed bool + internal MarketNotAllowedReasonFlags NotAllowedReason; // m_eNotAllowedReason EMarketNotAllowedReasonFlags + internal uint TAllowedAtTime; // m_rtAllowedAtTime RTime32 + internal int CdaySteamGuardRequiredDays; // m_cdaySteamGuardRequiredDays int + internal int CdayNewDeviceCooldown; // m_cdayNewDeviceCooldown int + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(MarketEligibilityResponse_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.MarketEligibilityResponse; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct DurationControl_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal AppId Appid; // m_appid AppId_t + [MarshalAs(UnmanagedType.I1)] + internal bool Applicable; // m_bApplicable bool + internal int CsecsLast5h; // m_csecsLast5h int32 + internal DurationControlProgress Progress; // m_progress EDurationControlProgress + internal DurationControlNotification Otification; // m_notification EDurationControlNotification + internal int CsecsToday; // m_csecsToday int32 + internal int CsecsRemaining; // m_csecsRemaining int32 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(DurationControl_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.DurationControl; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct PersonaStateChange_t : ICallbackData + { + internal ulong SteamID; // m_ulSteamID uint64 + internal int ChangeFlags; // m_nChangeFlags int + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(PersonaStateChange_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.PersonaStateChange; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct GameOverlayActivated_t : ICallbackData + { + internal byte Active; // m_bActive uint8 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GameOverlayActivated_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.GameOverlayActivated; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct GameServerChangeRequested_t : ICallbackData + { + internal string ServerUTF8() => System.Text.Encoding.UTF8.GetString( Server, 0, System.Array.IndexOf( Server, 0 ) ); + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] // byte[] m_rgchServer + internal byte[] Server; // m_rgchServer char [64] + internal string PasswordUTF8() => System.Text.Encoding.UTF8.GetString( Password, 0, System.Array.IndexOf( Password, 0 ) ); + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] // byte[] m_rgchPassword + internal byte[] Password; // m_rgchPassword char [64] + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GameServerChangeRequested_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.GameServerChangeRequested; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] + internal struct GameLobbyJoinRequested_t : ICallbackData + { + internal ulong SteamIDLobby; // m_steamIDLobby CSteamID + internal ulong SteamIDFriend; // m_steamIDFriend CSteamID + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GameLobbyJoinRequested_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.GameLobbyJoinRequested; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] + internal struct AvatarImageLoaded_t : ICallbackData + { + internal ulong SteamID; // m_steamID CSteamID + internal int Image; // m_iImage int + internal int Wide; // m_iWide int + internal int Tall; // m_iTall int + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(AvatarImageLoaded_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.AvatarImageLoaded; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] + internal struct ClanOfficerListResponse_t : ICallbackData + { + internal ulong SteamIDClan; // m_steamIDClan CSteamID + internal int COfficers; // m_cOfficers int + internal byte Success; // m_bSuccess uint8 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(ClanOfficerListResponse_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.ClanOfficerListResponse; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] + internal struct FriendRichPresenceUpdate_t : ICallbackData + { + internal ulong SteamIDFriend; // m_steamIDFriend CSteamID + internal AppId AppID; // m_nAppID AppId_t + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(FriendRichPresenceUpdate_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.FriendRichPresenceUpdate; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] + internal struct GameRichPresenceJoinRequested_t : ICallbackData + { + internal ulong SteamIDFriend; // m_steamIDFriend CSteamID + internal string ConnectUTF8() => System.Text.Encoding.UTF8.GetString( Connect, 0, System.Array.IndexOf( Connect, 0 ) ); + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] // byte[] m_rgchConnect + internal byte[] Connect; // m_rgchConnect char [256] + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GameRichPresenceJoinRequested_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.GameRichPresenceJoinRequested; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] + internal struct GameConnectedClanChatMsg_t : ICallbackData + { + internal ulong SteamIDClanChat; // m_steamIDClanChat CSteamID + internal ulong SteamIDUser; // m_steamIDUser CSteamID + internal int MessageID; // m_iMessageID int + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GameConnectedClanChatMsg_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.GameConnectedClanChatMsg; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] + internal struct GameConnectedChatJoin_t : ICallbackData + { + internal ulong SteamIDClanChat; // m_steamIDClanChat CSteamID + internal ulong SteamIDUser; // m_steamIDUser CSteamID + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GameConnectedChatJoin_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.GameConnectedChatJoin; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] + internal struct GameConnectedChatLeave_t : ICallbackData + { + internal ulong SteamIDClanChat; // m_steamIDClanChat CSteamID + internal ulong SteamIDUser; // m_steamIDUser CSteamID + [MarshalAs(UnmanagedType.I1)] + internal bool Kicked; // m_bKicked bool + [MarshalAs(UnmanagedType.I1)] + internal bool Dropped; // m_bDropped bool + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GameConnectedChatLeave_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.GameConnectedChatLeave; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct DownloadClanActivityCountsResult_t : ICallbackData + { + [MarshalAs(UnmanagedType.I1)] + internal bool Success; // m_bSuccess bool + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(DownloadClanActivityCountsResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.DownloadClanActivityCountsResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] + internal struct JoinClanChatRoomCompletionResult_t : ICallbackData + { + internal ulong SteamIDClanChat; // m_steamIDClanChat CSteamID + internal RoomEnter ChatRoomEnterResponse; // m_eChatRoomEnterResponse EChatRoomEnterResponse + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(JoinClanChatRoomCompletionResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.JoinClanChatRoomCompletionResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] + internal struct GameConnectedFriendChatMsg_t : ICallbackData + { + internal ulong SteamIDUser; // m_steamIDUser CSteamID + internal int MessageID; // m_iMessageID int + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GameConnectedFriendChatMsg_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.GameConnectedFriendChatMsg; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] + internal struct FriendsGetFollowerCount_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal ulong SteamID; // m_steamID CSteamID + internal int Count; // m_nCount int + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(FriendsGetFollowerCount_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.FriendsGetFollowerCount; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] + internal struct FriendsIsFollowing_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal ulong SteamID; // m_steamID CSteamID + [MarshalAs(UnmanagedType.I1)] + internal bool IsFollowing; // m_bIsFollowing bool + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(FriendsIsFollowing_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.FriendsIsFollowing; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] + internal struct FriendsEnumerateFollowingList_t : ICallbackData + { + internal Result Result; // m_eResult EResult + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U8)] + internal ulong[] GSteamID; // m_rgSteamID CSteamID [50] + internal int ResultsReturned; // m_nResultsReturned int32 + internal int TotalResultCount; // m_nTotalResultCount int32 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(FriendsEnumerateFollowingList_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.FriendsEnumerateFollowingList; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct SetPersonaNameResponse_t : ICallbackData + { + [MarshalAs(UnmanagedType.I1)] + internal bool Success; // m_bSuccess bool + [MarshalAs(UnmanagedType.I1)] + internal bool LocalSuccess; // m_bLocalSuccess bool + internal Result Result; // m_result EResult + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SetPersonaNameResponse_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.SetPersonaNameResponse; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct UnreadChatMessagesChanged_t : ICallbackData + { + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(UnreadChatMessagesChanged_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.UnreadChatMessagesChanged; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct IPCountry_t : ICallbackData + { + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(IPCountry_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.IPCountry; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct LowBatteryPower_t : ICallbackData + { + internal byte MinutesBatteryLeft; // m_nMinutesBatteryLeft uint8 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(LowBatteryPower_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.LowBatteryPower; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct SteamAPICallCompleted_t : ICallbackData + { + internal ulong AsyncCall; // m_hAsyncCall SteamAPICall_t + internal int Callback; // m_iCallback int + internal uint ParamCount; // m_cubParam uint32 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamAPICallCompleted_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.SteamAPICallCompleted; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct SteamShutdown_t : ICallbackData + { + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamShutdown_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.SteamShutdown; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct CheckFileSignature_t : ICallbackData + { + internal CheckFileSignature CheckFileSignature; // m_eCheckFileSignature ECheckFileSignature + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(CheckFileSignature_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.CheckFileSignature; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct GamepadTextInputDismissed_t : ICallbackData + { + [MarshalAs(UnmanagedType.I1)] + internal bool Submitted; // m_bSubmitted bool + internal uint SubmittedText; // m_unSubmittedText uint32 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GamepadTextInputDismissed_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.GamepadTextInputDismissed; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct FavoritesListChanged_t : ICallbackData + { + internal uint IP; // m_nIP uint32 + internal uint QueryPort; // m_nQueryPort uint32 + internal uint ConnPort; // m_nConnPort uint32 + internal uint AppID; // m_nAppID uint32 + internal uint Flags; // m_nFlags uint32 + [MarshalAs(UnmanagedType.I1)] + internal bool Add; // m_bAdd bool + internal uint AccountId; // m_unAccountId AccountID_t + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(FavoritesListChanged_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.FavoritesListChanged; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct LobbyInvite_t : ICallbackData + { + internal ulong SteamIDUser; // m_ulSteamIDUser uint64 + internal ulong SteamIDLobby; // m_ulSteamIDLobby uint64 + internal ulong GameID; // m_ulGameID uint64 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(LobbyInvite_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.LobbyInvite; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct LobbyEnter_t : ICallbackData + { + internal ulong SteamIDLobby; // m_ulSteamIDLobby uint64 + internal uint GfChatPermissions; // m_rgfChatPermissions uint32 + [MarshalAs(UnmanagedType.I1)] + internal bool Locked; // m_bLocked bool + internal uint EChatRoomEnterResponse; // m_EChatRoomEnterResponse uint32 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(LobbyEnter_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.LobbyEnter; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct LobbyDataUpdate_t : ICallbackData + { + internal ulong SteamIDLobby; // m_ulSteamIDLobby uint64 + internal ulong SteamIDMember; // m_ulSteamIDMember uint64 + internal byte Success; // m_bSuccess uint8 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(LobbyDataUpdate_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.LobbyDataUpdate; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct LobbyChatUpdate_t : ICallbackData + { + internal ulong SteamIDLobby; // m_ulSteamIDLobby uint64 + internal ulong SteamIDUserChanged; // m_ulSteamIDUserChanged uint64 + internal ulong SteamIDMakingChange; // m_ulSteamIDMakingChange uint64 + internal uint GfChatMemberStateChange; // m_rgfChatMemberStateChange uint32 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(LobbyChatUpdate_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.LobbyChatUpdate; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct LobbyChatMsg_t : ICallbackData + { + internal ulong SteamIDLobby; // m_ulSteamIDLobby uint64 + internal ulong SteamIDUser; // m_ulSteamIDUser uint64 + internal byte ChatEntryType; // m_eChatEntryType uint8 + internal uint ChatID; // m_iChatID uint32 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(LobbyChatMsg_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.LobbyChatMsg; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct LobbyGameCreated_t : ICallbackData + { + internal ulong SteamIDLobby; // m_ulSteamIDLobby uint64 + internal ulong SteamIDGameServer; // m_ulSteamIDGameServer uint64 + internal uint IP; // m_unIP uint32 + internal ushort Port; // m_usPort uint16 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(LobbyGameCreated_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.LobbyGameCreated; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct LobbyMatchList_t : ICallbackData + { + internal uint LobbiesMatching; // m_nLobbiesMatching uint32 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(LobbyMatchList_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.LobbyMatchList; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct LobbyKicked_t : ICallbackData + { + internal ulong SteamIDLobby; // m_ulSteamIDLobby uint64 + internal ulong SteamIDAdmin; // m_ulSteamIDAdmin uint64 + internal byte KickedDueToDisconnect; // m_bKickedDueToDisconnect uint8 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(LobbyKicked_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.LobbyKicked; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct LobbyCreated_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal ulong SteamIDLobby; // m_ulSteamIDLobby uint64 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(LobbyCreated_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.LobbyCreated; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] + internal struct PSNGameBootInviteResult_t : ICallbackData + { + [MarshalAs(UnmanagedType.I1)] + internal bool GameBootInviteExists; // m_bGameBootInviteExists bool + internal ulong SteamIDLobby; // m_steamIDLobby CSteamID + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(PSNGameBootInviteResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.PSNGameBootInviteResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct FavoritesListAccountsUpdated_t : ICallbackData + { + internal Result Result; // m_eResult EResult + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(FavoritesListAccountsUpdated_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.FavoritesListAccountsUpdated; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] + internal struct SearchForGameProgressCallback_t : ICallbackData + { + internal ulong LSearchID; // m_ullSearchID uint64 + internal Result Result; // m_eResult EResult + internal ulong LobbyID; // m_lobbyID CSteamID + internal ulong SteamIDEndedSearch; // m_steamIDEndedSearch CSteamID + internal int SecondsRemainingEstimate; // m_nSecondsRemainingEstimate int32 + internal int CPlayersSearching; // m_cPlayersSearching int32 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SearchForGameProgressCallback_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.SearchForGameProgressCallback; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] + internal struct SearchForGameResultCallback_t : ICallbackData + { + internal ulong LSearchID; // m_ullSearchID uint64 + internal Result Result; // m_eResult EResult + internal int CountPlayersInGame; // m_nCountPlayersInGame int32 + internal int CountAcceptedGame; // m_nCountAcceptedGame int32 + internal ulong SteamIDHost; // m_steamIDHost CSteamID + [MarshalAs(UnmanagedType.I1)] + internal bool FinalCallback; // m_bFinalCallback bool + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SearchForGameResultCallback_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.SearchForGameResultCallback; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct RequestPlayersForGameProgressCallback_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal ulong LSearchID; // m_ullSearchID uint64 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RequestPlayersForGameProgressCallback_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.RequestPlayersForGameProgressCallback; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] + internal struct RequestPlayersForGameResultCallback_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal ulong LSearchID; // m_ullSearchID uint64 + internal ulong SteamIDPlayerFound; // m_SteamIDPlayerFound CSteamID + internal ulong SteamIDLobby; // m_SteamIDLobby CSteamID + internal RequestPlayersForGameResultCallback_t.PlayerAcceptState_t PlayerAcceptState; // m_ePlayerAcceptState RequestPlayersForGameResultCallback_t::PlayerAcceptState_t + internal int PlayerIndex; // m_nPlayerIndex int32 + internal int TotalPlayersFound; // m_nTotalPlayersFound int32 + internal int TotalPlayersAcceptedGame; // m_nTotalPlayersAcceptedGame int32 + internal int SuggestedTeamIndex; // m_nSuggestedTeamIndex int32 + internal ulong LUniqueGameID; // m_ullUniqueGameID uint64 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RequestPlayersForGameResultCallback_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.RequestPlayersForGameResultCallback; + #endregion + internal enum PlayerAcceptState_t : int + { + Unknown = 0, + PlayerAccepted = 1, + PlayerDeclined = 2, + } + + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct RequestPlayersForGameFinalResultCallback_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal ulong LSearchID; // m_ullSearchID uint64 + internal ulong LUniqueGameID; // m_ullUniqueGameID uint64 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RequestPlayersForGameFinalResultCallback_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.RequestPlayersForGameFinalResultCallback; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] + internal struct SubmitPlayerResultResultCallback_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal ulong UllUniqueGameID; // ullUniqueGameID uint64 + internal ulong SteamIDPlayer; // steamIDPlayer CSteamID + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SubmitPlayerResultResultCallback_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.SubmitPlayerResultResultCallback; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct EndGameResultCallback_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal ulong UllUniqueGameID; // ullUniqueGameID uint64 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(EndGameResultCallback_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.EndGameResultCallback; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] + internal struct JoinPartyCallback_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal ulong BeaconID; // m_ulBeaconID PartyBeaconID_t + internal ulong SteamIDBeaconOwner; // m_SteamIDBeaconOwner CSteamID + internal string ConnectStringUTF8() => System.Text.Encoding.UTF8.GetString( ConnectString, 0, System.Array.IndexOf( ConnectString, 0 ) ); + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] // byte[] m_rgchConnectString + internal byte[] ConnectString; // m_rgchConnectString char [256] + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(JoinPartyCallback_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.JoinPartyCallback; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct CreateBeaconCallback_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal ulong BeaconID; // m_ulBeaconID PartyBeaconID_t + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(CreateBeaconCallback_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.CreateBeaconCallback; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] + internal struct ReservationNotificationCallback_t : ICallbackData + { + internal ulong BeaconID; // m_ulBeaconID PartyBeaconID_t + internal ulong SteamIDJoiner; // m_steamIDJoiner CSteamID + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(ReservationNotificationCallback_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.ReservationNotificationCallback; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct ChangeNumOpenSlotsCallback_t : ICallbackData + { + internal Result Result; // m_eResult EResult + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(ChangeNumOpenSlotsCallback_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.ChangeNumOpenSlotsCallback; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct AvailableBeaconLocationsUpdated_t : ICallbackData + { + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(AvailableBeaconLocationsUpdated_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.AvailableBeaconLocationsUpdated; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct ActiveBeaconsUpdated_t : ICallbackData + { + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(ActiveBeaconsUpdated_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.ActiveBeaconsUpdated; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct RemoteStorageAppSyncedClient_t : ICallbackData + { + internal AppId AppID; // m_nAppID AppId_t + internal Result Result; // m_eResult EResult + internal int NumDownloads; // m_unNumDownloads int + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageAppSyncedClient_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.RemoteStorageAppSyncedClient; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct RemoteStorageAppSyncedServer_t : ICallbackData + { + internal AppId AppID; // m_nAppID AppId_t + internal Result Result; // m_eResult EResult + internal int NumUploads; // m_unNumUploads int + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageAppSyncedServer_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.RemoteStorageAppSyncedServer; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct RemoteStorageAppSyncProgress_t : ICallbackData + { + internal string CurrentFileUTF8() => System.Text.Encoding.UTF8.GetString( CurrentFile, 0, System.Array.IndexOf( CurrentFile, 0 ) ); + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 260)] // byte[] m_rgchCurrentFile + internal byte[] CurrentFile; // m_rgchCurrentFile char [260] + internal AppId AppID; // m_nAppID AppId_t + internal uint BytesTransferredThisChunk; // m_uBytesTransferredThisChunk uint32 + internal double DAppPercentComplete; // m_dAppPercentComplete double + [MarshalAs(UnmanagedType.I1)] + internal bool Uploading; // m_bUploading bool + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageAppSyncProgress_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.RemoteStorageAppSyncProgress; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct RemoteStorageAppSyncStatusCheck_t : ICallbackData + { + internal AppId AppID; // m_nAppID AppId_t + internal Result Result; // m_eResult EResult + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageAppSyncStatusCheck_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.RemoteStorageAppSyncStatusCheck; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct RemoteStorageFileShareResult_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal ulong File; // m_hFile UGCHandle_t + internal string FilenameUTF8() => System.Text.Encoding.UTF8.GetString( Filename, 0, System.Array.IndexOf( Filename, 0 ) ); + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 260)] // byte[] m_rgchFilename + internal byte[] Filename; // m_rgchFilename char [260] + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageFileShareResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.RemoteStorageFileShareResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct RemoteStoragePublishFileResult_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t + [MarshalAs(UnmanagedType.I1)] + internal bool UserNeedsToAcceptWorkshopLegalAgreement; // m_bUserNeedsToAcceptWorkshopLegalAgreement bool + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStoragePublishFileResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.RemoteStoragePublishFileResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct RemoteStorageDeletePublishedFileResult_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageDeletePublishedFileResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.RemoteStorageDeletePublishedFileResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct RemoteStorageEnumerateUserPublishedFilesResult_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal int ResultsReturned; // m_nResultsReturned int32 + internal int TotalResultCount; // m_nTotalResultCount int32 + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U8)] + internal PublishedFileId[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageEnumerateUserPublishedFilesResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.RemoteStorageEnumerateUserPublishedFilesResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct RemoteStorageSubscribePublishedFileResult_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageSubscribePublishedFileResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.RemoteStorageSubscribePublishedFileResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct RemoteStorageEnumerateUserSubscribedFilesResult_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal int ResultsReturned; // m_nResultsReturned int32 + internal int TotalResultCount; // m_nTotalResultCount int32 + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U8)] + internal PublishedFileId[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U4)] + internal uint[] GRTimeSubscribed; // m_rgRTimeSubscribed uint32 [50] + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageEnumerateUserSubscribedFilesResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.RemoteStorageEnumerateUserSubscribedFilesResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct RemoteStorageUnsubscribePublishedFileResult_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageUnsubscribePublishedFileResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.RemoteStorageUnsubscribePublishedFileResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct RemoteStorageUpdatePublishedFileResult_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t + [MarshalAs(UnmanagedType.I1)] + internal bool UserNeedsToAcceptWorkshopLegalAgreement; // m_bUserNeedsToAcceptWorkshopLegalAgreement bool + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageUpdatePublishedFileResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.RemoteStorageUpdatePublishedFileResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct RemoteStorageDownloadUGCResult_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal ulong File; // m_hFile UGCHandle_t + internal AppId AppID; // m_nAppID AppId_t + internal int SizeInBytes; // m_nSizeInBytes int32 + internal string PchFileNameUTF8() => System.Text.Encoding.UTF8.GetString( PchFileName, 0, System.Array.IndexOf( PchFileName, 0 ) ); + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 260)] // byte[] m_pchFileName + internal byte[] PchFileName; // m_pchFileName char [260] + internal ulong SteamIDOwner; // m_ulSteamIDOwner uint64 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageDownloadUGCResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.RemoteStorageDownloadUGCResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct RemoteStorageGetPublishedFileDetailsResult_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal AppId CreatorAppID; // m_nCreatorAppID AppId_t + internal AppId ConsumerAppID; // m_nConsumerAppID AppId_t + internal string TitleUTF8() => System.Text.Encoding.UTF8.GetString( Title, 0, System.Array.IndexOf( Title, 0 ) ); + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 129)] // byte[] m_rgchTitle + internal byte[] Title; // m_rgchTitle char [129] + internal string DescriptionUTF8() => System.Text.Encoding.UTF8.GetString( Description, 0, System.Array.IndexOf( Description, 0 ) ); + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8000)] // byte[] m_rgchDescription + internal byte[] Description; // m_rgchDescription char [8000] + internal ulong File; // m_hFile UGCHandle_t + internal ulong PreviewFile; // m_hPreviewFile UGCHandle_t + internal ulong SteamIDOwner; // m_ulSteamIDOwner uint64 + internal uint TimeCreated; // m_rtimeCreated uint32 + internal uint TimeUpdated; // m_rtimeUpdated uint32 + internal RemoteStoragePublishedFileVisibility Visibility; // m_eVisibility ERemoteStoragePublishedFileVisibility + [MarshalAs(UnmanagedType.I1)] + internal bool Banned; // m_bBanned bool + internal string TagsUTF8() => System.Text.Encoding.UTF8.GetString( Tags, 0, System.Array.IndexOf( Tags, 0 ) ); + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1025)] // byte[] m_rgchTags + internal byte[] Tags; // m_rgchTags char [1025] + [MarshalAs(UnmanagedType.I1)] + internal bool TagsTruncated; // m_bTagsTruncated bool + internal string PchFileNameUTF8() => System.Text.Encoding.UTF8.GetString( PchFileName, 0, System.Array.IndexOf( PchFileName, 0 ) ); + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 260)] // byte[] m_pchFileName + internal byte[] PchFileName; // m_pchFileName char [260] + internal int FileSize; // m_nFileSize int32 + internal int PreviewFileSize; // m_nPreviewFileSize int32 + internal string URLUTF8() => System.Text.Encoding.UTF8.GetString( URL, 0, System.Array.IndexOf( URL, 0 ) ); + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] // byte[] m_rgchURL + internal byte[] URL; // m_rgchURL char [256] + internal WorkshopFileType FileType; // m_eFileType EWorkshopFileType + [MarshalAs(UnmanagedType.I1)] + internal bool AcceptedForUse; // m_bAcceptedForUse bool + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageGetPublishedFileDetailsResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.RemoteStorageGetPublishedFileDetailsResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct RemoteStorageEnumerateWorkshopFilesResult_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal int ResultsReturned; // m_nResultsReturned int32 + internal int TotalResultCount; // m_nTotalResultCount int32 + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U8)] + internal PublishedFileId[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.R4)] + internal float[] GScore; // m_rgScore float [50] + internal AppId AppId; // m_nAppId AppId_t + internal uint StartIndex; // m_unStartIndex uint32 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageEnumerateWorkshopFilesResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.RemoteStorageEnumerateWorkshopFilesResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct RemoteStorageGetPublishedItemVoteDetailsResult_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal PublishedFileId PublishedFileId; // m_unPublishedFileId PublishedFileId_t + internal int VotesFor; // m_nVotesFor int32 + internal int VotesAgainst; // m_nVotesAgainst int32 + internal int Reports; // m_nReports int32 + internal float FScore; // m_fScore float + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageGetPublishedItemVoteDetailsResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.RemoteStorageGetPublishedItemVoteDetailsResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct RemoteStoragePublishedFileSubscribed_t : ICallbackData + { + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal AppId AppID; // m_nAppID AppId_t + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStoragePublishedFileSubscribed_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.RemoteStoragePublishedFileSubscribed; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct RemoteStoragePublishedFileUnsubscribed_t : ICallbackData + { + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal AppId AppID; // m_nAppID AppId_t + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStoragePublishedFileUnsubscribed_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.RemoteStoragePublishedFileUnsubscribed; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct RemoteStoragePublishedFileDeleted_t : ICallbackData + { + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal AppId AppID; // m_nAppID AppId_t + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStoragePublishedFileDeleted_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.RemoteStoragePublishedFileDeleted; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct RemoteStorageUpdateUserPublishedItemVoteResult_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageUpdateUserPublishedItemVoteResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.RemoteStorageUpdateUserPublishedItemVoteResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct RemoteStorageUserVoteDetails_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal WorkshopVote Vote; // m_eVote EWorkshopVote + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageUserVoteDetails_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.RemoteStorageUserVoteDetails; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct RemoteStorageEnumerateUserSharedWorkshopFilesResult_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal int ResultsReturned; // m_nResultsReturned int32 + internal int TotalResultCount; // m_nTotalResultCount int32 + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U8)] + internal PublishedFileId[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageEnumerateUserSharedWorkshopFilesResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.RemoteStorageEnumerateUserSharedWorkshopFilesResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct RemoteStorageSetUserPublishedFileActionResult_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal WorkshopFileAction Action; // m_eAction EWorkshopFileAction + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageSetUserPublishedFileActionResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.RemoteStorageSetUserPublishedFileActionResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct RemoteStorageEnumeratePublishedFilesByUserActionResult_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal WorkshopFileAction Action; // m_eAction EWorkshopFileAction + internal int ResultsReturned; // m_nResultsReturned int32 + internal int TotalResultCount; // m_nTotalResultCount int32 + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U8)] + internal PublishedFileId[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U4)] + internal uint[] GRTimeUpdated; // m_rgRTimeUpdated uint32 [50] + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageEnumeratePublishedFilesByUserActionResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.RemoteStorageEnumeratePublishedFilesByUserActionResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct RemoteStoragePublishFileProgress_t : ICallbackData + { + internal double DPercentFile; // m_dPercentFile double + [MarshalAs(UnmanagedType.I1)] + internal bool Preview; // m_bPreview bool + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStoragePublishFileProgress_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.RemoteStoragePublishFileProgress; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct RemoteStoragePublishedFileUpdated_t : ICallbackData + { + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal AppId AppID; // m_nAppID AppId_t + internal ulong Unused; // m_ulUnused uint64 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStoragePublishedFileUpdated_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.RemoteStoragePublishedFileUpdated; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct RemoteStorageFileWriteAsyncComplete_t : ICallbackData + { + internal Result Result; // m_eResult EResult + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageFileWriteAsyncComplete_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.RemoteStorageFileWriteAsyncComplete; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct RemoteStorageFileReadAsyncComplete_t : ICallbackData + { + internal ulong FileReadAsync; // m_hFileReadAsync SteamAPICall_t + internal Result Result; // m_eResult EResult + internal uint Offset; // m_nOffset uint32 + internal uint Read; // m_cubRead uint32 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageFileReadAsyncComplete_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.RemoteStorageFileReadAsyncComplete; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] + internal struct UserStatsReceived_t : ICallbackData + { + internal ulong GameID; // m_nGameID uint64 + internal Result Result; // m_eResult EResult + internal ulong SteamIDUser; // m_steamIDUser CSteamID + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(UserStatsReceived_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.UserStatsReceived; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct UserStatsStored_t : ICallbackData + { + internal ulong GameID; // m_nGameID uint64 + internal Result Result; // m_eResult EResult + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(UserStatsStored_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.UserStatsStored; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct UserAchievementStored_t : ICallbackData + { + internal ulong GameID; // m_nGameID uint64 + [MarshalAs(UnmanagedType.I1)] + internal bool GroupAchievement; // m_bGroupAchievement bool + internal string AchievementNameUTF8() => System.Text.Encoding.UTF8.GetString( AchievementName, 0, System.Array.IndexOf( AchievementName, 0 ) ); + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] // byte[] m_rgchAchievementName + internal byte[] AchievementName; // m_rgchAchievementName char [128] + internal uint CurProgress; // m_nCurProgress uint32 + internal uint MaxProgress; // m_nMaxProgress uint32 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(UserAchievementStored_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.UserAchievementStored; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct LeaderboardFindResult_t : ICallbackData + { + internal ulong SteamLeaderboard; // m_hSteamLeaderboard SteamLeaderboard_t + internal byte LeaderboardFound; // m_bLeaderboardFound uint8 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(LeaderboardFindResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.LeaderboardFindResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct LeaderboardScoresDownloaded_t : ICallbackData + { + internal ulong SteamLeaderboard; // m_hSteamLeaderboard SteamLeaderboard_t + internal ulong SteamLeaderboardEntries; // m_hSteamLeaderboardEntries SteamLeaderboardEntries_t + internal int CEntryCount; // m_cEntryCount int + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(LeaderboardScoresDownloaded_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.LeaderboardScoresDownloaded; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct LeaderboardScoreUploaded_t : ICallbackData + { + internal byte Success; // m_bSuccess uint8 + internal ulong SteamLeaderboard; // m_hSteamLeaderboard SteamLeaderboard_t + internal int Score; // m_nScore int32 + internal byte ScoreChanged; // m_bScoreChanged uint8 + internal int GlobalRankNew; // m_nGlobalRankNew int + internal int GlobalRankPrevious; // m_nGlobalRankPrevious int + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(LeaderboardScoreUploaded_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.LeaderboardScoreUploaded; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct NumberOfCurrentPlayers_t : ICallbackData + { + internal byte Success; // m_bSuccess uint8 + internal int CPlayers; // m_cPlayers int32 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(NumberOfCurrentPlayers_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.NumberOfCurrentPlayers; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] + internal struct UserStatsUnloaded_t : ICallbackData + { + internal ulong SteamIDUser; // m_steamIDUser CSteamID + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(UserStatsUnloaded_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.UserStatsUnloaded; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct UserAchievementIconFetched_t : ICallbackData + { + internal GameId GameID; // m_nGameID CGameID + internal string AchievementNameUTF8() => System.Text.Encoding.UTF8.GetString( AchievementName, 0, System.Array.IndexOf( AchievementName, 0 ) ); + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] // byte[] m_rgchAchievementName + internal byte[] AchievementName; // m_rgchAchievementName char [128] + [MarshalAs(UnmanagedType.I1)] + internal bool Achieved; // m_bAchieved bool + internal int IconHandle; // m_nIconHandle int + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(UserAchievementIconFetched_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.UserAchievementIconFetched; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct GlobalAchievementPercentagesReady_t : ICallbackData + { + internal ulong GameID; // m_nGameID uint64 + internal Result Result; // m_eResult EResult + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GlobalAchievementPercentagesReady_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.GlobalAchievementPercentagesReady; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct LeaderboardUGCSet_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal ulong SteamLeaderboard; // m_hSteamLeaderboard SteamLeaderboard_t + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(LeaderboardUGCSet_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.LeaderboardUGCSet; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct PS3TrophiesInstalled_t : ICallbackData + { + internal ulong GameID; // m_nGameID uint64 + internal Result Result; // m_eResult EResult + internal ulong RequiredDiskSpace; // m_ulRequiredDiskSpace uint64 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(PS3TrophiesInstalled_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.PS3TrophiesInstalled; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct GlobalStatsReceived_t : ICallbackData + { + internal ulong GameID; // m_nGameID uint64 + internal Result Result; // m_eResult EResult + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GlobalStatsReceived_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.GlobalStatsReceived; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct DlcInstalled_t : ICallbackData + { + internal AppId AppID; // m_nAppID AppId_t + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(DlcInstalled_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.DlcInstalled; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct RegisterActivationCodeResponse_t : ICallbackData + { + internal RegisterActivationCodeResult Result; // m_eResult ERegisterActivationCodeResult + internal uint PackageRegistered; // m_unPackageRegistered uint32 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RegisterActivationCodeResponse_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.RegisterActivationCodeResponse; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct NewUrlLaunchParameters_t : ICallbackData + { + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(NewUrlLaunchParameters_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.NewUrlLaunchParameters; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct AppProofOfPurchaseKeyResponse_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal uint AppID; // m_nAppID uint32 + internal uint CchKeyLength; // m_cchKeyLength uint32 + internal string KeyUTF8() => System.Text.Encoding.UTF8.GetString( Key, 0, System.Array.IndexOf( Key, 0 ) ); + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 240)] // byte[] m_rgchKey + internal byte[] Key; // m_rgchKey char [240] + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(AppProofOfPurchaseKeyResponse_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.AppProofOfPurchaseKeyResponse; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct FileDetailsResult_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal ulong FileSize; // m_ulFileSize uint64 + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)] // m_FileSHA + internal byte[] FileSHA; // m_FileSHA uint8 [20] + internal uint Flags; // m_unFlags uint32 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(FileDetailsResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.FileDetailsResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] + internal struct P2PSessionRequest_t : ICallbackData + { + internal ulong SteamIDRemote; // m_steamIDRemote CSteamID + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(P2PSessionRequest_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.P2PSessionRequest; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] + internal struct P2PSessionConnectFail_t : ICallbackData + { + internal ulong SteamIDRemote; // m_steamIDRemote CSteamID + internal byte P2PSessionError; // m_eP2PSessionError uint8 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(P2PSessionConnectFail_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.P2PSessionConnectFail; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] + internal struct SocketStatusCallback_t : ICallbackData + { + internal uint Socket; // m_hSocket SNetSocket_t + internal uint ListenSocket; // m_hListenSocket SNetListenSocket_t + internal ulong SteamIDRemote; // m_steamIDRemote CSteamID + internal int SNetSocketState; // m_eSNetSocketState int + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SocketStatusCallback_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.SocketStatusCallback; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct ScreenshotReady_t : ICallbackData + { + internal uint Local; // m_hLocal ScreenshotHandle + internal Result Result; // m_eResult EResult + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(ScreenshotReady_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.ScreenshotReady; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct ScreenshotRequested_t : ICallbackData + { + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(ScreenshotRequested_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.ScreenshotRequested; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct PlaybackStatusHasChanged_t : ICallbackData + { + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(PlaybackStatusHasChanged_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.PlaybackStatusHasChanged; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct VolumeHasChanged_t : ICallbackData + { + internal float NewVolume; // m_flNewVolume float + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(VolumeHasChanged_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.VolumeHasChanged; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct MusicPlayerRemoteWillActivate_t : ICallbackData + { + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(MusicPlayerRemoteWillActivate_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.MusicPlayerRemoteWillActivate; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct MusicPlayerRemoteWillDeactivate_t : ICallbackData + { + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(MusicPlayerRemoteWillDeactivate_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.MusicPlayerRemoteWillDeactivate; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct MusicPlayerRemoteToFront_t : ICallbackData + { + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(MusicPlayerRemoteToFront_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.MusicPlayerRemoteToFront; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct MusicPlayerWillQuit_t : ICallbackData + { + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(MusicPlayerWillQuit_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.MusicPlayerWillQuit; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct MusicPlayerWantsPlay_t : ICallbackData + { + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(MusicPlayerWantsPlay_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.MusicPlayerWantsPlay; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct MusicPlayerWantsPause_t : ICallbackData + { + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(MusicPlayerWantsPause_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.MusicPlayerWantsPause; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct MusicPlayerWantsPlayPrevious_t : ICallbackData + { + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(MusicPlayerWantsPlayPrevious_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.MusicPlayerWantsPlayPrevious; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct MusicPlayerWantsPlayNext_t : ICallbackData + { + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(MusicPlayerWantsPlayNext_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.MusicPlayerWantsPlayNext; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct MusicPlayerWantsShuffled_t : ICallbackData + { + [MarshalAs(UnmanagedType.I1)] + internal bool Shuffled; // m_bShuffled bool + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(MusicPlayerWantsShuffled_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.MusicPlayerWantsShuffled; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct MusicPlayerWantsLooped_t : ICallbackData + { + [MarshalAs(UnmanagedType.I1)] + internal bool Looped; // m_bLooped bool + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(MusicPlayerWantsLooped_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.MusicPlayerWantsLooped; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct MusicPlayerWantsVolume_t : ICallbackData + { + internal float NewVolume; // m_flNewVolume float + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(MusicPlayerWantsVolume_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.MusicPlayerWantsVolume; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct MusicPlayerSelectsQueueEntry_t : ICallbackData + { + internal int NID; // nID int + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(MusicPlayerSelectsQueueEntry_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.MusicPlayerSelectsQueueEntry; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct MusicPlayerSelectsPlaylistEntry_t : ICallbackData + { + internal int NID; // nID int + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(MusicPlayerSelectsPlaylistEntry_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.MusicPlayerSelectsPlaylistEntry; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct MusicPlayerWantsPlayingRepeatStatus_t : ICallbackData + { + internal int PlayingRepeatStatus; // m_nPlayingRepeatStatus int + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(MusicPlayerWantsPlayingRepeatStatus_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.MusicPlayerWantsPlayingRepeatStatus; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct HTTPRequestCompleted_t : ICallbackData + { + internal uint Request; // m_hRequest HTTPRequestHandle + internal ulong ContextValue; // m_ulContextValue uint64 + [MarshalAs(UnmanagedType.I1)] + internal bool RequestSuccessful; // m_bRequestSuccessful bool + internal HTTPStatusCode StatusCode; // m_eStatusCode EHTTPStatusCode + internal uint BodySize; // m_unBodySize uint32 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTTPRequestCompleted_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.HTTPRequestCompleted; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct HTTPRequestHeadersReceived_t : ICallbackData + { + internal uint Request; // m_hRequest HTTPRequestHandle + internal ulong ContextValue; // m_ulContextValue uint64 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTTPRequestHeadersReceived_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.HTTPRequestHeadersReceived; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct HTTPRequestDataReceived_t : ICallbackData + { + internal uint Request; // m_hRequest HTTPRequestHandle + internal ulong ContextValue; // m_ulContextValue uint64 + internal uint COffset; // m_cOffset uint32 + internal uint CBytesReceived; // m_cBytesReceived uint32 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTTPRequestDataReceived_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.HTTPRequestDataReceived; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct SteamUGCQueryCompleted_t : ICallbackData + { + internal ulong Handle; // m_handle UGCQueryHandle_t + internal Result Result; // m_eResult EResult + internal uint NumResultsReturned; // m_unNumResultsReturned uint32 + internal uint TotalMatchingResults; // m_unTotalMatchingResults uint32 + [MarshalAs(UnmanagedType.I1)] + internal bool CachedData; // m_bCachedData bool + internal string NextCursorUTF8() => System.Text.Encoding.UTF8.GetString( NextCursor, 0, System.Array.IndexOf( NextCursor, 0 ) ); + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] // byte[] m_rgchNextCursor + internal byte[] NextCursor; // m_rgchNextCursor char [256] + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamUGCQueryCompleted_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.SteamUGCQueryCompleted; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct SteamUGCRequestUGCDetailsResult_t : ICallbackData + { + internal SteamUGCDetails_t Details; // m_details SteamUGCDetails_t + [MarshalAs(UnmanagedType.I1)] + internal bool CachedData; // m_bCachedData bool + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamUGCRequestUGCDetailsResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.SteamUGCRequestUGCDetailsResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct CreateItemResult_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t + [MarshalAs(UnmanagedType.I1)] + internal bool UserNeedsToAcceptWorkshopLegalAgreement; // m_bUserNeedsToAcceptWorkshopLegalAgreement bool + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(CreateItemResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.CreateItemResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct SubmitItemUpdateResult_t : ICallbackData + { + internal Result Result; // m_eResult EResult + [MarshalAs(UnmanagedType.I1)] + internal bool UserNeedsToAcceptWorkshopLegalAgreement; // m_bUserNeedsToAcceptWorkshopLegalAgreement bool + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SubmitItemUpdateResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.SubmitItemUpdateResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct ItemInstalled_t : ICallbackData + { + internal AppId AppID; // m_unAppID AppId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(ItemInstalled_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.ItemInstalled; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct DownloadItemResult_t : ICallbackData + { + internal AppId AppID; // m_unAppID AppId_t + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal Result Result; // m_eResult EResult + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(DownloadItemResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.DownloadItemResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct UserFavoriteItemsListChanged_t : ICallbackData + { + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal Result Result; // m_eResult EResult + [MarshalAs(UnmanagedType.I1)] + internal bool WasAddRequest; // m_bWasAddRequest bool + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(UserFavoriteItemsListChanged_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.UserFavoriteItemsListChanged; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct SetUserItemVoteResult_t : ICallbackData + { + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal Result Result; // m_eResult EResult + [MarshalAs(UnmanagedType.I1)] + internal bool VoteUp; // m_bVoteUp bool + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SetUserItemVoteResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.SetUserItemVoteResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct GetUserItemVoteResult_t : ICallbackData + { + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal Result Result; // m_eResult EResult + [MarshalAs(UnmanagedType.I1)] + internal bool VotedUp; // m_bVotedUp bool + [MarshalAs(UnmanagedType.I1)] + internal bool VotedDown; // m_bVotedDown bool + [MarshalAs(UnmanagedType.I1)] + internal bool VoteSkipped; // m_bVoteSkipped bool + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GetUserItemVoteResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.GetUserItemVoteResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct StartPlaytimeTrackingResult_t : ICallbackData + { + internal Result Result; // m_eResult EResult + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(StartPlaytimeTrackingResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.StartPlaytimeTrackingResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct StopPlaytimeTrackingResult_t : ICallbackData + { + internal Result Result; // m_eResult EResult + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(StopPlaytimeTrackingResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.StopPlaytimeTrackingResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct AddUGCDependencyResult_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId ChildPublishedFileId; // m_nChildPublishedFileId PublishedFileId_t + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(AddUGCDependencyResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.AddUGCDependencyResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct RemoveUGCDependencyResult_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal PublishedFileId ChildPublishedFileId; // m_nChildPublishedFileId PublishedFileId_t + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoveUGCDependencyResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.RemoveUGCDependencyResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct AddAppDependencyResult_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal AppId AppID; // m_nAppID AppId_t + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(AddAppDependencyResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.AddAppDependencyResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct RemoveAppDependencyResult_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t + internal AppId AppID; // m_nAppID AppId_t + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoveAppDependencyResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.RemoveAppDependencyResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct GetAppDependenciesResult_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.U4)] + internal AppId[] GAppIDs; // m_rgAppIDs AppId_t [32] + internal uint NumAppDependencies; // m_nNumAppDependencies uint32 + internal uint TotalNumAppDependencies; // m_nTotalNumAppDependencies uint32 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GetAppDependenciesResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.GetAppDependenciesResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct DeleteItemResult_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(DeleteItemResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.DeleteItemResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct SteamAppInstalled_t : ICallbackData + { + internal AppId AppID; // m_nAppID AppId_t + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamAppInstalled_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.SteamAppInstalled; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct SteamAppUninstalled_t : ICallbackData + { + internal AppId AppID; // m_nAppID AppId_t + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamAppUninstalled_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.SteamAppUninstalled; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct HTML_BrowserReady_t : ICallbackData + { + internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_BrowserReady_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.HTML_BrowserReady; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct HTML_NeedsPaint_t : ICallbackData + { + internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser + internal string PBGRA; // pBGRA const char * + internal uint UnWide; // unWide uint32 + internal uint UnTall; // unTall uint32 + internal uint UnUpdateX; // unUpdateX uint32 + internal uint UnUpdateY; // unUpdateY uint32 + internal uint UnUpdateWide; // unUpdateWide uint32 + internal uint UnUpdateTall; // unUpdateTall uint32 + internal uint UnScrollX; // unScrollX uint32 + internal uint UnScrollY; // unScrollY uint32 + internal float FlPageScale; // flPageScale float + internal uint UnPageSerial; // unPageSerial uint32 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_NeedsPaint_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.HTML_NeedsPaint; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct HTML_StartRequest_t : ICallbackData + { + internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser + internal string PchURL; // pchURL const char * + internal string PchTarget; // pchTarget const char * + internal string PchPostData; // pchPostData const char * + [MarshalAs(UnmanagedType.I1)] + internal bool BIsRedirect; // bIsRedirect bool + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_StartRequest_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.HTML_StartRequest; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct HTML_CloseBrowser_t : ICallbackData + { + internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_CloseBrowser_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.HTML_CloseBrowser; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct HTML_URLChanged_t : ICallbackData + { + internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser + internal string PchURL; // pchURL const char * + internal string PchPostData; // pchPostData const char * + [MarshalAs(UnmanagedType.I1)] + internal bool BIsRedirect; // bIsRedirect bool + internal string PchPageTitle; // pchPageTitle const char * + [MarshalAs(UnmanagedType.I1)] + internal bool BNewNavigation; // bNewNavigation bool + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_URLChanged_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.HTML_URLChanged; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct HTML_FinishedRequest_t : ICallbackData + { + internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser + internal string PchURL; // pchURL const char * + internal string PchPageTitle; // pchPageTitle const char * + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_FinishedRequest_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.HTML_FinishedRequest; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct HTML_OpenLinkInNewTab_t : ICallbackData + { + internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser + internal string PchURL; // pchURL const char * + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_OpenLinkInNewTab_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.HTML_OpenLinkInNewTab; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct HTML_ChangedTitle_t : ICallbackData + { + internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser + internal string PchTitle; // pchTitle const char * + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_ChangedTitle_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.HTML_ChangedTitle; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct HTML_SearchResults_t : ICallbackData + { + internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser + internal uint UnResults; // unResults uint32 + internal uint UnCurrentMatch; // unCurrentMatch uint32 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_SearchResults_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.HTML_SearchResults; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct HTML_CanGoBackAndForward_t : ICallbackData + { + internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser + [MarshalAs(UnmanagedType.I1)] + internal bool BCanGoBack; // bCanGoBack bool + [MarshalAs(UnmanagedType.I1)] + internal bool BCanGoForward; // bCanGoForward bool + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_CanGoBackAndForward_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.HTML_CanGoBackAndForward; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct HTML_HorizontalScroll_t : ICallbackData + { + internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser + internal uint UnScrollMax; // unScrollMax uint32 + internal uint UnScrollCurrent; // unScrollCurrent uint32 + internal float FlPageScale; // flPageScale float + [MarshalAs(UnmanagedType.I1)] + internal bool BVisible; // bVisible bool + internal uint UnPageSize; // unPageSize uint32 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_HorizontalScroll_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.HTML_HorizontalScroll; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct HTML_VerticalScroll_t : ICallbackData + { + internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser + internal uint UnScrollMax; // unScrollMax uint32 + internal uint UnScrollCurrent; // unScrollCurrent uint32 + internal float FlPageScale; // flPageScale float + [MarshalAs(UnmanagedType.I1)] + internal bool BVisible; // bVisible bool + internal uint UnPageSize; // unPageSize uint32 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_VerticalScroll_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.HTML_VerticalScroll; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct HTML_LinkAtPosition_t : ICallbackData + { + internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser + internal uint X; // x uint32 + internal uint Y; // y uint32 + internal string PchURL; // pchURL const char * + [MarshalAs(UnmanagedType.I1)] + internal bool BInput; // bInput bool + [MarshalAs(UnmanagedType.I1)] + internal bool BLiveLink; // bLiveLink bool + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_LinkAtPosition_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.HTML_LinkAtPosition; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct HTML_JSAlert_t : ICallbackData + { + internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser + internal string PchMessage; // pchMessage const char * + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_JSAlert_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.HTML_JSAlert; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct HTML_JSConfirm_t : ICallbackData + { + internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser + internal string PchMessage; // pchMessage const char * + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_JSConfirm_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.HTML_JSConfirm; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct HTML_FileOpenDialog_t : ICallbackData + { + internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser + internal string PchTitle; // pchTitle const char * + internal string PchInitialFile; // pchInitialFile const char * + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_FileOpenDialog_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.HTML_FileOpenDialog; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct HTML_NewWindow_t : ICallbackData + { + internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser + internal string PchURL; // pchURL const char * + internal uint UnX; // unX uint32 + internal uint UnY; // unY uint32 + internal uint UnWide; // unWide uint32 + internal uint UnTall; // unTall uint32 + internal uint UnNewWindow_BrowserHandle_IGNORE; // unNewWindow_BrowserHandle_IGNORE HHTMLBrowser + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_NewWindow_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.HTML_NewWindow; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct HTML_SetCursor_t : ICallbackData + { + internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser + internal uint EMouseCursor; // eMouseCursor uint32 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_SetCursor_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.HTML_SetCursor; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct HTML_StatusText_t : ICallbackData + { + internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser + internal string PchMsg; // pchMsg const char * + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_StatusText_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.HTML_StatusText; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct HTML_ShowToolTip_t : ICallbackData + { + internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser + internal string PchMsg; // pchMsg const char * + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_ShowToolTip_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.HTML_ShowToolTip; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct HTML_UpdateToolTip_t : ICallbackData + { + internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser + internal string PchMsg; // pchMsg const char * + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_UpdateToolTip_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.HTML_UpdateToolTip; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct HTML_HideToolTip_t : ICallbackData + { + internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_HideToolTip_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.HTML_HideToolTip; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct HTML_BrowserRestarted_t : ICallbackData + { + internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser + internal uint UnOldBrowserHandle; // unOldBrowserHandle HHTMLBrowser + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_BrowserRestarted_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.HTML_BrowserRestarted; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct SteamInventoryResultReady_t : ICallbackData + { + internal int Handle; // m_handle SteamInventoryResult_t + internal Result Result; // m_result EResult + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamInventoryResultReady_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.SteamInventoryResultReady; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct SteamInventoryFullUpdate_t : ICallbackData + { + internal int Handle; // m_handle SteamInventoryResult_t + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamInventoryFullUpdate_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.SteamInventoryFullUpdate; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct SteamInventoryDefinitionUpdate_t : ICallbackData + { + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamInventoryDefinitionUpdate_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.SteamInventoryDefinitionUpdate; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] + internal struct SteamInventoryEligiblePromoItemDefIDs_t : ICallbackData + { + internal Result Result; // m_result EResult + internal ulong SteamID; // m_steamID CSteamID + internal int UmEligiblePromoItemDefs; // m_numEligiblePromoItemDefs int + [MarshalAs(UnmanagedType.I1)] + internal bool CachedData; // m_bCachedData bool + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamInventoryEligiblePromoItemDefIDs_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.SteamInventoryEligiblePromoItemDefIDs; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct SteamInventoryStartPurchaseResult_t : ICallbackData + { + internal Result Result; // m_result EResult + internal ulong OrderID; // m_ulOrderID uint64 + internal ulong TransID; // m_ulTransID uint64 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamInventoryStartPurchaseResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.SteamInventoryStartPurchaseResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct SteamInventoryRequestPricesResult_t : ICallbackData + { + internal Result Result; // m_result EResult + internal string CurrencyUTF8() => System.Text.Encoding.UTF8.GetString( Currency, 0, System.Array.IndexOf( Currency, 0 ) ); + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] // byte[] m_rgchCurrency + internal byte[] Currency; // m_rgchCurrency char [4] + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamInventoryRequestPricesResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.SteamInventoryRequestPricesResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct GetVideoURLResult_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal AppId VideoAppID; // m_unVideoAppID AppId_t + internal string URLUTF8() => System.Text.Encoding.UTF8.GetString( URL, 0, System.Array.IndexOf( URL, 0 ) ); + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] // byte[] m_rgchURL + internal byte[] URL; // m_rgchURL char [256] + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GetVideoURLResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.GetVideoURLResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct GetOPFSettingsResult_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal AppId VideoAppID; // m_unVideoAppID AppId_t + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GetOPFSettingsResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.GetOPFSettingsResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct BroadcastUploadStart_t : ICallbackData + { + [MarshalAs(UnmanagedType.I1)] + internal bool IsRTMP; // m_bIsRTMP bool + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(BroadcastUploadStart_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.BroadcastUploadStart; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct BroadcastUploadStop_t : ICallbackData + { + internal BroadcastUploadResult Result; // m_eResult EBroadcastUploadResult + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(BroadcastUploadStop_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.BroadcastUploadStop; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct SteamParentalSettingsChanged_t : ICallbackData + { + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamParentalSettingsChanged_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.SteamParentalSettingsChanged; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct SteamRemotePlaySessionConnected_t : ICallbackData + { + internal uint SessionID; // m_unSessionID RemotePlaySessionID_t + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamRemotePlaySessionConnected_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.SteamRemotePlaySessionConnected; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct SteamRemotePlaySessionDisconnected_t : ICallbackData + { + internal uint SessionID; // m_unSessionID RemotePlaySessionID_t + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamRemotePlaySessionDisconnected_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.SteamRemotePlaySessionDisconnected; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct SteamNetConnectionStatusChangedCallback_t : ICallbackData + { + internal Connection Conn; // m_hConn HSteamNetConnection + internal ConnectionInfo Nfo; // m_info SteamNetConnectionInfo_t + internal ConnectionState OldState; // m_eOldState ESteamNetworkingConnectionState + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamNetConnectionStatusChangedCallback_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.SteamNetConnectionStatusChangedCallback; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct SteamNetAuthenticationStatus_t : ICallbackData + { + internal SteamNetworkingAvailability Avail; // m_eAvail ESteamNetworkingAvailability + internal string DebugMsgUTF8() => System.Text.Encoding.UTF8.GetString( DebugMsg, 0, System.Array.IndexOf( DebugMsg, 0 ) ); + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] // byte[] m_debugMsg + internal byte[] DebugMsg; // m_debugMsg char [256] + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamNetAuthenticationStatus_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.SteamNetAuthenticationStatus; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct SteamRelayNetworkStatus_t : ICallbackData + { + internal SteamNetworkingAvailability Avail; // m_eAvail ESteamNetworkingAvailability + internal int PingMeasurementInProgress; // m_bPingMeasurementInProgress int + internal SteamNetworkingAvailability AvailNetworkConfig; // m_eAvailNetworkConfig ESteamNetworkingAvailability + internal SteamNetworkingAvailability AvailAnyRelay; // m_eAvailAnyRelay ESteamNetworkingAvailability + internal string DebugMsgUTF8() => System.Text.Encoding.UTF8.GetString( DebugMsg, 0, System.Array.IndexOf( DebugMsg, 0 ) ); + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] // byte[] m_debugMsg + internal byte[] DebugMsg; // m_debugMsg char [256] + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamRelayNetworkStatus_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.SteamRelayNetworkStatus; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] + internal struct GSClientApprove_t : ICallbackData + { + internal ulong SteamID; // m_SteamID CSteamID + internal ulong OwnerSteamID; // m_OwnerSteamID CSteamID + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GSClientApprove_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.GSClientApprove; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] + internal struct GSClientDeny_t : ICallbackData + { + internal ulong SteamID; // m_SteamID CSteamID + internal DenyReason DenyReason; // m_eDenyReason EDenyReason + internal string OptionalTextUTF8() => System.Text.Encoding.UTF8.GetString( OptionalText, 0, System.Array.IndexOf( OptionalText, 0 ) ); + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] // byte[] m_rgchOptionalText + internal byte[] OptionalText; // m_rgchOptionalText char [128] + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GSClientDeny_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.GSClientDeny; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] + internal struct GSClientKick_t : ICallbackData + { + internal ulong SteamID; // m_SteamID CSteamID + internal DenyReason DenyReason; // m_eDenyReason EDenyReason + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GSClientKick_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.GSClientKick; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct GSClientAchievementStatus_t : ICallbackData + { + internal ulong SteamID; // m_SteamID uint64 + internal string PchAchievementUTF8() => System.Text.Encoding.UTF8.GetString( PchAchievement, 0, System.Array.IndexOf( PchAchievement, 0 ) ); + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] // byte[] m_pchAchievement + internal byte[] PchAchievement; // m_pchAchievement char [128] + [MarshalAs(UnmanagedType.I1)] + internal bool Unlocked; // m_bUnlocked bool + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GSClientAchievementStatus_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.GSClientAchievementStatus; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct GSPolicyResponse_t : ICallbackData + { + internal byte Secure; // m_bSecure uint8 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GSPolicyResponse_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.GSPolicyResponse; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct GSGameplayStats_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal int Rank; // m_nRank int32 + internal uint TotalConnects; // m_unTotalConnects uint32 + internal uint TotalMinutesPlayed; // m_unTotalMinutesPlayed uint32 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GSGameplayStats_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.GSGameplayStats; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] + internal struct GSClientGroupStatus_t : ICallbackData + { + internal ulong SteamIDUser; // m_SteamIDUser CSteamID + internal ulong SteamIDGroup; // m_SteamIDGroup CSteamID + [MarshalAs(UnmanagedType.I1)] + internal bool Member; // m_bMember bool + [MarshalAs(UnmanagedType.I1)] + internal bool Officer; // m_bOfficer bool + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GSClientGroupStatus_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.GSClientGroupStatus; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct GSReputation_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal uint ReputationScore; // m_unReputationScore uint32 + [MarshalAs(UnmanagedType.I1)] + internal bool Banned; // m_bBanned bool + internal uint BannedIP; // m_unBannedIP uint32 + internal ushort BannedPort; // m_usBannedPort uint16 + internal ulong BannedGameID; // m_ulBannedGameID uint64 + internal uint BanExpires; // m_unBanExpires uint32 + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GSReputation_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.GSReputation; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] + internal struct AssociateWithClanResult_t : ICallbackData + { + internal Result Result; // m_eResult EResult + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(AssociateWithClanResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.AssociateWithClanResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] + internal struct ComputeNewPlayerCompatibilityResult_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal int CPlayersThatDontLikeCandidate; // m_cPlayersThatDontLikeCandidate int + internal int CPlayersThatCandidateDoesntLike; // m_cPlayersThatCandidateDoesntLike int + internal int CClanPlayersThatDontLikeCandidate; // m_cClanPlayersThatDontLikeCandidate int + internal ulong SteamIDCandidate; // m_SteamIDCandidate CSteamID + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(ComputeNewPlayerCompatibilityResult_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.ComputeNewPlayerCompatibilityResult; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] + internal struct GSStatsReceived_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal ulong SteamIDUser; // m_steamIDUser CSteamID + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GSStatsReceived_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.GSStatsReceived; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] + internal struct GSStatsStored_t : ICallbackData + { + internal Result Result; // m_eResult EResult + internal ulong SteamIDUser; // m_steamIDUser CSteamID + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GSStatsStored_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.GSStatsStored; + #endregion + } + + [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] + internal struct GSStatsUnloaded_t : ICallbackData + { + internal ulong SteamIDUser; // m_steamIDUser CSteamID + + #region SteamCallback + public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GSStatsUnloaded_t) ); + public int DataSize => _datasize; + public CallbackType CallbackType => CallbackType.GSStatsUnloaded; + #endregion + } + +} diff --git a/Facepunch.Steamworks/Generated/SteamConstants.cs b/Facepunch.Steamworks/Generated/SteamConstants.cs index 35c3b45..521b00d 100644 --- a/Facepunch.Steamworks/Generated/SteamConstants.cs +++ b/Facepunch.Steamworks/Generated/SteamConstants.cs @@ -6,95 +6,99 @@ using System.Threading.Tasks; namespace Steamworks.Data { - internal static class CallbackIdentifiers - { - public const int SteamUser = 100; - public const int SteamGameServer = 200; - public const int SteamFriends = 300; - public const int SteamBilling = 400; - public const int SteamMatchmaking = 500; - public const int SteamContentServer = 600; - public const int SteamUtils = 700; - public const int ClientFriends = 800; - public const int ClientUser = 900; - public const int SteamApps = 1000; - public const int SteamUserStats = 1100; - public const int SteamNetworking = 1200; - public const int SteamNetworkingSockets = 1220; - public const int SteamNetworkingMessages = 1250; - public const int ClientRemoteStorage = 1300; - public const int ClientDepotBuilder = 1400; - public const int SteamGameServerItems = 1500; - public const int ClientUtils = 1600; - public const int SteamGameCoordinator = 1700; - public const int SteamGameServerStats = 1800; - public const int Steam2Async = 1900; - public const int SteamGameStats = 2000; - public const int ClientHTTP = 2100; - public const int ClientScreenshots = 2200; - public const int SteamScreenshots = 2300; - public const int ClientAudio = 2400; - public const int ClientUnifiedMessages = 2500; - public const int SteamStreamLauncher = 2600; - public const int ClientController = 2700; - public const int SteamController = 2800; - public const int ClientParentalSettings = 2900; - public const int ClientDeviceAuth = 3000; - public const int ClientNetworkDeviceManager = 3100; - public const int ClientMusic = 3200; - public const int ClientRemoteClientManager = 3300; - public const int ClientUGC = 3400; - public const int SteamStreamClient = 3500; - public const int ClientProductBuilder = 3600; - public const int ClientShortcuts = 3700; - public const int ClientRemoteControlManager = 3800; - public const int SteamAppList = 3900; - public const int SteamMusic = 4000; - public const int SteamMusicRemote = 4100; - public const int ClientVR = 4200; - public const int ClientGameNotification = 4300; - public const int SteamGameNotification = 4400; - public const int SteamHTMLSurface = 4500; - public const int ClientVideo = 4600; - public const int ClientInventory = 4700; - public const int ClientBluetoothManager = 4800; - public const int ClientSharedConnection = 4900; - public const int SteamParentalSettings = 5000; - public const int ClientShader = 5100; - public const int SteamGameSearch = 5200; - public const int SteamParties = 5300; - public const int ClientParties = 5400; - } internal static class Defines { - internal const string STEAMAPPLIST_INTERFACE_VERSION = "STEAMAPPLIST_INTERFACE_VERSION001"; - internal const string STEAMAPPS_INTERFACE_VERSION = "STEAMAPPS_INTERFACE_VERSION008"; - internal const string STEAMAPPTICKET_INTERFACE_VERSION = "STEAMAPPTICKET_INTERFACE_VERSION001"; - internal const string STEAMCONTROLLER_INTERFACE_VERSION = "SteamController007"; - internal const string STEAMFRIENDS_INTERFACE_VERSION = "SteamFriends017"; - internal const string STEAMGAMECOORDINATOR_INTERFACE_VERSION = "SteamGameCoordinator001"; - internal const string STEAMGAMESERVER_INTERFACE_VERSION = "SteamGameServer012"; - internal const string STEAMGAMESERVERSTATS_INTERFACE_VERSION = "SteamGameServerStats001"; - internal const string STEAMHTMLSURFACE_INTERFACE_VERSION = "STEAMHTMLSURFACE_INTERFACE_VERSION_005"; - internal const string STEAMHTTP_INTERFACE_VERSION = "STEAMHTTP_INTERFACE_VERSION003"; - internal const string STEAMINPUT_INTERFACE_VERSION = "SteamInput001"; - internal const string STEAMINVENTORY_INTERFACE_VERSION = "STEAMINVENTORY_INTERFACE_V003"; - internal const string STEAMMATCHMAKING_INTERFACE_VERSION = "SteamMatchMaking009"; - internal const string STEAMMATCHMAKINGSERVERS_INTERFACE_VERSION = "SteamMatchMakingServers002"; - internal const string STEAMGAMESEARCH_INTERFACE_VERSION = "SteamMatchGameSearch001"; - internal const string STEAMPARTIES_INTERFACE_VERSION = "SteamParties002"; - internal const string STEAMMUSIC_INTERFACE_VERSION = "STEAMMUSIC_INTERFACE_VERSION001"; - internal const string STEAMMUSICREMOTE_INTERFACE_VERSION = "STEAMMUSICREMOTE_INTERFACE_VERSION001"; - internal const string STEAMNETWORKING_INTERFACE_VERSION = "SteamNetworking005"; - internal const string STEAMNETWORKINGSOCKETS_INTERFACE_VERSION = "SteamNetworkingSockets002"; - internal const string STEAMNETWORKINGUTILS_INTERFACE_VERSION = "SteamNetworkingUtils001"; - internal const string STEAMPARENTALSETTINGS_INTERFACE_VERSION = "STEAMPARENTALSETTINGS_INTERFACE_VERSION001"; - internal const string STEAMREMOTESTORAGE_INTERFACE_VERSION = "STEAMREMOTESTORAGE_INTERFACE_VERSION014"; - internal const string STEAMSCREENSHOTS_INTERFACE_VERSION = "STEAMSCREENSHOTS_INTERFACE_VERSION003"; - internal const string STEAMUGC_INTERFACE_VERSION = "STEAMUGC_INTERFACE_VERSION012"; - internal const string STEAMUSER_INTERFACE_VERSION = "SteamUser020"; - internal const string STEAMUSERSTATS_INTERFACE_VERSION = "STEAMUSERSTATS_INTERFACE_VERSION011"; - internal const string STEAMUTILS_INTERFACE_VERSION = "SteamUtils009"; - internal const string STEAMVIDEO_INTERFACE_VERSION = "STEAMVIDEO_INTERFACE_V002"; + internal static readonly int k_cubSaltSize = 8; + internal static readonly GID_t k_GIDNil = 0xffffffffffffffff; + internal static readonly GID_t k_TxnIDNil = k_GIDNil; + internal static readonly GID_t k_TxnIDUnknown = 0; + internal static readonly JobID_t k_JobIDNil = 0xffffffffffffffff; + internal static readonly PackageId_t k_uPackageIdInvalid = 0xFFFFFFFF; + internal static readonly BundleId_t k_uBundleIdInvalid = 0; + internal static readonly AppId k_uAppIdInvalid = 0x0; + internal static readonly AssetClassId_t k_ulAssetClassIdInvalid = 0x0; + internal static readonly PhysicalItemId_t k_uPhysicalItemIdInvalid = 0x0; + internal static readonly DepotId_t k_uDepotIdInvalid = 0x0; + internal static readonly CellID_t k_uCellIDInvalid = 0xFFFFFFFF; + internal static readonly SteamAPICall_t k_uAPICallInvalid = 0x0; + internal static readonly PartnerId_t k_uPartnerIdInvalid = 0; + internal static readonly ManifestId_t k_uManifestIdInvalid = 0; + internal static readonly SiteId_t k_ulSiteIdInvalid = 0; + internal static readonly PartyBeaconID_t k_ulPartyBeaconIdInvalid = 0; + internal static readonly HAuthTicket k_HAuthTicketInvalid = 0; + internal static readonly uint k_unSteamAccountIDMask = 0xFFFFFFFF; + internal static readonly uint k_unSteamAccountInstanceMask = 0x000FFFFF; + internal static readonly uint k_unSteamUserDefaultInstance = 1; + internal static readonly int k_cchGameExtraInfoMax = 64; + internal static readonly int k_cchMaxFriendsGroupName = 64; + internal static readonly int k_cFriendsGroupLimit = 100; + internal static readonly FriendsGroupID_t k_FriendsGroupID_Invalid = - 1; + internal static readonly int k_cEnumerateFollowersMax = 50; + internal static readonly uint k_cubChatMetadataMax = 8192; + internal static readonly int k_cbMaxGameServerGameDir = 32; + internal static readonly int k_cbMaxGameServerMapName = 32; + internal static readonly int k_cbMaxGameServerGameDescription = 64; + internal static readonly int k_cbMaxGameServerName = 64; + internal static readonly int k_cbMaxGameServerTags = 128; + internal static readonly int k_cbMaxGameServerGameData = 2048; + internal static readonly int HSERVERQUERY_INVALID = -1; + internal static readonly uint k_unFavoriteFlagNone = 0x00; + internal static readonly uint k_unFavoriteFlagFavorite = 0x01; + internal static readonly uint k_unFavoriteFlagHistory = 0x02; + internal static readonly uint k_unMaxCloudFileChunkSize = 100 * 1024 * 1024; + internal static readonly PublishedFileId k_PublishedFileIdInvalid = 0; + internal static readonly UGCHandle_t k_UGCHandleInvalid = 0xffffffffffffffff; + internal static readonly PublishedFileUpdateHandle_t k_PublishedFileUpdateHandleInvalid = 0xffffffffffffffff; + internal static readonly UGCFileWriteStreamHandle_t k_UGCFileStreamHandleInvalid = 0xffffffffffffffff; + internal static readonly uint k_cchPublishedDocumentTitleMax = 128 + 1; + internal static readonly uint k_cchPublishedDocumentDescriptionMax = 8000; + internal static readonly uint k_cchPublishedDocumentChangeDescriptionMax = 8000; + internal static readonly uint k_unEnumeratePublishedFilesMaxResults = 50; + internal static readonly uint k_cchTagListMax = 1024 + 1; + internal static readonly uint k_cchFilenameMax = 260; + internal static readonly uint k_cchPublishedFileURLMax = 256; + internal static readonly int k_cubAppProofOfPurchaseKeyMax = 240; + internal static readonly uint k_nScreenshotMaxTaggedUsers = 32; + internal static readonly uint k_nScreenshotMaxTaggedPublishedFiles = 32; + internal static readonly int k_cubUFSTagTypeMax = 255; + internal static readonly int k_cubUFSTagValueMax = 255; + internal static readonly int k_ScreenshotThumbWidth = 200; + internal static readonly UGCQueryHandle_t k_UGCQueryHandleInvalid = 0xffffffffffffffff; + internal static readonly UGCUpdateHandle_t k_UGCUpdateHandleInvalid = 0xffffffffffffffff; + internal static readonly uint kNumUGCResultsPerPage = 50; + internal static readonly uint k_cchDeveloperMetadataMax = 5000; + internal static readonly uint INVALID_HTMLBROWSER = 0; + internal static readonly InventoryItemId k_SteamItemInstanceIDInvalid = ~default(ulong); + internal static readonly SteamInventoryResult_t k_SteamInventoryResultInvalid = - 1; + internal static readonly SteamInventoryUpdateHandle_t k_SteamInventoryUpdateHandleInvalid = 0xffffffffffffffff; + internal static readonly Connection k_HSteamNetConnection_Invalid = 0; + internal static readonly Socket k_HSteamListenSocket_Invalid = 0; + internal static readonly HSteamNetPollGroup k_HSteamNetPollGroup_Invalid = 0; + internal static readonly int k_cchMaxSteamNetworkingErrMsg = 1024; + internal static readonly int k_cchSteamNetworkingMaxConnectionCloseReason = 128; + internal static readonly int k_cchSteamNetworkingMaxConnectionDescription = 128; + internal static readonly int k_cbMaxSteamNetworkingSocketsMessageSizeSend = 512 * 1024; + internal static readonly int k_nSteamNetworkingSend_Unreliable = 0; + internal static readonly int k_nSteamNetworkingSend_NoNagle = 1; + internal static readonly int k_nSteamNetworkingSend_UnreliableNoNagle = k_nSteamNetworkingSend_Unreliable | k_nSteamNetworkingSend_NoNagle; + internal static readonly int k_nSteamNetworkingSend_NoDelay = 4; + internal static readonly int k_nSteamNetworkingSend_UnreliableNoDelay = k_nSteamNetworkingSend_Unreliable | k_nSteamNetworkingSend_NoDelay | k_nSteamNetworkingSend_NoNagle; + internal static readonly int k_nSteamNetworkingSend_Reliable = 8; + internal static readonly int k_nSteamNetworkingSend_ReliableNoNagle = k_nSteamNetworkingSend_Reliable | k_nSteamNetworkingSend_NoNagle; + internal static readonly int k_nSteamNetworkingSend_UseCurrentThread = 16; + internal static readonly int k_cchMaxSteamNetworkingPingLocationString = 1024; + internal static readonly int k_nSteamNetworkingPing_Failed = - 1; + internal static readonly int k_nSteamNetworkingPing_Unknown = - 2; + internal static readonly SteamNetworkingPOPID k_SteamDatagramPOPID_dev = ( ( uint ) 'd' << 16 ) | ( ( uint ) 'e' << 8 ) | ( uint ) 'v'; + internal static readonly uint k_unServerFlagNone = 0x00; + internal static readonly uint k_unServerFlagActive = 0x01; + internal static readonly uint k_unServerFlagSecure = 0x02; + internal static readonly uint k_unServerFlagDedicated = 0x04; + internal static readonly uint k_unServerFlagLinux = 0x08; + internal static readonly uint k_unServerFlagPassworded = 0x10; + internal static readonly uint k_unServerFlagPrivate = 0x20; + internal static readonly uint k_cbSteamDatagramMaxSerializedTicket = 512; + internal static readonly uint k_cbMaxSteamDatagramGameCoordinatorServerLoginAppData = 2048; + internal static readonly uint k_cbMaxSteamDatagramGameCoordinatorServerLoginSerialized = 4096; } } diff --git a/Facepunch.Steamworks/Generated/SteamEnums.cs b/Facepunch.Steamworks/Generated/SteamEnums.cs index 2076b6b..e207d1c 100644 --- a/Facepunch.Steamworks/Generated/SteamEnums.cs +++ b/Facepunch.Steamworks/Generated/SteamEnums.cs @@ -6,6 +6,15 @@ using System.Threading.Tasks; namespace Steamworks { + // + // ESteamIPType + // + internal enum SteamIPType : int + { + Type4 = 0, + Type6 = 1, + } + // // EUniverse // @@ -24,6 +33,7 @@ namespace Steamworks // public enum Result : int { + None = 0, OK = 1, Fail = 2, NoConnection = 3, @@ -136,6 +146,8 @@ namespace Steamworks AccountNotFriends = 111, LimitedUserAccount = 112, CantRemoveItem = 113, + AccountDeleted = 114, + ExistingUserCancelledLicense = 115, } // @@ -274,6 +286,8 @@ namespace Steamworks RentalNotActivated = 65536, Rental = 131072, SiteLicense = 262144, + LegacyFreeSub = 524288, + InvalidOSType = 1048576, } // @@ -295,9 +309,10 @@ namespace Steamworks Franchise = 1024, Video = 2048, Plugin = 4096, - Music = 8192, + MusicAlbum = 8192, Series = 16384, - Comic = 32768, + Comic_UNUSED = 32768, + Beta = 65536, Shortcut = 1073741824, DepotOnly = -2147483648, } @@ -449,33 +464,39 @@ namespace Steamworks // internal enum VRHMDType : int { - None = -1, - Unknown = 0, - HTC_Dev = 1, - HTC_VivePre = 2, - HTC_Vive = 3, - HTC_VivePro = 4, - HTC_Unknown = 20, - Oculus_DK1 = 21, - Oculus_DK2 = 22, - Oculus_Rift = 23, - Oculus_Unknown = 40, - Acer_Unknown = 50, - Acer_WindowsMR = 51, - Dell_Unknown = 60, - Dell_Visor = 61, - Lenovo_Unknown = 70, - Lenovo_Explorer = 71, - HP_Unknown = 80, - HP_WindowsMR = 81, - Samsung_Unknown = 90, - Samsung_Odyssey = 91, - Unannounced_Unknown = 100, - Unannounced_WindowsMR = 101, - vridge = 110, - Huawei_Unknown = 120, - Huawei_VR2 = 121, - Huawei_Unannounced = 129, + MDType_None = -1, + MDType_Unknown = 0, + MDType_HTC_Dev = 1, + MDType_HTC_VivePre = 2, + MDType_HTC_Vive = 3, + MDType_HTC_VivePro = 4, + MDType_HTC_ViveCosmos = 5, + MDType_HTC_Unknown = 20, + MDType_Oculus_DK1 = 21, + MDType_Oculus_DK2 = 22, + MDType_Oculus_Rift = 23, + MDType_Oculus_RiftS = 24, + MDType_Oculus_Quest = 25, + MDType_Oculus_Unknown = 40, + MDType_Acer_Unknown = 50, + MDType_Acer_WindowsMR = 51, + MDType_Dell_Unknown = 60, + MDType_Dell_Visor = 61, + MDType_Lenovo_Unknown = 70, + MDType_Lenovo_Explorer = 71, + MDType_HP_Unknown = 80, + MDType_HP_WindowsMR = 81, + MDType_HP_Reverb = 82, + MDType_Samsung_Unknown = 90, + MDType_Samsung_Odyssey = 91, + MDType_Unannounced_Unknown = 100, + MDType_Unannounced_WindowsMR = 101, + MDType_vridge = 110, + MDType_Huawei_Unknown = 120, + MDType_Huawei_VR2 = 121, + MDType_Huawei_EndOfRange = 129, + mdType_Valve_Unknown = 130, + mdType_Valve_Index = 131, } // @@ -503,14 +524,31 @@ namespace Steamworks } // - // CGameID::EGameIDType + // EDurationControlProgress // - internal enum GameIDType : int + internal enum DurationControlProgress : int { - App = 0, - GameMod = 1, - Shortcut = 2, - P2P = 3, + Progress_Full = 0, + Progress_Half = 1, + Progress_None = 2, + ExitSoon_3h = 3, + ExitSoon_5h = 4, + ExitSoon_Night = 5, + } + + // + // EDurationControlNotification + // + internal enum DurationControlNotification : int + { + None = 0, + DurationControlNotification1Hour = 1, + DurationControlNotification3Hours = 2, + HalfProgress = 3, + NoProgress = 4, + ExitSoon_3h = 5, + ExitSoon_5h = 6, + ExitSoon_Night = 7, } // @@ -542,12 +580,23 @@ namespace Steamworks } // - // IPCFailure_t::EFailureType + // ESteamIPv6ConnectivityProtocol // - internal enum FailureType : int + internal enum SteamIPv6ConnectivityProtocol : int { - FlushedCallbackQueue = 0, - PipeFail = 1, + Invalid = 0, + HTTP = 1, + UDP = 2, + } + + // + // ESteamIPv6ConnectivityState + // + internal enum SteamIPv6ConnectivityState : int + { + Unknown = 0, + Good = 1, + Bad = 2, } // @@ -718,6 +767,7 @@ namespace Steamworks FriendsOnly = 1, Public = 2, Invisible = 3, + PrivateUnique = 4, } // @@ -778,16 +828,6 @@ namespace Steamworks IconURLLarge = 4, } - // - // RequestPlayersForGameResultCallback_t::PlayerAcceptState_t - // - internal enum PlayerAcceptState_t : int - { - Unknown = 0, - PlayerAccepted = 1, - PlayerDeclined = 2, - } - // // ERemoteStoragePlatform // @@ -798,8 +838,9 @@ namespace Steamworks OSX = 2, PS3 = 4, Linux = 8, - Reserved2 = 16, + Switch = 16, Android = 32, + IOS = 64, All = -1, } @@ -811,6 +852,7 @@ namespace Steamworks Public = 0, FriendsOnly = 1, Private = 2, + Unlisted = 3, } // @@ -1027,74 +1069,49 @@ namespace Steamworks internal enum HTTPStatusCode : int { Invalid = 0, - HTTPStatusCode100Continue = 100, - HTTPStatusCode101SwitchingProtocols = 101, - HTTPStatusCode200OK = 200, - HTTPStatusCode201Created = 201, - HTTPStatusCode202Accepted = 202, - HTTPStatusCode203NonAuthoritative = 203, - HTTPStatusCode204NoContent = 204, - HTTPStatusCode205ResetContent = 205, - HTTPStatusCode206PartialContent = 206, - HTTPStatusCode300MultipleChoices = 300, - HTTPStatusCode301MovedPermanently = 301, - HTTPStatusCode302Found = 302, - HTTPStatusCode303SeeOther = 303, - HTTPStatusCode304NotModified = 304, - HTTPStatusCode305UseProxy = 305, - HTTPStatusCode307TemporaryRedirect = 307, - HTTPStatusCode400BadRequest = 400, - HTTPStatusCode401Unauthorized = 401, - HTTPStatusCode402PaymentRequired = 402, - HTTPStatusCode403Forbidden = 403, - HTTPStatusCode404NotFound = 404, - HTTPStatusCode405MethodNotAllowed = 405, - HTTPStatusCode406NotAcceptable = 406, - HTTPStatusCode407ProxyAuthRequired = 407, - HTTPStatusCode408RequestTimeout = 408, - HTTPStatusCode409Conflict = 409, - HTTPStatusCode410Gone = 410, - HTTPStatusCode411LengthRequired = 411, - HTTPStatusCode412PreconditionFailed = 412, - HTTPStatusCode413RequestEntityTooLarge = 413, - HTTPStatusCode414RequestURITooLong = 414, - HTTPStatusCode415UnsupportedMediaType = 415, - HTTPStatusCode416RequestedRangeNotSatisfiable = 416, - HTTPStatusCode417ExpectationFailed = 417, - HTTPStatusCode4xxUnknown = 418, - HTTPStatusCode429TooManyRequests = 429, - HTTPStatusCode500InternalServerError = 500, - HTTPStatusCode501NotImplemented = 501, - HTTPStatusCode502BadGateway = 502, - HTTPStatusCode503ServiceUnavailable = 503, - HTTPStatusCode504GatewayTimeout = 504, - HTTPStatusCode505HTTPVersionNotSupported = 505, - HTTPStatusCode5xxUnknown = 599, - } - - // - // EInputSource - // - internal enum InputSource : int - { - None = 0, - LeftTrackpad = 1, - RightTrackpad = 2, - Joystick = 3, - ABXY = 4, - Switch = 5, - LeftTrigger = 6, - RightTrigger = 7, - LeftBumper = 8, - RightBumper = 9, - Gyro = 10, - CenterTrackpad = 11, - RightJoystick = 12, - DPad = 13, - Key = 14, - Mouse = 15, - LeftGyro = 16, - Count = 17, + Code100Continue = 100, + Code101SwitchingProtocols = 101, + Code200OK = 200, + Code201Created = 201, + Code202Accepted = 202, + Code203NonAuthoritative = 203, + Code204NoContent = 204, + Code205ResetContent = 205, + Code206PartialContent = 206, + Code300MultipleChoices = 300, + Code301MovedPermanently = 301, + Code302Found = 302, + Code303SeeOther = 303, + Code304NotModified = 304, + Code305UseProxy = 305, + Code307TemporaryRedirect = 307, + Code400BadRequest = 400, + Code401Unauthorized = 401, + Code402PaymentRequired = 402, + Code403Forbidden = 403, + Code404NotFound = 404, + Code405MethodNotAllowed = 405, + Code406NotAcceptable = 406, + Code407ProxyAuthRequired = 407, + Code408RequestTimeout = 408, + Code409Conflict = 409, + Code410Gone = 410, + Code411LengthRequired = 411, + Code412PreconditionFailed = 412, + Code413RequestEntityTooLarge = 413, + Code414RequestURITooLong = 414, + Code415UnsupportedMediaType = 415, + Code416RequestedRangeNotSatisfiable = 416, + Code417ExpectationFailed = 417, + Code4xxUnknown = 418, + Code429TooManyRequests = 429, + Code500InternalServerError = 500, + Code501NotImplemented = 501, + Code502BadGateway = 502, + Code503ServiceUnavailable = 503, + Code504GatewayTimeout = 504, + Code505HTTPVersionNotSupported = 505, + Code5xxUnknown = 599, } // @@ -1229,7 +1246,7 @@ namespace Steamworks PS4_Gyro_Pitch = 100, PS4_Gyro_Yaw = 101, PS4_Gyro_Roll = 102, - PS4_Reserved0 = 103, + PS4_DPad_Move = 103, PS4_Reserved1 = 104, PS4_Reserved2 = 105, PS4_Reserved3 = 106, @@ -1268,7 +1285,7 @@ namespace Steamworks XBoxOne_DPad_South = 139, XBoxOne_DPad_West = 140, XBoxOne_DPad_East = 141, - XBoxOne_Reserved0 = 142, + XBoxOne_DPad_Move = 142, XBoxOne_Reserved1 = 143, XBoxOne_Reserved2 = 144, XBoxOne_Reserved3 = 145, @@ -1307,7 +1324,7 @@ namespace Steamworks XBox360_DPad_South = 178, XBox360_DPad_West = 179, XBox360_DPad_East = 180, - XBox360_Reserved0 = 181, + XBox360_DPad_Move = 181, XBox360_Reserved1 = 182, XBox360_Reserved2 = 183, XBox360_Reserved3 = 184, @@ -1351,7 +1368,7 @@ namespace Steamworks Switch_ProGyro_Pitch = 222, Switch_ProGyro_Yaw = 223, Switch_ProGyro_Roll = 224, - Switch_Reserved0 = 225, + Switch_DPad_Move = 225, Switch_Reserved1 = 226, Switch_Reserved2 = 227, Switch_Reserved3 = 228, @@ -1464,55 +1481,6 @@ namespace Steamworks RestoreUserDefault = 1, } - // - // EControllerSource - // - internal enum ControllerSource : int - { - None = 0, - LeftTrackpad = 1, - RightTrackpad = 2, - Joystick = 3, - ABXY = 4, - Switch = 5, - LeftTrigger = 6, - RightTrigger = 7, - LeftBumper = 8, - RightBumper = 9, - Gyro = 10, - CenterTrackpad = 11, - RightJoystick = 12, - DPad = 13, - Key = 14, - Mouse = 15, - LeftGyro = 16, - Count = 17, - } - - // - // EControllerSourceMode - // - internal enum ControllerSourceMode : int - { - None = 0, - Dpad = 1, - Buttons = 2, - FourButtons = 3, - AbsoluteMouse = 4, - RelativeMouse = 5, - JoystickMove = 6, - JoystickMouse = 7, - JoystickCamera = 8, - ScrollWheel = 9, - Trigger = 10, - TouchMenu = 11, - MouseJoystick = 12, - MouseRegion = 13, - RadialMenu = 14, - SingleButton = 15, - Switches = 16, - } - // // EControllerActionOrigin // @@ -1759,7 +1727,11 @@ namespace Steamworks Switch_LeftGrip_Upper = 238, Switch_RightGrip_Lower = 239, Switch_RightGrip_Upper = 240, - Count = 241, + PS4_DPad_Move = 241, + XBoxOne_DPad_Move = 242, + XBox360_DPad_Move = 243, + Switch_DPad_Move = 244, + Count = 245, MaximumPossibleValue = 32767, } @@ -1909,76 +1881,6 @@ namespace Steamworks ReservedMax = 255, } - // - // ISteamHTMLSurface::EHTMLMouseButton - // - internal enum HTMLMouseButton : int - { - Left = 0, - Right = 1, - Middle = 2, - } - - // - // ISteamHTMLSurface::EMouseCursor - // - internal enum MouseCursor : int - { - user = 0, - none = 1, - arrow = 2, - ibeam = 3, - hourglass = 4, - waitarrow = 5, - crosshair = 6, - up = 7, - sizenw = 8, - sizese = 9, - sizene = 10, - sizesw = 11, - sizew = 12, - sizee = 13, - sizen = 14, - sizes = 15, - sizewe = 16, - sizens = 17, - sizeall = 18, - no = 19, - hand = 20, - blank = 21, - middle_pan = 22, - north_pan = 23, - north_east_pan = 24, - east_pan = 25, - south_east_pan = 26, - south_pan = 27, - south_west_pan = 28, - west_pan = 29, - north_west_pan = 30, - alias = 31, - cell = 32, - colresize = 33, - copycur = 34, - verticaltext = 35, - rowresize = 36, - zoomin = 37, - zoomout = 38, - help = 39, - custom = 40, - last = 41, - } - - // - // ISteamHTMLSurface::EHTMLKeyModifiers - // - internal enum HTMLKeyModifiers : int - { - None = 0, - AltDown = 1, - CtrlDown = 2, - ShiftDown = 4, - } - // // ESteamItemFlags // @@ -1989,6 +1891,17 @@ namespace Steamworks Consumed = 512, } + // + // ESteamTVRegionBehavior + // + internal enum SteamTVRegionBehavior : int + { + Invalid = -1, + Hover = 0, + ClickPopup = 1, + ClickSurroundingRegion = 2, + } + // // EParentalFeature // @@ -2007,7 +1920,217 @@ namespace Steamworks ParentalSetup = 10, Library = 11, Test = 12, - Max = 13, + SiteLicense = 13, + Max = 14, + } + + // + // ESteamDeviceFormFactor + // + internal enum SteamDeviceFormFactor : int + { + Unknown = 0, + Phone = 1, + Tablet = 2, + Computer = 3, + TV = 4, + } + + // + // ESteamNetworkingAvailability + // + public enum SteamNetworkingAvailability : int + { + CannotTry = -102, + Failed = -101, + Previously = -100, + Retrying = -10, + NeverTried = 1, + Waiting = 2, + Attempting = 3, + Current = 100, + Unknown = 0, + Force32bit = 2147483647, + } + + // + // ESteamNetworkingIdentityType + // + internal enum NetIdentityType : int + { + Invalid = 0, + SteamID = 16, + XboxPairwiseID = 17, + IPAddress = 1, + GenericString = 2, + GenericBytes = 3, + UnknownType = 4, + Force32bit = 2147483647, + } + + // + // ESteamNetworkingConnectionState + // + public enum ConnectionState : int + { + None = 0, + Connecting = 1, + FindingRoute = 2, + Connected = 3, + ClosedByPeer = 4, + ProblemDetectedLocally = 5, + FinWait = -1, + Linger = -2, + Dead = -3, + Force32Bit = 2147483647, + } + + // + // ESteamNetConnectionEnd + // + internal enum SteamNetConnectionEnd : int + { + Invalid = 0, + App_Min = 1000, + App_Generic = 1000, + App_Max = 1999, + AppException_Min = 2000, + AppException_Generic = 2000, + AppException_Max = 2999, + Local_Min = 3000, + Local_OfflineMode = 3001, + Local_ManyRelayConnectivity = 3002, + Local_HostedServerPrimaryRelay = 3003, + Local_NetworkConfig = 3004, + Local_Rights = 3005, + Local_Max = 3999, + Remote_Min = 4000, + Remote_Timeout = 4001, + Remote_BadCrypt = 4002, + Remote_BadCert = 4003, + Remote_NotLoggedIn = 4004, + Remote_NotRunningApp = 4005, + Remote_BadProtocolVersion = 4006, + Remote_Max = 4999, + Misc_Min = 5000, + Misc_Generic = 5001, + Misc_InternalError = 5002, + Misc_Timeout = 5003, + Misc_RelayConnectivity = 5004, + Misc_SteamConnectivity = 5005, + Misc_NoRelaySessionsToClient = 5006, + Misc_Max = 5999, + Force32Bit = 2147483647, + } + + // + // ESteamNetworkingConfigScope + // + internal enum NetConfigScope : int + { + Global = 1, + SocketsInterface = 2, + ListenSocket = 3, + Connection = 4, + Scope__Force32Bit = 2147483647, + } + + // + // ESteamNetworkingConfigDataType + // + internal enum NetConfigType : int + { + Int32 = 1, + Int64 = 2, + Float = 3, + String = 4, + FunctionPtr = 5, + DataType__Force32Bit = 2147483647, + } + + // + // ESteamNetworkingConfigValue + // + internal enum NetConfig : int + { + Invalid = 0, + FakePacketLoss_Send = 2, + FakePacketLoss_Recv = 3, + FakePacketLag_Send = 4, + FakePacketLag_Recv = 5, + FakePacketReorder_Send = 6, + FakePacketReorder_Recv = 7, + FakePacketReorder_Time = 8, + FakePacketDup_Send = 26, + FakePacketDup_Recv = 27, + FakePacketDup_TimeMax = 28, + TimeoutInitial = 24, + TimeoutConnected = 25, + SendBufferSize = 9, + SendRateMin = 10, + SendRateMax = 11, + NagleTime = 12, + IP_AllowWithoutAuth = 23, + MTU_PacketSize = 32, + MTU_DataSize = 33, + Unencrypted = 34, + EnumerateDevVars = 35, + SDRClient_ConsecutitivePingTimeoutsFailInitial = 19, + SDRClient_ConsecutitivePingTimeoutsFail = 20, + SDRClient_MinPingsBeforePingAccurate = 21, + SDRClient_SingleSocket = 22, + SDRClient_ForceRelayCluster = 29, + SDRClient_DebugTicketAddress = 30, + SDRClient_ForceProxyAddr = 31, + SDRClient_FakeClusterPing = 36, + LogLevel_AckRTT = 13, + LogLevel_PacketDecode = 14, + LogLevel_Message = 15, + LogLevel_PacketGaps = 16, + LogLevel_P2PRendezvous = 17, + LogLevel_SDRRelayPings = 18, + Value__Force32Bit = 2147483647, + } + + // + // ESteamNetworkingGetConfigValueResult + // + internal enum NetConfigResult : int + { + BadValue = -1, + BadScopeObj = -2, + BufferTooSmall = -3, + OK = 1, + OKInherited = 2, + Result__Force32Bit = 2147483647, + } + + // + // ESteamNetworkingSocketsDebugOutputType + // + internal enum DebugOutputType : int + { + None = 0, + Bug = 1, + Error = 2, + Important = 3, + Warning = 4, + Msg = 5, + Verbose = 6, + Debug = 7, + Everything = 8, + Force32Bit = 2147483647, + } + + // + // EServerMode + // + internal enum ServerMode : int + { + Invalid = 0, + NoAuthentication = 1, + Authentication = 2, + AuthenticationAndSecure = 3, } } diff --git a/Facepunch.Steamworks/Generated/SteamGameServer.cs b/Facepunch.Steamworks/Generated/SteamGameServer.cs deleted file mode 100644 index f9713c1..0000000 --- a/Facepunch.Steamworks/Generated/SteamGameServer.cs +++ /dev/null @@ -1,48 +0,0 @@ -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_GetHSteamUser", CallingConvention = CallingConvention.Cdecl )] - public static extern HSteamUser SteamGameServer_GetHSteamUser(); - - [DllImport( Platform.LibraryName, EntryPoint = "SteamGameServer_GetHSteamPipe", CallingConvention = CallingConvention.Cdecl )] - public static extern HSteamPipe SteamGameServer_GetHSteamPipe(); - - } - static internal void RunCallbacks() - { - Native.SteamGameServer_RunCallbacks(); - } - - static internal void Shutdown() - { - Native.SteamGameServer_Shutdown(); - } - - static internal HSteamUser GetHSteamUser() - { - return Native.SteamGameServer_GetHSteamUser(); - } - - static internal HSteamPipe GetHSteamPipe() - { - return Native.SteamGameServer_GetHSteamPipe(); - } - - } -} diff --git a/Facepunch.Steamworks/Generated/SteamInternal.cs b/Facepunch.Steamworks/Generated/SteamInternal.cs deleted file mode 100644 index f9c15f0..0000000 --- a/Facepunch.Steamworks/Generated/SteamInternal.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; -using Steamworks.Data; - - -namespace Steamworks -{ - internal static class SteamInternal - { - internal static class Native - { - [DllImport( Platform.LibraryName, EntryPoint = "SteamInternal_GameServer_Init", CallingConvention = CallingConvention.Cdecl )] - [return: MarshalAs( UnmanagedType.I1 )] - public static extern bool SteamInternal_GameServer_Init( uint unIP, ushort usPort, ushort usGamePort, ushort usQueryPort, int eServerMode, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersionString ); - - [DllImport( Platform.LibraryName, EntryPoint = "SteamInternal_FindOrCreateUserInterface", CallingConvention = CallingConvention.Cdecl )] - public static extern IntPtr SteamInternal_FindOrCreateUserInterface( int steamuser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string versionname ); - - [DllImport( Platform.LibraryName, EntryPoint = "SteamInternal_FindOrCreateGameServerInterface", CallingConvention = CallingConvention.Cdecl )] - public static extern IntPtr SteamInternal_FindOrCreateGameServerInterface( int steamuser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string versionname ); - - [DllImport( Platform.LibraryName, EntryPoint = "SteamInternal_CreateInterface", CallingConvention = CallingConvention.Cdecl )] - public static extern IntPtr SteamInternal_CreateInterface( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string version ); - - } - static internal bool GameServer_Init( uint unIP, ushort usPort, ushort usGamePort, ushort usQueryPort, int eServerMode, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersionString ) - { - return Native.SteamInternal_GameServer_Init( unIP, usPort, usGamePort, usQueryPort, eServerMode, pchVersionString ); - } - - static internal IntPtr FindOrCreateUserInterface( int steamuser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string versionname ) - { - return Native.SteamInternal_FindOrCreateUserInterface( steamuser, versionname ); - } - - static internal IntPtr FindOrCreateGameServerInterface( int steamuser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string versionname ) - { - return Native.SteamInternal_FindOrCreateGameServerInterface( steamuser, versionname ); - } - - static internal IntPtr CreateInterface( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string version ) - { - return Native.SteamInternal_CreateInterface( version ); - } - - } -} diff --git a/Facepunch.Steamworks/Generated/SteamStructs.cs b/Facepunch.Steamworks/Generated/SteamStructs.cs index 66839d8..0660d98 100644 --- a/Facepunch.Steamworks/Generated/SteamStructs.cs +++ b/Facepunch.Steamworks/Generated/SteamStructs.cs @@ -6,591 +6,15 @@ using System.Threading.Tasks; namespace Steamworks.Data { - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct CallbackMsg_t - { - internal int SteamUser; // m_hSteamUser HSteamUser - internal int Callback; // m_iCallback int - internal IntPtr ParamPtr; // m_pubParam uint8 * - internal int ParamCount; // m_cubParam int - - #region Marshalling - internal static CallbackMsg_t Fill( IntPtr p ) => ((CallbackMsg_t)(CallbackMsg_t) Marshal.PtrToStructure( p, typeof(CallbackMsg_t) ) ); - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct SteamServerConnectFailure_t - { - internal Result Result; // m_eResult enum EResult - [MarshalAs(UnmanagedType.I1)] - internal bool StillRetrying; // m_bStillRetrying _Bool - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamServerConnectFailure_t) ); - internal static SteamServerConnectFailure_t Fill( IntPtr p ) => ((SteamServerConnectFailure_t)(SteamServerConnectFailure_t) Marshal.PtrToStructure( p, typeof(SteamServerConnectFailure_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamUser + 2, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamUser + 2, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamUser + 2, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct SteamServersDisconnected_t - { - internal Result Result; // m_eResult enum EResult - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamServersDisconnected_t) ); - internal static SteamServersDisconnected_t Fill( IntPtr p ) => ((SteamServersDisconnected_t)(SteamServersDisconnected_t) Marshal.PtrToStructure( p, typeof(SteamServersDisconnected_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamUser + 3, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamUser + 3, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamUser + 3, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct ClientGameServerDeny_t - { - internal uint AppID; // m_uAppID uint32 - internal uint GameServerIP; // m_unGameServerIP uint32 - internal ushort GameServerPort; // m_usGameServerPort uint16 - internal ushort Secure; // m_bSecure uint16 - internal uint Reason; // m_uReason uint32 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(ClientGameServerDeny_t) ); - internal static ClientGameServerDeny_t Fill( IntPtr p ) => ((ClientGameServerDeny_t)(ClientGameServerDeny_t) Marshal.PtrToStructure( p, typeof(ClientGameServerDeny_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamUser + 13, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamUser + 13, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamUser + 13, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] - internal struct ValidateAuthTicketResponse_t - { - internal ulong SteamID; // m_SteamID class CSteamID - internal AuthResponse AuthSessionResponse; // m_eAuthSessionResponse enum EAuthSessionResponse - internal ulong OwnerSteamID; // m_OwnerSteamID class CSteamID - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(ValidateAuthTicketResponse_t) ); - internal static ValidateAuthTicketResponse_t Fill( IntPtr p ) => ((ValidateAuthTicketResponse_t)(ValidateAuthTicketResponse_t) Marshal.PtrToStructure( p, typeof(ValidateAuthTicketResponse_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamUser + 43, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamUser + 43, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamUser + 43, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct MicroTxnAuthorizationResponse_t - { - internal uint AppID; // m_unAppID uint32 - internal ulong OrderID; // m_ulOrderID uint64 - internal byte Authorized; // m_bAuthorized uint8 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(MicroTxnAuthorizationResponse_t) ); - internal static MicroTxnAuthorizationResponse_t Fill( IntPtr p ) => ((MicroTxnAuthorizationResponse_t)(MicroTxnAuthorizationResponse_t) Marshal.PtrToStructure( p, typeof(MicroTxnAuthorizationResponse_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamUser + 52, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamUser + 52, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamUser + 52, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct EncryptedAppTicketResponse_t - { - internal Result Result; // m_eResult enum EResult - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(EncryptedAppTicketResponse_t) ); - internal static EncryptedAppTicketResponse_t Fill( IntPtr p ) => ((EncryptedAppTicketResponse_t)(EncryptedAppTicketResponse_t) Marshal.PtrToStructure( p, typeof(EncryptedAppTicketResponse_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamUser + 54, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamUser + 54, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamUser + 54, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct GetAuthSessionTicketResponse_t - { - internal uint AuthTicket; // m_hAuthTicket HAuthTicket - internal Result Result; // m_eResult enum EResult - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GetAuthSessionTicketResponse_t) ); - internal static GetAuthSessionTicketResponse_t Fill( IntPtr p ) => ((GetAuthSessionTicketResponse_t)(GetAuthSessionTicketResponse_t) Marshal.PtrToStructure( p, typeof(GetAuthSessionTicketResponse_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamUser + 63, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamUser + 63, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamUser + 63, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct GameWebCallback_t - { - internal string URLUTF8() => System.Text.Encoding.UTF8.GetString( URL, 0, System.Array.IndexOf( URL, 0 ) ); - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] // byte[] m_szURL - internal byte[] URL; // m_szURL char [256] - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GameWebCallback_t) ); - internal static GameWebCallback_t Fill( IntPtr p ) => ((GameWebCallback_t)(GameWebCallback_t) Marshal.PtrToStructure( p, typeof(GameWebCallback_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamUser + 64, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamUser + 64, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamUser + 64, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct StoreAuthURLResponse_t - { - internal string URLUTF8() => System.Text.Encoding.UTF8.GetString( URL, 0, System.Array.IndexOf( URL, 0 ) ); - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 512)] // byte[] m_szURL - internal byte[] URL; // m_szURL char [512] - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(StoreAuthURLResponse_t) ); - internal static StoreAuthURLResponse_t Fill( IntPtr p ) => ((StoreAuthURLResponse_t)(StoreAuthURLResponse_t) Marshal.PtrToStructure( p, typeof(StoreAuthURLResponse_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamUser + 65, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamUser + 65, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamUser + 65, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct MarketEligibilityResponse_t - { - [MarshalAs(UnmanagedType.I1)] - internal bool Allowed; // m_bAllowed _Bool - internal MarketNotAllowedReasonFlags NotAllowedReason; // m_eNotAllowedReason enum EMarketNotAllowedReasonFlags - internal uint TAllowedAtTime; // m_rtAllowedAtTime RTime32 - internal int CdaySteamGuardRequiredDays; // m_cdaySteamGuardRequiredDays int - internal int CdayNewDeviceCooldown; // m_cdayNewDeviceCooldown int - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(MarketEligibilityResponse_t) ); - internal static MarketEligibilityResponse_t Fill( IntPtr p ) => ((MarketEligibilityResponse_t)(MarketEligibilityResponse_t) Marshal.PtrToStructure( p, typeof(MarketEligibilityResponse_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamUser + 66, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamUser + 66, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamUser + 66, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] internal struct FriendGameInfo_t { - internal GameId GameID; // m_gameID class CGameID + internal GameId GameID; // m_gameID CGameID internal uint GameIP; // m_unGameIP uint32 internal ushort GamePort; // m_usGamePort uint16 internal ushort QueryPort; // m_usQueryPort uint16 - internal ulong SteamIDLobby; // m_steamIDLobby class CSteamID + internal ulong SteamIDLobby; // m_steamIDLobby CSteamID - #region Marshalling - internal static FriendGameInfo_t Fill( IntPtr p ) => ((FriendGameInfo_t)(FriendGameInfo_t) Marshal.PtrToStructure( p, typeof(FriendGameInfo_t) ) ); - #endregion } [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] @@ -599,1241 +23,6 @@ namespace Steamworks.Data internal uint IOnlineSessionInstances; // m_uiOnlineSessionInstances uint32 internal byte IPublishedToFriendsSessionInstance; // m_uiPublishedToFriendsSessionInstance uint8 - #region Marshalling - internal static FriendSessionStateInfo_t Fill( IntPtr p ) => ((FriendSessionStateInfo_t)(FriendSessionStateInfo_t) Marshal.PtrToStructure( p, typeof(FriendSessionStateInfo_t) ) ); - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct FriendStateChange_t - { - internal ulong SteamID; // m_ulSteamID uint64 - internal int ChangeFlags; // m_nChangeFlags int - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(FriendStateChange_t) ); - internal static FriendStateChange_t Fill( IntPtr p ) => ((FriendStateChange_t)(FriendStateChange_t) Marshal.PtrToStructure( p, typeof(FriendStateChange_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamFriends + 4, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamFriends + 4, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamFriends + 4, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct GameOverlayActivated_t - { - internal byte Active; // m_bActive uint8 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GameOverlayActivated_t) ); - internal static GameOverlayActivated_t Fill( IntPtr p ) => ((GameOverlayActivated_t)(GameOverlayActivated_t) Marshal.PtrToStructure( p, typeof(GameOverlayActivated_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamFriends + 31, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamFriends + 31, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamFriends + 31, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct GameServerChangeRequested_t - { - internal string ServerUTF8() => System.Text.Encoding.UTF8.GetString( Server, 0, System.Array.IndexOf( Server, 0 ) ); - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] // byte[] m_rgchServer - internal byte[] Server; // m_rgchServer char [64] - internal string PasswordUTF8() => System.Text.Encoding.UTF8.GetString( Password, 0, System.Array.IndexOf( Password, 0 ) ); - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] // byte[] m_rgchPassword - internal byte[] Password; // m_rgchPassword char [64] - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GameServerChangeRequested_t) ); - internal static GameServerChangeRequested_t Fill( IntPtr p ) => ((GameServerChangeRequested_t)(GameServerChangeRequested_t) Marshal.PtrToStructure( p, typeof(GameServerChangeRequested_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamFriends + 32, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamFriends + 32, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamFriends + 32, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] - internal struct GameLobbyJoinRequested_t - { - internal ulong SteamIDLobby; // m_steamIDLobby class CSteamID - internal ulong SteamIDFriend; // m_steamIDFriend class CSteamID - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GameLobbyJoinRequested_t) ); - internal static GameLobbyJoinRequested_t Fill( IntPtr p ) => ((GameLobbyJoinRequested_t)(GameLobbyJoinRequested_t) Marshal.PtrToStructure( p, typeof(GameLobbyJoinRequested_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamFriends + 33, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamFriends + 33, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamFriends + 33, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] - internal struct AvatarImageLoaded_t - { - internal ulong SteamID; // m_steamID class CSteamID - internal int Image; // m_iImage int - internal int Wide; // m_iWide int - internal int Tall; // m_iTall int - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(AvatarImageLoaded_t) ); - internal static AvatarImageLoaded_t Fill( IntPtr p ) => ((AvatarImageLoaded_t)(AvatarImageLoaded_t) Marshal.PtrToStructure( p, typeof(AvatarImageLoaded_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamFriends + 34, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamFriends + 34, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamFriends + 34, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] - internal struct ClanOfficerListResponse_t - { - internal ulong SteamIDClan; // m_steamIDClan class CSteamID - internal int COfficers; // m_cOfficers int - internal byte Success; // m_bSuccess uint8 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(ClanOfficerListResponse_t) ); - internal static ClanOfficerListResponse_t Fill( IntPtr p ) => ((ClanOfficerListResponse_t)(ClanOfficerListResponse_t) Marshal.PtrToStructure( p, typeof(ClanOfficerListResponse_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamFriends + 35, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamFriends + 35, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamFriends + 35, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] - internal struct FriendRichPresenceUpdate_t - { - internal ulong SteamIDFriend; // m_steamIDFriend class CSteamID - internal AppId AppID; // m_nAppID AppId_t - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(FriendRichPresenceUpdate_t) ); - internal static FriendRichPresenceUpdate_t Fill( IntPtr p ) => ((FriendRichPresenceUpdate_t)(FriendRichPresenceUpdate_t) Marshal.PtrToStructure( p, typeof(FriendRichPresenceUpdate_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamFriends + 36, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamFriends + 36, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamFriends + 36, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] - internal struct GameRichPresenceJoinRequested_t - { - internal ulong SteamIDFriend; // m_steamIDFriend class CSteamID - internal string ConnectUTF8() => System.Text.Encoding.UTF8.GetString( Connect, 0, System.Array.IndexOf( Connect, 0 ) ); - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] // byte[] m_rgchConnect - internal byte[] Connect; // m_rgchConnect char [256] - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GameRichPresenceJoinRequested_t) ); - internal static GameRichPresenceJoinRequested_t Fill( IntPtr p ) => ((GameRichPresenceJoinRequested_t)(GameRichPresenceJoinRequested_t) Marshal.PtrToStructure( p, typeof(GameRichPresenceJoinRequested_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamFriends + 37, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamFriends + 37, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamFriends + 37, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] - internal struct GameConnectedClanChatMsg_t - { - internal ulong SteamIDClanChat; // m_steamIDClanChat class CSteamID - internal ulong SteamIDUser; // m_steamIDUser class CSteamID - internal int MessageID; // m_iMessageID int - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GameConnectedClanChatMsg_t) ); - internal static GameConnectedClanChatMsg_t Fill( IntPtr p ) => ((GameConnectedClanChatMsg_t)(GameConnectedClanChatMsg_t) Marshal.PtrToStructure( p, typeof(GameConnectedClanChatMsg_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamFriends + 38, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamFriends + 38, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamFriends + 38, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] - internal struct GameConnectedChatJoin_t - { - internal ulong SteamIDClanChat; // m_steamIDClanChat class CSteamID - internal ulong SteamIDUser; // m_steamIDUser class CSteamID - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GameConnectedChatJoin_t) ); - internal static GameConnectedChatJoin_t Fill( IntPtr p ) => ((GameConnectedChatJoin_t)(GameConnectedChatJoin_t) Marshal.PtrToStructure( p, typeof(GameConnectedChatJoin_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamFriends + 39, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamFriends + 39, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamFriends + 39, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] - internal struct GameConnectedChatLeave_t - { - internal ulong SteamIDClanChat; // m_steamIDClanChat class CSteamID - internal ulong SteamIDUser; // m_steamIDUser class CSteamID - [MarshalAs(UnmanagedType.I1)] - internal bool Kicked; // m_bKicked _Bool - [MarshalAs(UnmanagedType.I1)] - internal bool Dropped; // m_bDropped _Bool - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GameConnectedChatLeave_t) ); - internal static GameConnectedChatLeave_t Fill( IntPtr p ) => ((GameConnectedChatLeave_t)(GameConnectedChatLeave_t) Marshal.PtrToStructure( p, typeof(GameConnectedChatLeave_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamFriends + 40, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamFriends + 40, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamFriends + 40, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct DownloadClanActivityCountsResult_t - { - [MarshalAs(UnmanagedType.I1)] - internal bool Success; // m_bSuccess _Bool - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(DownloadClanActivityCountsResult_t) ); - internal static DownloadClanActivityCountsResult_t Fill( IntPtr p ) => ((DownloadClanActivityCountsResult_t)(DownloadClanActivityCountsResult_t) Marshal.PtrToStructure( p, typeof(DownloadClanActivityCountsResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamFriends + 41, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamFriends + 41, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamFriends + 41, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] - internal struct JoinClanChatRoomCompletionResult_t - { - internal ulong SteamIDClanChat; // m_steamIDClanChat class CSteamID - internal RoomEnter ChatRoomEnterResponse; // m_eChatRoomEnterResponse enum EChatRoomEnterResponse - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(JoinClanChatRoomCompletionResult_t) ); - internal static JoinClanChatRoomCompletionResult_t Fill( IntPtr p ) => ((JoinClanChatRoomCompletionResult_t)(JoinClanChatRoomCompletionResult_t) Marshal.PtrToStructure( p, typeof(JoinClanChatRoomCompletionResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamFriends + 42, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamFriends + 42, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamFriends + 42, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] - internal struct GameConnectedFriendChatMsg_t - { - internal ulong SteamIDUser; // m_steamIDUser class CSteamID - internal int MessageID; // m_iMessageID int - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GameConnectedFriendChatMsg_t) ); - internal static GameConnectedFriendChatMsg_t Fill( IntPtr p ) => ((GameConnectedFriendChatMsg_t)(GameConnectedFriendChatMsg_t) Marshal.PtrToStructure( p, typeof(GameConnectedFriendChatMsg_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamFriends + 43, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamFriends + 43, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamFriends + 43, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] - internal struct FriendsGetFollowerCount_t - { - internal Result Result; // m_eResult enum EResult - internal ulong SteamID; // m_steamID class CSteamID - internal int Count; // m_nCount int - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(FriendsGetFollowerCount_t) ); - internal static FriendsGetFollowerCount_t Fill( IntPtr p ) => ((FriendsGetFollowerCount_t)(FriendsGetFollowerCount_t) Marshal.PtrToStructure( p, typeof(FriendsGetFollowerCount_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamFriends + 44, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamFriends + 44, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamFriends + 44, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] - internal struct FriendsIsFollowing_t - { - internal Result Result; // m_eResult enum EResult - internal ulong SteamID; // m_steamID class CSteamID - [MarshalAs(UnmanagedType.I1)] - internal bool IsFollowing; // m_bIsFollowing _Bool - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(FriendsIsFollowing_t) ); - internal static FriendsIsFollowing_t Fill( IntPtr p ) => ((FriendsIsFollowing_t)(FriendsIsFollowing_t) Marshal.PtrToStructure( p, typeof(FriendsIsFollowing_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamFriends + 45, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamFriends + 45, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamFriends + 45, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] - internal struct FriendsEnumerateFollowingList_t - { - internal Result Result; // m_eResult enum EResult - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U8)] - internal ulong[] GSteamID; // m_rgSteamID class CSteamID [50] - internal int ResultsReturned; // m_nResultsReturned int32 - internal int TotalResultCount; // m_nTotalResultCount int32 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(FriendsEnumerateFollowingList_t) ); - internal static FriendsEnumerateFollowingList_t Fill( IntPtr p ) => ((FriendsEnumerateFollowingList_t)(FriendsEnumerateFollowingList_t) Marshal.PtrToStructure( p, typeof(FriendsEnumerateFollowingList_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamFriends + 46, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamFriends + 46, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamFriends + 46, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct SetPersonaNameResponse_t - { - [MarshalAs(UnmanagedType.I1)] - internal bool Success; // m_bSuccess _Bool - [MarshalAs(UnmanagedType.I1)] - internal bool LocalSuccess; // m_bLocalSuccess _Bool - internal Result Result; // m_result enum EResult - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SetPersonaNameResponse_t) ); - internal static SetPersonaNameResponse_t Fill( IntPtr p ) => ((SetPersonaNameResponse_t)(SetPersonaNameResponse_t) Marshal.PtrToStructure( p, typeof(SetPersonaNameResponse_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamFriends + 47, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamFriends + 47, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamFriends + 47, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct LowBatteryPower_t - { - internal byte MinutesBatteryLeft; // m_nMinutesBatteryLeft uint8 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(LowBatteryPower_t) ); - internal static LowBatteryPower_t Fill( IntPtr p ) => ((LowBatteryPower_t)(LowBatteryPower_t) Marshal.PtrToStructure( p, typeof(LowBatteryPower_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamUtils + 2, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamUtils + 2, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamUtils + 2, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct SteamAPICallCompleted_t - { - internal ulong AsyncCall; // m_hAsyncCall SteamAPICall_t - internal int Callback; // m_iCallback int - internal uint ParamCount; // m_cubParam uint32 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamAPICallCompleted_t) ); - internal static SteamAPICallCompleted_t Fill( IntPtr p ) => ((SteamAPICallCompleted_t)(SteamAPICallCompleted_t) Marshal.PtrToStructure( p, typeof(SteamAPICallCompleted_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamUtils + 3, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamUtils + 3, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamUtils + 3, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct CheckFileSignature_t - { - internal CheckFileSignature CheckFileSignature; // m_eCheckFileSignature enum ECheckFileSignature - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(CheckFileSignature_t) ); - internal static CheckFileSignature_t Fill( IntPtr p ) => ((CheckFileSignature_t)(CheckFileSignature_t) Marshal.PtrToStructure( p, typeof(CheckFileSignature_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamUtils + 5, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamUtils + 5, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamUtils + 5, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct GamepadTextInputDismissed_t - { - [MarshalAs(UnmanagedType.I1)] - internal bool Submitted; // m_bSubmitted _Bool - internal uint SubmittedText; // m_unSubmittedText uint32 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GamepadTextInputDismissed_t) ); - internal static GamepadTextInputDismissed_t Fill( IntPtr p ) => ((GamepadTextInputDismissed_t)(GamepadTextInputDismissed_t) Marshal.PtrToStructure( p, typeof(GamepadTextInputDismissed_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamUtils + 14, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamUtils + 14, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamUtils + 14, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion } [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] @@ -1843,20 +32,17 @@ namespace Steamworks.Data internal ushort QueryPort; // m_usQueryPort uint16 internal uint IP; // m_unIP uint32 - #region Marshalling - internal static servernetadr_t Fill( IntPtr p ) => ((servernetadr_t)(servernetadr_t) Marshal.PtrToStructure( p, typeof(servernetadr_t) ) ); - #endregion } [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] internal struct gameserveritem_t { - internal servernetadr_t NetAdr; // m_NetAdr class servernetadr_t + internal servernetadr_t NetAdr; // m_NetAdr servernetadr_t internal int Ping; // m_nPing int [MarshalAs(UnmanagedType.I1)] - internal bool HadSuccessfulResponse; // m_bHadSuccessfulResponse _Bool + internal bool HadSuccessfulResponse; // m_bHadSuccessfulResponse bool [MarshalAs(UnmanagedType.I1)] - internal bool DoNotRefresh; // m_bDoNotRefresh _Bool + internal bool DoNotRefresh; // m_bDoNotRefresh bool internal string GameDirUTF8() => System.Text.Encoding.UTF8.GetString( GameDir, 0, System.Array.IndexOf( GameDir, 0 ) ); [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] // byte[] m_szGameDir internal byte[] GameDir; // m_szGameDir char [32] @@ -1871,9 +57,9 @@ namespace Steamworks.Data internal int MaxPlayers; // m_nMaxPlayers int internal int BotPlayers; // m_nBotPlayers int [MarshalAs(UnmanagedType.I1)] - internal bool Password; // m_bPassword _Bool + internal bool Password; // m_bPassword bool [MarshalAs(UnmanagedType.I1)] - internal bool Secure; // m_bSecure _Bool + internal bool Secure; // m_bSecure bool internal uint TimeLastPlayed; // m_ulTimeLastPlayed uint32 internal int ServerVersion; // m_nServerVersion int internal string ServerNameUTF8() => System.Text.Encoding.UTF8.GetString( ServerName, 0, System.Array.IndexOf( ServerName, 0 ) ); @@ -1882,1326 +68,16 @@ namespace Steamworks.Data internal string GameTagsUTF8() => System.Text.Encoding.UTF8.GetString( GameTags, 0, System.Array.IndexOf( GameTags, 0 ) ); [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] // byte[] m_szGameTags internal byte[] GameTags; // m_szGameTags char [128] - internal ulong SteamID; // m_steamID class CSteamID + internal ulong SteamID; // m_steamID CSteamID - #region Marshalling - internal static gameserveritem_t Fill( IntPtr p ) => ((gameserveritem_t)(gameserveritem_t) Marshal.PtrToStructure( p, typeof(gameserveritem_t) ) ); - #endregion } [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] internal struct SteamPartyBeaconLocation_t { - internal SteamPartyBeaconLocationType Type; // m_eType enum ESteamPartyBeaconLocationType + internal SteamPartyBeaconLocationType Type; // m_eType ESteamPartyBeaconLocationType internal ulong LocationID; // m_ulLocationID uint64 - #region Marshalling - internal static SteamPartyBeaconLocation_t Fill( IntPtr p ) => ((SteamPartyBeaconLocation_t)(SteamPartyBeaconLocation_t) Marshal.PtrToStructure( p, typeof(SteamPartyBeaconLocation_t) ) ); - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct FavoritesListChanged_t - { - internal uint IP; // m_nIP uint32 - internal uint QueryPort; // m_nQueryPort uint32 - internal uint ConnPort; // m_nConnPort uint32 - internal uint AppID; // m_nAppID uint32 - internal uint Flags; // m_nFlags uint32 - [MarshalAs(UnmanagedType.I1)] - internal bool Add; // m_bAdd _Bool - internal uint AccountId; // m_unAccountId AccountID_t - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(FavoritesListChanged_t) ); - internal static FavoritesListChanged_t Fill( IntPtr p ) => ((FavoritesListChanged_t)(FavoritesListChanged_t) Marshal.PtrToStructure( p, typeof(FavoritesListChanged_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamMatchmaking + 2, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamMatchmaking + 2, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamMatchmaking + 2, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct LobbyInvite_t - { - internal ulong SteamIDUser; // m_ulSteamIDUser uint64 - internal ulong SteamIDLobby; // m_ulSteamIDLobby uint64 - internal ulong GameID; // m_ulGameID uint64 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(LobbyInvite_t) ); - internal static LobbyInvite_t Fill( IntPtr p ) => ((LobbyInvite_t)(LobbyInvite_t) Marshal.PtrToStructure( p, typeof(LobbyInvite_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamMatchmaking + 3, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamMatchmaking + 3, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamMatchmaking + 3, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct LobbyEnter_t - { - internal ulong SteamIDLobby; // m_ulSteamIDLobby uint64 - internal uint GfChatPermissions; // m_rgfChatPermissions uint32 - [MarshalAs(UnmanagedType.I1)] - internal bool Locked; // m_bLocked _Bool - internal uint EChatRoomEnterResponse; // m_EChatRoomEnterResponse uint32 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(LobbyEnter_t) ); - internal static LobbyEnter_t Fill( IntPtr p ) => ((LobbyEnter_t)(LobbyEnter_t) Marshal.PtrToStructure( p, typeof(LobbyEnter_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamMatchmaking + 4, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamMatchmaking + 4, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamMatchmaking + 4, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct LobbyDataUpdate_t - { - internal ulong SteamIDLobby; // m_ulSteamIDLobby uint64 - internal ulong SteamIDMember; // m_ulSteamIDMember uint64 - internal byte Success; // m_bSuccess uint8 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(LobbyDataUpdate_t) ); - internal static LobbyDataUpdate_t Fill( IntPtr p ) => ((LobbyDataUpdate_t)(LobbyDataUpdate_t) Marshal.PtrToStructure( p, typeof(LobbyDataUpdate_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamMatchmaking + 5, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamMatchmaking + 5, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamMatchmaking + 5, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct LobbyChatUpdate_t - { - internal ulong SteamIDLobby; // m_ulSteamIDLobby uint64 - internal ulong SteamIDUserChanged; // m_ulSteamIDUserChanged uint64 - internal ulong SteamIDMakingChange; // m_ulSteamIDMakingChange uint64 - internal uint GfChatMemberStateChange; // m_rgfChatMemberStateChange uint32 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(LobbyChatUpdate_t) ); - internal static LobbyChatUpdate_t Fill( IntPtr p ) => ((LobbyChatUpdate_t)(LobbyChatUpdate_t) Marshal.PtrToStructure( p, typeof(LobbyChatUpdate_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamMatchmaking + 6, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamMatchmaking + 6, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamMatchmaking + 6, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct LobbyChatMsg_t - { - internal ulong SteamIDLobby; // m_ulSteamIDLobby uint64 - internal ulong SteamIDUser; // m_ulSteamIDUser uint64 - internal byte ChatEntryType; // m_eChatEntryType uint8 - internal uint ChatID; // m_iChatID uint32 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(LobbyChatMsg_t) ); - internal static LobbyChatMsg_t Fill( IntPtr p ) => ((LobbyChatMsg_t)(LobbyChatMsg_t) Marshal.PtrToStructure( p, typeof(LobbyChatMsg_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamMatchmaking + 7, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamMatchmaking + 7, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamMatchmaking + 7, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct LobbyGameCreated_t - { - internal ulong SteamIDLobby; // m_ulSteamIDLobby uint64 - internal ulong SteamIDGameServer; // m_ulSteamIDGameServer uint64 - internal uint IP; // m_unIP uint32 - internal ushort Port; // m_usPort uint16 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(LobbyGameCreated_t) ); - internal static LobbyGameCreated_t Fill( IntPtr p ) => ((LobbyGameCreated_t)(LobbyGameCreated_t) Marshal.PtrToStructure( p, typeof(LobbyGameCreated_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamMatchmaking + 9, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamMatchmaking + 9, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamMatchmaking + 9, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct LobbyMatchList_t - { - internal uint LobbiesMatching; // m_nLobbiesMatching uint32 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(LobbyMatchList_t) ); - internal static LobbyMatchList_t Fill( IntPtr p ) => ((LobbyMatchList_t)(LobbyMatchList_t) Marshal.PtrToStructure( p, typeof(LobbyMatchList_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamMatchmaking + 10, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamMatchmaking + 10, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamMatchmaking + 10, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct LobbyKicked_t - { - internal ulong SteamIDLobby; // m_ulSteamIDLobby uint64 - internal ulong SteamIDAdmin; // m_ulSteamIDAdmin uint64 - internal byte KickedDueToDisconnect; // m_bKickedDueToDisconnect uint8 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(LobbyKicked_t) ); - internal static LobbyKicked_t Fill( IntPtr p ) => ((LobbyKicked_t)(LobbyKicked_t) Marshal.PtrToStructure( p, typeof(LobbyKicked_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamMatchmaking + 12, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamMatchmaking + 12, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamMatchmaking + 12, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct LobbyCreated_t - { - internal Result Result; // m_eResult enum EResult - internal ulong SteamIDLobby; // m_ulSteamIDLobby uint64 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(LobbyCreated_t) ); - internal static LobbyCreated_t Fill( IntPtr p ) => ((LobbyCreated_t)(LobbyCreated_t) Marshal.PtrToStructure( p, typeof(LobbyCreated_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamMatchmaking + 13, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamMatchmaking + 13, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamMatchmaking + 13, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] - internal struct PSNGameBootInviteResult_t - { - [MarshalAs(UnmanagedType.I1)] - internal bool GameBootInviteExists; // m_bGameBootInviteExists _Bool - internal ulong SteamIDLobby; // m_steamIDLobby class CSteamID - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(PSNGameBootInviteResult_t) ); - internal static PSNGameBootInviteResult_t Fill( IntPtr p ) => ((PSNGameBootInviteResult_t)(PSNGameBootInviteResult_t) Marshal.PtrToStructure( p, typeof(PSNGameBootInviteResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamMatchmaking + 15, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamMatchmaking + 15, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamMatchmaking + 15, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct FavoritesListAccountsUpdated_t - { - internal Result Result; // m_eResult enum EResult - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(FavoritesListAccountsUpdated_t) ); - internal static FavoritesListAccountsUpdated_t Fill( IntPtr p ) => ((FavoritesListAccountsUpdated_t)(FavoritesListAccountsUpdated_t) Marshal.PtrToStructure( p, typeof(FavoritesListAccountsUpdated_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamMatchmaking + 16, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamMatchmaking + 16, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamMatchmaking + 16, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] - internal struct SearchForGameProgressCallback_t - { - internal ulong LSearchID; // m_ullSearchID uint64 - internal Result Result; // m_eResult enum EResult - internal ulong LobbyID; // m_lobbyID class CSteamID - internal ulong SteamIDEndedSearch; // m_steamIDEndedSearch class CSteamID - internal int SecondsRemainingEstimate; // m_nSecondsRemainingEstimate int32 - internal int CPlayersSearching; // m_cPlayersSearching int32 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SearchForGameProgressCallback_t) ); - internal static SearchForGameProgressCallback_t Fill( IntPtr p ) => ((SearchForGameProgressCallback_t)(SearchForGameProgressCallback_t) Marshal.PtrToStructure( p, typeof(SearchForGameProgressCallback_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamGameSearch + 1, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamGameSearch + 1, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamGameSearch + 1, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] - internal struct SearchForGameResultCallback_t - { - internal ulong LSearchID; // m_ullSearchID uint64 - internal Result Result; // m_eResult enum EResult - internal int CountPlayersInGame; // m_nCountPlayersInGame int32 - internal int CountAcceptedGame; // m_nCountAcceptedGame int32 - internal ulong SteamIDHost; // m_steamIDHost class CSteamID - [MarshalAs(UnmanagedType.I1)] - internal bool FinalCallback; // m_bFinalCallback _Bool - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SearchForGameResultCallback_t) ); - internal static SearchForGameResultCallback_t Fill( IntPtr p ) => ((SearchForGameResultCallback_t)(SearchForGameResultCallback_t) Marshal.PtrToStructure( p, typeof(SearchForGameResultCallback_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamGameSearch + 2, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamGameSearch + 2, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamGameSearch + 2, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct RequestPlayersForGameProgressCallback_t - { - internal Result Result; // m_eResult enum EResult - internal ulong LSearchID; // m_ullSearchID uint64 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RequestPlayersForGameProgressCallback_t) ); - internal static RequestPlayersForGameProgressCallback_t Fill( IntPtr p ) => ((RequestPlayersForGameProgressCallback_t)(RequestPlayersForGameProgressCallback_t) Marshal.PtrToStructure( p, typeof(RequestPlayersForGameProgressCallback_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamGameSearch + 11, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamGameSearch + 11, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamGameSearch + 11, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] - internal struct RequestPlayersForGameResultCallback_t - { - internal Result Result; // m_eResult enum EResult - internal ulong LSearchID; // m_ullSearchID uint64 - internal ulong SteamIDPlayerFound; // m_SteamIDPlayerFound class CSteamID - internal ulong SteamIDLobby; // m_SteamIDLobby class CSteamID - internal PlayerAcceptState_t PlayerAcceptState; // m_ePlayerAcceptState PlayerAcceptState_t - internal int PlayerIndex; // m_nPlayerIndex int32 - internal int TotalPlayersFound; // m_nTotalPlayersFound int32 - internal int TotalPlayersAcceptedGame; // m_nTotalPlayersAcceptedGame int32 - internal int SuggestedTeamIndex; // m_nSuggestedTeamIndex int32 - internal ulong LUniqueGameID; // m_ullUniqueGameID uint64 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RequestPlayersForGameResultCallback_t) ); - internal static RequestPlayersForGameResultCallback_t Fill( IntPtr p ) => ((RequestPlayersForGameResultCallback_t)(RequestPlayersForGameResultCallback_t) Marshal.PtrToStructure( p, typeof(RequestPlayersForGameResultCallback_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamGameSearch + 12, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamGameSearch + 12, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamGameSearch + 12, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct RequestPlayersForGameFinalResultCallback_t - { - internal Result Result; // m_eResult enum EResult - internal ulong LSearchID; // m_ullSearchID uint64 - internal ulong LUniqueGameID; // m_ullUniqueGameID uint64 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RequestPlayersForGameFinalResultCallback_t) ); - internal static RequestPlayersForGameFinalResultCallback_t Fill( IntPtr p ) => ((RequestPlayersForGameFinalResultCallback_t)(RequestPlayersForGameFinalResultCallback_t) Marshal.PtrToStructure( p, typeof(RequestPlayersForGameFinalResultCallback_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamGameSearch + 13, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamGameSearch + 13, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamGameSearch + 13, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] - internal struct SubmitPlayerResultResultCallback_t - { - internal Result Result; // m_eResult enum EResult - internal ulong UllUniqueGameID; // ullUniqueGameID uint64 - internal ulong SteamIDPlayer; // steamIDPlayer class CSteamID - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SubmitPlayerResultResultCallback_t) ); - internal static SubmitPlayerResultResultCallback_t Fill( IntPtr p ) => ((SubmitPlayerResultResultCallback_t)(SubmitPlayerResultResultCallback_t) Marshal.PtrToStructure( p, typeof(SubmitPlayerResultResultCallback_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamGameSearch + 14, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamGameSearch + 14, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamGameSearch + 14, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct EndGameResultCallback_t - { - internal Result Result; // m_eResult enum EResult - internal ulong UllUniqueGameID; // ullUniqueGameID uint64 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(EndGameResultCallback_t) ); - internal static EndGameResultCallback_t Fill( IntPtr p ) => ((EndGameResultCallback_t)(EndGameResultCallback_t) Marshal.PtrToStructure( p, typeof(EndGameResultCallback_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamGameSearch + 15, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamGameSearch + 15, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamGameSearch + 15, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] - internal struct JoinPartyCallback_t - { - internal Result Result; // m_eResult enum EResult - internal ulong BeaconID; // m_ulBeaconID PartyBeaconID_t - internal ulong SteamIDBeaconOwner; // m_SteamIDBeaconOwner class CSteamID - internal string ConnectStringUTF8() => System.Text.Encoding.UTF8.GetString( ConnectString, 0, System.Array.IndexOf( ConnectString, 0 ) ); - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] // byte[] m_rgchConnectString - internal byte[] ConnectString; // m_rgchConnectString char [256] - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(JoinPartyCallback_t) ); - internal static JoinPartyCallback_t Fill( IntPtr p ) => ((JoinPartyCallback_t)(JoinPartyCallback_t) Marshal.PtrToStructure( p, typeof(JoinPartyCallback_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamParties + 1, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamParties + 1, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamParties + 1, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct CreateBeaconCallback_t - { - internal Result Result; // m_eResult enum EResult - internal ulong BeaconID; // m_ulBeaconID PartyBeaconID_t - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(CreateBeaconCallback_t) ); - internal static CreateBeaconCallback_t Fill( IntPtr p ) => ((CreateBeaconCallback_t)(CreateBeaconCallback_t) Marshal.PtrToStructure( p, typeof(CreateBeaconCallback_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamParties + 2, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamParties + 2, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamParties + 2, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] - internal struct ReservationNotificationCallback_t - { - internal ulong BeaconID; // m_ulBeaconID PartyBeaconID_t - internal ulong SteamIDJoiner; // m_steamIDJoiner class CSteamID - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(ReservationNotificationCallback_t) ); - internal static ReservationNotificationCallback_t Fill( IntPtr p ) => ((ReservationNotificationCallback_t)(ReservationNotificationCallback_t) Marshal.PtrToStructure( p, typeof(ReservationNotificationCallback_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamParties + 3, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamParties + 3, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamParties + 3, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct ChangeNumOpenSlotsCallback_t - { - internal Result Result; // m_eResult enum EResult - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(ChangeNumOpenSlotsCallback_t) ); - internal static ChangeNumOpenSlotsCallback_t Fill( IntPtr p ) => ((ChangeNumOpenSlotsCallback_t)(ChangeNumOpenSlotsCallback_t) Marshal.PtrToStructure( p, typeof(ChangeNumOpenSlotsCallback_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamParties + 4, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamParties + 4, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamParties + 4, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion } [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] @@ -3210,2607 +86,17 @@ namespace Steamworks.Data internal IntPtr Strings; // m_ppStrings const char ** internal int NumStrings; // m_nNumStrings int32 - #region Marshalling - internal static SteamParamStringArray_t Fill( IntPtr p ) => ((SteamParamStringArray_t)(SteamParamStringArray_t) Marshal.PtrToStructure( p, typeof(SteamParamStringArray_t) ) ); - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct RemoteStorageAppSyncedClient_t - { - internal AppId AppID; // m_nAppID AppId_t - internal Result Result; // m_eResult enum EResult - internal int NumDownloads; // m_unNumDownloads int - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageAppSyncedClient_t) ); - internal static RemoteStorageAppSyncedClient_t Fill( IntPtr p ) => ((RemoteStorageAppSyncedClient_t)(RemoteStorageAppSyncedClient_t) Marshal.PtrToStructure( p, typeof(RemoteStorageAppSyncedClient_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientRemoteStorage + 1, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientRemoteStorage + 1, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientRemoteStorage + 1, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct RemoteStorageAppSyncedServer_t - { - internal AppId AppID; // m_nAppID AppId_t - internal Result Result; // m_eResult enum EResult - internal int NumUploads; // m_unNumUploads int - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageAppSyncedServer_t) ); - internal static RemoteStorageAppSyncedServer_t Fill( IntPtr p ) => ((RemoteStorageAppSyncedServer_t)(RemoteStorageAppSyncedServer_t) Marshal.PtrToStructure( p, typeof(RemoteStorageAppSyncedServer_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientRemoteStorage + 2, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientRemoteStorage + 2, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientRemoteStorage + 2, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct RemoteStorageAppSyncProgress_t - { - internal string CurrentFileUTF8() => System.Text.Encoding.UTF8.GetString( CurrentFile, 0, System.Array.IndexOf( CurrentFile, 0 ) ); - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 260)] // byte[] m_rgchCurrentFile - internal byte[] CurrentFile; // m_rgchCurrentFile char [260] - internal AppId AppID; // m_nAppID AppId_t - internal uint BytesTransferredThisChunk; // m_uBytesTransferredThisChunk uint32 - internal double DAppPercentComplete; // m_dAppPercentComplete double - [MarshalAs(UnmanagedType.I1)] - internal bool Uploading; // m_bUploading _Bool - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageAppSyncProgress_t) ); - internal static RemoteStorageAppSyncProgress_t Fill( IntPtr p ) => ((RemoteStorageAppSyncProgress_t)(RemoteStorageAppSyncProgress_t) Marshal.PtrToStructure( p, typeof(RemoteStorageAppSyncProgress_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientRemoteStorage + 3, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientRemoteStorage + 3, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientRemoteStorage + 3, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct RemoteStorageAppSyncStatusCheck_t - { - internal AppId AppID; // m_nAppID AppId_t - internal Result Result; // m_eResult enum EResult - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageAppSyncStatusCheck_t) ); - internal static RemoteStorageAppSyncStatusCheck_t Fill( IntPtr p ) => ((RemoteStorageAppSyncStatusCheck_t)(RemoteStorageAppSyncStatusCheck_t) Marshal.PtrToStructure( p, typeof(RemoteStorageAppSyncStatusCheck_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientRemoteStorage + 5, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientRemoteStorage + 5, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientRemoteStorage + 5, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct RemoteStorageFileShareResult_t - { - internal Result Result; // m_eResult enum EResult - internal ulong File; // m_hFile UGCHandle_t - internal string FilenameUTF8() => System.Text.Encoding.UTF8.GetString( Filename, 0, System.Array.IndexOf( Filename, 0 ) ); - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 260)] // byte[] m_rgchFilename - internal byte[] Filename; // m_rgchFilename char [260] - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageFileShareResult_t) ); - internal static RemoteStorageFileShareResult_t Fill( IntPtr p ) => ((RemoteStorageFileShareResult_t)(RemoteStorageFileShareResult_t) Marshal.PtrToStructure( p, typeof(RemoteStorageFileShareResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientRemoteStorage + 7, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientRemoteStorage + 7, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientRemoteStorage + 7, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct RemoteStoragePublishFileResult_t - { - internal Result Result; // m_eResult enum EResult - internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t - [MarshalAs(UnmanagedType.I1)] - internal bool UserNeedsToAcceptWorkshopLegalAgreement; // m_bUserNeedsToAcceptWorkshopLegalAgreement _Bool - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStoragePublishFileResult_t) ); - internal static RemoteStoragePublishFileResult_t Fill( IntPtr p ) => ((RemoteStoragePublishFileResult_t)(RemoteStoragePublishFileResult_t) Marshal.PtrToStructure( p, typeof(RemoteStoragePublishFileResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientRemoteStorage + 9, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientRemoteStorage + 9, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientRemoteStorage + 9, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct RemoteStorageDeletePublishedFileResult_t - { - internal Result Result; // m_eResult enum EResult - internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageDeletePublishedFileResult_t) ); - internal static RemoteStorageDeletePublishedFileResult_t Fill( IntPtr p ) => ((RemoteStorageDeletePublishedFileResult_t)(RemoteStorageDeletePublishedFileResult_t) Marshal.PtrToStructure( p, typeof(RemoteStorageDeletePublishedFileResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientRemoteStorage + 11, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientRemoteStorage + 11, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientRemoteStorage + 11, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct RemoteStorageEnumerateUserPublishedFilesResult_t - { - internal Result Result; // m_eResult enum EResult - internal int ResultsReturned; // m_nResultsReturned int32 - internal int TotalResultCount; // m_nTotalResultCount int32 - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U8)] - internal PublishedFileId[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageEnumerateUserPublishedFilesResult_t) ); - internal static RemoteStorageEnumerateUserPublishedFilesResult_t Fill( IntPtr p ) => ((RemoteStorageEnumerateUserPublishedFilesResult_t)(RemoteStorageEnumerateUserPublishedFilesResult_t) Marshal.PtrToStructure( p, typeof(RemoteStorageEnumerateUserPublishedFilesResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientRemoteStorage + 12, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientRemoteStorage + 12, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientRemoteStorage + 12, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct RemoteStorageSubscribePublishedFileResult_t - { - internal Result Result; // m_eResult enum EResult - internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageSubscribePublishedFileResult_t) ); - internal static RemoteStorageSubscribePublishedFileResult_t Fill( IntPtr p ) => ((RemoteStorageSubscribePublishedFileResult_t)(RemoteStorageSubscribePublishedFileResult_t) Marshal.PtrToStructure( p, typeof(RemoteStorageSubscribePublishedFileResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientRemoteStorage + 13, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientRemoteStorage + 13, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientRemoteStorage + 13, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct RemoteStorageEnumerateUserSubscribedFilesResult_t - { - internal Result Result; // m_eResult enum EResult - internal int ResultsReturned; // m_nResultsReturned int32 - internal int TotalResultCount; // m_nTotalResultCount int32 - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U8)] - internal PublishedFileId[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U4)] - internal uint[] GRTimeSubscribed; // m_rgRTimeSubscribed uint32 [50] - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageEnumerateUserSubscribedFilesResult_t) ); - internal static RemoteStorageEnumerateUserSubscribedFilesResult_t Fill( IntPtr p ) => ((RemoteStorageEnumerateUserSubscribedFilesResult_t)(RemoteStorageEnumerateUserSubscribedFilesResult_t) Marshal.PtrToStructure( p, typeof(RemoteStorageEnumerateUserSubscribedFilesResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientRemoteStorage + 14, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientRemoteStorage + 14, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientRemoteStorage + 14, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct RemoteStorageUnsubscribePublishedFileResult_t - { - internal Result Result; // m_eResult enum EResult - internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageUnsubscribePublishedFileResult_t) ); - internal static RemoteStorageUnsubscribePublishedFileResult_t Fill( IntPtr p ) => ((RemoteStorageUnsubscribePublishedFileResult_t)(RemoteStorageUnsubscribePublishedFileResult_t) Marshal.PtrToStructure( p, typeof(RemoteStorageUnsubscribePublishedFileResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientRemoteStorage + 15, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientRemoteStorage + 15, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientRemoteStorage + 15, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct RemoteStorageUpdatePublishedFileResult_t - { - internal Result Result; // m_eResult enum EResult - internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t - [MarshalAs(UnmanagedType.I1)] - internal bool UserNeedsToAcceptWorkshopLegalAgreement; // m_bUserNeedsToAcceptWorkshopLegalAgreement _Bool - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageUpdatePublishedFileResult_t) ); - internal static RemoteStorageUpdatePublishedFileResult_t Fill( IntPtr p ) => ((RemoteStorageUpdatePublishedFileResult_t)(RemoteStorageUpdatePublishedFileResult_t) Marshal.PtrToStructure( p, typeof(RemoteStorageUpdatePublishedFileResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientRemoteStorage + 16, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientRemoteStorage + 16, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientRemoteStorage + 16, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct RemoteStorageDownloadUGCResult_t - { - internal Result Result; // m_eResult enum EResult - internal ulong File; // m_hFile UGCHandle_t - internal AppId AppID; // m_nAppID AppId_t - internal int SizeInBytes; // m_nSizeInBytes int32 - internal string PchFileNameUTF8() => System.Text.Encoding.UTF8.GetString( PchFileName, 0, System.Array.IndexOf( PchFileName, 0 ) ); - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 260)] // byte[] m_pchFileName - internal byte[] PchFileName; // m_pchFileName char [260] - internal ulong SteamIDOwner; // m_ulSteamIDOwner uint64 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageDownloadUGCResult_t) ); - internal static RemoteStorageDownloadUGCResult_t Fill( IntPtr p ) => ((RemoteStorageDownloadUGCResult_t)(RemoteStorageDownloadUGCResult_t) Marshal.PtrToStructure( p, typeof(RemoteStorageDownloadUGCResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientRemoteStorage + 17, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientRemoteStorage + 17, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientRemoteStorage + 17, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct RemoteStorageGetPublishedFileDetailsResult_t - { - internal Result Result; // m_eResult enum EResult - internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t - internal AppId CreatorAppID; // m_nCreatorAppID AppId_t - internal AppId ConsumerAppID; // m_nConsumerAppID AppId_t - internal string TitleUTF8() => System.Text.Encoding.UTF8.GetString( Title, 0, System.Array.IndexOf( Title, 0 ) ); - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 129)] // byte[] m_rgchTitle - internal byte[] Title; // m_rgchTitle char [129] - internal string DescriptionUTF8() => System.Text.Encoding.UTF8.GetString( Description, 0, System.Array.IndexOf( Description, 0 ) ); - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8000)] // byte[] m_rgchDescription - internal byte[] Description; // m_rgchDescription char [8000] - internal ulong File; // m_hFile UGCHandle_t - internal ulong PreviewFile; // m_hPreviewFile UGCHandle_t - internal ulong SteamIDOwner; // m_ulSteamIDOwner uint64 - internal uint TimeCreated; // m_rtimeCreated uint32 - internal uint TimeUpdated; // m_rtimeUpdated uint32 - internal RemoteStoragePublishedFileVisibility Visibility; // m_eVisibility enum ERemoteStoragePublishedFileVisibility - [MarshalAs(UnmanagedType.I1)] - internal bool Banned; // m_bBanned _Bool - internal string TagsUTF8() => System.Text.Encoding.UTF8.GetString( Tags, 0, System.Array.IndexOf( Tags, 0 ) ); - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1025)] // byte[] m_rgchTags - internal byte[] Tags; // m_rgchTags char [1025] - [MarshalAs(UnmanagedType.I1)] - internal bool TagsTruncated; // m_bTagsTruncated _Bool - internal string PchFileNameUTF8() => System.Text.Encoding.UTF8.GetString( PchFileName, 0, System.Array.IndexOf( PchFileName, 0 ) ); - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 260)] // byte[] m_pchFileName - internal byte[] PchFileName; // m_pchFileName char [260] - internal int FileSize; // m_nFileSize int32 - internal int PreviewFileSize; // m_nPreviewFileSize int32 - internal string URLUTF8() => System.Text.Encoding.UTF8.GetString( URL, 0, System.Array.IndexOf( URL, 0 ) ); - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] // byte[] m_rgchURL - internal byte[] URL; // m_rgchURL char [256] - internal WorkshopFileType FileType; // m_eFileType enum EWorkshopFileType - [MarshalAs(UnmanagedType.I1)] - internal bool AcceptedForUse; // m_bAcceptedForUse _Bool - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageGetPublishedFileDetailsResult_t) ); - internal static RemoteStorageGetPublishedFileDetailsResult_t Fill( IntPtr p ) => ((RemoteStorageGetPublishedFileDetailsResult_t)(RemoteStorageGetPublishedFileDetailsResult_t) Marshal.PtrToStructure( p, typeof(RemoteStorageGetPublishedFileDetailsResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientRemoteStorage + 18, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientRemoteStorage + 18, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientRemoteStorage + 18, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct RemoteStorageEnumerateWorkshopFilesResult_t - { - internal Result Result; // m_eResult enum EResult - internal int ResultsReturned; // m_nResultsReturned int32 - internal int TotalResultCount; // m_nTotalResultCount int32 - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U8)] - internal PublishedFileId[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.R4)] - internal float[] GScore; // m_rgScore float [50] - internal AppId AppId; // m_nAppId AppId_t - internal uint StartIndex; // m_unStartIndex uint32 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageEnumerateWorkshopFilesResult_t) ); - internal static RemoteStorageEnumerateWorkshopFilesResult_t Fill( IntPtr p ) => ((RemoteStorageEnumerateWorkshopFilesResult_t)(RemoteStorageEnumerateWorkshopFilesResult_t) Marshal.PtrToStructure( p, typeof(RemoteStorageEnumerateWorkshopFilesResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientRemoteStorage + 19, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientRemoteStorage + 19, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientRemoteStorage + 19, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct RemoteStorageGetPublishedItemVoteDetailsResult_t - { - internal Result Result; // m_eResult enum EResult - internal PublishedFileId PublishedFileId; // m_unPublishedFileId PublishedFileId_t - internal int VotesFor; // m_nVotesFor int32 - internal int VotesAgainst; // m_nVotesAgainst int32 - internal int Reports; // m_nReports int32 - internal float FScore; // m_fScore float - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageGetPublishedItemVoteDetailsResult_t) ); - internal static RemoteStorageGetPublishedItemVoteDetailsResult_t Fill( IntPtr p ) => ((RemoteStorageGetPublishedItemVoteDetailsResult_t)(RemoteStorageGetPublishedItemVoteDetailsResult_t) Marshal.PtrToStructure( p, typeof(RemoteStorageGetPublishedItemVoteDetailsResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientRemoteStorage + 20, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientRemoteStorage + 20, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientRemoteStorage + 20, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct RemoteStoragePublishedFileSubscribed_t - { - internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t - internal AppId AppID; // m_nAppID AppId_t - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStoragePublishedFileSubscribed_t) ); - internal static RemoteStoragePublishedFileSubscribed_t Fill( IntPtr p ) => ((RemoteStoragePublishedFileSubscribed_t)(RemoteStoragePublishedFileSubscribed_t) Marshal.PtrToStructure( p, typeof(RemoteStoragePublishedFileSubscribed_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientRemoteStorage + 21, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientRemoteStorage + 21, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientRemoteStorage + 21, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct RemoteStoragePublishedFileUnsubscribed_t - { - internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t - internal AppId AppID; // m_nAppID AppId_t - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStoragePublishedFileUnsubscribed_t) ); - internal static RemoteStoragePublishedFileUnsubscribed_t Fill( IntPtr p ) => ((RemoteStoragePublishedFileUnsubscribed_t)(RemoteStoragePublishedFileUnsubscribed_t) Marshal.PtrToStructure( p, typeof(RemoteStoragePublishedFileUnsubscribed_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientRemoteStorage + 22, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientRemoteStorage + 22, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientRemoteStorage + 22, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct RemoteStoragePublishedFileDeleted_t - { - internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t - internal AppId AppID; // m_nAppID AppId_t - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStoragePublishedFileDeleted_t) ); - internal static RemoteStoragePublishedFileDeleted_t Fill( IntPtr p ) => ((RemoteStoragePublishedFileDeleted_t)(RemoteStoragePublishedFileDeleted_t) Marshal.PtrToStructure( p, typeof(RemoteStoragePublishedFileDeleted_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientRemoteStorage + 23, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientRemoteStorage + 23, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientRemoteStorage + 23, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct RemoteStorageUpdateUserPublishedItemVoteResult_t - { - internal Result Result; // m_eResult enum EResult - internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageUpdateUserPublishedItemVoteResult_t) ); - internal static RemoteStorageUpdateUserPublishedItemVoteResult_t Fill( IntPtr p ) => ((RemoteStorageUpdateUserPublishedItemVoteResult_t)(RemoteStorageUpdateUserPublishedItemVoteResult_t) Marshal.PtrToStructure( p, typeof(RemoteStorageUpdateUserPublishedItemVoteResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientRemoteStorage + 24, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientRemoteStorage + 24, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientRemoteStorage + 24, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct RemoteStorageUserVoteDetails_t - { - internal Result Result; // m_eResult enum EResult - internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t - internal WorkshopVote Vote; // m_eVote enum EWorkshopVote - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageUserVoteDetails_t) ); - internal static RemoteStorageUserVoteDetails_t Fill( IntPtr p ) => ((RemoteStorageUserVoteDetails_t)(RemoteStorageUserVoteDetails_t) Marshal.PtrToStructure( p, typeof(RemoteStorageUserVoteDetails_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientRemoteStorage + 25, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientRemoteStorage + 25, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientRemoteStorage + 25, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct RemoteStorageEnumerateUserSharedWorkshopFilesResult_t - { - internal Result Result; // m_eResult enum EResult - internal int ResultsReturned; // m_nResultsReturned int32 - internal int TotalResultCount; // m_nTotalResultCount int32 - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U8)] - internal PublishedFileId[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageEnumerateUserSharedWorkshopFilesResult_t) ); - internal static RemoteStorageEnumerateUserSharedWorkshopFilesResult_t Fill( IntPtr p ) => ((RemoteStorageEnumerateUserSharedWorkshopFilesResult_t)(RemoteStorageEnumerateUserSharedWorkshopFilesResult_t) Marshal.PtrToStructure( p, typeof(RemoteStorageEnumerateUserSharedWorkshopFilesResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientRemoteStorage + 26, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientRemoteStorage + 26, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientRemoteStorage + 26, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct RemoteStorageSetUserPublishedFileActionResult_t - { - internal Result Result; // m_eResult enum EResult - internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t - internal WorkshopFileAction Action; // m_eAction enum EWorkshopFileAction - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageSetUserPublishedFileActionResult_t) ); - internal static RemoteStorageSetUserPublishedFileActionResult_t Fill( IntPtr p ) => ((RemoteStorageSetUserPublishedFileActionResult_t)(RemoteStorageSetUserPublishedFileActionResult_t) Marshal.PtrToStructure( p, typeof(RemoteStorageSetUserPublishedFileActionResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientRemoteStorage + 27, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientRemoteStorage + 27, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientRemoteStorage + 27, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct RemoteStorageEnumeratePublishedFilesByUserActionResult_t - { - internal Result Result; // m_eResult enum EResult - internal WorkshopFileAction Action; // m_eAction enum EWorkshopFileAction - internal int ResultsReturned; // m_nResultsReturned int32 - internal int TotalResultCount; // m_nTotalResultCount int32 - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U8)] - internal PublishedFileId[] GPublishedFileId; // m_rgPublishedFileId PublishedFileId_t [50] - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 50, ArraySubType = UnmanagedType.U4)] - internal uint[] GRTimeUpdated; // m_rgRTimeUpdated uint32 [50] - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageEnumeratePublishedFilesByUserActionResult_t) ); - internal static RemoteStorageEnumeratePublishedFilesByUserActionResult_t Fill( IntPtr p ) => ((RemoteStorageEnumeratePublishedFilesByUserActionResult_t)(RemoteStorageEnumeratePublishedFilesByUserActionResult_t) Marshal.PtrToStructure( p, typeof(RemoteStorageEnumeratePublishedFilesByUserActionResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientRemoteStorage + 28, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientRemoteStorage + 28, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientRemoteStorage + 28, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct RemoteStoragePublishFileProgress_t - { - internal double DPercentFile; // m_dPercentFile double - [MarshalAs(UnmanagedType.I1)] - internal bool Preview; // m_bPreview _Bool - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStoragePublishFileProgress_t) ); - internal static RemoteStoragePublishFileProgress_t Fill( IntPtr p ) => ((RemoteStoragePublishFileProgress_t)(RemoteStoragePublishFileProgress_t) Marshal.PtrToStructure( p, typeof(RemoteStoragePublishFileProgress_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientRemoteStorage + 29, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientRemoteStorage + 29, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientRemoteStorage + 29, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct RemoteStoragePublishedFileUpdated_t - { - internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t - internal AppId AppID; // m_nAppID AppId_t - internal ulong Unused; // m_ulUnused uint64 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStoragePublishedFileUpdated_t) ); - internal static RemoteStoragePublishedFileUpdated_t Fill( IntPtr p ) => ((RemoteStoragePublishedFileUpdated_t)(RemoteStoragePublishedFileUpdated_t) Marshal.PtrToStructure( p, typeof(RemoteStoragePublishedFileUpdated_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientRemoteStorage + 30, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientRemoteStorage + 30, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientRemoteStorage + 30, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct RemoteStorageFileWriteAsyncComplete_t - { - internal Result Result; // m_eResult enum EResult - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageFileWriteAsyncComplete_t) ); - internal static RemoteStorageFileWriteAsyncComplete_t Fill( IntPtr p ) => ((RemoteStorageFileWriteAsyncComplete_t)(RemoteStorageFileWriteAsyncComplete_t) Marshal.PtrToStructure( p, typeof(RemoteStorageFileWriteAsyncComplete_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientRemoteStorage + 31, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientRemoteStorage + 31, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientRemoteStorage + 31, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct RemoteStorageFileReadAsyncComplete_t - { - internal ulong FileReadAsync; // m_hFileReadAsync SteamAPICall_t - internal Result Result; // m_eResult enum EResult - internal uint Offset; // m_nOffset uint32 - internal uint Read; // m_cubRead uint32 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoteStorageFileReadAsyncComplete_t) ); - internal static RemoteStorageFileReadAsyncComplete_t Fill( IntPtr p ) => ((RemoteStorageFileReadAsyncComplete_t)(RemoteStorageFileReadAsyncComplete_t) Marshal.PtrToStructure( p, typeof(RemoteStorageFileReadAsyncComplete_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientRemoteStorage + 32, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientRemoteStorage + 32, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientRemoteStorage + 32, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion } [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] internal struct LeaderboardEntry_t { - internal ulong SteamIDUser; // m_steamIDUser class CSteamID + internal ulong SteamIDUser; // m_steamIDUser CSteamID internal int GlobalRank; // m_nGlobalRank int32 internal int Score; // m_nScore int32 internal int CDetails; // m_cDetails int32 internal ulong UGC; // m_hUGC UGCHandle_t - #region Marshalling - internal static LeaderboardEntry_t Fill( IntPtr p ) => ((LeaderboardEntry_t)(LeaderboardEntry_t) Marshal.PtrToStructure( p, typeof(LeaderboardEntry_t) ) ); - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] - internal struct UserStatsReceived_t - { - internal ulong GameID; // m_nGameID uint64 - internal Result Result; // m_eResult enum EResult - internal ulong SteamIDUser; // m_steamIDUser class CSteamID - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(UserStatsReceived_t) ); - internal static UserStatsReceived_t Fill( IntPtr p ) => ((UserStatsReceived_t)(UserStatsReceived_t) Marshal.PtrToStructure( p, typeof(UserStatsReceived_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamUserStats + 1, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamUserStats + 1, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamUserStats + 1, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct UserStatsStored_t - { - internal ulong GameID; // m_nGameID uint64 - internal Result Result; // m_eResult enum EResult - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(UserStatsStored_t) ); - internal static UserStatsStored_t Fill( IntPtr p ) => ((UserStatsStored_t)(UserStatsStored_t) Marshal.PtrToStructure( p, typeof(UserStatsStored_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamUserStats + 2, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamUserStats + 2, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamUserStats + 2, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct UserAchievementStored_t - { - internal ulong GameID; // m_nGameID uint64 - [MarshalAs(UnmanagedType.I1)] - internal bool GroupAchievement; // m_bGroupAchievement _Bool - internal string AchievementNameUTF8() => System.Text.Encoding.UTF8.GetString( AchievementName, 0, System.Array.IndexOf( AchievementName, 0 ) ); - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] // byte[] m_rgchAchievementName - internal byte[] AchievementName; // m_rgchAchievementName char [128] - internal uint CurProgress; // m_nCurProgress uint32 - internal uint MaxProgress; // m_nMaxProgress uint32 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(UserAchievementStored_t) ); - internal static UserAchievementStored_t Fill( IntPtr p ) => ((UserAchievementStored_t)(UserAchievementStored_t) Marshal.PtrToStructure( p, typeof(UserAchievementStored_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamUserStats + 3, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamUserStats + 3, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamUserStats + 3, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct LeaderboardFindResult_t - { - internal ulong SteamLeaderboard; // m_hSteamLeaderboard SteamLeaderboard_t - internal byte LeaderboardFound; // m_bLeaderboardFound uint8 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(LeaderboardFindResult_t) ); - internal static LeaderboardFindResult_t Fill( IntPtr p ) => ((LeaderboardFindResult_t)(LeaderboardFindResult_t) Marshal.PtrToStructure( p, typeof(LeaderboardFindResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamUserStats + 4, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamUserStats + 4, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamUserStats + 4, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct LeaderboardScoresDownloaded_t - { - internal ulong SteamLeaderboard; // m_hSteamLeaderboard SteamLeaderboard_t - internal ulong SteamLeaderboardEntries; // m_hSteamLeaderboardEntries SteamLeaderboardEntries_t - internal int CEntryCount; // m_cEntryCount int - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(LeaderboardScoresDownloaded_t) ); - internal static LeaderboardScoresDownloaded_t Fill( IntPtr p ) => ((LeaderboardScoresDownloaded_t)(LeaderboardScoresDownloaded_t) Marshal.PtrToStructure( p, typeof(LeaderboardScoresDownloaded_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamUserStats + 5, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamUserStats + 5, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamUserStats + 5, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct LeaderboardScoreUploaded_t - { - internal byte Success; // m_bSuccess uint8 - internal ulong SteamLeaderboard; // m_hSteamLeaderboard SteamLeaderboard_t - internal int Score; // m_nScore int32 - internal byte ScoreChanged; // m_bScoreChanged uint8 - internal int GlobalRankNew; // m_nGlobalRankNew int - internal int GlobalRankPrevious; // m_nGlobalRankPrevious int - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(LeaderboardScoreUploaded_t) ); - internal static LeaderboardScoreUploaded_t Fill( IntPtr p ) => ((LeaderboardScoreUploaded_t)(LeaderboardScoreUploaded_t) Marshal.PtrToStructure( p, typeof(LeaderboardScoreUploaded_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamUserStats + 6, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamUserStats + 6, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamUserStats + 6, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct NumberOfCurrentPlayers_t - { - internal byte Success; // m_bSuccess uint8 - internal int CPlayers; // m_cPlayers int32 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(NumberOfCurrentPlayers_t) ); - internal static NumberOfCurrentPlayers_t Fill( IntPtr p ) => ((NumberOfCurrentPlayers_t)(NumberOfCurrentPlayers_t) Marshal.PtrToStructure( p, typeof(NumberOfCurrentPlayers_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamUserStats + 7, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamUserStats + 7, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamUserStats + 7, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] - internal struct UserStatsUnloaded_t - { - internal ulong SteamIDUser; // m_steamIDUser class CSteamID - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(UserStatsUnloaded_t) ); - internal static UserStatsUnloaded_t Fill( IntPtr p ) => ((UserStatsUnloaded_t)(UserStatsUnloaded_t) Marshal.PtrToStructure( p, typeof(UserStatsUnloaded_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamUserStats + 8, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamUserStats + 8, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamUserStats + 8, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct UserAchievementIconFetched_t - { - internal GameId GameID; // m_nGameID class CGameID - internal string AchievementNameUTF8() => System.Text.Encoding.UTF8.GetString( AchievementName, 0, System.Array.IndexOf( AchievementName, 0 ) ); - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] // byte[] m_rgchAchievementName - internal byte[] AchievementName; // m_rgchAchievementName char [128] - [MarshalAs(UnmanagedType.I1)] - internal bool Achieved; // m_bAchieved _Bool - internal int IconHandle; // m_nIconHandle int - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(UserAchievementIconFetched_t) ); - internal static UserAchievementIconFetched_t Fill( IntPtr p ) => ((UserAchievementIconFetched_t)(UserAchievementIconFetched_t) Marshal.PtrToStructure( p, typeof(UserAchievementIconFetched_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamUserStats + 9, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamUserStats + 9, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamUserStats + 9, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct GlobalAchievementPercentagesReady_t - { - internal ulong GameID; // m_nGameID uint64 - internal Result Result; // m_eResult enum EResult - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GlobalAchievementPercentagesReady_t) ); - internal static GlobalAchievementPercentagesReady_t Fill( IntPtr p ) => ((GlobalAchievementPercentagesReady_t)(GlobalAchievementPercentagesReady_t) Marshal.PtrToStructure( p, typeof(GlobalAchievementPercentagesReady_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamUserStats + 10, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamUserStats + 10, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamUserStats + 10, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct LeaderboardUGCSet_t - { - internal Result Result; // m_eResult enum EResult - internal ulong SteamLeaderboard; // m_hSteamLeaderboard SteamLeaderboard_t - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(LeaderboardUGCSet_t) ); - internal static LeaderboardUGCSet_t Fill( IntPtr p ) => ((LeaderboardUGCSet_t)(LeaderboardUGCSet_t) Marshal.PtrToStructure( p, typeof(LeaderboardUGCSet_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamUserStats + 11, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamUserStats + 11, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamUserStats + 11, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct PS3TrophiesInstalled_t - { - internal ulong GameID; // m_nGameID uint64 - internal Result Result; // m_eResult enum EResult - internal ulong RequiredDiskSpace; // m_ulRequiredDiskSpace uint64 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(PS3TrophiesInstalled_t) ); - internal static PS3TrophiesInstalled_t Fill( IntPtr p ) => ((PS3TrophiesInstalled_t)(PS3TrophiesInstalled_t) Marshal.PtrToStructure( p, typeof(PS3TrophiesInstalled_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamUserStats + 12, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamUserStats + 12, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamUserStats + 12, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct GlobalStatsReceived_t - { - internal ulong GameID; // m_nGameID uint64 - internal Result Result; // m_eResult enum EResult - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GlobalStatsReceived_t) ); - internal static GlobalStatsReceived_t Fill( IntPtr p ) => ((GlobalStatsReceived_t)(GlobalStatsReceived_t) Marshal.PtrToStructure( p, typeof(GlobalStatsReceived_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamUserStats + 12, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamUserStats + 12, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamUserStats + 12, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct DlcInstalled_t - { - internal AppId AppID; // m_nAppID AppId_t - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(DlcInstalled_t) ); - internal static DlcInstalled_t Fill( IntPtr p ) => ((DlcInstalled_t)(DlcInstalled_t) Marshal.PtrToStructure( p, typeof(DlcInstalled_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamApps + 5, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamApps + 5, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamApps + 5, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct RegisterActivationCodeResponse_t - { - internal RegisterActivationCodeResult Result; // m_eResult enum ERegisterActivationCodeResult - internal uint PackageRegistered; // m_unPackageRegistered uint32 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RegisterActivationCodeResponse_t) ); - internal static RegisterActivationCodeResponse_t Fill( IntPtr p ) => ((RegisterActivationCodeResponse_t)(RegisterActivationCodeResponse_t) Marshal.PtrToStructure( p, typeof(RegisterActivationCodeResponse_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamApps + 8, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamApps + 8, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamApps + 8, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct AppProofOfPurchaseKeyResponse_t - { - internal Result Result; // m_eResult enum EResult - internal uint AppID; // m_nAppID uint32 - internal uint CchKeyLength; // m_cchKeyLength uint32 - internal string KeyUTF8() => System.Text.Encoding.UTF8.GetString( Key, 0, System.Array.IndexOf( Key, 0 ) ); - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 240)] // byte[] m_rgchKey - internal byte[] Key; // m_rgchKey char [240] - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(AppProofOfPurchaseKeyResponse_t) ); - internal static AppProofOfPurchaseKeyResponse_t Fill( IntPtr p ) => ((AppProofOfPurchaseKeyResponse_t)(AppProofOfPurchaseKeyResponse_t) Marshal.PtrToStructure( p, typeof(AppProofOfPurchaseKeyResponse_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamApps + 21, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamApps + 21, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamApps + 21, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct FileDetailsResult_t - { - internal Result Result; // m_eResult enum EResult - internal ulong FileSize; // m_ulFileSize uint64 - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)] // m_FileSHA - internal byte[] FileSHA; // m_FileSHA uint8 [20] - internal uint Flags; // m_unFlags uint32 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(FileDetailsResult_t) ); - internal static FileDetailsResult_t Fill( IntPtr p ) => ((FileDetailsResult_t)(FileDetailsResult_t) Marshal.PtrToStructure( p, typeof(FileDetailsResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamApps + 23, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamApps + 23, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamApps + 23, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion } [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] @@ -5825,789 +111,14 @@ namespace Steamworks.Data internal uint RemoteIP; // m_nRemoteIP uint32 internal ushort RemotePort; // m_nRemotePort uint16 - #region Marshalling - internal static P2PSessionState_t Fill( IntPtr p ) => ((P2PSessionState_t)(P2PSessionState_t) Marshal.PtrToStructure( p, typeof(P2PSessionState_t) ) ); - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] - internal struct P2PSessionRequest_t - { - internal ulong SteamIDRemote; // m_steamIDRemote class CSteamID - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(P2PSessionRequest_t) ); - internal static P2PSessionRequest_t Fill( IntPtr p ) => ((P2PSessionRequest_t)(P2PSessionRequest_t) Marshal.PtrToStructure( p, typeof(P2PSessionRequest_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamNetworking + 2, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamNetworking + 2, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamNetworking + 2, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] - internal struct P2PSessionConnectFail_t - { - internal ulong SteamIDRemote; // m_steamIDRemote class CSteamID - internal byte P2PSessionError; // m_eP2PSessionError uint8 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(P2PSessionConnectFail_t) ); - internal static P2PSessionConnectFail_t Fill( IntPtr p ) => ((P2PSessionConnectFail_t)(P2PSessionConnectFail_t) Marshal.PtrToStructure( p, typeof(P2PSessionConnectFail_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamNetworking + 3, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamNetworking + 3, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamNetworking + 3, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] - internal struct SocketStatusCallback_t - { - internal uint Socket; // m_hSocket SNetSocket_t - internal uint ListenSocket; // m_hListenSocket SNetListenSocket_t - internal ulong SteamIDRemote; // m_steamIDRemote class CSteamID - internal int SNetSocketState; // m_eSNetSocketState int - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SocketStatusCallback_t) ); - internal static SocketStatusCallback_t Fill( IntPtr p ) => ((SocketStatusCallback_t)(SocketStatusCallback_t) Marshal.PtrToStructure( p, typeof(SocketStatusCallback_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamNetworking + 1, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamNetworking + 1, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamNetworking + 1, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct ScreenshotReady_t - { - internal uint Local; // m_hLocal ScreenshotHandle - internal Result Result; // m_eResult enum EResult - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(ScreenshotReady_t) ); - internal static ScreenshotReady_t Fill( IntPtr p ) => ((ScreenshotReady_t)(ScreenshotReady_t) Marshal.PtrToStructure( p, typeof(ScreenshotReady_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamScreenshots + 1, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamScreenshots + 1, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamScreenshots + 1, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct VolumeHasChanged_t - { - internal float NewVolume; // m_flNewVolume float - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(VolumeHasChanged_t) ); - internal static VolumeHasChanged_t Fill( IntPtr p ) => ((VolumeHasChanged_t)(VolumeHasChanged_t) Marshal.PtrToStructure( p, typeof(VolumeHasChanged_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamMusic + 2, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamMusic + 2, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamMusic + 2, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct MusicPlayerWantsShuffled_t - { - [MarshalAs(UnmanagedType.I1)] - internal bool Shuffled; // m_bShuffled _Bool - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(MusicPlayerWantsShuffled_t) ); - internal static MusicPlayerWantsShuffled_t Fill( IntPtr p ) => ((MusicPlayerWantsShuffled_t)(MusicPlayerWantsShuffled_t) Marshal.PtrToStructure( p, typeof(MusicPlayerWantsShuffled_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamMusicRemote + 9, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamMusicRemote + 9, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamMusicRemote + 9, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct MusicPlayerWantsLooped_t - { - [MarshalAs(UnmanagedType.I1)] - internal bool Looped; // m_bLooped _Bool - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(MusicPlayerWantsLooped_t) ); - internal static MusicPlayerWantsLooped_t Fill( IntPtr p ) => ((MusicPlayerWantsLooped_t)(MusicPlayerWantsLooped_t) Marshal.PtrToStructure( p, typeof(MusicPlayerWantsLooped_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamMusicRemote + 10, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamMusicRemote + 10, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamMusicRemote + 10, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct MusicPlayerWantsVolume_t - { - internal float NewVolume; // m_flNewVolume float - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(MusicPlayerWantsVolume_t) ); - internal static MusicPlayerWantsVolume_t Fill( IntPtr p ) => ((MusicPlayerWantsVolume_t)(MusicPlayerWantsVolume_t) Marshal.PtrToStructure( p, typeof(MusicPlayerWantsVolume_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamMusic + 11, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamMusic + 11, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamMusic + 11, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct MusicPlayerSelectsQueueEntry_t - { - internal int NID; // nID int - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(MusicPlayerSelectsQueueEntry_t) ); - internal static MusicPlayerSelectsQueueEntry_t Fill( IntPtr p ) => ((MusicPlayerSelectsQueueEntry_t)(MusicPlayerSelectsQueueEntry_t) Marshal.PtrToStructure( p, typeof(MusicPlayerSelectsQueueEntry_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamMusic + 12, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamMusic + 12, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamMusic + 12, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct MusicPlayerSelectsPlaylistEntry_t - { - internal int NID; // nID int - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(MusicPlayerSelectsPlaylistEntry_t) ); - internal static MusicPlayerSelectsPlaylistEntry_t Fill( IntPtr p ) => ((MusicPlayerSelectsPlaylistEntry_t)(MusicPlayerSelectsPlaylistEntry_t) Marshal.PtrToStructure( p, typeof(MusicPlayerSelectsPlaylistEntry_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamMusic + 13, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamMusic + 13, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamMusic + 13, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct MusicPlayerWantsPlayingRepeatStatus_t - { - internal int PlayingRepeatStatus; // m_nPlayingRepeatStatus int - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(MusicPlayerWantsPlayingRepeatStatus_t) ); - internal static MusicPlayerWantsPlayingRepeatStatus_t Fill( IntPtr p ) => ((MusicPlayerWantsPlayingRepeatStatus_t)(MusicPlayerWantsPlayingRepeatStatus_t) Marshal.PtrToStructure( p, typeof(MusicPlayerWantsPlayingRepeatStatus_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamMusicRemote + 14, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamMusicRemote + 14, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamMusicRemote + 14, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct HTTPRequestCompleted_t - { - internal uint Request; // m_hRequest HTTPRequestHandle - internal ulong ContextValue; // m_ulContextValue uint64 - [MarshalAs(UnmanagedType.I1)] - internal bool RequestSuccessful; // m_bRequestSuccessful _Bool - internal HTTPStatusCode StatusCode; // m_eStatusCode enum EHTTPStatusCode - internal uint BodySize; // m_unBodySize uint32 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTTPRequestCompleted_t) ); - internal static HTTPRequestCompleted_t Fill( IntPtr p ) => ((HTTPRequestCompleted_t)(HTTPRequestCompleted_t) Marshal.PtrToStructure( p, typeof(HTTPRequestCompleted_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientHTTP + 1, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientHTTP + 1, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientHTTP + 1, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct HTTPRequestHeadersReceived_t - { - internal uint Request; // m_hRequest HTTPRequestHandle - internal ulong ContextValue; // m_ulContextValue uint64 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTTPRequestHeadersReceived_t) ); - internal static HTTPRequestHeadersReceived_t Fill( IntPtr p ) => ((HTTPRequestHeadersReceived_t)(HTTPRequestHeadersReceived_t) Marshal.PtrToStructure( p, typeof(HTTPRequestHeadersReceived_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientHTTP + 2, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientHTTP + 2, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientHTTP + 2, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct HTTPRequestDataReceived_t - { - internal uint Request; // m_hRequest HTTPRequestHandle - internal ulong ContextValue; // m_ulContextValue uint64 - internal uint COffset; // m_cOffset uint32 - internal uint CBytesReceived; // m_cBytesReceived uint32 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTTPRequestDataReceived_t) ); - internal static HTTPRequestDataReceived_t Fill( IntPtr p ) => ((HTTPRequestDataReceived_t)(HTTPRequestDataReceived_t) Marshal.PtrToStructure( p, typeof(HTTPRequestDataReceived_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientHTTP + 3, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientHTTP + 3, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientHTTP + 3, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion } [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] internal struct SteamUGCDetails_t { internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t - internal Result Result; // m_eResult enum EResult - internal WorkshopFileType FileType; // m_eFileType enum EWorkshopFileType + internal Result Result; // m_eResult EResult + internal WorkshopFileType FileType; // m_eFileType EWorkshopFileType internal AppId CreatorAppID; // m_nCreatorAppID AppId_t internal AppId ConsumerAppID; // m_nConsumerAppID AppId_t internal string TitleUTF8() => System.Text.Encoding.UTF8.GetString( Title, 0, System.Array.IndexOf( Title, 0 ) ); @@ -6620,13 +131,13 @@ namespace Steamworks.Data internal uint TimeCreated; // m_rtimeCreated uint32 internal uint TimeUpdated; // m_rtimeUpdated uint32 internal uint TimeAddedToUserList; // m_rtimeAddedToUserList uint32 - internal RemoteStoragePublishedFileVisibility Visibility; // m_eVisibility enum ERemoteStoragePublishedFileVisibility + internal RemoteStoragePublishedFileVisibility Visibility; // m_eVisibility ERemoteStoragePublishedFileVisibility [MarshalAs(UnmanagedType.I1)] - internal bool Banned; // m_bBanned _Bool + internal bool Banned; // m_bBanned bool [MarshalAs(UnmanagedType.I1)] - internal bool AcceptedForUse; // m_bAcceptedForUse _Bool + internal bool AcceptedForUse; // m_bAcceptedForUse bool [MarshalAs(UnmanagedType.I1)] - internal bool TagsTruncated; // m_bTagsTruncated _Bool + internal bool TagsTruncated; // m_bTagsTruncated bool internal string TagsUTF8() => System.Text.Encoding.UTF8.GetString( Tags, 0, System.Array.IndexOf( Tags, 0 ) ); [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1025)] // byte[] m_rgchTags internal byte[] Tags; // m_rgchTags char [1025] @@ -6645,2203 +156,6 @@ namespace Steamworks.Data internal float Score; // m_flScore float internal uint NumChildren; // m_unNumChildren uint32 - #region Marshalling - internal static SteamUGCDetails_t Fill( IntPtr p ) => ((SteamUGCDetails_t)(SteamUGCDetails_t) Marshal.PtrToStructure( p, typeof(SteamUGCDetails_t) ) ); - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct SteamUGCQueryCompleted_t - { - internal ulong Handle; // m_handle UGCQueryHandle_t - internal Result Result; // m_eResult enum EResult - internal uint NumResultsReturned; // m_unNumResultsReturned uint32 - internal uint TotalMatchingResults; // m_unTotalMatchingResults uint32 - [MarshalAs(UnmanagedType.I1)] - internal bool CachedData; // m_bCachedData _Bool - internal string NextCursorUTF8() => System.Text.Encoding.UTF8.GetString( NextCursor, 0, System.Array.IndexOf( NextCursor, 0 ) ); - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] // byte[] m_rgchNextCursor - internal byte[] NextCursor; // m_rgchNextCursor char [256] - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamUGCQueryCompleted_t) ); - internal static SteamUGCQueryCompleted_t Fill( IntPtr p ) => ((SteamUGCQueryCompleted_t)(SteamUGCQueryCompleted_t) Marshal.PtrToStructure( p, typeof(SteamUGCQueryCompleted_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientUGC + 1, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientUGC + 1, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientUGC + 1, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct SteamUGCRequestUGCDetailsResult_t - { - internal SteamUGCDetails_t Details; // m_details struct SteamUGCDetails_t - [MarshalAs(UnmanagedType.I1)] - internal bool CachedData; // m_bCachedData _Bool - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamUGCRequestUGCDetailsResult_t) ); - internal static SteamUGCRequestUGCDetailsResult_t Fill( IntPtr p ) => ((SteamUGCRequestUGCDetailsResult_t)(SteamUGCRequestUGCDetailsResult_t) Marshal.PtrToStructure( p, typeof(SteamUGCRequestUGCDetailsResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientUGC + 2, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientUGC + 2, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientUGC + 2, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct CreateItemResult_t - { - internal Result Result; // m_eResult enum EResult - internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t - [MarshalAs(UnmanagedType.I1)] - internal bool UserNeedsToAcceptWorkshopLegalAgreement; // m_bUserNeedsToAcceptWorkshopLegalAgreement _Bool - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(CreateItemResult_t) ); - internal static CreateItemResult_t Fill( IntPtr p ) => ((CreateItemResult_t)(CreateItemResult_t) Marshal.PtrToStructure( p, typeof(CreateItemResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientUGC + 3, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientUGC + 3, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientUGC + 3, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct SubmitItemUpdateResult_t - { - internal Result Result; // m_eResult enum EResult - [MarshalAs(UnmanagedType.I1)] - internal bool UserNeedsToAcceptWorkshopLegalAgreement; // m_bUserNeedsToAcceptWorkshopLegalAgreement _Bool - internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SubmitItemUpdateResult_t) ); - internal static SubmitItemUpdateResult_t Fill( IntPtr p ) => ((SubmitItemUpdateResult_t)(SubmitItemUpdateResult_t) Marshal.PtrToStructure( p, typeof(SubmitItemUpdateResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientUGC + 4, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientUGC + 4, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientUGC + 4, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct DownloadItemResult_t - { - internal AppId AppID; // m_unAppID AppId_t - internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t - internal Result Result; // m_eResult enum EResult - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(DownloadItemResult_t) ); - internal static DownloadItemResult_t Fill( IntPtr p ) => ((DownloadItemResult_t)(DownloadItemResult_t) Marshal.PtrToStructure( p, typeof(DownloadItemResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientUGC + 6, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientUGC + 6, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientUGC + 6, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct UserFavoriteItemsListChanged_t - { - internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t - internal Result Result; // m_eResult enum EResult - [MarshalAs(UnmanagedType.I1)] - internal bool WasAddRequest; // m_bWasAddRequest _Bool - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(UserFavoriteItemsListChanged_t) ); - internal static UserFavoriteItemsListChanged_t Fill( IntPtr p ) => ((UserFavoriteItemsListChanged_t)(UserFavoriteItemsListChanged_t) Marshal.PtrToStructure( p, typeof(UserFavoriteItemsListChanged_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientUGC + 7, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientUGC + 7, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientUGC + 7, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct SetUserItemVoteResult_t - { - internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t - internal Result Result; // m_eResult enum EResult - [MarshalAs(UnmanagedType.I1)] - internal bool VoteUp; // m_bVoteUp _Bool - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SetUserItemVoteResult_t) ); - internal static SetUserItemVoteResult_t Fill( IntPtr p ) => ((SetUserItemVoteResult_t)(SetUserItemVoteResult_t) Marshal.PtrToStructure( p, typeof(SetUserItemVoteResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientUGC + 8, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientUGC + 8, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientUGC + 8, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct GetUserItemVoteResult_t - { - internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t - internal Result Result; // m_eResult enum EResult - [MarshalAs(UnmanagedType.I1)] - internal bool VotedUp; // m_bVotedUp _Bool - [MarshalAs(UnmanagedType.I1)] - internal bool VotedDown; // m_bVotedDown _Bool - [MarshalAs(UnmanagedType.I1)] - internal bool VoteSkipped; // m_bVoteSkipped _Bool - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GetUserItemVoteResult_t) ); - internal static GetUserItemVoteResult_t Fill( IntPtr p ) => ((GetUserItemVoteResult_t)(GetUserItemVoteResult_t) Marshal.PtrToStructure( p, typeof(GetUserItemVoteResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientUGC + 9, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientUGC + 9, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientUGC + 9, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct StartPlaytimeTrackingResult_t - { - internal Result Result; // m_eResult enum EResult - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(StartPlaytimeTrackingResult_t) ); - internal static StartPlaytimeTrackingResult_t Fill( IntPtr p ) => ((StartPlaytimeTrackingResult_t)(StartPlaytimeTrackingResult_t) Marshal.PtrToStructure( p, typeof(StartPlaytimeTrackingResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientUGC + 10, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientUGC + 10, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientUGC + 10, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct StopPlaytimeTrackingResult_t - { - internal Result Result; // m_eResult enum EResult - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(StopPlaytimeTrackingResult_t) ); - internal static StopPlaytimeTrackingResult_t Fill( IntPtr p ) => ((StopPlaytimeTrackingResult_t)(StopPlaytimeTrackingResult_t) Marshal.PtrToStructure( p, typeof(StopPlaytimeTrackingResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientUGC + 11, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientUGC + 11, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientUGC + 11, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct AddUGCDependencyResult_t - { - internal Result Result; // m_eResult enum EResult - internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t - internal PublishedFileId ChildPublishedFileId; // m_nChildPublishedFileId PublishedFileId_t - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(AddUGCDependencyResult_t) ); - internal static AddUGCDependencyResult_t Fill( IntPtr p ) => ((AddUGCDependencyResult_t)(AddUGCDependencyResult_t) Marshal.PtrToStructure( p, typeof(AddUGCDependencyResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientUGC + 12, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientUGC + 12, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientUGC + 12, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct RemoveUGCDependencyResult_t - { - internal Result Result; // m_eResult enum EResult - internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t - internal PublishedFileId ChildPublishedFileId; // m_nChildPublishedFileId PublishedFileId_t - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoveUGCDependencyResult_t) ); - internal static RemoveUGCDependencyResult_t Fill( IntPtr p ) => ((RemoveUGCDependencyResult_t)(RemoveUGCDependencyResult_t) Marshal.PtrToStructure( p, typeof(RemoveUGCDependencyResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientUGC + 13, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientUGC + 13, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientUGC + 13, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct AddAppDependencyResult_t - { - internal Result Result; // m_eResult enum EResult - internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t - internal AppId AppID; // m_nAppID AppId_t - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(AddAppDependencyResult_t) ); - internal static AddAppDependencyResult_t Fill( IntPtr p ) => ((AddAppDependencyResult_t)(AddAppDependencyResult_t) Marshal.PtrToStructure( p, typeof(AddAppDependencyResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientUGC + 14, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientUGC + 14, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientUGC + 14, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct RemoveAppDependencyResult_t - { - internal Result Result; // m_eResult enum EResult - internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t - internal AppId AppID; // m_nAppID AppId_t - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(RemoveAppDependencyResult_t) ); - internal static RemoveAppDependencyResult_t Fill( IntPtr p ) => ((RemoveAppDependencyResult_t)(RemoveAppDependencyResult_t) Marshal.PtrToStructure( p, typeof(RemoveAppDependencyResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientUGC + 15, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientUGC + 15, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientUGC + 15, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct GetAppDependenciesResult_t - { - internal Result Result; // m_eResult enum EResult - internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32, ArraySubType = UnmanagedType.U4)] - internal AppId[] GAppIDs; // m_rgAppIDs AppId_t [32] - internal uint NumAppDependencies; // m_nNumAppDependencies uint32 - internal uint TotalNumAppDependencies; // m_nTotalNumAppDependencies uint32 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GetAppDependenciesResult_t) ); - internal static GetAppDependenciesResult_t Fill( IntPtr p ) => ((GetAppDependenciesResult_t)(GetAppDependenciesResult_t) Marshal.PtrToStructure( p, typeof(GetAppDependenciesResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientUGC + 16, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientUGC + 16, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientUGC + 16, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct DeleteItemResult_t - { - internal Result Result; // m_eResult enum EResult - internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(DeleteItemResult_t) ); - internal static DeleteItemResult_t Fill( IntPtr p ) => ((DeleteItemResult_t)(DeleteItemResult_t) Marshal.PtrToStructure( p, typeof(DeleteItemResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientUGC + 17, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientUGC + 17, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientUGC + 17, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct SteamAppInstalled_t - { - internal AppId AppID; // m_nAppID AppId_t - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamAppInstalled_t) ); - internal static SteamAppInstalled_t Fill( IntPtr p ) => ((SteamAppInstalled_t)(SteamAppInstalled_t) Marshal.PtrToStructure( p, typeof(SteamAppInstalled_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamAppList + 1, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamAppList + 1, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamAppList + 1, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct SteamAppUninstalled_t - { - internal AppId AppID; // m_nAppID AppId_t - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamAppUninstalled_t) ); - internal static SteamAppUninstalled_t Fill( IntPtr p ) => ((SteamAppUninstalled_t)(SteamAppUninstalled_t) Marshal.PtrToStructure( p, typeof(SteamAppUninstalled_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamAppList + 2, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamAppList + 2, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamAppList + 2, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct HTML_BrowserReady_t - { - internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_BrowserReady_t) ); - internal static HTML_BrowserReady_t Fill( IntPtr p ) => ((HTML_BrowserReady_t)(HTML_BrowserReady_t) Marshal.PtrToStructure( p, typeof(HTML_BrowserReady_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamHTMLSurface + 1, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamHTMLSurface + 1, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamHTMLSurface + 1, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct HTML_NeedsPaint_t - { - internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser - internal string PBGRA; // pBGRA const char * - internal uint UnWide; // unWide uint32 - internal uint UnTall; // unTall uint32 - internal uint UnUpdateX; // unUpdateX uint32 - internal uint UnUpdateY; // unUpdateY uint32 - internal uint UnUpdateWide; // unUpdateWide uint32 - internal uint UnUpdateTall; // unUpdateTall uint32 - internal uint UnScrollX; // unScrollX uint32 - internal uint UnScrollY; // unScrollY uint32 - internal float FlPageScale; // flPageScale float - internal uint UnPageSerial; // unPageSerial uint32 - - #region Marshalling - internal static HTML_NeedsPaint_t Fill( IntPtr p ) => ((HTML_NeedsPaint_t)(HTML_NeedsPaint_t) Marshal.PtrToStructure( p, typeof(HTML_NeedsPaint_t) ) ); - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct HTML_StartRequest_t - { - internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser - internal string PchURL; // pchURL const char * - internal string PchTarget; // pchTarget const char * - internal string PchPostData; // pchPostData const char * - [MarshalAs(UnmanagedType.I1)] - internal bool BIsRedirect; // bIsRedirect _Bool - - #region Marshalling - internal static HTML_StartRequest_t Fill( IntPtr p ) => ((HTML_StartRequest_t)(HTML_StartRequest_t) Marshal.PtrToStructure( p, typeof(HTML_StartRequest_t) ) ); - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct HTML_CloseBrowser_t - { - internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser - - #region Marshalling - internal static HTML_CloseBrowser_t Fill( IntPtr p ) => ((HTML_CloseBrowser_t)(HTML_CloseBrowser_t) Marshal.PtrToStructure( p, typeof(HTML_CloseBrowser_t) ) ); - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct HTML_URLChanged_t - { - internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser - internal string PchURL; // pchURL const char * - internal string PchPostData; // pchPostData const char * - [MarshalAs(UnmanagedType.I1)] - internal bool BIsRedirect; // bIsRedirect _Bool - internal string PchPageTitle; // pchPageTitle const char * - [MarshalAs(UnmanagedType.I1)] - internal bool BNewNavigation; // bNewNavigation _Bool - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_URLChanged_t) ); - internal static HTML_URLChanged_t Fill( IntPtr p ) => ((HTML_URLChanged_t)(HTML_URLChanged_t) Marshal.PtrToStructure( p, typeof(HTML_URLChanged_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamHTMLSurface + 5, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamHTMLSurface + 5, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamHTMLSurface + 5, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct HTML_FinishedRequest_t - { - internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser - internal string PchURL; // pchURL const char * - internal string PchPageTitle; // pchPageTitle const char * - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_FinishedRequest_t) ); - internal static HTML_FinishedRequest_t Fill( IntPtr p ) => ((HTML_FinishedRequest_t)(HTML_FinishedRequest_t) Marshal.PtrToStructure( p, typeof(HTML_FinishedRequest_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamHTMLSurface + 6, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamHTMLSurface + 6, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamHTMLSurface + 6, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct HTML_OpenLinkInNewTab_t - { - internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser - internal string PchURL; // pchURL const char * - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_OpenLinkInNewTab_t) ); - internal static HTML_OpenLinkInNewTab_t Fill( IntPtr p ) => ((HTML_OpenLinkInNewTab_t)(HTML_OpenLinkInNewTab_t) Marshal.PtrToStructure( p, typeof(HTML_OpenLinkInNewTab_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamHTMLSurface + 7, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamHTMLSurface + 7, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamHTMLSurface + 7, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct HTML_ChangedTitle_t - { - internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser - internal string PchTitle; // pchTitle const char * - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_ChangedTitle_t) ); - internal static HTML_ChangedTitle_t Fill( IntPtr p ) => ((HTML_ChangedTitle_t)(HTML_ChangedTitle_t) Marshal.PtrToStructure( p, typeof(HTML_ChangedTitle_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamHTMLSurface + 8, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamHTMLSurface + 8, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamHTMLSurface + 8, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct HTML_SearchResults_t - { - internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser - internal uint UnResults; // unResults uint32 - internal uint UnCurrentMatch; // unCurrentMatch uint32 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_SearchResults_t) ); - internal static HTML_SearchResults_t Fill( IntPtr p ) => ((HTML_SearchResults_t)(HTML_SearchResults_t) Marshal.PtrToStructure( p, typeof(HTML_SearchResults_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamHTMLSurface + 9, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamHTMLSurface + 9, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamHTMLSurface + 9, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct HTML_CanGoBackAndForward_t - { - internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser - [MarshalAs(UnmanagedType.I1)] - internal bool BCanGoBack; // bCanGoBack _Bool - [MarshalAs(UnmanagedType.I1)] - internal bool BCanGoForward; // bCanGoForward _Bool - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_CanGoBackAndForward_t) ); - internal static HTML_CanGoBackAndForward_t Fill( IntPtr p ) => ((HTML_CanGoBackAndForward_t)(HTML_CanGoBackAndForward_t) Marshal.PtrToStructure( p, typeof(HTML_CanGoBackAndForward_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamHTMLSurface + 10, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamHTMLSurface + 10, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamHTMLSurface + 10, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct HTML_HorizontalScroll_t - { - internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser - internal uint UnScrollMax; // unScrollMax uint32 - internal uint UnScrollCurrent; // unScrollCurrent uint32 - internal float FlPageScale; // flPageScale float - [MarshalAs(UnmanagedType.I1)] - internal bool BVisible; // bVisible _Bool - internal uint UnPageSize; // unPageSize uint32 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_HorizontalScroll_t) ); - internal static HTML_HorizontalScroll_t Fill( IntPtr p ) => ((HTML_HorizontalScroll_t)(HTML_HorizontalScroll_t) Marshal.PtrToStructure( p, typeof(HTML_HorizontalScroll_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamHTMLSurface + 11, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamHTMLSurface + 11, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamHTMLSurface + 11, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct HTML_VerticalScroll_t - { - internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser - internal uint UnScrollMax; // unScrollMax uint32 - internal uint UnScrollCurrent; // unScrollCurrent uint32 - internal float FlPageScale; // flPageScale float - [MarshalAs(UnmanagedType.I1)] - internal bool BVisible; // bVisible _Bool - internal uint UnPageSize; // unPageSize uint32 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_VerticalScroll_t) ); - internal static HTML_VerticalScroll_t Fill( IntPtr p ) => ((HTML_VerticalScroll_t)(HTML_VerticalScroll_t) Marshal.PtrToStructure( p, typeof(HTML_VerticalScroll_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamHTMLSurface + 12, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamHTMLSurface + 12, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamHTMLSurface + 12, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct HTML_LinkAtPosition_t - { - internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser - internal uint X; // x uint32 - internal uint Y; // y uint32 - internal string PchURL; // pchURL const char * - [MarshalAs(UnmanagedType.I1)] - internal bool BInput; // bInput _Bool - [MarshalAs(UnmanagedType.I1)] - internal bool BLiveLink; // bLiveLink _Bool - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_LinkAtPosition_t) ); - internal static HTML_LinkAtPosition_t Fill( IntPtr p ) => ((HTML_LinkAtPosition_t)(HTML_LinkAtPosition_t) Marshal.PtrToStructure( p, typeof(HTML_LinkAtPosition_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamHTMLSurface + 13, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamHTMLSurface + 13, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamHTMLSurface + 13, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct HTML_JSAlert_t - { - internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser - internal string PchMessage; // pchMessage const char * - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_JSAlert_t) ); - internal static HTML_JSAlert_t Fill( IntPtr p ) => ((HTML_JSAlert_t)(HTML_JSAlert_t) Marshal.PtrToStructure( p, typeof(HTML_JSAlert_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamHTMLSurface + 14, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamHTMLSurface + 14, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamHTMLSurface + 14, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct HTML_JSConfirm_t - { - internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser - internal string PchMessage; // pchMessage const char * - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_JSConfirm_t) ); - internal static HTML_JSConfirm_t Fill( IntPtr p ) => ((HTML_JSConfirm_t)(HTML_JSConfirm_t) Marshal.PtrToStructure( p, typeof(HTML_JSConfirm_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamHTMLSurface + 15, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamHTMLSurface + 15, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamHTMLSurface + 15, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct HTML_FileOpenDialog_t - { - internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser - internal string PchTitle; // pchTitle const char * - internal string PchInitialFile; // pchInitialFile const char * - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_FileOpenDialog_t) ); - internal static HTML_FileOpenDialog_t Fill( IntPtr p ) => ((HTML_FileOpenDialog_t)(HTML_FileOpenDialog_t) Marshal.PtrToStructure( p, typeof(HTML_FileOpenDialog_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamHTMLSurface + 16, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamHTMLSurface + 16, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamHTMLSurface + 16, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct HTML_NewWindow_t - { - internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser - internal string PchURL; // pchURL const char * - internal uint UnX; // unX uint32 - internal uint UnY; // unY uint32 - internal uint UnWide; // unWide uint32 - internal uint UnTall; // unTall uint32 - internal uint UnNewWindow_BrowserHandle_IGNORE; // unNewWindow_BrowserHandle_IGNORE HHTMLBrowser - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_NewWindow_t) ); - internal static HTML_NewWindow_t Fill( IntPtr p ) => ((HTML_NewWindow_t)(HTML_NewWindow_t) Marshal.PtrToStructure( p, typeof(HTML_NewWindow_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamHTMLSurface + 21, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamHTMLSurface + 21, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamHTMLSurface + 21, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct HTML_SetCursor_t - { - internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser - internal uint EMouseCursor; // eMouseCursor uint32 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_SetCursor_t) ); - internal static HTML_SetCursor_t Fill( IntPtr p ) => ((HTML_SetCursor_t)(HTML_SetCursor_t) Marshal.PtrToStructure( p, typeof(HTML_SetCursor_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamHTMLSurface + 22, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamHTMLSurface + 22, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamHTMLSurface + 22, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct HTML_StatusText_t - { - internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser - internal string PchMsg; // pchMsg const char * - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_StatusText_t) ); - internal static HTML_StatusText_t Fill( IntPtr p ) => ((HTML_StatusText_t)(HTML_StatusText_t) Marshal.PtrToStructure( p, typeof(HTML_StatusText_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamHTMLSurface + 23, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamHTMLSurface + 23, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamHTMLSurface + 23, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct HTML_ShowToolTip_t - { - internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser - internal string PchMsg; // pchMsg const char * - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_ShowToolTip_t) ); - internal static HTML_ShowToolTip_t Fill( IntPtr p ) => ((HTML_ShowToolTip_t)(HTML_ShowToolTip_t) Marshal.PtrToStructure( p, typeof(HTML_ShowToolTip_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamHTMLSurface + 24, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamHTMLSurface + 24, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamHTMLSurface + 24, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct HTML_UpdateToolTip_t - { - internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser - internal string PchMsg; // pchMsg const char * - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_UpdateToolTip_t) ); - internal static HTML_UpdateToolTip_t Fill( IntPtr p ) => ((HTML_UpdateToolTip_t)(HTML_UpdateToolTip_t) Marshal.PtrToStructure( p, typeof(HTML_UpdateToolTip_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamHTMLSurface + 25, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamHTMLSurface + 25, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamHTMLSurface + 25, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct HTML_HideToolTip_t - { - internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_HideToolTip_t) ); - internal static HTML_HideToolTip_t Fill( IntPtr p ) => ((HTML_HideToolTip_t)(HTML_HideToolTip_t) Marshal.PtrToStructure( p, typeof(HTML_HideToolTip_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamHTMLSurface + 26, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamHTMLSurface + 26, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamHTMLSurface + 26, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct HTML_BrowserRestarted_t - { - internal uint UnBrowserHandle; // unBrowserHandle HHTMLBrowser - internal uint UnOldBrowserHandle; // unOldBrowserHandle HHTMLBrowser - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(HTML_BrowserRestarted_t) ); - internal static HTML_BrowserRestarted_t Fill( IntPtr p ) => ((HTML_BrowserRestarted_t)(HTML_BrowserRestarted_t) Marshal.PtrToStructure( p, typeof(HTML_BrowserRestarted_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamHTMLSurface + 27, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamHTMLSurface + 27, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamHTMLSurface + 27, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion } [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] @@ -8852,2107 +166,40 @@ namespace Steamworks.Data internal ushort Quantity; // m_unQuantity uint16 internal ushort Flags; // m_unFlags uint16 - #region Marshalling - internal static SteamItemDetails_t Fill( IntPtr p ) => ((SteamItemDetails_t)(SteamItemDetails_t) Marshal.PtrToStructure( p, typeof(SteamItemDetails_t) ) ); - #endregion } [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct SteamInventoryResultReady_t + internal struct SteamTVRegion_t { - internal int Handle; // m_handle SteamInventoryResult_t - internal Result Result; // m_result enum EResult + internal uint UnMinX; // unMinX uint32 + internal uint UnMinY; // unMinY uint32 + internal uint UnMaxX; // unMaxX uint32 + internal uint UnMaxY; // unMaxY uint32 - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamInventoryResultReady_t) ); - internal static SteamInventoryResultReady_t Fill( IntPtr p ) => ((SteamInventoryResultReady_t)(SteamInventoryResultReady_t) Marshal.PtrToStructure( p, typeof(SteamInventoryResultReady_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientInventory + 0, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientInventory + 0, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientInventory + 0, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion } [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct SteamInventoryFullUpdate_t + internal struct SteamDatagramHostedAddress { - internal int Handle; // m_handle SteamInventoryResult_t + internal int CbSize; // m_cbSize int + internal string DataUTF8() => System.Text.Encoding.UTF8.GetString( Data, 0, System.Array.IndexOf( Data, 0 ) ); + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] // byte[] m_data + internal byte[] Data; // m_data char [128] - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamInventoryFullUpdate_t) ); - internal static SteamInventoryFullUpdate_t Fill( IntPtr p ) => ((SteamInventoryFullUpdate_t)(SteamInventoryFullUpdate_t) Marshal.PtrToStructure( p, typeof(SteamInventoryFullUpdate_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientInventory + 1, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientInventory + 1, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientInventory + 1, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] - internal struct SteamInventoryEligiblePromoItemDefIDs_t - { - internal Result Result; // m_result enum EResult - internal ulong SteamID; // m_steamID class CSteamID - internal int UmEligiblePromoItemDefs; // m_numEligiblePromoItemDefs int - [MarshalAs(UnmanagedType.I1)] - internal bool CachedData; // m_bCachedData _Bool - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamInventoryEligiblePromoItemDefIDs_t) ); - internal static SteamInventoryEligiblePromoItemDefIDs_t Fill( IntPtr p ) => ((SteamInventoryEligiblePromoItemDefIDs_t)(SteamInventoryEligiblePromoItemDefIDs_t) Marshal.PtrToStructure( p, typeof(SteamInventoryEligiblePromoItemDefIDs_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientInventory + 3, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientInventory + 3, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientInventory + 3, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion } [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct SteamInventoryStartPurchaseResult_t + internal struct SteamDatagramGameCoordinatorServerLogin { - internal Result Result; // m_result enum EResult - internal ulong OrderID; // m_ulOrderID uint64 - internal ulong TransID; // m_ulTransID uint64 + internal NetIdentity Dentity; // m_identity SteamNetworkingIdentity + internal SteamDatagramHostedAddress Outing; // m_routing SteamDatagramHostedAddress + internal AppId AppID; // m_nAppID AppId_t + internal uint Time; // m_rtime RTime32 + internal int CbAppData; // m_cbAppData int + internal string AppDataUTF8() => System.Text.Encoding.UTF8.GetString( AppData, 0, System.Array.IndexOf( AppData, 0 ) ); + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2048)] // byte[] m_appData + internal byte[] AppData; // m_appData char [2048] - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamInventoryStartPurchaseResult_t) ); - internal static SteamInventoryStartPurchaseResult_t Fill( IntPtr p ) => ((SteamInventoryStartPurchaseResult_t)(SteamInventoryStartPurchaseResult_t) Marshal.PtrToStructure( p, typeof(SteamInventoryStartPurchaseResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientInventory + 4, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientInventory + 4, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientInventory + 4, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct SteamInventoryRequestPricesResult_t - { - internal Result Result; // m_result enum EResult - internal string CurrencyUTF8() => System.Text.Encoding.UTF8.GetString( Currency, 0, System.Array.IndexOf( Currency, 0 ) ); - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] // byte[] m_rgchCurrency - internal byte[] Currency; // m_rgchCurrency char [4] - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamInventoryRequestPricesResult_t) ); - internal static SteamInventoryRequestPricesResult_t Fill( IntPtr p ) => ((SteamInventoryRequestPricesResult_t)(SteamInventoryRequestPricesResult_t) Marshal.PtrToStructure( p, typeof(SteamInventoryRequestPricesResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientInventory + 5, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientInventory + 5, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientInventory + 5, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct BroadcastUploadStop_t - { - internal BroadcastUploadResult Result; // m_eResult enum EBroadcastUploadResult - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(BroadcastUploadStop_t) ); - internal static BroadcastUploadStop_t Fill( IntPtr p ) => ((BroadcastUploadStop_t)(BroadcastUploadStop_t) Marshal.PtrToStructure( p, typeof(BroadcastUploadStop_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientVideo + 5, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientVideo + 5, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientVideo + 5, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct GetVideoURLResult_t - { - internal Result Result; // m_eResult enum EResult - internal AppId VideoAppID; // m_unVideoAppID AppId_t - internal string URLUTF8() => System.Text.Encoding.UTF8.GetString( URL, 0, System.Array.IndexOf( URL, 0 ) ); - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] // byte[] m_rgchURL - internal byte[] URL; // m_rgchURL char [256] - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GetVideoURLResult_t) ); - internal static GetVideoURLResult_t Fill( IntPtr p ) => ((GetVideoURLResult_t)(GetVideoURLResult_t) Marshal.PtrToStructure( p, typeof(GetVideoURLResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientVideo + 11, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientVideo + 11, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientVideo + 11, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct GetOPFSettingsResult_t - { - internal Result Result; // m_eResult enum EResult - internal AppId VideoAppID; // m_unVideoAppID AppId_t - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GetOPFSettingsResult_t) ); - internal static GetOPFSettingsResult_t Fill( IntPtr p ) => ((GetOPFSettingsResult_t)(GetOPFSettingsResult_t) Marshal.PtrToStructure( p, typeof(GetOPFSettingsResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientVideo + 24, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientVideo + 24, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientVideo + 24, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] - internal struct GSClientApprove_t - { - internal ulong SteamID; // m_SteamID class CSteamID - internal ulong OwnerSteamID; // m_OwnerSteamID class CSteamID - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GSClientApprove_t) ); - internal static GSClientApprove_t Fill( IntPtr p ) => ((GSClientApprove_t)(GSClientApprove_t) Marshal.PtrToStructure( p, typeof(GSClientApprove_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamGameServer + 1, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamGameServer + 1, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamGameServer + 1, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] - internal struct GSClientDeny_t - { - internal ulong SteamID; // m_SteamID class CSteamID - internal DenyReason DenyReason; // m_eDenyReason enum EDenyReason - internal string OptionalTextUTF8() => System.Text.Encoding.UTF8.GetString( OptionalText, 0, System.Array.IndexOf( OptionalText, 0 ) ); - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] // byte[] m_rgchOptionalText - internal byte[] OptionalText; // m_rgchOptionalText char [128] - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GSClientDeny_t) ); - internal static GSClientDeny_t Fill( IntPtr p ) => ((GSClientDeny_t)(GSClientDeny_t) Marshal.PtrToStructure( p, typeof(GSClientDeny_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamGameServer + 2, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamGameServer + 2, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamGameServer + 2, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] - internal struct GSClientKick_t - { - internal ulong SteamID; // m_SteamID class CSteamID - internal DenyReason DenyReason; // m_eDenyReason enum EDenyReason - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GSClientKick_t) ); - internal static GSClientKick_t Fill( IntPtr p ) => ((GSClientKick_t)(GSClientKick_t) Marshal.PtrToStructure( p, typeof(GSClientKick_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamGameServer + 3, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamGameServer + 3, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamGameServer + 3, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct GSClientAchievementStatus_t - { - internal ulong SteamID; // m_SteamID uint64 - internal string PchAchievementUTF8() => System.Text.Encoding.UTF8.GetString( PchAchievement, 0, System.Array.IndexOf( PchAchievement, 0 ) ); - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] // byte[] m_pchAchievement - internal byte[] PchAchievement; // m_pchAchievement char [128] - [MarshalAs(UnmanagedType.I1)] - internal bool Unlocked; // m_bUnlocked _Bool - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GSClientAchievementStatus_t) ); - internal static GSClientAchievementStatus_t Fill( IntPtr p ) => ((GSClientAchievementStatus_t)(GSClientAchievementStatus_t) Marshal.PtrToStructure( p, typeof(GSClientAchievementStatus_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamGameServer + 6, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamGameServer + 6, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamGameServer + 6, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct GSPolicyResponse_t - { - internal byte Secure; // m_bSecure uint8 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GSPolicyResponse_t) ); - internal static GSPolicyResponse_t Fill( IntPtr p ) => ((GSPolicyResponse_t)(GSPolicyResponse_t) Marshal.PtrToStructure( p, typeof(GSPolicyResponse_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamUser + 15, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamUser + 15, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamUser + 15, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct GSGameplayStats_t - { - internal Result Result; // m_eResult enum EResult - internal int Rank; // m_nRank int32 - internal uint TotalConnects; // m_unTotalConnects uint32 - internal uint TotalMinutesPlayed; // m_unTotalMinutesPlayed uint32 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GSGameplayStats_t) ); - internal static GSGameplayStats_t Fill( IntPtr p ) => ((GSGameplayStats_t)(GSGameplayStats_t) Marshal.PtrToStructure( p, typeof(GSGameplayStats_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamGameServer + 7, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamGameServer + 7, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamGameServer + 7, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] - internal struct GSClientGroupStatus_t - { - internal ulong SteamIDUser; // m_SteamIDUser class CSteamID - internal ulong SteamIDGroup; // m_SteamIDGroup class CSteamID - [MarshalAs(UnmanagedType.I1)] - internal bool Member; // m_bMember _Bool - [MarshalAs(UnmanagedType.I1)] - internal bool Officer; // m_bOfficer _Bool - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GSClientGroupStatus_t) ); - internal static GSClientGroupStatus_t Fill( IntPtr p ) => ((GSClientGroupStatus_t)(GSClientGroupStatus_t) Marshal.PtrToStructure( p, typeof(GSClientGroupStatus_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamGameServer + 8, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamGameServer + 8, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamGameServer + 8, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct GSReputation_t - { - internal Result Result; // m_eResult enum EResult - internal uint ReputationScore; // m_unReputationScore uint32 - [MarshalAs(UnmanagedType.I1)] - internal bool Banned; // m_bBanned _Bool - internal uint BannedIP; // m_unBannedIP uint32 - internal ushort BannedPort; // m_usBannedPort uint16 - internal ulong BannedGameID; // m_ulBannedGameID uint64 - internal uint BanExpires; // m_unBanExpires uint32 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GSReputation_t) ); - internal static GSReputation_t Fill( IntPtr p ) => ((GSReputation_t)(GSReputation_t) Marshal.PtrToStructure( p, typeof(GSReputation_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamGameServer + 9, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamGameServer + 9, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamGameServer + 9, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct AssociateWithClanResult_t - { - internal Result Result; // m_eResult enum EResult - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(AssociateWithClanResult_t) ); - internal static AssociateWithClanResult_t Fill( IntPtr p ) => ((AssociateWithClanResult_t)(AssociateWithClanResult_t) Marshal.PtrToStructure( p, typeof(AssociateWithClanResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamGameServer + 10, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamGameServer + 10, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamGameServer + 10, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] - internal struct ComputeNewPlayerCompatibilityResult_t - { - internal Result Result; // m_eResult enum EResult - internal int CPlayersThatDontLikeCandidate; // m_cPlayersThatDontLikeCandidate int - internal int CPlayersThatCandidateDoesntLike; // m_cPlayersThatCandidateDoesntLike int - internal int CClanPlayersThatDontLikeCandidate; // m_cClanPlayersThatDontLikeCandidate int - internal ulong SteamIDCandidate; // m_SteamIDCandidate class CSteamID - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(ComputeNewPlayerCompatibilityResult_t) ); - internal static ComputeNewPlayerCompatibilityResult_t Fill( IntPtr p ) => ((ComputeNewPlayerCompatibilityResult_t)(ComputeNewPlayerCompatibilityResult_t) Marshal.PtrToStructure( p, typeof(ComputeNewPlayerCompatibilityResult_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamGameServer + 11, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamGameServer + 11, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamGameServer + 11, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] - internal struct GSStatsReceived_t - { - internal Result Result; // m_eResult enum EResult - internal ulong SteamIDUser; // m_steamIDUser class CSteamID - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GSStatsReceived_t) ); - internal static GSStatsReceived_t Fill( IntPtr p ) => ((GSStatsReceived_t)(GSStatsReceived_t) Marshal.PtrToStructure( p, typeof(GSStatsReceived_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamGameServerStats + 0, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamGameServerStats + 0, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamGameServerStats + 0, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] - internal struct GSStatsStored_t - { - internal Result Result; // m_eResult enum EResult - internal ulong SteamIDUser; // m_steamIDUser class CSteamID - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GSStatsStored_t) ); - internal static GSStatsStored_t Fill( IntPtr p ) => ((GSStatsStored_t)(GSStatsStored_t) Marshal.PtrToStructure( p, typeof(GSStatsStored_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamGameServerStats + 1, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamGameServerStats + 1, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamGameServerStats + 1, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )] - internal struct GSStatsUnloaded_t - { - internal ulong SteamIDUser; // m_steamIDUser class CSteamID - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GSStatsUnloaded_t) ); - internal static GSStatsUnloaded_t Fill( IntPtr p ) => ((GSStatsUnloaded_t)(GSStatsUnloaded_t) Marshal.PtrToStructure( p, typeof(GSStatsUnloaded_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamUserStats + 8, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamUserStats + 8, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamUserStats + 8, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct AvailableBeaconLocationsUpdated_t - { - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(AvailableBeaconLocationsUpdated_t) ); - internal static AvailableBeaconLocationsUpdated_t Fill( IntPtr p ) => ((AvailableBeaconLocationsUpdated_t)(AvailableBeaconLocationsUpdated_t) Marshal.PtrToStructure( p, typeof(AvailableBeaconLocationsUpdated_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamParties + 5, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamParties + 5, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamParties + 5, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct ActiveBeaconsUpdated_t - { - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(ActiveBeaconsUpdated_t) ); - internal static ActiveBeaconsUpdated_t Fill( IntPtr p ) => ((ActiveBeaconsUpdated_t)(ActiveBeaconsUpdated_t) Marshal.PtrToStructure( p, typeof(ActiveBeaconsUpdated_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamParties + 6, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamParties + 6, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamParties + 6, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct PlaybackStatusHasChanged_t - { - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(PlaybackStatusHasChanged_t) ); - internal static PlaybackStatusHasChanged_t Fill( IntPtr p ) => ((PlaybackStatusHasChanged_t)(PlaybackStatusHasChanged_t) Marshal.PtrToStructure( p, typeof(PlaybackStatusHasChanged_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamMusic + 1, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamMusic + 1, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamMusic + 1, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct BroadcastUploadStart_t - { - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(BroadcastUploadStart_t) ); - internal static BroadcastUploadStart_t Fill( IntPtr p ) => ((BroadcastUploadStart_t)(BroadcastUploadStart_t) Marshal.PtrToStructure( p, typeof(BroadcastUploadStart_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientVideo + 4, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientVideo + 4, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientVideo + 4, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct NewUrlLaunchParameters_t - { - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(NewUrlLaunchParameters_t) ); - internal static NewUrlLaunchParameters_t Fill( IntPtr p ) => ((NewUrlLaunchParameters_t)(NewUrlLaunchParameters_t) Marshal.PtrToStructure( p, typeof(NewUrlLaunchParameters_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamApps + 14, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamApps + 14, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamApps + 14, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct ItemInstalled_t - { - internal AppId AppID; // m_unAppID AppId_t - internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(ItemInstalled_t) ); - internal static ItemInstalled_t Fill( IntPtr p ) => ((ItemInstalled_t)(ItemInstalled_t) Marshal.PtrToStructure( p, typeof(ItemInstalled_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientUGC + 5, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientUGC + 5, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientUGC + 5, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct SteamNetConnectionStatusChangedCallback_t - { - internal Connection Conn; // m_hConn HSteamNetConnection - internal ConnectionInfo Nfo; // m_info SteamNetConnectionInfo_t - internal ConnectionState OldState; // m_eOldState ESteamNetworkingConnectionState - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamNetConnectionStatusChangedCallback_t) ); - internal static SteamNetConnectionStatusChangedCallback_t Fill( IntPtr p ) => ((SteamNetConnectionStatusChangedCallback_t)(SteamNetConnectionStatusChangedCallback_t) Marshal.PtrToStructure( p, typeof(SteamNetConnectionStatusChangedCallback_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamNetworkingSockets + 1, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamNetworkingSockets + 1, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamNetworkingSockets + 1, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct SteamInventoryDefinitionUpdate_t - { - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamInventoryDefinitionUpdate_t) ); - internal static SteamInventoryDefinitionUpdate_t Fill( IntPtr p ) => ((SteamInventoryDefinitionUpdate_t)(SteamInventoryDefinitionUpdate_t) Marshal.PtrToStructure( p, typeof(SteamInventoryDefinitionUpdate_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.ClientInventory + 2, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.ClientInventory + 2, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.ClientInventory + 2, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct SteamParentalSettingsChanged_t - { - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamParentalSettingsChanged_t) ); - internal static SteamParentalSettingsChanged_t Fill( IntPtr p ) => ((SteamParentalSettingsChanged_t)(SteamParentalSettingsChanged_t) Marshal.PtrToStructure( p, typeof(SteamParentalSettingsChanged_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamParentalSettings + 1, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamParentalSettings + 1, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamParentalSettings + 1, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct SteamServersConnected_t - { - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamServersConnected_t) ); - internal static SteamServersConnected_t Fill( IntPtr p ) => ((SteamServersConnected_t)(SteamServersConnected_t) Marshal.PtrToStructure( p, typeof(SteamServersConnected_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamUser + 1, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamUser + 1, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamUser + 1, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct NewLaunchQueryParameters_t - { - - #region Marshalling - internal static NewLaunchQueryParameters_t Fill( IntPtr p ) => ((NewLaunchQueryParameters_t)(NewLaunchQueryParameters_t) Marshal.PtrToStructure( p, typeof(NewLaunchQueryParameters_t) ) ); - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct GCMessageAvailable_t - { - internal uint MessageSize; // m_nMessageSize uint32 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GCMessageAvailable_t) ); - internal static GCMessageAvailable_t Fill( IntPtr p ) => ((GCMessageAvailable_t)(GCMessageAvailable_t) Marshal.PtrToStructure( p, typeof(GCMessageAvailable_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamGameCoordinator + 1, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamGameCoordinator + 1, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamGameCoordinator + 1, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct GCMessageFailed_t - { - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(GCMessageFailed_t) ); - internal static GCMessageFailed_t Fill( IntPtr p ) => ((GCMessageFailed_t)(GCMessageFailed_t) Marshal.PtrToStructure( p, typeof(GCMessageFailed_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamGameCoordinator + 2, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamGameCoordinator + 2, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamGameCoordinator + 2, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct ScreenshotRequested_t - { - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(ScreenshotRequested_t) ); - internal static ScreenshotRequested_t Fill( IntPtr p ) => ((ScreenshotRequested_t)(ScreenshotRequested_t) Marshal.PtrToStructure( p, typeof(ScreenshotRequested_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamScreenshots + 2, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamScreenshots + 2, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamScreenshots + 2, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct LicensesUpdated_t - { - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(LicensesUpdated_t) ); - internal static LicensesUpdated_t Fill( IntPtr p ) => ((LicensesUpdated_t)(LicensesUpdated_t) Marshal.PtrToStructure( p, typeof(LicensesUpdated_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamUser + 25, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamUser + 25, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamUser + 25, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct SteamShutdown_t - { - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(SteamShutdown_t) ); - internal static SteamShutdown_t Fill( IntPtr p ) => ((SteamShutdown_t)(SteamShutdown_t) Marshal.PtrToStructure( p, typeof(SteamShutdown_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamUtils + 4, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamUtils + 4, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamUtils + 4, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct IPCountry_t - { - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(IPCountry_t) ); - internal static IPCountry_t Fill( IntPtr p ) => ((IPCountry_t)(IPCountry_t) Marshal.PtrToStructure( p, typeof(IPCountry_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamUtils + 1, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamUtils + 1, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamUtils + 1, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion - } - - [StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )] - internal struct IPCFailure_t - { - internal byte FailureType; // m_eFailureType uint8 - - #region SteamCallback - internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(IPCFailure_t) ); - internal static IPCFailure_t Fill( IntPtr p ) => ((IPCFailure_t)(IPCFailure_t) Marshal.PtrToStructure( p, typeof(IPCFailure_t) ) ); - - static Action actionClient; - [MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) ); - static Action actionServer; - [MonoPInvokeCallback] static void OnServer( IntPtr thisptr, IntPtr pvParam ) => actionServer?.Invoke( Fill( pvParam ) ); - public static void Install( Action action, bool server = false ) - { - if ( server ) - { - Event.Register( OnServer, StructSize, CallbackIdentifiers.SteamUser + 17, true ); - actionServer = action; - } - else - { - Event.Register( OnClient, StructSize, CallbackIdentifiers.SteamUser + 17, false ); - actionClient = action; - } - } - public static async Task GetResultAsync( SteamAPICall_t handle ) - { - bool failed = false; - - while ( !SteamUtils.IsCallComplete( handle, out failed ) ) - { - await Task.Delay( 1 ); - if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null; - } - if ( failed ) return null; - - var ptr = Marshal.AllocHGlobal( StructSize ); - - try - { - if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, CallbackIdentifiers.SteamUser + 17, ref failed ) || failed ) - return null; - - return Fill( ptr ); - } - finally - { - Marshal.FreeHGlobal( ptr ); - } - } - #endregion } } diff --git a/Facepunch.Steamworks/Generated/SteamTypes.cs b/Facepunch.Steamworks/Generated/SteamTypes.cs index 1ccf33b..44f5be6 100644 --- a/Facepunch.Steamworks/Generated/SteamTypes.cs +++ b/Facepunch.Steamworks/Generated/SteamTypes.cs @@ -8,6 +8,7 @@ namespace Steamworks.Data { internal struct GID_t : IEquatable, IComparable { + // Name: GID_t, Type: unsigned long long public ulong Value; public static implicit operator GID_t( ulong value ) => new GID_t(){ Value = value }; @@ -23,6 +24,7 @@ namespace Steamworks.Data internal struct JobID_t : IEquatable, IComparable { + // Name: JobID_t, Type: unsigned long long public ulong Value; public static implicit operator JobID_t( ulong value ) => new JobID_t(){ Value = value }; @@ -38,10 +40,11 @@ namespace Steamworks.Data internal struct TxnID_t : IEquatable, IComparable { - public GID_t Value; + // Name: TxnID_t, Type: unsigned long long + public ulong Value; - public static implicit operator TxnID_t( GID_t value ) => new TxnID_t(){ Value = value }; - public static implicit operator GID_t( TxnID_t value ) => value.Value; + public static implicit operator TxnID_t( ulong value ) => new TxnID_t(){ Value = value }; + public static implicit operator ulong( TxnID_t value ) => value.Value; public override string ToString() => Value.ToString(); public override int GetHashCode() => Value.GetHashCode(); public override bool Equals( object p ) => this.Equals( (TxnID_t) p ); @@ -53,6 +56,7 @@ namespace Steamworks.Data internal struct PackageId_t : IEquatable, IComparable { + // Name: PackageId_t, Type: unsigned int public uint Value; public static implicit operator PackageId_t( uint value ) => new PackageId_t(){ Value = value }; @@ -68,6 +72,7 @@ namespace Steamworks.Data internal struct BundleId_t : IEquatable, IComparable { + // Name: BundleId_t, Type: unsigned int public uint Value; public static implicit operator BundleId_t( uint value ) => new BundleId_t(){ Value = value }; @@ -83,6 +88,7 @@ namespace Steamworks.Data internal struct AssetClassId_t : IEquatable, IComparable { + // Name: AssetClassId_t, Type: unsigned long long public ulong Value; public static implicit operator AssetClassId_t( ulong value ) => new AssetClassId_t(){ Value = value }; @@ -98,6 +104,7 @@ namespace Steamworks.Data internal struct PhysicalItemId_t : IEquatable, IComparable { + // Name: PhysicalItemId_t, Type: unsigned int public uint Value; public static implicit operator PhysicalItemId_t( uint value ) => new PhysicalItemId_t(){ Value = value }; @@ -113,6 +120,7 @@ namespace Steamworks.Data internal struct DepotId_t : IEquatable, IComparable { + // Name: DepotId_t, Type: unsigned int public uint Value; public static implicit operator DepotId_t( uint value ) => new DepotId_t(){ Value = value }; @@ -128,6 +136,7 @@ namespace Steamworks.Data internal struct RTime32 : IEquatable, IComparable { + // Name: RTime32, Type: unsigned int public uint Value; public static implicit operator RTime32( uint value ) => new RTime32(){ Value = value }; @@ -143,6 +152,7 @@ namespace Steamworks.Data internal struct CellID_t : IEquatable, IComparable { + // Name: CellID_t, Type: unsigned int public uint Value; public static implicit operator CellID_t( uint value ) => new CellID_t(){ Value = value }; @@ -158,6 +168,7 @@ namespace Steamworks.Data internal struct SteamAPICall_t : IEquatable, IComparable { + // Name: SteamAPICall_t, Type: unsigned long long public ulong Value; public static implicit operator SteamAPICall_t( ulong value ) => new SteamAPICall_t(){ Value = value }; @@ -173,6 +184,7 @@ namespace Steamworks.Data internal struct AccountID_t : IEquatable, IComparable { + // Name: AccountID_t, Type: unsigned int public uint Value; public static implicit operator AccountID_t( uint value ) => new AccountID_t(){ Value = value }; @@ -188,6 +200,7 @@ namespace Steamworks.Data internal struct PartnerId_t : IEquatable, IComparable { + // Name: PartnerId_t, Type: unsigned int public uint Value; public static implicit operator PartnerId_t( uint value ) => new PartnerId_t(){ Value = value }; @@ -203,6 +216,7 @@ namespace Steamworks.Data internal struct ManifestId_t : IEquatable, IComparable { + // Name: ManifestId_t, Type: unsigned long long public ulong Value; public static implicit operator ManifestId_t( ulong value ) => new ManifestId_t(){ Value = value }; @@ -218,6 +232,7 @@ namespace Steamworks.Data internal struct SiteId_t : IEquatable, IComparable { + // Name: SiteId_t, Type: unsigned long long public ulong Value; public static implicit operator SiteId_t( ulong value ) => new SiteId_t(){ Value = value }; @@ -233,6 +248,7 @@ namespace Steamworks.Data internal struct PartyBeaconID_t : IEquatable, IComparable { + // Name: PartyBeaconID_t, Type: unsigned long long public ulong Value; public static implicit operator PartyBeaconID_t( ulong value ) => new PartyBeaconID_t(){ Value = value }; @@ -248,6 +264,7 @@ namespace Steamworks.Data internal struct HAuthTicket : IEquatable, IComparable { + // Name: HAuthTicket, Type: unsigned int public uint Value; public static implicit operator HAuthTicket( uint value ) => new HAuthTicket(){ Value = value }; @@ -263,6 +280,7 @@ namespace Steamworks.Data internal struct BREAKPAD_HANDLE : IEquatable, IComparable { + // Name: BREAKPAD_HANDLE, Type: void * public IntPtr Value; public static implicit operator BREAKPAD_HANDLE( IntPtr value ) => new BREAKPAD_HANDLE(){ Value = value }; @@ -278,6 +296,7 @@ namespace Steamworks.Data internal struct HSteamPipe : IEquatable, IComparable { + // Name: HSteamPipe, Type: int public int Value; public static implicit operator HSteamPipe( int value ) => new HSteamPipe(){ Value = value }; @@ -293,6 +312,7 @@ namespace Steamworks.Data internal struct HSteamUser : IEquatable, IComparable { + // Name: HSteamUser, Type: int public int Value; public static implicit operator HSteamUser( int value ) => new HSteamUser(){ Value = value }; @@ -308,6 +328,7 @@ namespace Steamworks.Data internal struct FriendsGroupID_t : IEquatable, IComparable { + // Name: FriendsGroupID_t, Type: short public short Value; public static implicit operator FriendsGroupID_t( short value ) => new FriendsGroupID_t(){ Value = value }; @@ -323,6 +344,7 @@ namespace Steamworks.Data internal struct HServerListRequest : IEquatable, IComparable { + // Name: HServerListRequest, Type: void * public IntPtr Value; public static implicit operator HServerListRequest( IntPtr value ) => new HServerListRequest(){ Value = value }; @@ -338,6 +360,7 @@ namespace Steamworks.Data internal struct HServerQuery : IEquatable, IComparable { + // Name: HServerQuery, Type: int public int Value; public static implicit operator HServerQuery( int value ) => new HServerQuery(){ Value = value }; @@ -353,6 +376,7 @@ namespace Steamworks.Data internal struct UGCHandle_t : IEquatable, IComparable { + // Name: UGCHandle_t, Type: unsigned long long public ulong Value; public static implicit operator UGCHandle_t( ulong value ) => new UGCHandle_t(){ Value = value }; @@ -368,6 +392,7 @@ namespace Steamworks.Data internal struct PublishedFileUpdateHandle_t : IEquatable, IComparable { + // Name: PublishedFileUpdateHandle_t, Type: unsigned long long public ulong Value; public static implicit operator PublishedFileUpdateHandle_t( ulong value ) => new PublishedFileUpdateHandle_t(){ Value = value }; @@ -383,6 +408,7 @@ namespace Steamworks.Data public struct PublishedFileId : IEquatable, IComparable { + // Name: PublishedFileId_t, Type: unsigned long long public ulong Value; public static implicit operator PublishedFileId( ulong value ) => new PublishedFileId(){ Value = value }; @@ -398,6 +424,7 @@ namespace Steamworks.Data internal struct UGCFileWriteStreamHandle_t : IEquatable, IComparable { + // Name: UGCFileWriteStreamHandle_t, Type: unsigned long long public ulong Value; public static implicit operator UGCFileWriteStreamHandle_t( ulong value ) => new UGCFileWriteStreamHandle_t(){ Value = value }; @@ -413,6 +440,7 @@ namespace Steamworks.Data internal struct SteamLeaderboard_t : IEquatable, IComparable { + // Name: SteamLeaderboard_t, Type: unsigned long long public ulong Value; public static implicit operator SteamLeaderboard_t( ulong value ) => new SteamLeaderboard_t(){ Value = value }; @@ -428,6 +456,7 @@ namespace Steamworks.Data internal struct SteamLeaderboardEntries_t : IEquatable, IComparable { + // Name: SteamLeaderboardEntries_t, Type: unsigned long long public ulong Value; public static implicit operator SteamLeaderboardEntries_t( ulong value ) => new SteamLeaderboardEntries_t(){ Value = value }; @@ -443,6 +472,7 @@ namespace Steamworks.Data internal struct SNetSocket_t : IEquatable, IComparable { + // Name: SNetSocket_t, Type: unsigned int public uint Value; public static implicit operator SNetSocket_t( uint value ) => new SNetSocket_t(){ Value = value }; @@ -458,6 +488,7 @@ namespace Steamworks.Data internal struct SNetListenSocket_t : IEquatable, IComparable { + // Name: SNetListenSocket_t, Type: unsigned int public uint Value; public static implicit operator SNetListenSocket_t( uint value ) => new SNetListenSocket_t(){ Value = value }; @@ -473,6 +504,7 @@ namespace Steamworks.Data internal struct ScreenshotHandle : IEquatable, IComparable { + // Name: ScreenshotHandle, Type: unsigned int public uint Value; public static implicit operator ScreenshotHandle( uint value ) => new ScreenshotHandle(){ Value = value }; @@ -488,6 +520,7 @@ namespace Steamworks.Data internal struct HTTPRequestHandle : IEquatable, IComparable { + // Name: HTTPRequestHandle, Type: unsigned int public uint Value; public static implicit operator HTTPRequestHandle( uint value ) => new HTTPRequestHandle(){ Value = value }; @@ -503,6 +536,7 @@ namespace Steamworks.Data internal struct HTTPCookieContainerHandle : IEquatable, IComparable { + // Name: HTTPCookieContainerHandle, Type: unsigned int public uint Value; public static implicit operator HTTPCookieContainerHandle( uint value ) => new HTTPCookieContainerHandle(){ Value = value }; @@ -518,6 +552,7 @@ namespace Steamworks.Data internal struct InputHandle_t : IEquatable, IComparable { + // Name: InputHandle_t, Type: unsigned long long public ulong Value; public static implicit operator InputHandle_t( ulong value ) => new InputHandle_t(){ Value = value }; @@ -533,6 +568,7 @@ namespace Steamworks.Data internal struct InputActionSetHandle_t : IEquatable, IComparable { + // Name: InputActionSetHandle_t, Type: unsigned long long public ulong Value; public static implicit operator InputActionSetHandle_t( ulong value ) => new InputActionSetHandle_t(){ Value = value }; @@ -548,6 +584,7 @@ namespace Steamworks.Data internal struct InputDigitalActionHandle_t : IEquatable, IComparable { + // Name: InputDigitalActionHandle_t, Type: unsigned long long public ulong Value; public static implicit operator InputDigitalActionHandle_t( ulong value ) => new InputDigitalActionHandle_t(){ Value = value }; @@ -563,6 +600,7 @@ namespace Steamworks.Data internal struct InputAnalogActionHandle_t : IEquatable, IComparable { + // Name: InputAnalogActionHandle_t, Type: unsigned long long public ulong Value; public static implicit operator InputAnalogActionHandle_t( ulong value ) => new InputAnalogActionHandle_t(){ Value = value }; @@ -578,6 +616,7 @@ namespace Steamworks.Data internal struct ControllerHandle_t : IEquatable, IComparable { + // Name: ControllerHandle_t, Type: unsigned long long public ulong Value; public static implicit operator ControllerHandle_t( ulong value ) => new ControllerHandle_t(){ Value = value }; @@ -593,6 +632,7 @@ namespace Steamworks.Data internal struct ControllerActionSetHandle_t : IEquatable, IComparable { + // Name: ControllerActionSetHandle_t, Type: unsigned long long public ulong Value; public static implicit operator ControllerActionSetHandle_t( ulong value ) => new ControllerActionSetHandle_t(){ Value = value }; @@ -608,6 +648,7 @@ namespace Steamworks.Data internal struct ControllerDigitalActionHandle_t : IEquatable, IComparable { + // Name: ControllerDigitalActionHandle_t, Type: unsigned long long public ulong Value; public static implicit operator ControllerDigitalActionHandle_t( ulong value ) => new ControllerDigitalActionHandle_t(){ Value = value }; @@ -623,6 +664,7 @@ namespace Steamworks.Data internal struct ControllerAnalogActionHandle_t : IEquatable, IComparable { + // Name: ControllerAnalogActionHandle_t, Type: unsigned long long public ulong Value; public static implicit operator ControllerAnalogActionHandle_t( ulong value ) => new ControllerAnalogActionHandle_t(){ Value = value }; @@ -638,6 +680,7 @@ namespace Steamworks.Data internal struct UGCQueryHandle_t : IEquatable, IComparable { + // Name: UGCQueryHandle_t, Type: unsigned long long public ulong Value; public static implicit operator UGCQueryHandle_t( ulong value ) => new UGCQueryHandle_t(){ Value = value }; @@ -653,6 +696,7 @@ namespace Steamworks.Data internal struct UGCUpdateHandle_t : IEquatable, IComparable { + // Name: UGCUpdateHandle_t, Type: unsigned long long public ulong Value; public static implicit operator UGCUpdateHandle_t( ulong value ) => new UGCUpdateHandle_t(){ Value = value }; @@ -668,6 +712,7 @@ namespace Steamworks.Data internal struct HHTMLBrowser : IEquatable, IComparable { + // Name: HHTMLBrowser, Type: unsigned int public uint Value; public static implicit operator HHTMLBrowser( uint value ) => new HHTMLBrowser(){ Value = value }; @@ -683,6 +728,7 @@ namespace Steamworks.Data public struct InventoryItemId : IEquatable, IComparable { + // Name: SteamItemInstanceID_t, Type: unsigned long long public ulong Value; public static implicit operator InventoryItemId( ulong value ) => new InventoryItemId(){ Value = value }; @@ -698,6 +744,7 @@ namespace Steamworks.Data public struct InventoryDefId : IEquatable, IComparable { + // Name: SteamItemDef_t, Type: int public int Value; public static implicit operator InventoryDefId( int value ) => new InventoryDefId(){ Value = value }; @@ -713,6 +760,7 @@ namespace Steamworks.Data internal struct SteamInventoryResult_t : IEquatable, IComparable { + // Name: SteamInventoryResult_t, Type: int public int Value; public static implicit operator SteamInventoryResult_t( int value ) => new SteamInventoryResult_t(){ Value = value }; @@ -728,6 +776,7 @@ namespace Steamworks.Data internal struct SteamInventoryUpdateHandle_t : IEquatable, IComparable { + // Name: SteamInventoryUpdateHandle_t, Type: unsigned long long public ulong Value; public static implicit operator SteamInventoryUpdateHandle_t( ulong value ) => new SteamInventoryUpdateHandle_t(){ Value = value }; @@ -741,4 +790,52 @@ namespace Steamworks.Data public int CompareTo( SteamInventoryUpdateHandle_t other ) => Value.CompareTo( other.Value ); } + internal struct RemotePlaySessionID_t : IEquatable, IComparable + { + // Name: RemotePlaySessionID_t, Type: unsigned int + public uint Value; + + public static implicit operator RemotePlaySessionID_t( uint value ) => new RemotePlaySessionID_t(){ Value = value }; + public static implicit operator uint( RemotePlaySessionID_t value ) => value.Value; + public override string ToString() => Value.ToString(); + public override int GetHashCode() => Value.GetHashCode(); + public override bool Equals( object p ) => this.Equals( (RemotePlaySessionID_t) p ); + public bool Equals( RemotePlaySessionID_t p ) => p.Value == Value; + public static bool operator ==( RemotePlaySessionID_t a, RemotePlaySessionID_t b ) => a.Equals( b ); + public static bool operator !=( RemotePlaySessionID_t a, RemotePlaySessionID_t b ) => !a.Equals( b ); + public int CompareTo( RemotePlaySessionID_t other ) => Value.CompareTo( other.Value ); + } + + internal struct HSteamNetPollGroup : IEquatable, IComparable + { + // Name: HSteamNetPollGroup, Type: unsigned int + public uint Value; + + public static implicit operator HSteamNetPollGroup( uint value ) => new HSteamNetPollGroup(){ Value = value }; + public static implicit operator uint( HSteamNetPollGroup value ) => value.Value; + public override string ToString() => Value.ToString(); + public override int GetHashCode() => Value.GetHashCode(); + public override bool Equals( object p ) => this.Equals( (HSteamNetPollGroup) p ); + public bool Equals( HSteamNetPollGroup p ) => p.Value == Value; + public static bool operator ==( HSteamNetPollGroup a, HSteamNetPollGroup b ) => a.Equals( b ); + public static bool operator !=( HSteamNetPollGroup a, HSteamNetPollGroup b ) => !a.Equals( b ); + public int CompareTo( HSteamNetPollGroup other ) => Value.CompareTo( other.Value ); + } + + internal struct SteamNetworkingPOPID : IEquatable, IComparable + { + // Name: SteamNetworkingPOPID, Type: unsigned int + public uint Value; + + public static implicit operator SteamNetworkingPOPID( uint value ) => new SteamNetworkingPOPID(){ Value = value }; + public static implicit operator uint( SteamNetworkingPOPID value ) => value.Value; + public override string ToString() => Value.ToString(); + public override int GetHashCode() => Value.GetHashCode(); + public override bool Equals( object p ) => this.Equals( (SteamNetworkingPOPID) p ); + public bool Equals( SteamNetworkingPOPID p ) => p.Value == Value; + public static bool operator ==( SteamNetworkingPOPID a, SteamNetworkingPOPID b ) => a.Equals( b ); + public static bool operator !=( SteamNetworkingPOPID a, SteamNetworkingPOPID b ) => !a.Equals( b ); + public int CompareTo( SteamNetworkingPOPID other ) => Value.CompareTo( other.Value ); + } + }